@aeternity/aepp-sdk 14.1.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aepp-sdk.browser-script.cjs +1 -1
- package/dist/aepp-sdk.browser-script.cjs.map +1 -1
- package/dist/aepp-sdk.browser.cjs +1 -1
- package/dist/aepp-sdk.browser.cjs.map +1 -1
- package/dist/aepp-sdk.cjs +10776 -6350
- package/dist/aepp-sdk.cjs.map +1 -1
- package/es/account/Base.d.ts +6 -1
- package/es/account/Base.js.map +1 -1
- package/es/account/Generalized.d.ts +1 -1
- package/es/account/Generalized.js +7 -1
- package/es/account/Generalized.js.map +1 -1
- package/es/aens.d.ts +10 -2
- package/es/aens.js +10 -2
- package/es/aens.js.map +1 -1
- package/es/apis/middleware/models/index.js.map +1 -1
- package/es/apis/node/models/index.d.ts +405 -79
- package/es/apis/node/models/index.js.map +1 -1
- package/es/apis/node/models/mappers.d.ts +54 -4
- package/es/apis/node/models/mappers.js +1910 -500
- package/es/apis/node/models/mappers.js.map +1 -1
- package/es/apis/node/node.d.ts +28 -6
- package/es/apis/node/node.js +276 -5
- package/es/apis/node/node.js.map +1 -1
- package/es/channel/Contract.d.ts +5 -0
- package/es/channel/Contract.js +8 -2
- package/es/channel/Contract.js.map +1 -1
- package/es/channel/handlers.js +3 -3
- package/es/channel/handlers.js.map +1 -1
- package/es/contract/compiler/Cli.js +6 -2
- package/es/contract/compiler/Cli.js.map +1 -1
- package/es/contract/ga.d.ts +5 -2
- package/es/contract/ga.js +53 -21
- package/es/contract/ga.js.map +1 -1
- package/es/index-browser.d.ts +3 -1
- package/es/index-browser.js +2 -1
- package/es/index-browser.js.map +1 -1
- package/es/tx/builder/constants.d.ts +12 -2
- package/es/tx/builder/constants.js +11 -1
- package/es/tx/builder/constants.js.map +1 -1
- package/es/tx/builder/entry/index.js +6 -0
- package/es/tx/builder/entry/index.js.map +1 -1
- package/es/tx/builder/entry/schema.d.ts +10 -10
- package/es/tx/builder/field-types/ct-version.d.ts +14 -0
- package/es/tx/builder/field-types/ct-version.js +14 -0
- package/es/tx/builder/field-types/ct-version.js.map +1 -1
- package/es/tx/builder/field-types/fee.d.ts +9 -7
- package/es/tx/builder/field-types/fee.js +75 -66
- package/es/tx/builder/field-types/fee.js.map +1 -1
- package/es/tx/builder/field-types/gas-limit.d.ts +5 -3
- package/es/tx/builder/field-types/gas-limit.js +25 -14
- package/es/tx/builder/field-types/gas-limit.js.map +1 -1
- package/es/tx/builder/field-types/gas-price.d.ts +6 -4
- package/es/tx/builder/field-types/gas-price.js +87 -21
- package/es/tx/builder/field-types/gas-price.js.map +1 -1
- package/es/tx/builder/field-types/interface.d.ts +20 -0
- package/es/tx/builder/field-types/interface.js +17 -1
- package/es/tx/builder/field-types/interface.js.map +1 -1
- package/es/tx/builder/field-types/name-fee.d.ts +3 -2
- package/es/tx/builder/field-types/name-fee.js +6 -0
- package/es/tx/builder/field-types/name-fee.js.map +1 -1
- package/es/tx/builder/field-types/pointers.d.ts +2 -1
- package/es/tx/builder/field-types/pointers.js +6 -2
- package/es/tx/builder/field-types/pointers.js.map +1 -1
- package/es/tx/builder/field-types/transaction.d.ts +4 -1
- package/es/tx/builder/field-types/transaction.js +18 -3
- package/es/tx/builder/field-types/transaction.js.map +1 -1
- package/es/tx/builder/field-types/ttl.d.ts +1 -2
- package/es/tx/builder/field-types/ttl.js +7 -4
- package/es/tx/builder/field-types/ttl.js.map +1 -1
- package/es/tx/builder/field-types/with-formatting.d.ts +1 -1
- package/es/tx/builder/field-types/with-formatting.js +1 -1
- package/es/tx/builder/field-types/with-formatting.js.map +1 -1
- package/es/tx/builder/index.d.ts +13 -0
- package/es/tx/builder/index.js +92 -5
- package/es/tx/builder/index.js.map +1 -1
- package/es/tx/builder/protocol-parameters.d.ts +123 -0
- package/es/tx/builder/protocol-parameters.js +519 -0
- package/es/tx/builder/protocol-parameters.js.map +1 -0
- package/es/tx/builder/schema.d.ts +179 -201
- package/es/tx/builder/schema.js +5 -1
- package/es/tx/builder/schema.js.map +1 -1
- package/es/tx/execution-cost.js +5 -5
- package/es/tx/execution-cost.js.map +1 -1
- package/es/tx/transaction-signer.js +2 -2
- package/es/tx/transaction-signer.js.map +1 -1
- package/es/tx/validator.js +4 -4
- package/es/tx/validator.js.map +1 -1
- package/es/utils/wrap-proxy.d.ts +10 -0
- package/es/utils/wrap-proxy.js +18 -0
- package/es/utils/wrap-proxy.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see aepp-sdk.browser-script.cjs.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},160:function(e,t,n){"use strict";var r=n(3948),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(e)}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),d=n(1626),p=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",C="entries",S=function(){return this};e.exports=function(e,t,n,s,h,y,T){c(n,t,s);var P,A,z,I=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||I(h),k="Array"===t&&q.entries||R;if(k&&(P=u(k.call(new e)))!==Object.prototype&&P.next&&(i||u(P)===w||(l?l(P,w):o(P[b])||p(P,b,S)),m(P,E,!0,!0),i&&(f[E]=S)),g&&h===_&&R&&R.name!==_&&(!i&&N?d(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(A={values:I(_),keys:y?O:I(x),entries:I(C)},T)for(z in A)(v||M||!(z in q))&&p(q,z,A[z]);else r({target:t,proto:!0,forced:v||M},A);return i&&!T||q[b]===O||p(q,b,O,{name:h}),f[t]=O,A}},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(d=1,c=new Array(m-1);d<m;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,d=n?-1:1,p=e[t+m];for(m+=d,i=p&(1<<-l)-1,p>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?d/c:d*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+p]=255&o,p+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*f}},359:function(e,t,n){"use strict";n(366)("replaceAll")},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.f(e)})}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},392:function(e,t,n){var r=n(2861).Buffer;function a(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}a.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,a=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%a,u=Math.min(i-o,a-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%a==0&&this._update(n)}return this._len+=i,this},a.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 n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=a},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,d=7===e,p=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),C=0,S=g||c,T=t?S(h,x):n||d?S(h,0):void 0;x>C;C++)if((p||C in b)&&(w=_(N=b[C],C,v),e))if(t)T[C]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return C;case 2:u(T,N)}else switch(e){case 4:return!1;case 7:u(T,N)}return m?-1:a||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},751:function(e,t,n){"use strict";var r=n(1091),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(u,e))return u[e]}})},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:d(i(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function m(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const a=e[t];n.set(a,r),r+=a.length}return n}function p(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:m,utf8ToBytes:p};const g={encode:n,decode:s};t.default=g},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),d=n(9724);n(6128);var p=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,C=e.proto,S=x?r:_?r[b]:r[b]&&r[b].prototype,T=x?u:u[b]||m(u,b,{})[b],P=T.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&S&&d(S,f),g=T[f],a&&(N=e.dontCallGetSet?(v=o(S,f))&&v.value:S[f]),y=a&&N?N:t[f],(n||C||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?p(y):C&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(T,f,w),C&&(d(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&P&&(n||!P[f])&&m(P,f,y)))}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},1281:function(){},1372:function(e,t,n){"use strict";n(366)("metadata")},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),d=a(n),p=m.length;return d<0||d>=p?e?"":void 0:(r=c(m,d))<55296||r>56319||d+1===p||(l=c(m,d+1))<56320||l>57343?e?o(m,d):r:e?u(m,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/m)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,C,S,T,P,A,z,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,$=1,G=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,p,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,p=e;p>=10;p/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(p=y.search(/e/i))>0?(l<0&&(l=p),l+=+y.slice(p+1),y=y.substring(0,p)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=p=0,f=y.length;p<f;p++)if(n.indexOf(s=y.charAt(p))<0){if("."==s){if(p>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,p=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(p=0;48===y.charCodeAt(p);p++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(p,++f)){if(f-=p,h&&j.DEBUG&&f>15&&(e>d||e!==o(e)))throw Error(u+g.s*e);if((l=l-p-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],p=(l+1)%m,l<0&&(p+=m),p<f){for(p&&g.c.push(+y.slice(0,p)),f-=m;p<f;)g.c.push(+y.slice(p,p+=m));p=m-(y=y.slice(p)).length}else p-=f;for(;p--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,d,h,f,y=e.c,g=p;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,d=y[h=0],f=o(d/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));d=f=0,a=1,c=(i%=m)-m+1}else{for(d=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(d/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?d:d%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?d/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(d/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),G=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:$,POW_PRECISION:G,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(_=9007199254740992,C=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],d=new j(E);if(null==e?e=M:w(e,0,f),a=s(e/m),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!U)for(;u<a;)(i=C())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=p[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return d.e=r,d.c=l,d}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,d,p,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=G,G=0,r=r.replace(".",""),p=(f=new j(a)).pow(r.length-y),G=m,f.c=t(x(g(p.c),p.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=s,h=(p=n(p,f,N,w,i)).c,d=p.r,l=p.e),y=h[u=l+N+1],m=i/2,d=d||u<0||null!=h[u+1],d=w<4?(null!=y||d)&&(0==w||w==(p.s<0?3:2)):y>m||y==m&&(4==w||d||6==w&&1&h[u-1]||w==(p.s<0?8:7)),u<1||!h[0])r=d?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,d,p,h,f,g,N,w,v,b,x,_,C,S,T,P,A,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(d=r.e-a.e)+1,c||(c=l,d=y(r.e/m)-y(a.e/m),z=z/m|0),p=0;E[p]==(I[p]||0);p++);if(E[p]>(I[p]||0)&&d--,z<0)v.push(1),h=!0;else{for(S=I.length,P=E.length,p=0,z+=2,(f=o(c/(E[0]+1)))>1&&(E=e(E,f,c),I=e(I,f,c),P=E.length,S=I.length),C=P,x=(b=I.slice(0,P)).length;x<P;b[x++]=0);A=E.slice(),A=[0].concat(A),T=E[0],E[1]>=c/2&&T++;do{if(f=0,(u=t(E,b,P,x))<0){if(_=b[0],P!=x&&(_=_*c+(b[1]||0)),(f=o(_/T))>1)for(f>=c&&(f=c-1),N=(g=e(E,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,P<N?A:E,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=E.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(E,b,P,x)<1;)f++,n(b,P<x?A:E,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[p++]=f,b[0]?b[x++]=I[C]||0:(b=[I[C]],x=1)}while((C++<S||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,z=v[0];z>=10;z/=10,p++);W(w,i+(w.e=p+d*m-1)+1,s,h)}else w.e=d,w.r=+h;return w}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(A.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(S,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(T,"$1").replace(P,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return N(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,u,l,d,p,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);G&&(i=s(G/m+2))}for(u?(n=new j(.5),l&&(e.s=1),d=v(e)):d=(a=Math.abs(+K(e)))%2,p=new j(E);;){if(d){if(!(p=p.times(h)).c)break;i?p.c.length>i&&(p.c.length=i):r&&(p=p.mod(t))}if(a){if(0===(a=o(a/2)))break;d=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)d=v(e);else{if(0==(a=+K(e)))break;d=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?p:(l&&(p=E.div(p)),t?p.mod(t):i?W(p,G,q,void 0):p)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===N(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return N(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return N(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=N(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,d=s.c,p=e.c;if(!c||!u){if(!d||!p)return d?(e.s=-t,e):new j(p?s:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new j(d[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),d=d.slice(),o=c-u){for((i=o<0)?(o=-o,a=d):(u=c,a=p),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=d.length)<(t=p.length))?o:t,o=t=0;t<r;t++)if(d[t]!=p[t]){i=d[t]<p[t];break}if(i&&(a=d,d=p,p=a,e.s=-e.s),(t=(r=p.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=l-1;r>o;){if(d[--r]<p[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=p[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?J(e,d,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,d,p,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(p=_.length)&&(N=x,x=_,_=N,a=c,c=p,p=a),a=c+p,N=[];a--;N.push(0));for(w=l,v=h,a=p;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(d=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*d,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],d=s[1],p=a.s<0,h=p?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),p&&(m="-"+m)}r=d?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):m}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,u,l,d,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(E)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(E),d=r=new j(E),a=l=new j(E),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=p[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:d:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,d=l.plus(h.times(i=d)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(d)),r=r.plus(i.times(a)),l.s=d.s=N.s,f=n(d,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[d,a]:[l,r],B=o,f},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&w(e,1,f),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},1626:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},1660:function(e,t,n){"use strict";n(366)("species")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.sham=!0)},2046:function(e){"use strict";e.exports={}},2156:function(e){"use strict";e.exports=function(){}},2159:function(e,t,n){"use strict";var r=n(2250),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},2230:function(e,t,n){"use strict";n(366)("replace")},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.Array},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},2596:function(e,t,n){"use strict";n(366)("hasInstance")},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},3045:function(e,t,n){"use strict";var r=n(1907),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},3121:function(e,t,n){"use strict";var r=n(5482),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("Symbol")(t);return u[t]=n,l[n]=t,n}})},3325:function(e,t,n){"use strict";n(366)("unscopables")},3377:function(e,t,n){"use strict";n(366)("matchAll")},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},3643:function(){},3648:function(e,t,n){"use strict";var r=n(9447),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},3669:function(e,t,n){"use strict";var r=n(366),a=n(3467);r("toPrimitive"),a()},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),d=n(8280),p=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),C=n(4284),S=n(2220),T=n(2574),P=n(8055),A=n(9251),z=n(5816),I=n(2522),E=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),U=n(4932),$=n(726).forEach,G=I("hidden"),V="Symbol",D="prototype",L=U.set,j=U.getterFor(V),F=Object[D],H=a.Symbol,J=H&&H[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,X=C.f,Z=b.f,ee=T.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(F,t);r&&delete F[t],X(e,t,n),r&&e!==F&&X(F,t,r)},oe=c&&l((function(){return 7!==N(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===F&&ue(re,t,n),p(e);var r=f(t);return p(n),m(ne,r)?(n.enumerable?(m(e,G)&&e[G][r]&&(e[G][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,G)||X(e,G,g(1,N(null))),e[G][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){p(e);var n=h(t),r=w(n).concat(he(n));return $(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===F&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,G)&&this[G][t])||n)},de=function(e,t){var n=h(e),r=f(t);if(n!==F||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,G)&&n[G][r]||(a.enumerable=!0),a}},pe=function(e){var t=Z(h(e)),n=[];return $(t,(function(e){m(ne,e)||m(E,e)||te(n,e)})),n},he=function(e){var t=e===F,n=Z(t?re:h(e)),r=[];return $(n,(function(e){!m(ne,e)||t&&!m(F,e)||te(r,ne[e])})),r};u||(H=function(){if(d(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===F&&i(n,re,e),m(r,G)&&m(r[G],t)&&(r[G][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(F,t,{configurable:!0,set:n}),ce(t,e)},P(J=H[D],"toString",(function(){return j(this).tag})),P(H,"withoutSetter",(function(e){return ce(M(e),e)})),T.f=me,C.f=ue,S.f=le,_.f=de,v.f=b.f=pe,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(A(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||P(F,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),$(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pe}),k(),B(H,V),E[G]=!0},3742:function(e){"use strict";e.exports={}},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},3846:function(e,t,n){"use strict";var r=n(9447),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},3930:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(t.callee)?"Arguments":r}},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},4010:function(e,t,n){"use strict";var r=n(1793),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},4107:function(e,t,n){var r=n(6698),a=n(392),i=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,a.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function m(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 p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,a),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+p(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+d(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.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=c},4123:function(e,t,n){"use strict";n(366)("match")},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],d=m[o],p=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,d,p),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),l=new Uint32Array(32),m=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(p,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function g(e,t,n,a,i){n=n||64,e=r.normalizeInput(e),a&&(a=r.normalizeInput(a)),i&&(i=r.normalizeInput(i));const s=h(n,t,a,i);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,a,i){const s=g(e,t,n,a,i);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},4239:function(e,t,n){"use strict";var r=n(7136),a=TypeError;e.exports=function(e){if(r(e))throw new a("Can't call method on "+e);return e}},4284:function(e,t,n){"use strict";var r=n(9447),a=n(3648),i=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m="enumerable",d="configurable",p="writable";t.f=r?i?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:m in n?n[m]:r[m],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),a)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4436:function(e,t,n){"use strict";var r=n(7374),a=n(4849),i=n(575),s=function(e){return function(t,n,s){var o=r(t),c=i(o);if(0===c)return!e&&-1;var u,l=a(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},4443:function(e,t,n){"use strict";var r=n(3045),a=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},4610:function(e,t,n){"use strict";n(366)("split")},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4664:function(e,t,n){"use strict";n(366)("observable")},4810:function(e,t,n){"use strict";var r=n(5582),a=n(366),i=n(4840);a("toStringTag"),i(r("Symbol"),"Symbol")},4840:function(e,t,n){"use strict";var r=n(2623),a=n(4284).f,i=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||a(l,c,{configurable:!0,value:t}),u&&!r&&i(l,"toString",o))}},4849:function(e,t,n){"use strict";var r=n(5482),a=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):i(n,t)}},4878:function(e,t,n){"use strict";var r=n(2623),a=n(3948);e.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},4932:function(e,t,n){"use strict";var r,a,i,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),m=n(6128),d=n(2522),p=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||m.state){var g=m.state||(m.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var N=d("state");p[N]=!0,r=function(e,t){if(l(e,N))throw new f(h);return t.facade=e,u(e,N,t),t},a=function(e){return l(e,N)?e[N]:{}},i=function(e){return l(e,N)}}e.exports={set:r,get:a,has:i,enforce:function(e){return i(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=a(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},4954:function(e,t,n){"use strict";n(366)("iterator")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},5084:function(){},5116:function(e,t,n){"use strict";var r,a,i,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),m=n(8055),d=n(6264),p=n(7376),h=d("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(r=a):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),o(r[h])||m(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},5205:function(){},5264:function(e,t,n){"use strict";var r=n(1091),a=n(9846),i=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!a||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},5344:function(e,t,n){"use strict";n(366)("search")},5407:function(e,t,n){"use strict";var r=n(5807),a=n(7374),i=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},5468:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),m=/^\s*(?:class|function)\b/,d=r(m.exec),p=!m.test(u),h=function(e){if(!i(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(m,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||a((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},5543:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=function(e,t,n){r?a.f(e,t,i(0,n)):e[t]=n}},5582:function(e,t,n){"use strict";var r=n(2046),a=n(5951),i=n(2250),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},5594:function(e,t,n){"use strict";var r=n(5582),a=n(2250),i=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&i(t.prototype,o(e))}},5606:function(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var o,c=[],u=!1,l=-1;function m(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(m);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return 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 h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},5807:function(e,t,n){"use strict";var r=n(1907),a=r({}.toString),i=r("".slice);e.exports=function(e){return i(a(e),8,-1)}},5816:function(e,t,n){"use strict";var r=n(6128);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5951:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5972:function(e,t,n){"use strict";var r=n(9724),a=n(2250),i=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},6024:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.apply,s=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},6028:function(e,t,n){"use strict";var r=n(3930),a=n(6285),i=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!a(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},6128:function(e,t,n){"use strict";var r=n(7376),a=n(5951),i=n(2532),s="__core-js_shared__",o=e.exports=a[s]||i(s,{});(o.versions||(o.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6264:function(e,t,n){"use strict";var r=n(5951),a=n(5816),i=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=a("wks"),m=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=o&&i(u,e)?u[e]:m("Symbol."+e)),l[e]}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},6499:function(e,t,n){"use strict";var r=n(1907),a=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,36)}},6624:function(e,t,n){"use strict";var r=n(6285),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not an object")}},6656:function(e,t,n){"use strict";var r=n(1907),a=n(1793),i=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(i(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,m=!0;return function(e,t){if(m)return m=!1,t;if(a(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6750:function(e,t,n){"use strict";var r=n(1091),a=n(9447),i=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!a},{defineProperty:i})},6794:function(e,t,n){"use strict";var r=n(5951).navigator,a=r&&r.userAgent;e.exports=a?String(a):""},6833:function(e,t,n){"use strict";var r=n(9447),a=n(9724),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},6878:function(e,t,n){"use strict";n(366)("metadataKey")},6946:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(5807),s=Object,o=r("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):s(e)}:s},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.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 i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,s,u;if(o(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(a=c(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=l.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(i){r.once&&e.removeEventListener(t,a),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},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+".");s=e}}),i.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},i.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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,m(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,m(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,i,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},7057:function(e,t,n){"use strict";var r=n(1470).charAt,a=n(160),i=n(4932),s=n(183),o=n(9550),c="String Iterator",u=i.set,l=i.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:a(e),index:0})}),(function(){var e,t=l(this),n=t.string,a=t.index;return a>=n.length?o(void 0,!0):(e=r(n,a),t.index+=e.length,o(e,!1))}))},7136:function(e){"use strict";e.exports=function(e){return null==e}},7152:function(e,t,n){"use strict";n(366)("dispose")},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},7171:function(e,t,n){"use strict";var r=n(8828),a=n(6264),i=n(798),s=a("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,a=n(8075),i=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=a(r,{next:i(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},7372:function(e,t,n){var r=n(1594),a=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(a,i){var s,u,l,m,d,p=e,h=i[a],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(a)),"function"==typeof n&&(h=n.call(i,a,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(m=h.length,s=0;s<m;s+=1)d[s]=c(s,h)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,l}if(n&&"object"==typeof n)for(m=n.length,s=0;s<m;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&d.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&d.push(o(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,l}}"function"!=typeof a.stringify&&(a.stringify=function(r,a,i){var s;if(e="",t="","number"==typeof i)for(s=0;s<i;s+=1)t+=" ";else"string"==typeof i&&(t=i);if(n=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},7374:function(e,t,n){"use strict";var r=n(6946),a=n(4239);e.exports=function(e){return r(a(e))}},7376:function(e){"use strict";e.exports=!0},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7463:function(e,t,n){"use strict";var r=n(8828),a=n(2250),i=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(a(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=o(e),s=i[0],c=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,m=c>0?s-4:s;for(n=0;n<m;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],s=16383,o=0,u=r-a;o<u;o+=s)i.push(c(e,o,o+s>u?u:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,a){return a&&a.enumerable?e[t]=n:r(e,t,n),e}},8075:function(e,t,n){"use strict";var r,a=n(6624),i=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),m="prototype",d="script",p=l("IE_PROTO"),h=function(){},f=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var a=s.length;a--;)delete g[m][s[a]];return g()};o[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[m]=a(e),n=new h,h[m]=null,n[p]=e):n=g(),void 0===t?n:i.f(n,t)}},8146:function(e,t,n){var r=null;const a=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},m=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},d=function(e){return e&&e!==o&&m("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},p=function(){var e,a="";for("-"===o&&(a="-",d("-"));o>="0"&&o<="9";)a+=o,d();if("."===o)for(a+=".";d()&&o>="0"&&o<="9";)a+=o;if("e"===o||"E"===o)for(a+=o,d(),"-"!==o&&"+"!==o||(a+=o,d());o>="0"&&o<="9";)a+=o,d();if(e=+a,isFinite(e))return null==r&&(r=n(1594)),a.length>15?t.storeAsString?a:t.useNativeBigInt?BigInt(a):new r(a):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;m("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var a=s;d();){if('"'===o)return s-1>a&&(r+=c.substring(a,s-1)),d(),r;if("\\"===o){if(s-1>a&&(r+=c.substring(a,s-1)),d(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}a=s}}m("Bad string")},f=function(){for(;o&&o<=" ";)d()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(d("{"),f(),"}"===o)return d("}"),n;for(;o;){if(e=h(),f(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&m('Duplicate key "'+e+'"'),!0===a.test(e)?"error"===t.protoAction?m("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?m("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return d("}"),n;d(","),f()}}m("Bad object")}();case"[":return function(){var e=[];if("["===o){if(d("["),f(),"]"===o)return d("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return d("]"),e;d(","),f()}}m("Bad array")}();case'"':return h();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}m("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&m("Syntax error"),"function"==typeof t?function e(n,r){var a,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},8172:function(){},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},8287:function(e,t,n){"use strict";const r=n(7526),a=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let r=o(n);const a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const a=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function m(e){return l(e),o(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(a)return r?-1:H(e).length;t=(""+t).toLowerCase(),a=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,a){let i,s=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let r=-1;for(i=n;i<o;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>o&&(n=o-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(Y(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return W(J(t),e,n,r)}function C(e,t,n,r){return W(function(e,t){let n,r,a;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a<n;){const t=e[a];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[a+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[a+1],r=e[a+2],o=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),a+=s}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return m(e)},c.allocUnsafeSlow=function(e){return m(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let a=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))a+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,a){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(i,s),u=this.slice(r,a),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){i=u[e],s=l[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return N(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return N(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function A(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function z(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function I(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let a="";for(let r=t;r<n;++r)a+=Q[e[r]];return a}function E(e,t,n){const r=e.slice(t,n);let a="";for(let e=0;e<r.length-1;e+=2)a+=String.fromCharCode(r[e]+256*r[e+1]);return a}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(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);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(a)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return a*=128,r>=a&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,a=1,i=this[e+--r];for(;r>0&&(a*=256);)i+=this[e+--r]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const a=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),a},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};const $={};function G(e,t,n){$[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function D(e,t,n,r,a,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let a;throw a=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,a,i)}function L(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=V(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=V(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const F=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let a=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let a;for(a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},8311:function(e,t,n){"use strict";var r=n(2361),a=n(2159),i=n(1505),s=r(r.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},8530:function(e){"use strict";e.exports={}},8537:function(){},8545:function(e,t,n){"use strict";var r=n(1091),a=n(8828),i=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),m=n(6968),d=n(7171),p=n(6264),h=n(798),f=p("isConcatSpreadable"),y=h>=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(e){var t,n,r,a,i,s=o(this),d=m(s,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(a=c(i),u(p+a),n=0;n<a;n++,p++)n in i&&l(d,p,i[n]);else u(p+1),l(d,p++,i);return d.length=p,d}})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},8661:function(e,t,n){"use strict";var r=n(9447),a=n(8828);e.exports=r&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8703:function(e,t,n){"use strict";n(366)("matcher")},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),o=t([1]),c=t([56129,1]),u=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]),m=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]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function f(e,t,n,r,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function N(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=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,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=i,x=s,_=o,C=c,S=u,T=l,P=m,A=d,z=p,I=h,E=f,M=y,q=g,R=N,O=w,k=v,B=0;B<20;B+=2)b^=(a=(q^=(a=(z^=(a=(S^=(a=b+q|0)<<7|a>>>25)+b|0)<<9|a>>>23)+S|0)<<13|a>>>19)+z|0)<<18|a>>>14,T^=(a=(x^=(a=(R^=(a=(I^=(a=T+x|0)<<7|a>>>25)+T|0)<<9|a>>>23)+I|0)<<13|a>>>19)+R|0)<<18|a>>>14,E^=(a=(P^=(a=(_^=(a=(O^=(a=E+P|0)<<7|a>>>25)+E|0)<<9|a>>>23)+O|0)<<13|a>>>19)+_|0)<<18|a>>>14,k^=(a=(M^=(a=(A^=(a=(C^=(a=k+M|0)<<7|a>>>25)+k|0)<<9|a>>>23)+C|0)<<13|a>>>19)+A|0)<<18|a>>>14,b^=(a=(C^=(a=(_^=(a=(x^=(a=b+C|0)<<7|a>>>25)+b|0)<<9|a>>>23)+x|0)<<13|a>>>19)+_|0)<<18|a>>>14,T^=(a=(S^=(a=(A^=(a=(P^=(a=T+S|0)<<7|a>>>25)+T|0)<<9|a>>>23)+P|0)<<13|a>>>19)+A|0)<<18|a>>>14,E^=(a=(I^=(a=(z^=(a=(M^=(a=E+I|0)<<7|a>>>25)+E|0)<<9|a>>>23)+M|0)<<13|a>>>19)+z|0)<<18|a>>>14,k^=(a=(O^=(a=(R^=(a=(q^=(a=k+O|0)<<7|a>>>25)+k|0)<<9|a>>>23)+q|0)<<13|a>>>19)+R|0)<<18|a>>>14;b=b+i|0,x=x+s|0,_=_+o|0,C=C+c|0,S=S+u|0,T=T+l|0,P=P+m|0,A=A+d|0,z=z+p|0,I=I+h|0,E=E+f|0,M=M+y|0,q=q+g|0,R=R+N|0,O=O+w|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=C>>>0&255,e[13]=C>>>8&255,e[14]=C>>>16&255,e[15]=C>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=T>>>0&255,e[21]=T>>>8&255,e[22]=T>>>16&255,e[23]=T>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=z>>>0&255,e[33]=z>>>8&255,e[34]=z>>>16&255,e[35]=z>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=E>>>0&255,e[41]=E>>>8&255,e[42]=E>>>16&255,e[43]=E>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function w(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=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,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)i^=(a=(g^=(a=(p^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+p|0)<<18|a>>>14,l^=(a=(s^=(a=(N^=(a=(h^=(a=l+s|0)<<7|a>>>25)+l|0)<<9|a>>>23)+h|0)<<13|a>>>19)+N|0)<<18|a>>>14,f^=(a=(m^=(a=(o^=(a=(w^=(a=f+m|0)<<7|a>>>25)+f|0)<<9|a>>>23)+w|0)<<13|a>>>19)+o|0)<<18|a>>>14,v^=(a=(y^=(a=(d^=(a=(c^=(a=v+y|0)<<7|a>>>25)+v|0)<<9|a>>>23)+c|0)<<13|a>>>19)+d|0)<<18|a>>>14,i^=(a=(c^=(a=(o^=(a=(s^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+s|0)<<13|a>>>19)+o|0)<<18|a>>>14,l^=(a=(u^=(a=(d^=(a=(m^=(a=l+u|0)<<7|a>>>25)+l|0)<<9|a>>>23)+m|0)<<13|a>>>19)+d|0)<<18|a>>>14,f^=(a=(h^=(a=(p^=(a=(y^=(a=f+h|0)<<7|a>>>25)+f|0)<<9|a>>>23)+y|0)<<13|a>>>19)+p|0)<<18|a>>>14,v^=(a=(w^=(a=(N^=(a=(g^=(a=v+w|0)<<7|a>>>25)+v|0)<<9|a>>>23)+g|0)<<13|a>>>19)+N|0)<<18|a>>>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]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,a,i,s){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;a>=64;){for(N(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;a-=64,t+=64,r+=64}if(a>0)for(N(l,u,s,v),c=0;c<a;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,a){var i,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(N(c,o,a,v),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&o[s])|0,o[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(N(c,o,a,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,a){var i=new Uint8Array(32);w(i,r,a,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,i)}function C(e,t,n,r,a,i,s){var o=new Uint8Array(32);w(o,i,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return b(e,t,n,r,a,c,o)}var S=function(e){var t,n,r,a,i,s,o,c;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,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>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 T(e,t,n,r,a,i){var s=new S(i);return s.update(n,r,a),s.finish(e,t),0}function P(e,t,n,r,a,i){var s=new Uint8Array(16);return T(s,0,n,r,a,i),y(e,t,s,0)}function A(e,t,n,r,a){var i;if(n<32)return-1;for(C(e,0,t,0,n,r,a),T(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function z(e,t,n,r,a){var i,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,a),0!==P(t,16,t,32,n-32,s))return-1;for(C(e,0,t,0,n,r,a),i=0;i<32;i++)e[i]=0;return 0}function I(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function E(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,a=~(n-1),i=0;i<16;i++)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function q(e,n){var r,a,i,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(E(o),E(o),E(o),a=0;a<2;a++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function $(e,t,n){var r,a,i=0,s=0,o=0,c=0,u=0,l=0,m=0,d=0,p=0,h=0,f=0,y=0,g=0,N=0,w=0,v=0,b=0,x=0,_=0,C=0,S=0,T=0,P=0,A=0,z=0,I=0,E=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],U=n[2],$=n[3],G=n[4],V=n[5],D=n[6],L=n[7],j=n[8],F=n[9],H=n[10],J=n[11],W=n[12],K=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*k,s+=r*B,o+=r*U,c+=r*$,u+=r*G,l+=r*V,m+=r*D,d+=r*L,p+=r*j,h+=r*F,f+=r*H,y+=r*J,g+=r*W,N+=r*K,w+=r*Y,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*U,u+=r*$,l+=r*G,m+=r*V,d+=r*D,p+=r*L,h+=r*j,f+=r*F,y+=r*H,g+=r*J,N+=r*W,w+=r*K,v+=r*Y,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*U,l+=r*$,m+=r*G,d+=r*V,p+=r*D,h+=r*L,f+=r*j,y+=r*F,g+=r*H,N+=r*J,w+=r*W,v+=r*K,b+=r*Y,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*U,m+=r*$,d+=r*G,p+=r*V,h+=r*D,f+=r*L,y+=r*j,g+=r*F,N+=r*H,w+=r*J,v+=r*W,b+=r*K,x+=r*Y,_+=r*Q,u+=(r=t[4])*k,l+=r*B,m+=r*U,d+=r*$,p+=r*G,h+=r*V,f+=r*D,y+=r*L,g+=r*j,N+=r*F,w+=r*H,v+=r*J,b+=r*W,x+=r*K,_+=r*Y,C+=r*Q,l+=(r=t[5])*k,m+=r*B,d+=r*U,p+=r*$,h+=r*G,f+=r*V,y+=r*D,g+=r*L,N+=r*j,w+=r*F,v+=r*H,b+=r*J,x+=r*W,_+=r*K,C+=r*Y,S+=r*Q,m+=(r=t[6])*k,d+=r*B,p+=r*U,h+=r*$,f+=r*G,y+=r*V,g+=r*D,N+=r*L,w+=r*j,v+=r*F,b+=r*H,x+=r*J,_+=r*W,C+=r*K,S+=r*Y,T+=r*Q,d+=(r=t[7])*k,p+=r*B,h+=r*U,f+=r*$,y+=r*G,g+=r*V,N+=r*D,w+=r*L,v+=r*j,b+=r*F,x+=r*H,_+=r*J,C+=r*W,S+=r*K,T+=r*Y,P+=r*Q,p+=(r=t[8])*k,h+=r*B,f+=r*U,y+=r*$,g+=r*G,N+=r*V,w+=r*D,v+=r*L,b+=r*j,x+=r*F,_+=r*H,C+=r*J,S+=r*W,T+=r*K,P+=r*Y,A+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*U,g+=r*$,N+=r*G,w+=r*V,v+=r*D,b+=r*L,x+=r*j,_+=r*F,C+=r*H,S+=r*J,T+=r*W,P+=r*K,A+=r*Y,z+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*U,N+=r*$,w+=r*G,v+=r*V,b+=r*D,x+=r*L,_+=r*j,C+=r*F,S+=r*H,T+=r*J,P+=r*W,A+=r*K,z+=r*Y,I+=r*Q,y+=(r=t[11])*k,g+=r*B,N+=r*U,w+=r*$,v+=r*G,b+=r*V,x+=r*D,_+=r*L,C+=r*j,S+=r*F,T+=r*H,P+=r*J,A+=r*W,z+=r*K,I+=r*Y,E+=r*Q,g+=(r=t[12])*k,N+=r*B,w+=r*U,v+=r*$,b+=r*G,x+=r*V,_+=r*D,C+=r*L,S+=r*j,T+=r*F,P+=r*H,A+=r*J,z+=r*W,I+=r*K,E+=r*Y,M+=r*Q,N+=(r=t[13])*k,w+=r*B,v+=r*U,b+=r*$,x+=r*G,_+=r*V,C+=r*D,S+=r*L,T+=r*j,P+=r*F,A+=r*H,z+=r*J,I+=r*W,E+=r*K,M+=r*Y,q+=r*Q,w+=(r=t[14])*k,v+=r*B,b+=r*U,x+=r*$,_+=r*G,C+=r*V,S+=r*D,T+=r*L,P+=r*j,A+=r*F,z+=r*H,I+=r*J,E+=r*W,M+=r*K,q+=r*Y,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*U),o+=38*(_+=r*$),c+=38*(C+=r*G),u+=38*(S+=r*V),l+=38*(T+=r*D),m+=38*(P+=r*L),d+=38*(A+=r*j),p+=38*(z+=r*F),h+=38*(I+=r*H),f+=38*(E+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*K),N+=38*(R+=r*Y),w+=38*(O+=r*Q),i=(r=(i+=38*(b+=r*B))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i=(r=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=m,e[7]=d,e[8]=p,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=N,e[14]=w,e[15]=v}function G(e,t){$(e,t,t)}function V(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=253;r>=0;r--)G(a,a),2!==r&&4!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function D(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=250;r>=0;r--)G(a,a),1!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function L(e,n,r){var a,i,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),m=t(),d=t(),p=t(),h=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),i=0;i<16;i++)l[i]=o[i],d[i]=u[i]=m[i]=0;for(u[0]=d[0]=1,i=254;i>=0;--i)M(u,l,a=s[i>>>3]>>>(7&i)&1),M(m,d,a),B(p,u,m),U(u,u,m),B(m,l,d),U(l,l,d),G(d,p),G(h,u),$(u,m,u),$(m,l,p),B(p,u,m),U(u,u,m),G(l,u),U(m,d,h),$(u,m,c),B(u,u,d),$(m,m,u),$(u,d,h),$(d,l,o),G(l,p),M(u,l,a),M(m,d,a);for(i=0;i<16;i++)o[i+16]=u[i],o[i+32]=m[i],o[i+48]=l[i],o[i+64]=d[i];var f=o.subarray(32),y=o.subarray(16);return V(f,f),$(y,y,f),q(e,y),0}function j(e,t){return L(e,t,i)}function F(e,t){return r(t,32),j(e,t)}function H(e,t,n){var r=new Uint8Array(32);return L(r,n,t),w(e,a,r,v)}S.prototype.blocks=function(e,t,n){for(var r,a,i,s,o,c,u,l,m,d,p,h,f,y,g,N,w,v,b,x=this.fin?0:2048,_=this.h[0],C=this.h[1],S=this.h[2],T=this.h[3],P=this.h[4],A=this.h[5],z=this.h[6],I=this.h[7],E=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],U=this.r[5],$=this.r[6],G=this.r[7],V=this.r[8],D=this.r[9];n>=16;)d=m=0,d+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,d+=(C+=8191&(r>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),d+=(S+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),d+=(T+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*G),m=(d+=(P+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,d&=8191,d+=(A+=o>>>1&8191)*(5*U),d+=(z+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),d+=(E+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),p=m+=(d+=(M+=l>>>5|x)*(5*R))>>>13,p+=_*R,p+=C*q,p+=S*(5*D),p+=T*(5*V),m=(p+=P*(5*G))>>>13,p&=8191,p+=A*(5*$),p+=z*(5*U),p+=I*(5*B),p+=E*(5*k),m+=(p+=M*(5*O))>>>13,p&=8191,h=m,h+=_*O,h+=C*R,h+=S*q,h+=T*(5*D),m=(h+=P*(5*V))>>>13,h&=8191,h+=A*(5*G),h+=z*(5*$),h+=I*(5*U),h+=E*(5*B),f=m+=(h+=M*(5*k))>>>13,f+=_*k,f+=C*O,f+=S*R,f+=T*q,m=(f+=P*(5*D))>>>13,f&=8191,f+=A*(5*V),f+=z*(5*G),f+=I*(5*$),f+=E*(5*U),y=m+=(f+=M*(5*B))>>>13,y+=_*B,y+=C*k,y+=S*O,y+=T*R,m=(y+=P*q)>>>13,y&=8191,y+=A*(5*D),y+=z*(5*V),y+=I*(5*G),y+=E*(5*$),g=m+=(y+=M*(5*U))>>>13,g+=_*U,g+=C*B,g+=S*k,g+=T*O,m=(g+=P*R)>>>13,g&=8191,g+=A*q,g+=z*(5*D),g+=I*(5*V),g+=E*(5*G),N=m+=(g+=M*(5*$))>>>13,N+=_*$,N+=C*U,N+=S*B,N+=T*k,m=(N+=P*O)>>>13,N&=8191,N+=A*R,N+=z*q,N+=I*(5*D),N+=E*(5*V),w=m+=(N+=M*(5*G))>>>13,w+=_*G,w+=C*$,w+=S*U,w+=T*B,m=(w+=P*k)>>>13,w&=8191,w+=A*O,w+=z*R,w+=I*q,w+=E*(5*D),v=m+=(w+=M*(5*V))>>>13,v+=_*V,v+=C*G,v+=S*$,v+=T*U,m=(v+=P*B)>>>13,v&=8191,v+=A*k,v+=z*O,v+=I*R,v+=E*q,b=m+=(v+=M*(5*D))>>>13,b+=_*D,b+=C*V,b+=S*G,b+=T*$,m=(b+=P*U)>>>13,b&=8191,b+=A*B,b+=z*k,b+=I*O,b+=E*R,_=d=8191&(m=(m=((m+=(b+=M*q)>>>13)<<2)+m|0)+(d&=8191)|0),C=p+=m>>>=13,S=h&=8191,T=f&=8191,P=y&=8191,A=g&=8191,z=N&=8191,I=w&=8191,E=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=C,this.h[2]=S,this.h[3]=T,this.h[4]=P,this.h[5]=A,this.h[6]=z,this.h[7]=I,this.h[8]=E,this.h[9]=M},S.prototype.finish=function(e,t){var n,r,a,i,s=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(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[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),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;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},S.prototype.update=function(e,t,n){var r,a;if(this.leftover){for((a=16-this.leftover)>n&&(a=n),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(a=n-n%16,this.blocks(e,t,a),t+=a,n-=a),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=A,W=z,K=[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,n,r){for(var a,i,s,o,c,u,l,m,d,p,h,f,y,g,N,w,v,b,x,_,C,S,T,P,A,z,I=new Int32Array(16),E=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],U=e[6],$=e[7],G=t[0],V=t[1],D=t[2],L=t[3],j=t[4],F=t[5],H=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,I[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],E[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(a=M,i=q,s=R,o=O,c=k,u=B,l=U,d=G,p=V,h=D,f=L,y=j,g=F,N=H,T=65535&(S=J),P=S>>>16,A=65535&(C=$),z=C>>>16,T+=65535&(S=(j>>>14|k<<18)^(j>>>18|k<<14)^(k>>>9|j<<23)),P+=S>>>16,A+=65535&(C=(k>>>14|j<<18)^(k>>>18|j<<14)^(j>>>9|k<<23)),z+=C>>>16,T+=65535&(S=j&F^~j&H),P+=S>>>16,A+=65535&(C=k&B^~k&U),z+=C>>>16,T+=65535&(S=K[2*x+1]),P+=S>>>16,A+=65535&(C=K[2*x]),z+=C>>>16,C=I[x%16],P+=(S=E[x%16])>>>16,A+=65535&C,z+=C>>>16,A+=(P+=(T+=65535&S)>>>16)>>>16,T=65535&(S=b=65535&T|P<<16),P=S>>>16,A=65535&(C=v=65535&A|(z+=A>>>16)<<16),z=C>>>16,T+=65535&(S=(G>>>28|M<<4)^(M>>>2|G<<30)^(M>>>7|G<<25)),P+=S>>>16,A+=65535&(C=(M>>>28|G<<4)^(G>>>2|M<<30)^(G>>>7|M<<25)),z+=C>>>16,P+=(S=G&V^G&D^V&D)>>>16,A+=65535&(C=M&q^M&R^q&R),z+=C>>>16,m=65535&(A+=(P+=(T+=65535&S)>>>16)>>>16)|(z+=A>>>16)<<16,w=65535&T|P<<16,T=65535&(S=f),P=S>>>16,A=65535&(C=o),z=C>>>16,P+=(S=b)>>>16,A+=65535&(C=v),z+=C>>>16,q=a,R=i,O=s,k=o=65535&(A+=(P+=(T+=65535&S)>>>16)>>>16)|(z+=A>>>16)<<16,B=c,U=u,$=l,M=m,V=d,D=p,L=h,j=f=65535&T|P<<16,F=y,H=g,J=N,G=w,x%16==15)for(_=0;_<16;_++)C=I[_],T=65535&(S=E[_]),P=S>>>16,A=65535&C,z=C>>>16,C=I[(_+9)%16],T+=65535&(S=E[(_+9)%16]),P+=S>>>16,A+=65535&C,z+=C>>>16,v=I[(_+1)%16],T+=65535&(S=((b=E[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),P+=S>>>16,A+=65535&(C=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),z+=C>>>16,v=I[(_+14)%16],P+=(S=((b=E[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,A+=65535&(C=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,I[_]=65535&A|z<<16,E[_]=65535&T|P<<16;T=65535&(S=G),P=S>>>16,A=65535&(C=M),z=C>>>16,C=e[0],P+=(S=t[0])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[0]=M=65535&A|z<<16,t[0]=G=65535&T|P<<16,T=65535&(S=V),P=S>>>16,A=65535&(C=q),z=C>>>16,C=e[1],P+=(S=t[1])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[1]=q=65535&A|z<<16,t[1]=V=65535&T|P<<16,T=65535&(S=D),P=S>>>16,A=65535&(C=R),z=C>>>16,C=e[2],P+=(S=t[2])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[2]=R=65535&A|z<<16,t[2]=D=65535&T|P<<16,T=65535&(S=L),P=S>>>16,A=65535&(C=O),z=C>>>16,C=e[3],P+=(S=t[3])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[3]=O=65535&A|z<<16,t[3]=L=65535&T|P<<16,T=65535&(S=j),P=S>>>16,A=65535&(C=k),z=C>>>16,C=e[4],P+=(S=t[4])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[4]=k=65535&A|z<<16,t[4]=j=65535&T|P<<16,T=65535&(S=F),P=S>>>16,A=65535&(C=B),z=C>>>16,C=e[5],P+=(S=t[5])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[5]=B=65535&A|z<<16,t[5]=F=65535&T|P<<16,T=65535&(S=H),P=S>>>16,A=65535&(C=U),z=C>>>16,C=e[6],P+=(S=t[6])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[6]=U=65535&A|z<<16,t[6]=H=65535&T|P<<16,T=65535&(S=J),P=S>>>16,A=65535&(C=$),z=C>>>16,C=e[7],P+=(S=t[7])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[7]=$=65535&A|z<<16,t[7]=J=65535&T|P<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[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(a,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),Y(a,i,s,n),r=0;r<8;r++)h(e,8*r,a[r],i[r]);return 0}function X(e,n){var r=t(),a=t(),i=t(),s=t(),o=t(),c=t(),u=t(),m=t(),d=t();U(r,e[1],e[0]),U(d,n[1],n[0]),$(r,r,d),B(a,e[0],e[1]),B(d,n[0],n[1]),$(a,a,d),$(i,e[3],n[3]),$(i,i,l),$(s,e[2],n[2]),B(s,s,s),U(o,a,r),U(c,s,i),B(u,s,i),B(m,a,r),$(e[0],o,c),$(e[1],m,u),$(e[2],u,c),$(e[3],o,m)}function Z(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),a=t(),i=t();V(i,n[2]),$(r,n[0],i),$(a,n[1],i),q(e,a),e[31]^=O(r)<<7}function te(e,t,n){var r,a;for(I(e[0],s),I(e[1],o),I(e[2],o),I(e[3],s),a=255;a>=0;--a)Z(e,t,r=n[a/8|0]>>(7&a)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];I(r[0],m),I(r[1],d),I(r[2],o),$(r[3],m,d),te(e,r,n)}function re(e,n,a){var i,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(a||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),i=0;i<32;i++)n[i+32]=e[i];return 0}var ae=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 n,r,a,i;for(r=63;r>=32;--r){for(n=0,a=r-32,i=r-12;a<i;++a)t[a]+=n-16*t[r]*ae[a-(r-32)],n=Math.floor((t[a]+128)/256),t[a]-=256*n;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;a++)t[a]+=n-(t[31]>>4)*ae[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=n*ae[a];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,n)}function oe(e,n,r,a){var i,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),m=[t(),t(),t(),t()];Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=o[32+i];for(Q(u,e.subarray(32),r+32),se(u),ne(m,u),ee(e,m),i=32;i<64;i++)e[i]=a[i];for(Q(c,e,r+64),se(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=c[i]*o[s];return ie(e.subarray(32),l),d}function ce(e,n,r,a){var i,c=new Uint8Array(32),l=new Uint8Array(64),m=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),a=t(),i=t(),c=t(),l=t(),m=t(),d=t();return I(e[2],o),k(e[1],n),G(i,e[1]),$(c,i,u),U(i,i,e[2]),B(c,e[2],c),G(l,c),G(m,l),$(d,m,l),$(r,d,i),$(r,r,c),D(r,r),$(r,r,i),$(r,r,c),$(r,r,c),$(e[0],r,c),G(a,e[0]),$(a,a,c),R(a,i)&&$(e[0],e[0],p),G(a,e[0]),$(a,a,c),R(a,i)?-1:(O(e[0])===n[31]>>7&&U(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(d,a))return-1;for(i=0;i<r;i++)e[i]=n[i];for(i=0;i<32;i++)e[i+32]=a[i];if(Q(l,e,r),se(l),te(m,d,l),ne(d,n.subarray(32)),X(m,d),ee(c,m),r-=64,g(n,0,c,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=n[i+64];return r}var ue=64,le=32,me=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:C,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:T,crypto_onetimeauth_verify:P,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:A,crypto_secretbox_open:z,crypto_scalarmult:L,crypto_scalarmult_base:j,crypto_box_beforenm:H,crypto_box_afternm:J,crypto_box:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),W(e,t,n,r,s)},crypto_box_keypair:F,crypto_hash:Q,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ce,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:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:me,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ae,pack25519:q,unpack25519:k,M:$,A:B,S:G,Z:U,pow2523:D,add:X,set25519:I,modL:ie,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return A(a,r,r.length,t,n),a.subarray(16)},e.secretbox.open=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==z(a,r,r.length,t,n)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return L(n,e,t),n},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return j(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox(t,n,i)},e.box.before=function(e,t){pe(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 n=new Uint8Array(32);return H(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return F(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return j(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(pe(e,t),t.length!==me)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(pe(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i];return a},e.sign.detached=function(t,n){for(var r=e.sign(t,n),a=new Uint8Array(ue),i=0;i<a.length;i++)a[i]=r[i];return a},e.sign.detached.verify=function(e,t,n){if(pe(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,a=new Uint8Array(ue+e.length),i=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)a[r]=t[r];for(r=0;r<e.length;r++)a[r+ue]=e[r];return ce(i,a,a.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(me);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==me)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(me),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=me,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){pe(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,a=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(a.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=a[r];he(a)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,a=t.randomBytes(n);for(r=0;r<n;r++)e[r]=a[r];he(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},9003:function(e){"use strict";e.exports={version:"1.0.35"}},9192:function(e,t,n){"use strict";var r=n(1871),a=n(6285),i=n(4239),s=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),s(r),a(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},9197:function(e,t,n){"use strict";for(var r=n(5816),a=n(5582),i=n(1907),s=n(5594),o=n(6264),c=a("Symbol"),u=c.isWellKnownSymbol,l=a("Object","getOwnPropertyNames"),m=i(c.prototype.valueOf),d=r("wks"),p=0,h=l(c),f=h.length;p<f;p++)try{var y=h[p];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=m(e),n=0,r=l(d),a=r.length;n<a;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128;function n(n,r){var a,i,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),a=0;a<t;a++)s[a]=54;for(a=0;a<r.length;a++)s[a]^=r[a];for(s.set(n,t),i=e.hash(s.subarray(0,t+n.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<r.length;a++)s[a]^=r[a];return s.set(i,t),e.hash(s.subarray(0,t+i.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9298:function(e,t,n){"use strict";var r=n(4239),a=Object;e.exports=function(e){return a(r(e))}},9363:function(e,t,n){"use strict";var r=n(7374),a=n(2156),i=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),m=n(9447),d="Array Iterator",p=s.set,h=s.getterFor(d);e.exports=c(Array,"Array",(function(e,t){p(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var f=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&m&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},9367:function(e,t,n){"use strict";var r=n(2159),a=n(7136);e.exports=function(e,t){var n=e[t];return a(n)?void 0:r(n)}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},9552:function(e,t,n){"use strict";var r=n(5951),a=n(6285),i=r.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},9671:function(e,t,n){"use strict";n(366)("patternMatch")},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},9721:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),m=n(3427),d=n(6656),p=n(9846),h=String,f=a("JSON","stringify"),y=o(/./.exec),g=o("".charAt),N=o("".charCodeAt),w=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,C=!p||c((function(){var e=a("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),S=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),T=function(e,t){var n=m(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(f,null,n)},P=function(e,t,n){var r=g(n,t-1),a=g(n,t+1);return y(x,e)&&!y(_,a)||y(_,e)&&!y(x,r)?"\\u"+v(N(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:C||S},{stringify:function(e,t,n){var r=m(arguments),a=i(C?T:f,null,r);return S&&"string"==typeof a?w(a,b,P):a}})},9724:function(e,t,n){"use strict";var r=n(1907),a=n(9298),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(e),t)}},9840:function(e,t,n){e.exports=n(9003).version},9846:function(e,t,n){"use strict";var r=n(798),a=n(8828),i=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ze},AbiVersion:function(){return Qr},AccountBase:function(){return vl},AccountError:function(){return R},AccountGeneralized:function(){return Zy},AccountLedger:function(){return ng},AccountLedgerFactory:function(){return lg},AccountMemory:function(){return dp},AccountMetamask:function(){return yg},AccountMetamaskFactory:function(){return Pg},AccountMnemonicFactory:function(){return Jy},AeSdk:function(){return kh},AeSdkAepp:function(){return yf},AeSdkBase:function(){return Oh},AeSdkMethods:function(){return Mh},AeSdkWallet:function(){return Df},AensError:function(){return O},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ye},AmbiguousEventDefinitionError:function(){return qe},ArgumentCountMismatchError:function(){return H},ArgumentError:function(){return j},BaseError:function(){return q},BrowserRuntimeConnection:function(){return xT},BrowserWindowMessageConnection:function(){return yT},BytecodeMismatchError:function(){return xe},CallReturnType:function(){return Ii},Channel:function(){return lw},ChannelCallError:function(){return fe},ChannelConnectionError:function(){return ye},ChannelError:function(){return B},ChannelIncomingMessageError:function(){return we},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return Eg},CompilerError:function(){return U},CompilerHttp:function(){return SN},ConsensusProtocolVersion:function(){return Kr},Contract:function(){return sh},ContractError:function(){return $},CryptographyError:function(){return G},DRY_RUN_ACCOUNT:function(){return Vr},DecodeError:function(){return Ve},DelegationTag:function(){return Mp},DryRunError:function(){return Le},DuplicateContractError:function(){return _e},DuplicateNodeError:function(){return $e},Encoded:function(){return e},Encoding:function(){return cr},EntryTag:function(){return Ei},IllegalArgumentError:function(){return F},IllegalBidFeeError:function(){return je},InactiveContractError:function(){return Ce},InsufficientBalanceError:function(){return J},InsufficientNameFeeError:function(){return ce},InternalError:function(){return ae},InvalidAensNameError:function(){return ue},InvalidAuthDataError:function(){return be},InvalidChecksumError:function(){return Re},InvalidMethodInvocationError:function(){return Se},InvalidRpcMessageError:function(){return le},InvalidSignatureError:function(){return Fe},InvalidTxError:function(){return vp},LogicError:function(){return re},MAX_AUTH_FUN_GAS:function(){return Dr},MESSAGE_DIRECTION:function(){return Bh},METHODS:function(){return Gh},MIN_GAS_PRICE:function(){return Lr},MemoryAccount:function(){return dp},MerkleTreeHashMismatchError:function(){return Oe},Middleware:function(){return sT},MiddlewarePageMissed:function(){return rT},MiddlewareSubscriber:function(){return Tw},MiddlewareSubscriberDisconnected:function(){return bw},MiddlewareSubscriberError:function(){return vw},MissingCallbackError:function(){return me},MissingContractAddressError:function(){return Te},MissingContractDefError:function(){return Pe},MissingEventDefinitionError:function(){return Me},MissingFunctionNameError:function(){return Ae},MissingNodeInTreeError:function(){return ke},MissingParamError:function(){return W},NAME_BID_RANGES:function(){return Wr},NAME_BID_TIMEOUT_BLOCKS:function(){return Hr},NAME_FEE_BID_INCREMENT:function(){return Fr},NAME_FEE_MULTIPLIER:function(){return jr},NAME_MAX_LENGTH_FEE:function(){return Jr},Name:function(){return Dp},NoSerializerFoundError:function(){return K},NoSuchContractFunctionError:function(){return Ie},NoWalletConnectedError:function(){return Qe},Node:function(){return Nl},NodeError:function(){return V},NodeInvocationError:function(){return ze},NodeNotFoundError:function(){return Ge},NotImplementedError:function(){return te},NotPayableFunctionError:function(){return Ee},ORACLE_TTL_TYPES:function(){return Mi},Oracle:function(){return ph},OracleClient:function(){return hh},PayloadLengthError:function(){return De},PrefixNotFoundError:function(){return He},RPC_STATUS:function(){return Vh},RequestTimedOutError:function(){return Y},RpcConnectionDenyError:function(){return Jh},RpcConnectionError:function(){return Xe},RpcError:function(){return Lh},RpcInternalError:function(){return Yh},RpcInvalidTransactionError:function(){return jh},RpcMethodNotFoundError:function(){return Xh},RpcNoNetworkById:function(){return Qh},RpcNotAuthorizeError:function(){return Wh},RpcPermissionDenyError:function(){return Kh},RpcRejectedByUserError:function(){return Fh},RpcUnsupportedProtocolError:function(){return Hh},SUBSCRIPTION_TYPES:function(){return $h},SchemaNotFoundError:function(){return Je},Tag:function(){return Xr},TagNotFoundError:function(){return We},TransactionError:function(){return D},TxNotInChainError:function(){return Ke},TxTimedOutError:function(){return Q},TypeError:function(){return X},UnAuthorizedAccountError:function(){return de},UnavailableAccountError:function(){return se},UnexpectedChannelMessageError:function(){return Ne},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return ve},UnknownNodeLengthError:function(){return Be},UnknownPathNibbleError:function(){return Ue},UnknownRpcClientError:function(){return pe},UnsubscribedAccountError:function(){return he},UnsupportedPlatformError:function(){return Z},UnsupportedProtocolError:function(){return ee},UnsupportedVersionError:function(){return ne},VmVersion:function(){return Yr},WALLET_TYPE:function(){return Uh},WalletConnectorFrame:function(){return Mf},WalletConnectorFrameWithNode:function(){return kf},WalletError:function(){return L},_getPollInterval:function(){return fa},awaitHeight:function(){return wa},buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},buildContractId:function(){return ea},buildContractIdByContractTx:function(){return Es},buildTx:function(){return Ps},buildTxAsync:function(){return As},buildTxHash:function(){return Is},commitmentHash:function(){return ia},computeAuctionEndBlock:function(){return pa},computeBidFee:function(){return da},connectionProxy:function(){return oT},createGeneralizedAccount:function(){return wh},decode:function(){return Cr},encode:function(){return Sr},encodeContractAddress:function(){return ea},encodeUnsigned:function(){return Er},ensureEncoded:function(){return Ar},ensureJwt:function(){return Ip},ensureName:function(){return oa},formatAmount:function(){return tt},genSalt:function(){return Ir},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getDefaultPointerKey:function(){return la},getExecutionCost:function(){return pp},getExecutionCostBySignedTx:function(){return hp},getExecutionCostUsingNode:function(){return fp},getGeneration:function(){return Ca},getHeight:function(){return ga},getKeyBlock:function(){return Ta},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Sa},getMinimumNameFee:function(){return ma},getName:function(){return qa},getTransactionSignerAddress:function(){return wl},hash:function(){return Mr},hashDomain:function(){return sp},hashJson:function(){return ip},hashMessage:function(){return Br},hashTypedData:function(){return op},isAddressValid:function(){return Pr},isAuctionName:function(){return ha},isEncoded:function(){return zr},isJwt:function(){return zp},isName:function(){return ca},isNameValid:function(){return ca},messageToHash:function(){return Br},oracleQueryId:function(){return ta},packDelegation:function(){return Bp},packEntry:function(){return Cs},payForTransaction:function(){return gh},poll:function(){return Na},prefixedAmount:function(){return ot},produceNameId:function(){return aa},readInt:function(){return sa},resolveName:function(){return Ra},sendTransaction:function(){return bp},signJwt:function(){return Pp},spend:function(){return fh},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return Gr},transferFunds:function(){return yh},txDryRun:function(){return Ia},unpackDelegation:function(){return Up},unpackEntry:function(){return Ss},unpackJwt:function(){return Ap},unpackTx:function(){return zs},verify:function(){return qr},verifyJwt:function(){return Ep},verifyMessage:function(){return Ur},verifyMessageSignature:function(){return Ur},verifySignature:function(){return qr},verifyTransaction:function(){return wp},waitForTxConfirm:function(){return va},walletDetector:function(){return gT}});var e={};n.r(e),n.d(e,{Encoding:function(){return cr}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return fa},awaitHeight:function(){return wa},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getGeneration:function(){return Ca},getHeight:function(){return ga},getKeyBlock:function(){return Ta},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Sa},getName:function(){return qa},poll:function(){return Na},resolveName:function(){return Ra},txDryRun:function(){return Ia},waitForTxConfirm:function(){return va}});var a={};n.r(a),n.d(a,{Account:function(){return Po},AuctionEntry:function(){return Uo},ByteCode:function(){return Vo},Channel:function(){return $o},ChannelCloseMutualTx:function(){return Cc},ChannelCloseSoloTx:function(){return Sc},ChannelCreateTx:function(){return Tc},ChannelDepositTx:function(){return Pc},ChannelForceProgressTx:function(){return Ac},ChannelSetDelegatesTx:function(){return zc},ChannelSettleTx:function(){return Ic},ChannelSlashTx:function(){return Ec},ChannelSnapshotSoloTx:function(){return Mc},ChannelWithdrawTx:function(){return qc},CheckTxInPoolResponse:function(){return Rc},CommitmentId:function(){return Oc},ContractCallObject:function(){return Xo},ContractCallTx:function(){return kc},ContractCreateTx:function(){return Bc},ContractObject:function(){return Go},CountResponse:function(){return cc},CreateContractUnsignedTx:function(){return mu},Currency:function(){return Lo},Delegates:function(){return qo},DryRunAccount:function(){return Ho},DryRunCallContext:function(){return Ko},DryRunCallReq:function(){return Wo},DryRunInput:function(){return Fo},DryRunInputItem:function(){return Jo},DryRunResult:function(){return Qo},DryRunResults:function(){return Yo},EncodedTx:function(){return vc},ErrorModel:function(){return Ao},Event:function(){return Zo},GAAttachTx:function(){return $c},GAMetaTx:function(){return Gc},GAObject:function(){return _c},GasPricesItem:function(){return fc},Generation:function(){return ec},HCContractPubkeys:function(){return ac},HashResponse:function(){return ic},Header:function(){return nc},HeightResponse:function(){return sc},Image:function(){return jo},KeyBlock:function(){return tc},MicroBlockHeader:function(){return oc},NameClaimTx:function(){return Vc},NameEntry:function(){return uc},NameHash:function(){return Dc},NamePointer:function(){return Bo},NamePointerComplete:function(){return lc},NamePreclaimTx:function(){return Lc},NameRevokeTx:function(){return jc},NameTransferTx:function(){return Fc},NameUpdateTx:function(){return Hc},NextNonceResponse:function(){return zo},OffChainCallContract:function(){return su},OffChainDeposit:function(){return ou},OffChainNewContract:function(){return cu},OffChainTransfer:function(){return uu},OffChainUpdate:function(){return Ro},OffChainWithdrawal:function(){return lu},OracleExtendTx:function(){return Wc},OracleQueries:function(){return dc},OracleQuery:function(){return pc},OracleQueryTx:function(){return Kc},OracleRegisterTx:function(){return Yc},OracleRespondTx:function(){return Qc},PayingForTx:function(){return Xc},PeerConnections:function(){return Nc},PeerCount:function(){return Zc},PeerCountAvailable:function(){return tu},PeerCountConnected:function(){return eu},PeerDetails:function(){return Jc},PeerPubKey:function(){return hc},Peers:function(){return nu},PinningTx:function(){return rc},PoI:function(){return Do},PostTxResponse:function(){return bc},Protocol:function(){return gc},PubKey:function(){return ru},RegisteredOracle:function(){return mc},RelativeTTL:function(){return Oo},SignedTx:function(){return Eo},SignedTxs:function(){return Io},SpendTx:function(){return au},Status:function(){return yc},SyncStatus:function(){return wc},TokenSupply:function(){return iu},Ttl:function(){return ko},Tx:function(){return Mo},TxInfoObject:function(){return xc},UnsignedTx:function(){return Uc},discriminators:function(){return du}});var i={};n.r(i),n.d(i,{addChecksum:function(){return vd},decode:function(){return _d},encode:function(){return xd},getPayload:function(){return bd}});var s={};n.r(s),n.d(s,{decode:function(){return Sd},encode:function(){return Cd}});var o={};n.r(o),n.d(o,{payForTransaction:function(){return gh},spend:function(){return fh},transferFunds:function(){return yh}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},createGeneralizedAccount:function(){return wh}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return Yg},ByteCodeInput:function(){return Hg},BytecodeCallResultInput:function(){return Ug},Calldata:function(){return Vg},CompileOpts:function(){return qg},CompileResult:function(){return kg},CompilerError:function(){return Rg},CompilerVersion:function(){return Kg},Contract:function(){return Mg},DecodeCalldataBytecode:function(){return Dg},DecodeCalldataSource:function(){return Fg},DecodedCalldata:function(){return Lg},DecodedCallresult:function(){return $g},ErrorModel:function(){return jg},ErrorPos:function(){return Og},FateAssembler:function(){return Jg},FunctionCallInput:function(){return Gg},SophiaBinaryData:function(){return Qg},SophiaCallResultInput:function(){return Bg},SophiaJsonData:function(){return Xg},ValidateByteCodeInput:function(){return Wg}});var l={};n.r(l),n.d(l,{appendSignature:function(){return VN},awaitingChannelCreateTx:function(){return WN},awaitingCompletion:function(){return jN},awaitingConnection:function(){return FN},awaitingLeave:function(){return ew},awaitingOnChainTx:function(){return KN},awaitingReconnection:function(){return JN},awaitingReestablish:function(){return HN},awaitingShutdownTx:function(){return ZN},channelClosed:function(){return tw},channelOpen:function(){return QN},handleUnexpectedMessage:function(){return LN},signAndNotify:function(){return DN}});var m={};n.r(m),n.d(m,{Activity:function(){return Nv},ActivityPayload:function(){return wv},Aex141Response:function(){return gb},Aex141TemplateTokensResponse:function(){return bb},Aex141TemplatesResponse:function(){return wb},Aex141TokenDetailResponse:function(){return _b},Aex141TokenResponse:function(){return Iv},Aex141TransferEvent:function(){return Sb},Aex9BalanceResponse:function(){return Mv},Aex9ContractBalanceResponse:function(){return Ib},Aex9Response:function(){return Pb},Aex9TransferEvent:function(){return s_},Aex9TransferResponse:function(){return o_},Auction:function(){return cx},AuctionLastBid:function(){return ux},AuctionLastBidTx:function(){return TC},Channel:function(){return Ob},ChannelCloseMutualTx:function(){return y_},ChannelCloseSoloTx:function(){return g_},ChannelCreateTx:function(){return d_},ChannelDepositTx:function(){return p_},ChannelForceProgressTx:function(){return f_},ChannelSetDelegatesTx:function(){return b_},ChannelSettleTx:function(){return w_},ChannelSlashTx:function(){return N_},ChannelSnapshotSoloTx:function(){return v_},ChannelWithdrawTx:function(){return h_},Components171VsjiSchemasNametxPropertiesTxAllof1:function(){return hx},Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1:function(){return lx},Components1Viuqa3SchemasOracletxPropertiesTxAllof1:function(){return Ax},Contract:function(){return Gb},ContractCall:function(){return Bb},ContractCallTx:function(){return S_},ContractCreateTx:function(){return Vb},ContractLog:function(){return $b},Delegate:function(){return Xb},Delegates:function(){return bv},DeltaStat:function(){return Lx},DexSwap:function(){return Rv},DexSwapAmounts:function(){return Ov},EpochInfo:function(){return Fb},EpochInfoValidatorsItem:function(){return Hb},ErrorResponse:function(){return Av},GAAttachTx:function(){return T_},GAMetaTx:function(){return P_},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return qb},Get200ApplicationJsonProperties:function(){return jv},InternalContractCallEvent:function(){return c_},InternalTransferEvent:function(){return u_},KeyBlock:function(){return tx},KeyBlockExtended:function(){return PC},MicroBlockExtended:function(){return AC},MicroBlockHeader:function(){return rx},Miner:function(){return Jx},Name:function(){return ox},NameClaim:function(){return Bv},NameClaimEvent:function(){return l_},NameClaimTx:function(){return Uv},NameOwnership:function(){return mx},NamePointer:function(){return Sv},NamePreclaimTx:function(){return C_},NameRevokeTx:function(){return px},NameTransfer:function(){return wx},NameTransferTx:function(){return vx},NameTx:function(){return dx},NameTxTx:function(){return zC},NameUpdate:function(){return xx},NameUpdateTx:function(){return Dv},NotFoundResponse:function(){return $v},OffChainUpdate:function(){return xv},Oracle:function(){return Cx},OracleExtend:function(){return Ix},OracleExtendTx:function(){return Ex},OracleFormat:function(){return Sx},OracleQuery:function(){return qx},OracleQueryTx:function(){return x_},OracleRegisterTx:function(){return Px},OracleRespondTx:function(){return __},OracleResponse:function(){return Rx},OracleTx:function(){return Tx},OracleTxTx:function(){return IC},PaginatedResponse:function(){return Pv},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Mb},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ub},Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return qv},Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return Qv},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return eC},Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return hb},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return nC},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return tC},Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema:function(){return bC},Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema:function(){return X_},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return B_},Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema:function(){return q_},Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kv},Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return ub},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return k_},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sx},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kb},Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema:function(){return W_},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return Ab},Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gx},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Cb},Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Kv},Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema:function(){return yC},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return H_},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return oC},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return sC},Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema:function(){return z_},Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jb},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return aC},Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $x},Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema:function(){return Q_},Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema:function(){return Y_},Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return xC},Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fx},Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Dx},Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return Xv},Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kx},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return cC},Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return Hv},Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return R_},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return V_},Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return pb},Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return lb},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return $_},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return _C},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zv},Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kb},Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return rb},Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jx},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fx},Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return ib},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return iC},Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema:function(){return K_},Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return Jv},Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema:function(){return pC},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ox},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xb},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return j_},Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return db},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nx},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Mx},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Tb},Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema:function(){return dC},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return D_},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return G_},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return O_},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return Z_},Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qx},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return L_},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return I_},Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return fb},Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hx},Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return nb},Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema:function(){return fC},Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xx},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Lb},Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vx},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return F_},Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qb},Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Jb},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return uC},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return yb},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Db},PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gv},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return SC},PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema:function(){return NC},PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gv},PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return ab},PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema:function(){return wC},PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema:function(){return mC},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return yx},PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return eb},PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wx},PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zb},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zb},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ex},PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Fv},PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return tb},PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Bx},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return _x},PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return Yv},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return t_},PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0:function(){return n_},PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema:function(){return vC},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return rC},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return E_},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return Eb},PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return sb},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return J_},PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return mb},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gx},PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Zv},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nx},PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return ob},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rb},PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema:function(){return gC},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return vb},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bx},PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx:function(){return Wv},PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return cb},PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema:function(){return CC},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return a_},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return lC},PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema:function(){return hC},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nb},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return U_},PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema:function(){return Lv},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ax},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zx},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Ev},PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return M_},PayingForTx:function(){return A_},PendingTransaction:function(){return r_},Pointee:function(){return Vv},RelativeTTL:function(){return _v},Schedule:function(){return Wb},SignedTx:function(){return Tv},SpendTx:function(){return m_},Stat:function(){return Ux},Stats:function(){return kx},Status:function(){return Zx},StatusMdwAsyncTasks:function(){return e_},TotalStat:function(){return Yx},Transaction:function(){return ix},Transfer:function(){return i_},Ttl:function(){return Cv},Tx:function(){return vv},Validator:function(){return Yb},discriminators:function(){return EC}});var d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,p=Math.ceil,h=Math.floor,f="[BigNumber Error] ",y=f+"Number primitive has more than 15 significant digits: ",g=1e14,N=14,w=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,x=1e9;function _(e){var t=0|e;return e>0||e===t?t:t-1}function C(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=N-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function S(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function T(e,t,n,r){if(e<t||e>n||e!==h(e))throw Error(f+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function P(e){var t=e.c.length-1;return _(e.e/N)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function z(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var I=function e(t){var n,r,a,i,s,o,c,u,l,m,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,$=1,G=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,i,s,o,c,u,l,m,p=this;if(!(p instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>B?p.c=p.e=null:e.e<k?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?p.c=p.e=null:(p.e=o,p.c=[e]))}m=String(e)}else{if(!d.test(m=String(e)))return a(p,m,u);p.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(T(t,2,D.length,"Base"),10==t&&L)return W(p=new j(e),M+p.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return a(p,m,u,t);if(p.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(y+e)}else p.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=D.slice(0,t),o=c=0,l=m.length;c<l;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>o){o=l;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return a(p,String(e),u,t)}u=!1,(o=(m=r(m,t,10,p.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(l=m.length;48===m.charCodeAt(--l););if(m=m.slice(c,++l)){if(l-=c,u&&j.DEBUG&&l>15&&(e>w||e!==h(e)))throw Error(y+p.s*e);if((o=o-c-1)>B)p.c=p.e=null;else if(o<k)p.c=[p.e=0];else{if(p.e=o,p.c=[],c=(o+1)%N,o<0&&(c+=N),c<l){for(c&&p.c.push(+m.slice(0,c)),l-=N;c<l;)p.c.push(+m.slice(c,c+=N));c=N-(m=m.slice(c)).length}else c-=l;for(;c--;m+="0");p.c.push(+m)}}else p.c=[p.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:T(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=C(e.c),c=1==r||2==r&&(s<=R||s>=O)?A(c,s):z(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=C(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=A(c,i)}else if(t-=s,c=z(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=S(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*N-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,s,o,c,u,l,m=e.c,d=v;if(m){e:{for(a=1,o=m[0];o>=10;o/=10,a++);if((i=t-a)<0)i+=N,s=t,c=m[u=0],l=h(c/d[a-s-1]%10);else if((u=p((i+1)/N))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,a=1,s=(i%=N)-N+1}else{for(c=o=m[u],a=1;o>=10;o/=10,a++);l=(s=(i%=N)-N+a)<0?0:h(c/d[a-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%d[a-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?c/d[a-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=d[(N-t%N)%N],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=u,o=1,u--):(m.length=u+1,o=d[N-i],m[u]=s>0?h(c/d[a-s]%d[s])*o:0),r)for(;;){if(0==u){for(i=1,s=m[0];s>=10;s/=10,i++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);i!=o&&(e.e++,m[0]==g&&(m[0]=1));break}if(m[u]+=o,m[u]!=g)break;m[u--]=0,o=1}for(i=m.length;0===m[--i];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=C(e.c),t=n<=R||n>=O?A(t,n):z(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(T(n=e[t],0,x,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(T(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(T(n[0],-x,0,t),T(n[1],0,x,t),R=n[0],O=n[1]):(T(n,-x,x,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)T(n[0],-x,-1,t),T(n[1],1,x,t),k=n[0],B=n[1];else{if(T(n,-x,x,t),!n)throw Error(f+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(f+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(f+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(T(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(T(n=e[t],0,x,t),G=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(f+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:$,POW_PRECISION:G,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-x&&a<=x&&a===h(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%N)<1&&(t+=N),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==h(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(f+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return h(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,o=0,c=[],u=new j(E);if(null==e?e=M:T(e,0,x),a=p(e/N),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));o<a;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(i%1e14),o+=2);o=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(a*=7);o<a;)(i=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(c.push(i%1e14),o+=7);o=a/7}if(!U)for(;o<a;)(i=s())<9e15&&(c[o++]=i%1e14);for(a=c[--o],e%=N,a&&e&&(i=v[N-e],c[o]=h(a/i)*i);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=N);for(o=1,i=c[0];i>=10;i/=10,o++);o<N&&(r-=N-o)}return u.e=r,u.c=c,u}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,d,p,h,f,y=r.indexOf("."),g=M,N=q;for(y>=0&&(m=G,G=0,r=r.replace(".",""),p=(f=new j(a)).pow(r.length-y),G=m,f.c=t(z(C(p.c),p.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=s,h=(p=n(p,f,g,N,i)).c,d=p.r,l=p.e),y=h[u=l+g+1],m=i/2,d=d||u<0||null!=h[u+1],d=N<4?(null!=y||d)&&(0==N||N==(p.s<0?3:2)):y>m||y==m&&(4==N||d||6==N&&1&h[u-1]||N==(p.s<0?8:7)),u<1||!h[0])r=d?z(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=z(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%b,l=t/b|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%b)+(r=l*i+(s=e[c]/b|0)*u)%b*b+o)/n|0)+(r/b|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,o){var c,u,l,m,d,p,f,y,w,v,b,x,C,S,T,P,A,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(w=(y=new j(z)).c=[],z=i+(u=r.e-a.e)+1,o||(o=g,u=_(r.e/N)-_(a.e/N),z=z/N|0),l=0;E[l]==(I[l]||0);l++);if(E[l]>(I[l]||0)&&u--,z<0)w.push(1),m=!0;else{for(S=I.length,P=E.length,l=0,z+=2,(d=h(o/(E[0]+1)))>1&&(E=e(E,d,o),I=e(I,d,o),P=E.length,S=I.length),C=P,b=(v=I.slice(0,P)).length;b<P;v[b++]=0);A=E.slice(),A=[0].concat(A),T=E[0],E[1]>=o/2&&T++;do{if(d=0,(c=t(E,v,P,b))<0){if(x=v[0],P!=b&&(x=x*o+(v[1]||0)),(d=h(x/T))>1)for(d>=o&&(d=o-1),f=(p=e(E,d,o)).length,b=v.length;1==t(p,v,f,b);)d--,n(p,P<f?A:E,f,o),f=p.length,c=1;else 0==d&&(c=d=1),f=(p=E.slice()).length;if(f<b&&(p=[0].concat(p)),n(v,p,b,o),b=v.length,-1==c)for(;t(E,v,P,b)<1;)d++,n(v,P<b?A:E,b,o),b=v.length}else 0===c&&(d++,v=[0]);w[l++]=d,v[0]?v[b++]=I[C]||0:(v=[I[C]],b=1)}while((C++<S||null!=v[0])&&z--);m=null!=v[0],w[0]||w.splice(0,1)}if(o==g){for(l=1,z=w[0];z>=10;z/=10,l++);W(y,i+(y.e=l+u*N-1)+1,s,m)}else y.e=u,y.r=+m;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(m,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(o,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(c,"$1").replace(u,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(f+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return S(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return T(e,0,x),null==t?t=q:T(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-_(this.e/N))*N,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,s,o,c,u,l=this;if((e=new j(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new j(Math.pow(+K(l),s?e.s*(2-P(e)):+K(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!o&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&P(e)?-0:0,l.e>-1&&(i=1/i),new j(o?1/i:i);G&&(i=p(G/N+2))}for(s?(n=new j(.5),o&&(e.s=1),c=P(e)):c=(a=Math.abs(+K(e)))%2,u=new j(E);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(a){if(0===(a=h(a/2)))break;c=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=P(e);else{if(0==(a=+K(e)))break;c=a%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(o&&(u=E.div(u)),t?u.mod(t):i?W(u,G,q,void 0):u)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:T(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===S(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return S(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=S(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&_(this.e/N)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return S(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=S(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/N,u=e.e/N,l=s.c,m=e.c;if(!c||!u){if(!l||!m)return l?(e.s=-t,e):new j(m?s:NaN);if(!l[0]||!m[0])return m[0]?(e.s=-t,e):new j(l[0]?s:3==q?-0:0)}if(c=_(c),u=_(u),l=l.slice(),o=c-u){for((i=o<0)?(o=-o,a=l):(u=c,a=m),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=l.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(l[t]!=m[t]){i=l[t]<m[t];break}if(i&&(a=l,l=m,m=a,e.s=-e.s),(t=(r=m.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>o;){if(l[--r]<m[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=m[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,l,m,d,p,h,f,y,w=this,v=w.c,x=(e=new j(e,t)).c;if(!(v&&x&&v[0]&&x[0]))return!w.s||!e.s||v&&!v[0]&&!x||x&&!x[0]&&!v?e.c=e.e=e.s=null:(e.s*=w.s,v&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(w.e/N)+_(e.e/N),e.s*=w.s,(c=v.length)<(m=x.length)&&(h=v,v=x,x=h,a=c,c=m,m=a),a=c+m,h=[];a--;h.push(0));for(f=g,y=b,a=m;--a>=0;){for(n=0,d=x[a]%y,p=x[a]/y|0,i=a+(s=c);i>a;)n=((u=d*(u=v[--s]%y)+(o=p*u+(l=v[s]/y|0)*d)%y*y+h[i]+n)/f|0)+(o/y|0)+p*l,h[i--]=u%f;h[i]=n}return n?++r:h.splice(0,1),J(e,h,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/N,s=e.e/N,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=_(i),s=_(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/g|0,o[t]=g===o[t]?0:o[t]%g;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return T(e,1,x),null==t?t=q:T(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*N+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return T(e,-9007199254740991,w),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=C(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=_((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),C(i.c).slice(0,c)===(t=C(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(T(e,0,x),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(T(e,0,x),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(f+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],m=s[1],d=a.s<0,p=d?l.slice(1):l,h=p.length;if(c&&(i=o,o=c,c=i,h-=i),o>0&&h>0){for(i=h%o||o,l=p.substr(0,i);i<h;i+=o)l+=u+p.substr(i,o);c>0&&(l+=u+p.slice(i)),d&&(l="-"+l)}r=m?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):l}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,c,u,l,m,d,p,h=this,y=h.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(E)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!y)return new j(h);for(t=new j(E),l=r=new j(E),a=u=new j(E),p=C(y),s=t.e=p.length-h.e-1,t.c[0]=v[(o=s%N)<0?N+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new j(p),u.c[0]=0;m=n(c,t,0,1),1!=(i=r.plus(m.times(a))).comparedTo(e);)r=a,a=i,l=u.plus(m.times(i=l)),u=i,t=c.minus(m.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(a)),u.s=l.s=h.s,d=n(l,a,s*=2,q).minus(h).abs().comparedTo(n(u,r,s,q).minus(h).abs())<1?[l,a]:[u,r],B=o,d},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&T(e,1,x),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?A(C(n.c),i):z(C(n.c),i,"0"):10===e&&L?t=z(C((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(T(e,2,D.length,"Base"),t=r(z(C(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,I[Symbol.toStringTag]="BigNumber",I[Symbol.for("nodejs.util.inspect.custom")]=I.valueOf,null!=t&&j.set(t),j}(),E=I;const M=e=>e.integerValue(E.ROUND_CEIL);class q extends Error{constructor(e){super(e),this.name="BaseError"}}class R extends q{constructor(e){super(e),this.name="AccountError"}}class O extends q{constructor(e){super(e),this.name="AensError"}}class k extends q{constructor(e){super(e),this.name="AeppError"}}class B extends q{constructor(e){super(e),this.name="ChannelError"}}class U extends q{constructor(e){super(e),this.name="CompilerError"}}class $ extends q{constructor(e){super(e),this.name="ContractError"}}class G extends q{constructor(e){super(e),this.name="CryptographyError"}}class V extends q{constructor(e){super(e),this.name="NodeError"}}class D extends q{constructor(e){super(e),this.name="TransactionError"}}class L extends q{constructor(e){super(e),this.name="WalletError"}}class j extends q{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class F extends G{constructor(e){super(e),this.name="IllegalArgumentError"}}class H extends q{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class J extends q{constructor(e){super(e),this.name="InsufficientBalanceError"}}class W extends q{constructor(e){super(e),this.name="MissingParamError"}}class K extends q{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class Y extends q{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class Q extends q{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class X extends q{constructor(e){super(e),this.name="TypeError"}}class Z extends q{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class ee extends q{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class te extends q{constructor(e){super(e),this.name="NotImplementedError"}}class ne extends q{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class re extends q{constructor(e){super(e),this.name="LogicError"}}class ae extends q{constructor(e){super(e),this.name="InternalError"}}class ie extends ae{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class se extends R{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends O{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ce extends O{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ue extends O{constructor(e){super(e),this.name="InvalidAensNameError"}}class le extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class me extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class de extends k{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class pe extends k{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class he extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class fe extends B{constructor(e){super(e),this.name="ChannelCallError"}}class ye extends B{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends B{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class Ne extends B{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class we extends B{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ve extends B{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class be extends U{constructor(e){super(e),this.name="InvalidAuthDataError"}}class xe extends ${constructor(e,t=""){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`+t),this.name="BytecodeMismatchError"}}class _e extends ${constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Ce extends ${constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Se extends ${constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class Te extends ${constructor(e){super(e),this.name="MissingContractAddressError"}}class Pe extends ${constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Ae extends ${constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class ze extends ${constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ie extends ${constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Ee extends ${constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Me extends ${constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class qe extends ${constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class Re extends G{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Oe extends G{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class ke extends G{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Be extends G{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Ue extends G{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class $e extends V{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Ge extends V{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ve extends D{constructor(e){super(e),this.name="DecodeError"}}class De extends D{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends D{constructor(e){super(e),this.name="DryRunError"}}class je extends D{constructor(e){super(e),this.name="IllegalBidFeeError"}}class Fe extends D{constructor(e){super(e),this.name="InvalidSignatureError"}}class He extends D{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Je extends D{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class We extends D{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Ke extends D{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ye extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class Qe extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Xe extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Ze=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const et={[Ze.AE]:0,[Ze.MILI_AE]:-3,[Ze.MICRO_AE]:-6,[Ze.NANO_AE]:-9,[Ze.PICO_AE]:-12,[Ze.FEMTO_AE]:-15,[Ze.AETTOS]:-18},tt=(e,{denomination:t=Ze.AETTOS,targetDenomination:n=Ze.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!E.isBigNumber(r)))throw new j("value","a number",e);var r;return new E("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Ze.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Ze.AE}),rt=(e,{denomination:t=Ze.AE}={})=>tt(e,{denomination:t}),at=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],it=e=>at.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),st=e=>{var t;return null!==(t=at.find((t=>t.magnitude<=e)))&&void 0!==t?t:at[at.length-1]},ot=e=>{var t;const n=new E(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:a,magnitude:i}=(r<0?it:st)(r);return`${n.shiftedBy(-i).precision(9+Math.min(r-i,0)).toFixed()}${""!==a?" ":""}${a}`},ct=new Set(["Deserialize","Serialize","Retry","Sign"]);class ut{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!ct.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ct.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new ut(this._policies)}static create(){return new ut}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),a=n("None"),i=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,a,i,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?i:"Sign"===e?o:a}for(const e of this._policies){const n=e.policy,r=e.options,a=n.name;if(t.has(a))throw new Error("Duplicate policy names not allowed in pipeline");const i={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(a,i),u(r.phase).policies.add(i)}for(const e of this._policies){const{policy:n,options:r}=e,a=n.name,i=t.get(a);if(!i)throw new Error(`Missing node for policy ${a}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(i.dependsOn.add(n),n.dependants.add(i))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(i),i.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function m(){for(const e of c){if(l(e),e.policies.size>0&&e!==a)return void(a.hasRun||l(a));e.hasAfterPolicies&&l(a)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(m(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var lt=n(5606);const mt=void 0!==lt&<.env&<.env.DEBUG||void 0;let dt,pt=[],ht=[];const ft=[];mt&>(mt);const yt=Object.assign((e=>wt(e)),{enable:gt,enabled:Nt,disable:function(){const e=dt||"";return gt(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function gt(e){dt=e,pt=[],ht=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?ht.push(new RegExp(`^${e.substr(1)}$`)):pt.push(new RegExp(`^${e}$`));for(const e of ft)e.enabled=Nt(e.namespace)}function Nt(e){if(e.endsWith("*"))return!0;for(const t of ht)if(t.test(e))return!1;for(const t of pt)if(t.test(e))return!0;return!1}function wt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Nt(e),destroy:vt,log:yt.log,namespace:e,extend:bt});return ft.push(t),t}function vt(){const e=ft.indexOf(this);return e>=0&&(ft.splice(e,1),!0)}function bt(e){const t=wt(`${this.namespace}:${e}`);return t.log=this.log,t}var xt=yt,_t=n(5606);const Ct=new Set,St=void 0!==_t&&_t.env&&_t.env.AZURE_LOG_LEVEL||void 0;let Tt;const Pt=xt("azure");Pt.log=(...e)=>{xt.log(...e)};const At=["verbose","info","warning","error"];St&&(Rt(St)?function(e){if(e&&!Rt(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${At.join(",")}`);Tt=e;const t=[];for(const e of Ct)qt(e)&&t.push(e.namespace);xt.enable(t.join(","))}(St):console.error(`AZURE_LOG_LEVEL set to unknown log level '${St}'; logging is not enabled. Acceptable values: ${At.join(", ")}.`));const zt={verbose:400,info:300,warning:200,error:100};function It(e){const t=Pt.extend(e);return Et(Pt,t),{error:Mt(t,"error"),warning:Mt(t,"warning"),info:Mt(t,"info"),verbose:Mt(t,"verbose")}}function Et(e,t){t.log=(...t)=>{e.log(...t)}}function Mt(e,t){const n=Object.assign(e.extend(t),{level:t});if(Et(e,n),qt(n)){const e=xt.disable();xt.enable(e+","+n.namespace)}return Ct.add(n),n}function qt(e){return Boolean(Tt&&zt[e.level]<=zt[Tt])}function Rt(e){return At.includes(e)}const Ot=It("core-rest-pipeline");class kt extends Error{constructor(e){super(e),this.name="AbortError"}}function Bt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Ut(e){if(Bt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function $t(e){if(Ut(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Gt(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Vt(e);case"base64url":return function(e){return Vt(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],a=e[2*n+1];if(!Dt.has(r)||!Dt.has(a))return t.slice(0,n);t[n]=parseInt(`${r}${a}`,16)}return t}(e)}}function Vt(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Dt=new Set("0123456789abcdefABCDEF");var Lt;const jt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ft(){return jt()}var Ht,Jt,Wt,Kt;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ht=self.constructor)||void 0===Ht?void 0:Ht.name)||"ServiceWorkerGlobalScope"===(null===(Jt=self.constructor)||void 0===Jt?void 0:Jt.name)||null===(Wt=self.constructor)||void 0===Wt||Wt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Yt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Kt=globalThis.process.versions)||void 0===Kt?void 0:Kt.node),Qt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Xt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Zt=["api-version"];class en{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Xt.concat(e),t=Zt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||Bt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,Qt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}}const tn=["GET","HEAD"];function nn(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return rn(n,r,t)}}}async function rn(e,t,n,r=0){const{request:a,status:i,headers:s}=t,o=s.get("location");if(o&&(300===i||301===i&&tn.includes(a.method)||302===i&&tn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&r<n){const t=new URL(o,a.url);a.url=t.toString(),303===i&&(a.method="GET",a.headers.delete("Content-Length"),delete a.body),a.headers.delete("Authorization");const s=await e(a);return rn(e,s,n,r+1)}return t}const an="1.19.1";async function sn(e){const t=new Map;t.set("core-rest-pipeline",an),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const a=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);a&&e.set(a.brand,a.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const on="x-ms-useragent",cn="userAgentPolicy",un=Symbol("rawContent");function ln(e){return"function"==typeof e[un]?e[un]():e.stream()}function mn(e){return Boolean(e&&"function"==typeof e.pipe)}function dn(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function pn(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(dn(e))return new Response(e).blob();const t=ln(e);if(mn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return pn(t)}function hn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function fn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const yn="multipartPolicy",gn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Nn(){return{name:yn,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const a=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",i=a.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${a}`);const[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!gn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ft()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Gt(`--${n}`,"utf-8"),...t.flatMap((e=>[Gt("\r\n","utf-8"),Gt(hn(e.headers),"utf-8"),Gt("\r\n","utf-8"),e.body,Gt(`\r\n--${n}`,"utf-8")])),Gt("--\r\n\r\n","utf-8")],a=function(e){let t=0;for(const n of e){const e=fn(n);if(void 0===e)return;t+=e}return t}(r);a&&e.headers.set("Content-Length",a),e.body=await async function(e){const t=[];for(const n of e)t.push(await pn("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function wn(e,t,n){return new Promise(((r,a)=>{let i,s;const o=()=>a(new kt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(i&&clearTimeout(i),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();i=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function vn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const bn="Retry-After",xn=["retry-after-ms","x-ms-retry-after-ms",bn];function _n(e){if(e&&[429,503].includes(e.status))try{for(const t of xn){const n=vn(e,t);if(0===n||n)return n*(t===bn?1e3:1)}const t=e.headers.get(bn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Cn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,a=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=!!(m=i)&&("ETIMEDOUT"===m.code||"ESOCKETTIMEDOUT"===m.code||"ECONNREFUSED"===m.code||"ECONNRESET"===m.code||"ENOENT"===m.code||"ENOTFOUND"===m.code),o=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(_n(e))}(n)||!c);var m;return l||u||o?{skipStrategy:!0}:!i||s||c?function(e,t){const n=t.retryDelayInMs*Math.pow(2,e),r=Math.min(t.maxRetryDelayInMs,n);var a,i;return{retryAfterInMs:r/2+(a=0,i=r/2,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)}}(t,{retryDelayInMs:r,maxRetryDelayInMs:a}):{errorToThrow:i}}}}const Sn=It("core-rest-pipeline retryPolicy");function Tn(e,t={maxRetries:3}){const n=t.logger||Sn;return{name:"retryPolicy",async sendRequest(r,a){var i,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await a(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;o=c.response}if(null===(i=r.abortSignal)||void 0===i?void 0:i.aborted)throw n.error(`Retry ${u}: Request aborted.`),new kt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||Sn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:a,retryAfterInMs:i,redirectTo:s}=n;if(a)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,a),a;if(i||0===i){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${i}`),await wn(i,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Pn(e){return e.toLowerCase()}class An{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Pn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Pn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Pn(e))}delete(e){this._headersMap.delete(Pn(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function zn(e){return new An(e)}const In="setClientRequestIdPolicy",En={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Mn(e={}){let t=new qn(e.parentContext);return e.span&&(t=t.setValue(En.span,e.span)),e.namespace&&(t=t.setValue(En.namespace,e.namespace)),t}class qn{constructor(e){this._contextMap=e instanceof qn?new Map(e._contextMap):new Map}setValue(e,t){const n=new qn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qn(this);return t._contextMap.delete(e),t}}const Rn={instrumenterImplementation:void 0};function On(){return Rn.instrumenterImplementation||(Rn.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Mn({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),Rn.instrumenterImplementation}const kn={},Bn=new en;class Un extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Un.prototype)}[kn](){return`RestError: ${this.message} \n ${Bn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function $n(e){return e instanceof Un||Ut(e)&&"RestError"===e.name}function Gn(e){var t;const n=ut.create();var r,a;return Yt&&(e.agent&&n.addPolicy((a=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=a),t(e))})),e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Yt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,a]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(a);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:zn({"Content-Disposition":`form-data; name="${t}"`}),body:Gt(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",a=zn();a.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),a.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:a,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[yn]}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix);return{name:cn,async sendRequest(e,n){return e.headers.has(on)||e.headers.set(on,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:In,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(Nn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:Tn([{name:"throttlingRetryStrategy",retry({response:e}){const t=_n(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Cn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix),n=new en({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function a(e,a,i){var s;const o=On().startSpan(e,Object.assign(Object.assign({},i),{packageName:n,packageVersion:r,tracingContext:null===(s=null==a?void 0:a.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(En.namespace)||(c=c.setValue(En.namespace,t)),u.setAttribute("az.namespace",c.getValue(En.namespace)),{span:u,updatedOptions:Object.assign({},a,{tracingOptions:Object.assign(Object.assign({},null==a?void 0:a.tracingOptions),{tracingContext:c})})}}function i(e,t,...n){return On().withContext(e,t,...n)}return{startSpan:a,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=a(e,t,r);try{const e=await i(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:i,parseTraceparentHeader:function(e){return On().parseTraceparentHeader(e)},createRequestHeaders:function(e){return On().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:an})}catch(e){return void Ot.warning(`Error when creating the TracingClient: ${$t(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,a){var i;if(!r)return a(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(i=function(e,t,n){try{const{span:r,updatedOptions:a}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const i=e.createRequestHeaders(a.tracingOptions.tracingContext);for(const[e,n]of Object.entries(i))t.headers.set(e,n);return{span:r,tracingContext:a.tracingOptions.tracingContext}}catch(e){return void Ot.warning(`Skipping creating a tracing span due to an error: ${$t(e)}`)}}(r,e,o))&&void 0!==i?i:{};if(!c||!u)return a(e);try{const t=await r.withContext(u,a,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Ut(t)?t:void 0}),$n(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Yt&&n.addPolicy(nn(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Ot.info,r=new en({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const a=await t(e);return n(`Response status code: ${a.status}`),n(`Headers: ${r.sanitize(a.headers)}`),a}}}(e.loggingOptions),{afterPhase:"Sign"}),n}Un.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Un.PARSE_ERROR="PARSE_ERROR";class Vn{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new kt("The operation was aborted. Request has already been canceled.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:a,body:i}=function(e){const t="function"==typeof e.body?e.body():e.body;if(mn(t))throw new Error("Node streams are not supported in browser environment.");return dn(t)?{streaming:!0,body:Dn(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:i,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});a&&(s.duplex="half");const o=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,a;const i=function(e){const t=zn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:i,status:e.status},o=dn(e.body)?Dn(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(a=t.streamResponseStatusCodes)||void 0===a?void 0:a.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new Un(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:Un.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Dn(e,t={}){let n=0;const{onProgress:r,onEnd:a}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==a||a()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var i;const{done:s,value:o}=await t.read();if(s||!o)return null==a||a(),e.close(),void t.releaseLock();n+=null!==(i=null==o?void 0:o.length)&&void 0!==i?i:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==a||a(),t.cancel(e)}})}}class Ln{constructor(e){var t,n,r,a,i,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:zn(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(a=e.disableKeepAlive)&&void 0!==a&&a,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(i=e.withCredentials)&&void 0!==i&&i,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ft(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o,this.agent=e.agent,this.tlsSettings=e.tlsSettings}}const jn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Fn(e,t){try{return[await t(e),void 0]}catch(e){if($n(e)&&e.response)return[e.response,e];throw e}}async function Hn(e){const{scopes:t,getAccessToken:n,request:r}=e,a={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0},i=await n(t,a);i&&e.request.headers.set("Authorization",`Bearer ${i.token}`)}function Jn(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function Wn(e,t){var n;const{scopes:r}=e,a=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!a&&(e.request.headers.set("Authorization",`${null!==(n=a.tokenType)&&void 0!==n?n:"Bearer"} ${a.token}`),!0)}function Kn(e){var t;if(!e)return;const n=function(e){const t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[];let a;for(;null!==(a=t.exec(e));){const e=a[1],t=a[2],i={};let s;for(;null!==(s=n.exec(t));)i[s[1]]=s[2];r.push({scheme:e,params:i})}return r}(e);return null===(t=n.find((e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)))||void 0===t?void 0:t.params.claims}var Yn=n(8287).Buffer;const Qn=async e=>new Promise((t=>{setTimeout(t,e)})),Xn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),Zn=(()=>{try{return Yn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Yn.concat(e.map((e=>Yn.from(e))),t):Yn.concat;function er(e,t){return e in t}function tr(e,t){return t.includes(e)}function nr(e){return e instanceof Un&&404===e.statusCode&&e.message.includes("Account not found")}function rr(e){if(!(e instanceof Error))throw e}function ar(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const a=e();if(null==a)throw new j("wrapped value","defined",a);if("get"===t&&"_wrappedValue"===r[0])return a;const i=Reflect[t](a,...r);return"function"==typeof i&&"get"===t?i.bind(a):i}]))))}var ir=n(8947),sr=n.n(ir),or=n(4156);let cr=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.AccountSecretKey="sk",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var ur=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),a=r.charCodeAt(0);if(255!==t[a])throw new TypeError(r+" is ambiguous");t[a]=n}const n=e.length,r=e.charAt(0),a=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,o=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*a+1>>>0,u=new Uint8Array(c);for(;i<e.length;){const r=e.charCodeAt(i);if(r>255)return;let a=t[r];if(255===a)return;let s=0;for(let e=c-1;(0!==a||s<o)&&-1!==e;e--,s++)a+=n*u[e]>>>0,u[e]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");o=s,i++}let l=c-o;for(;l!==c&&0===u[l];)l++;const m=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)m[d++]=u[l++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let a=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,a++;const u=(c-o)*i+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let m=u-s;for(;m!==u&&0===l[m];)m++;let d=r.repeat(a);for(;m<u;++m)d+=e.charAt(l[m]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),lr=n(4107),mr=n.n(lr),dr=n(8287).Buffer;function pr(e){return(new(mr())).update(e).digest()}const hr=[cr.ContractBytearray,cr.ContractStoreKey,cr.ContractStoreValue,cr.Transaction,cr.OracleQuery,cr.OracleResponse,cr.State,cr.Poi,cr.StateTrees,cr.CallStateTree,cr.Bytearray],fr=[cr.KeyBlockHash,cr.MicroBlockHash,cr.BlockPofHash,cr.BlockTxHash,cr.BlockStateHash,cr.Channel,cr.ContractAddress,cr.TxHash,cr.OracleAddress,cr.OracleQueryId,cr.AccountAddress,cr.AccountSecretKey,cr.Signature,cr.Commitment,cr.PeerPubkey,cr.Name],yr={[cr.KeyBlockHash]:32,[cr.MicroBlockHash]:32,[cr.BlockPofHash]:32,[cr.BlockTxHash]:32,[cr.BlockStateHash]:32,[cr.Channel]:32,[cr.ContractAddress]:32,[cr.TxHash]:32,[cr.OracleAddress]:32,[cr.OracleQueryId]:32,[cr.AccountAddress]:32,[cr.AccountSecretKey]:32,[cr.Signature]:64,[cr.Commitment]:32,[cr.PeerPubkey]:32,[cr.State]:32};function gr(e,t){if(!er(t,yr))return;const n=yr[t];if(null!=n&&e.length!==n)throw new De(`Payload should be ${n} bytes, got ${e.length} instead`)}const Nr=e=>pr(pr(e)).slice(0,4),wr=e=>Zn([e,Nr(e)]);function vr(e){const t=e.slice(0,-4);if(!Nr(t).equals(e.slice(-4)))throw new Re;return t}const br={encode:e=>wr(e).toString("base64"),decode:e=>vr(dr.from(e,"base64"))},xr={encode:e=>ur.encode(wr(e)),decode:e=>vr(dr.from(ur.decode(e)))},_r=e=>{const t=hr.find((t=>t===e));if(null!=t)return[t,br];const n=fr.find((t=>t===e));if(null!=n)return[n,xr];throw new j("prefix",`one of ${[...fr,...hr].join(", ")}`,e)};function Cr(e){const[t,n,r]=e.split("_");if(null==n)throw new Ve(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ve(`Encoded string have extra parts: ${e}`);const[a,i]=_r(t),s=i.decode(n);return gr(s,a),s}function Sr(e,t){const[,n]=_r(t);return gr(e,t),`${t}_${n.encode(e)}`}var Tr=n(8287).Buffer;function Pr(e,...t){0===t.length&&(t=[cr.AccountAddress]);try{Cr(e);const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Ar(e,...t){if(Cr(e),0===t.length)return;const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n)}function zr(e,...t){try{return Ar(e,...t),!0}catch(e){return!1}}function Ir(){const[e]=new BigUint64Array(sr().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Er(e){const t=Tr.allocUnsafe(4);return t.writeUInt32BE(e),t.subarray(t.findIndex((e=>0!==e)))}function Mr(e){return Tr.from((0,or.blake2b)(e,void 0,32))}function qr(e,t,n){return sr().sign.detached.verify(e,t,Cr(n))}function Rr(e){return e<253?Tr.from([e]):Zn(e<=65535?[Tr.from([253]),Tr.from(new Uint16Array([e]).buffer)]:e<=4294967295?[Tr.from([254]),Tr.from(new Uint32Array([e]).buffer)]:[Tr.from([255]),Tr.from(new BigUint64Array([BigInt(e)]).buffer)])}const Or=Tr.from("aeternity Signed Message:\n","utf8"),kr=Rr(Or.length);function Br(e){const t=Tr.from(e,"utf8");return Mr(Zn([kr,Or,Rr(t.length),t]))}function Ur(e,t,n){return qr(Br(e),t,n)}var $r=n(8287).Buffer;function Gr(e,t=!1){if(null==e)return $r.from([]);if(Number.isInteger(e)||E.isBigNumber(e)||t){if(E.isBigNumber(e)||(e=new E(e)),!e.isInteger())throw new X(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),$r.from(t,"hex")}if("string"==typeof e)return $r.from(e);throw new K}const Vr={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},Dr=5e4,Lr=1e9,jr=1e14,Fr=.05,Hr=480,Jr=31,Wr=Xn({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new E(t).times(jr)]));let Kr=function(e){return e[e.Ceres=6]="Ceres",e}({}),Yr=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),Qr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Xr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleRespondTx=24]="OracleRespondTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var Zr=n(8287).Buffer;function ea(e,t){return Sr(Mr(Zr.from([...Cr(e),...Gr(t)])),cr.ContractAddress)}function ta(e,t,n){return Sr(Mr(Zr.from([...Cr(e),...function(e){const t=Gr(e,!0);return Zn([Zr.alloc(32-t.length),t])}(t),...Cr(n)])),cr.OracleQueryId)}const na=".chain";function ra(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new j("aens name","including only one dot",e);if(n!==na.slice(1))throw new j("aens name",`suffixed with ${na}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new j("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new j("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new j("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new j("aens name",'ending with no "-" char',e);let a;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new j("aens name","valid",e);a=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new j("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(a))throw new j("aens name","without illegal chars",e);if(a.length>63+na.length)throw new j("aens name","not too long",e);return a}function aa(e){return Sr(Mr(ra(e)),cr.Name)}function ia(e,t=Ir()){return Sr(Mr(Zn([Zr.from(ra(e)),Zr.from(t.toString(16).padStart(64,"0"),"hex")])),cr.Commitment)}function sa(e=Zr.from([])){return BigInt("0x"+Zr.from(e).toString("hex")).toString()}function oa(e){ra(e)}function ca(e){try{return oa(e),!0}catch(e){return!1}}const ua=[[cr.AccountAddress,"account_pubkey"],[cr.OracleAddress,"oracle_pubkey"],[cr.ContractAddress,"contract_pubkey"],[cr.Channel,"channel"]];function la(e){Cr(e);const t=e.substring(0,2),n=ua.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new j("identifier",`prefixed with one of ${ua.map((([e])=>`${e}_`)).join(", ")}`,e)}function ma(e){const t=ra(e).length-na.length;return Wr[Math.min(t,Jr)]}function da(e,{startFee:t,increment:n=Fr}={}){if(Number(n)!==n||n%1==0)throw new je(`Increment must be float. Current increment ${n}`);if(n<Fr)throw new je(`minimum increment percentage is ${Fr}`);return M(new E(null!=t?t:ma(e)).times(new E(Fr).plus(1)))}function pa(e,t){var n,r,a;const i=ra(e).length-na.length;return(null!==(n=null!==(r=null!==(a=i<=4?2400:null)&&void 0!==a?a:i<=8?960:null)&&void 0!==r?r:i<=12?480:null)&&void 0!==n?n:0)+t}function ha(e){return ra(e).length<13+na.length}async function fa(e,t){return Math.floor(await async function(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){if(null!=t&&"key-block"===e)return t;if(null!=n&&"micro-block"===e)return n;const a=await r.getNetworkId();return"ae_dev"===a?0:!["ae_mainnet","ae_uat"].includes(a)&&await r._isHyperchain()?3e3:"key-block"===e?18e4:3e3}(e,t)/3)}const ya=new WeakMap;async function ga({cached:e=!1,...t}){const n=null!==(a=(r=t.onNode)._wrappedValue)&&void 0!==a?a:r;var r,a;if(e){const e=ya.get(n);if(null!=e&&e.time>Date.now()-await fa("key-block",t))return e.height}const{height:i}=await n.getCurrentKeyBlockHeight();return ya.set(n,{height:i,time:Date.now()}),i}async function Na(e,{blocks:t=5,interval:n,...r}){let a;null!=n||(n=await fa("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await ga({...r,cached:!0})+t),await Qn(n)}while(-1===a||await ga({...r,cached:!0})<a);throw new Q(t,e)}async function wa(e,{interval:t,...n}){let r;null!=t||(t=Math.min(await fa("key-block",n),5e3));do{null!=r&&await Qn(t),r=await ga(n)}while(r<e);return r}async function va(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:a}=await n.getTransactionByHash(e),i=await wa(a+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new Ke(e);case a:return i;default:return va(e,{onNode:n,confirm:t,...r})}}async function ba(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function xa(e,{format:t=Ze.AETTOS,...n}){const r=e.startsWith("ok_")?Sr(Cr(e),cr.AccountAddress):e,{balance:a}=await ba(r,n).catch((e=>{if(!nr(e))throw e;return{balance:0n}}));return tt(a,{targetDenomination:t})}async function _a({onNode:e}){return e.getCurrentGeneration()}async function Ca(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Sa(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function Ta(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function Pa(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const Aa=new Map;async function za(e,t){const n=Aa.get(e);if(Aa.delete(e),null==n)throw new ae("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await t.getKeyBlockByHeight(n[0].top)).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:Vr.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:a,txEvents:i}=r;a.forEach((({result:e,reason:t,...r},a)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[a];"ok"===e?s({...r,txEvents:i}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ia(e,t,{top:n,txEvents:r,combine:a,onNode:i}){var s;const o=!0===a?[n,r].join():"immediate",c=null!==(s=Aa.get(o))&&void 0!==s?s:[];return Aa.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===a?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{za(o,i)}))):za(o,i)}))}async function Ea(e,{onNode:t}){return t.getContractCode(e)}async function Ma(e,{onNode:t}){return t.getContract(e)}async function qa(e,{onNode:t}){return t.getNameEntryByName(e)}async function Ra(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:a}){if(ca(e)){if(n||r){const n=(await a.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return aa(e)}try{return Cr(e),e}catch(t){throw new ue(`Invalid name or address: ${e}`)}}var Oa=n(8287).Buffer;const ka={[Kr.Ceres]:{"contract-create":{vmVersion:[Yr.Fate3],abiVersion:[Qr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Qr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Qr.NoAbi,Qr.Fate]}}};function Ba(e,t){var n;const r=ka[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Yr.Fate2,abiVersion:r.abiVersion[0]}}var Ua={serialize(e,t,{consensusProtocolVersion:n=Kr.Ceres}){return null!=e||(e=Ba(n,"contract-create")),Oa.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?Ba((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},$a=n(8287).Buffer,Ga={_getProtocolDetails(e,t){return Ba(e,Xr.ContractCallTx===t||Xr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Kr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return $a.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Va=n(8287).Buffer;const Da=[cr.AccountAddress,cr.Name,cr.Commitment,cr.OracleAddress,cr.ContractAddress,cr.Channel];function La(...e){return{serialize(t){const n=t.slice(0,2);if(!tr(n,Da))throw new We(n);if(!tr(n,e))throw new j("Address encoding",e.join(", "),n);const r=Da.indexOf(n)+1;return Va.from([...Gr(r),...Cr(t)])},deserialize(t){const n=Va.from(t).readUIntBE(0,1),r=Da[n-1];if(null==r)throw new He(n);if(!tr(r,e))throw new j("Address encoding",e.join(", "),r);return Sr(t.subarray(1),r)}}}function ja(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Fa={serialize(e){if(Number(e)<0)throw new j("value","greater or equal to 0",e);return Gr(e,!0)},deserialize(e){return sa(e)}},Ha={...Fa,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ze.AETTOS,...r}){return Fa.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}},Ja=n(8287).Buffer;function Wa(e,t){return{serialize(e){if(null==e){if(!0===t)return Ja.from([]);throw new j("Encoded data","provided",e)}return Cr(e)},deserialize(t){return Sr(t,e)}}}var Ka=n(8287).Buffer;function Ya(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Ka.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(Sr(t,cr.Bytearray),e)}}}var Qa=n(8287).Buffer;function Xa(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new j("value","to be a number",e);if(e>255)throw new j("value","to be less than 256",e);if(!tr(e,t))throw new j("value","to be a value of Enum",e);return Qa.from([e])},deserialize(e){if(1!==e.length)throw new j("buffer","to have single element",e.length);const n=e[0];if(!tr(n,t))throw new j("value","to be a value of Enum",n);return n}}}const Za=new WeakMap;async function ei(e){const t=Za.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{minGasPrice:n,utilization:r}=(await e.getRecentGasPrices())[0];let a=r<70?0n:BigInt(new E(n.toString()).times(1.01).integerValue().toFixed());const i=100000n*BigInt(Lr);return a>i&&(console.warn(`Estimated gas price ${a} exceeds the maximum safe value for unknown reason. It will be limited to ${i}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),a=i),Za.set(e,{gasPrice:a,time:Date.now()}),a}var ti={...Ha,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `gasPrice` instead)",n);const a=await ei(n);return 0n!==a?tt(a,{targetDenomination:r}):void 0},serializeAettos(e=Lr.toString()){if(+e<Lr)throw new F(`Gas price ${e.toString()} must be bigger than ${Lr}`);return e}};function ni(e){const t={[Xr.OracleRegisterTx]:"oracleTtlValue",[Xr.OracleExtendTx]:"oracleTtlValue",[Xr.OracleQueryTx]:"queryTtlValue",[Xr.OracleRespondTx]:"responseTtlValue"},{tag:n}=e;return er(n,t)?e[t[n]]:1}function ri(e,t,n){const{length:r}=Cr(e),a=t(e);let i=0;return a.tag!==Xr.GaMetaTx&&a.tag!==Xr.PayingForTx||(i=Cr(n(a.tx.encodedTx)).length),(e=>{var t;return 15e3*(null!==(t={[Xr.ChannelForceProgressTx]:30,[Xr.ChannelOffChainTx]:0,[Xr.ContractCreateTx]:5,[Xr.ContractCallTx]:12,[Xr.GaAttachTx]:5,[Xr.GaMetaTx]:5,[Xr.PayingForTx]:.2}[e])&&void 0!==t?t:1)})(a.tag)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case Xr.OracleRegisterTx:case Xr.OracleExtendTx:case Xr.OracleQueryTx:case Xr.OracleRespondTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case Xr.GaMetaTx:case Xr.PayingForTx:return 20*(t-r);default:return 20*t}})(a.tag,r,{relativeTtl:ni(a),innerTxSize:i})}const ai="_gas-price:";var ii={...Ha,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `fee` instead)",n);const r=await ei(n);return 0n!==r?ai+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:a},{_canIncreaseFee:i}){if(null!=a)return a.toFixed();const s=function(e,t,n){let r,a=new E(0);do{r=a,a=new E(Lr).times(ri(e(a),t,n))}while(!a.eq(r));return a}((e=>t({_computingMinFee:e})),n,r),o=!0===e?.startsWith(ai)?s.dividedBy(Lr).times(e.replace(ai,"")):new E(null!=e?e:s);if(s.gt(o)){if(!0===i)return s.toFixed();throw new F(`Fee ${o.toString()} must be bigger than ${s}`)}return o.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(ai)?Fa.serialize(this.serializeAettos(e,t,n)):Ha.serialize.call(this,e,t,n)}},si={serialize(e){return Fa.serialize(e)},deserialize(e){return+Fa.deserialize(e)}},oi={...si,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:a,_computingGasLimit:i},{gasMax:s=6e6}){if(null!=i)return si.serialize(i);const o=t===Xr.GaMetaTx?Dr:function(e,t,n,r){return e-+ri(t(e),n,r)}(s,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,a),c=null!=e?e:o;if(c>o)throw new F(`Gas limit ${c} must be less or equal to ${o}`);return si.serialize(c)}},ci=n(8287).Buffer,ui={serialize(e){return ci.from(e)},deserialize(e){return e.toString()}},li={serialize(e){return ui.serialize(e)},deserialize(e){return ui.deserialize(e)}},mi={...Ha,serializeAettos(e,t){const n=ma(t.name),r=new E(null!=e?e:n);if(n.gt(r))throw new ce(r,n);return r.toFixed()},serialize(e,t,n){return Ha.serialize.call(this,e,t,n)}};const di=La(cr.Name);var pi={...di,serialize(e){return di.serialize(ca(e)?aa(e):e)}};function hi(e){return{...si,serialize(e,{tag:t}){if(Xr.GaAttachTx===t&&1!==e)throw new j("nonce","equal 1 if GaAttachTx",e);return si.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:a,strategy:i}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==a)throw new j("onNode",o,a);if(null==s)throw new j("senderId",o,s);return(await a.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:i}).catch((e=>{if(!nr(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var fi=n(8287).Buffer;const yi=fi.from([1]),gi=fi.from([2]),Ni=La(...Da);var wi=e=>({serialize(t){if(t.length>32)throw new F(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(zr(n,...Da)&&(r=[...e?[yi]:[],Ni.serialize(n)]),zr(n,cr.Bytearray)){const e=Cr(n);if(e.length>1024)throw new j("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[gi,e]}if(null==r)throw new Ve(`Unknown AENS pointer value: ${n}`);return[Gr(t),fi.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:Ni.deserialize(n)};const r=n.subarray(0,1),a=n.subarray(1);let i;if(r.equals(yi)&&(i=Ni.deserialize(a)),r.equals(gi)&&(i=Sr(a,cr.Bytearray)),null==i)throw new Ve(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:i}}))}}),vi={...Ha,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:a}=n,i="provided (or provide `queryFee` instead)";if(null==r)throw new j("onNode",i,r);if(null==a)throw new j("oracleId",i,a);return(await r.getOracleByPubkey(a)).queryFee.toString()}},bi=n(8287).Buffer,xi={serialize(e){return bi.from(e)},deserialize(e){return e}};function _i(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new j("ShortUIntConst",e,n);return si.serialize(e)},deserialize(t){const n=si.deserialize(t);if(n!==e)throw new j("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Ci={serialize(e){return Gr(e)},deserialize(e){return e.toString()}},Si=n(8287).Buffer;function Ti(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?Si.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(Sr(t,cr.Transaction),e)}}}var Pi={...si,serialize(e){return si.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:a,...i}){if(!0!==r&&0!==e&&(null!=e||!0===a)){if(null==n)throw new j("onNode","provided",n);e=(null!=e?e:3)+await ga({...i,onNode:n,cached:!0})}return e}};function Ai(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function zi(e,t){return{...t,serialize(n,r,a){return t.serialize(e(n),r,a)}}}let Ii=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),Ei=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.Channel=58]="Channel",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),Mi=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const qi=Ti(),Ri=Ti(Xr.SignedTx),Oi=Ya(Ei.TreesPoi),ki=Ai(3600,si),Bi=zi((e=>{const t=18e4;if(null!=e||(e=t),e>=1&&e<=t)return e;throw new j("nameTtl","a number between 1 and 180000 blocks",e)}),si),Ui=[{tag:_i(Xr.SignedTx),version:_i(1,!0),signatures:ja(xi),encodedTx:qi},{tag:_i(Xr.SpendTx),version:_i(1,!0),senderId:La(cr.AccountAddress),recipientId:La(cr.AccountAddress,cr.ContractAddress,cr.Name),amount:Ha,fee:ii,ttl:Pi,nonce:hi("senderId"),payload:Wa(cr.Bytearray,!0)},{tag:_i(Xr.NamePreclaimTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),commitmentId:La(cr.Commitment),fee:ii,ttl:Pi},{tag:_i(Xr.NameClaimTx),version:_i(2,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),name:li,nameSalt:Ai(0,Fa),nameFee:mi,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,nameTtl:Bi,pointers:wi(!1),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(2),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,nameTtl:Bi,pointers:wi(!0),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameTransferTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,recipientId:La(cr.AccountAddress,cr.Name),fee:ii,ttl:Pi},{tag:_i(Xr.NameRevokeTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,fee:ii,ttl:Pi},{tag:_i(Xr.ContractCreateTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),ctVersion:Ua,fee:ii,ttl:Pi,deposit:zi(((e=0)=>{if(0==+e)return e;throw new j("deposit","equal 0 (because is not refundable)",e)}),Ha),amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.ContractCallTx),version:_i(1,!0),callerId:La(cr.AccountAddress),nonce:hi("callerId"),contractId:La(cr.ContractAddress,cr.Name),abiVersion:Ga,fee:ii,ttl:Pi,amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.OracleRegisterTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),queryFormat:Ci,responseFormat:Ci,queryFee:Ha,oracleTtlType:Ai(Mi.delta,Xa(Mi)),oracleTtlValue:Ai(500,si),fee:ii,ttl:Pi,abiVersion:Ga},{tag:_i(Xr.OracleExtendTx),version:_i(1,!0),oracleId:La(cr.OracleAddress,cr.Name),nonce:hi("oracleId"),oracleTtlType:Ai(Mi.delta,Xa(Mi)),oracleTtlValue:Ai(500,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleQueryTx),version:_i(1,!0),senderId:La(cr.AccountAddress),nonce:hi("senderId"),oracleId:La(cr.OracleAddress,cr.Name),query:Ci,queryFee:vi,queryTtlType:Ai(Mi.delta,Xa(Mi)),queryTtlValue:Ai(10,si),responseTtlType:Ai(Mi.delta,Xa(Mi)),responseTtlValue:Ai(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleRespondTx),version:_i(1,!0),oracleId:La(cr.OracleAddress),nonce:hi("oracleId"),queryId:Wa(cr.OracleQueryId),response:Ci,responseTtlType:Ai(Mi.delta,Xa(Mi)),responseTtlValue:Ai(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.ChannelCreateTx),version:_i(2,!0),initiator:La(cr.AccountAddress),initiatorAmount:Fa,responder:La(cr.AccountAddress),responderAmount:Fa,channelReserve:Fa,lockPeriod:Fa,ttl:Pi,fee:ii,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),nonce:hi("initiator")},{tag:_i(Xr.ChannelCloseMutualTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelCloseSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelSlashTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelDepositTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelWithdrawTx),version:_i(1,!0),channelId:La(cr.Channel),toId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelSettleTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelForceProgressTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),round:si,update:Wa(cr.ContractBytearray),stateHash:Wa(cr.State),offChainTrees:Wa(cr.StateTrees),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelOffChainTx),version:_i(2,!0),channelId:La(cr.Channel),round:si,stateHash:Wa(cr.State)},{tag:_i(Xr.ChannelSnapshotSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.GaAttachTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),authFun:xi,ctVersion:Ua,fee:ii,ttl:Pi,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.GaMetaTx),version:_i(2,!0),gaId:La(cr.AccountAddress),authData:Wa(cr.ContractBytearray),abiVersion:Ga,fee:ii,gasLimit:oi,gasPrice:ti,tx:Ri},{tag:_i(Xr.PayingForTx),version:_i(1,!0),payerId:La(cr.AccountAddress),nonce:hi("payerId"),fee:ii,tx:Ri}];var $i=n(858),Gi=n(8287).Buffer;function Vi(e,t,n,r){const a=e.filter((e=>e.tag.constValue===n));if(0===a.length)throw new Je(`${t[n]} (${n})`,0);if(null==r){const e=a.find((e=>e.version.constValueOptional));if(null==e)throw new ae(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const i=a.find((e=>e.version.constValue===r));if(null==i)throw new Je(`${t[n]} (${n})`,r);return Object.entries(i)}function Di(e,t,n,r,a){const i=Vi(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Sr((0,$i.encode)(i),a)}function Li(e,t,n,r,a){const i=(0,$i.decode)(Cr(n));if(!ArrayBuffer.isView(i[0])||!ArrayBuffer.isView(i[1]))throw new Ve("Can't parse tag or version in provided RLP");const s=Gi.from(i[0]).readUintBE(0,i[0].length),o=Vi(e,t,s,Gi.from(i[1]).readUintBE(0,i[1].length));if(null!=r&&r!==s)throw new Ve(`Expected ${t[r]} tag, got ${t[s]} instead`);if(i.length!==o.length)throw new j("RLP length",o.length,i.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(i[n],a)])))}var ji=n(8287).Buffer,Fi={serialize(e){return ji.from([e?1:0])},deserialize(e){return 1===e[0]}};function Hi(e,t){return{serialize(e,{packEntry:n}){return Cr(n({tag:Ei.Mtree,values:Object.entries(e).map((([e,r])=>({tag:Ei.MtreeValue,key:Cr(e),value:Cr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:a}=r(Sr(n,cr.Bytearray),Ei.Mtree);return Object.fromEntries(a.filter((({key:t})=>e!==cr.ContractAddress||32===t.length)).map((({key:n,value:a})=>[Sr(n,e),r(Sr(a,cr.Bytearray),t)])))},recursiveType:!0}}var Ji,Wi=n(8287).Buffer;function Ki(e,t,n){Yi(e,t),t.set(e,n)}function Yi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qi(e,t,n){return e.set(Zi(e,t),n),n}function Xi(e,t){return e.get(Zi(e,t))}function Zi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var es=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(es||{}),ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,as=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakSet;class cs{get isComplete(){return Xi(ns,this)}constructor(e,t,n,r){var a;if(Yi(this,a=os),a.add(this),Ki(this,ts,void 0),Ki(this,ns,!0),Ki(this,rs,void 0),Ki(this,as,void 0),Ki(this,is,void 0),Ki(this,ss,void 0),Qi(as,this,t),Qi(is,this,n),Qi(ss,this,r),Qi(ts,this,e[0].toString("hex")),Qi(rs,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=Xi(rs,this)[Xi(ts,this)])Object.entries(Xi(rs,this)).forEach((([e,t])=>{if(us.call(cs,t)!==e)throw new Oe;const{type:n}=ls.call(cs,t);switch(n){case es.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==Xi(rs,this)[e.toString("hex")]&&Qi(ns,this,!1)}));break;case es.Extension:if(null==Xi(rs,this)[t[1].toString("hex")])throw new ke("Can't find a node by hash in extension node");break;case es.Leaf:break;default:throw new ae(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(Xi(rs,this)).length)throw new ke("Can't find a node by root hash");Qi(ns,this,!1)}}isEqual(e){return Xi(ts,this)===Xi(ts,e)}serialize(){return[Wi.from(Xi(ts,this),"hex"),Object.entries(Xi(rs,this)).map((([e,t])=>[Wi.from(e,"hex"),t]))]}get(e){const t=Zi(os,this,ms).call(this,Cr(e).toString("hex"));return null==t?t:Xi(ss,this).call(this,Sr(t,cr.Bytearray),Xi(is,this))}toObject(){return Object.fromEntries(Zi(os,this,ds).call(this).filter((([e])=>Xi(as,this)!==cr.ContractAddress||66!==e.length)).map((([e,t])=>[Sr(Wi.from(e,"hex"),Xi(as,this)),Xi(ss,this).call(this,Sr(t,cr.Bytearray),Xi(is,this))])))}}function us(e){return Wi.from(Mr((0,$i.encode)(e))).toString("hex")}function ls(e){switch(e.length){case 17:return{type:es.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Ue(t);const n=t<=1?es.Extension:es.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===es.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Be(e.length)}}function ms(e){let t=Xi(ts,this),n=e;for(;;){const e=Xi(rs,this)[t];if(null==e){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:r,value:a,path:i}=ls.call(Ji,e);switch(r){case es.Branch:if(0===n.length)return a;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case es.Extension:if(n.substring(0,i?.length)!==i)return;t=e[1].toString("hex"),n=n.substring(i.length);break;case es.Leaf:if(i!==n)return;return a;default:throw new ae(`Unknown MPTree node type: ${r}`)}}}function ds(){const e=[],t=(n,r)=>{const a=Xi(rs,this)[n];if(null==a){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:i,value:s,path:o}=ls.call(Ji,a);switch(i){case es.Branch:a.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case es.Extension:t(a[1].toString("hex"),r+o);break;case es.Leaf:if(null==s)throw new ie;e.push([r+o,s]);break;default:throw new ae(`Unknown MPTree node type: ${i}`)}};return t(Xi(ts,this),""),e}function ps(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new cs(n,e,t,r)}}}function hs(e){return{serialize(t,{packEntry:n}){return Cr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(Sr(t,cr.Bytearray),e).payload},recursiveType:!0}}Ji=cs;const fs=ja(Ya(Ei.MtreeValue)),ys=Hi(cr.ContractAddress,Ei.Contract),gs=Hi(cr.AccountAddress,Ei.Account),Ns=Hi(cr.Bytearray,Ei.ContractCall),ws=Hi(cr.Channel,Ei.Channel),vs=Hi(cr.Name,Ei.Name),bs=Hi(cr.OracleAddress,Ei.Oracle),xs=[{tag:_i(Ei.Account),version:_i(1),nonce:si,balance:Fa},{tag:_i(Ei.Account),version:_i(2,!0),flags:Fa,nonce:si,balance:Fa,gaContract:La(cr.ContractAddress,cr.Name),gaAuthFun:Wa(cr.ContractBytearray)},{tag:_i(Ei.Name),version:_i(1,!0),accountId:La(cr.AccountAddress),nameTtl:si,status:xi,clientTtl:si,pointers:wi},{tag:_i(Ei.Contract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),log:Wa(cr.ContractBytearray),active:Fi,referers:ja(La(cr.AccountAddress)),deposit:Ha},{tag:_i(Ei.ContractCall),version:_i(2,!0),callerId:La(cr.AccountAddress),callerNonce:si,height:si,contractId:La(cr.ContractAddress),gasPrice:Fa,gasUsed:si,returnValue:Wa(cr.ContractBytearray),returnType:Xa(Ii),log:ja(xi)},{tag:_i(Ei.Oracle),version:_i(1,!0),accountId:La(cr.AccountAddress),queryFormat:Ci,responseFormat:Ci,queryFee:Ha,oracleTtlValue:si,abiVersion:Ga},{tag:_i(Ei.Channel),version:_i(3,!0),initiator:La(cr.AccountAddress),responder:La(cr.AccountAddress),channelAmount:Fa,initiatorAmount:Fa,responderAmount:Fa,channelReserve:Fa,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),round:si,soloRound:Fa,lockPeriod:Fa,lockedUntil:Fa,initiatorAuth:Wa(cr.ContractBytearray),responderAuth:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateTransfer),version:_i(1,!0),from:La(cr.AccountAddress),to:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateDeposit),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateWithdraw),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateCreateContract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),deposit:Fa,callData:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateCallContract),version:_i(1,!0),caller:La(cr.AccountAddress),contract:La(cr.ContractAddress),abiVersion:Ga,amount:Fa,callData:Wa(cr.ContractBytearray),callStack:xi,gasPrice:ti,gasLimit:oi},{tag:_i(Ei.TreesPoi),version:_i(1,!0),accounts:ja(ps(cr.AccountAddress,Ei.Account)),calls:ja(ps(cr.Bytearray,Ei.ContractCall)),channels:ja(ps(cr.Channel,Ei.Channel)),contracts:ja(ps(cr.ContractAddress,Ei.Contract)),ns:ja(ps(cr.Name,Ei.Name)),oracles:ja(ps(cr.OracleAddress,Ei.Oracle))},{tag:_i(Ei.StateTrees),version:_i(0,!0),contracts:hs(Ei.ContractsMtree),calls:hs(Ei.CallsMtree),channels:hs(Ei.ChannelsMtree),ns:hs(Ei.NameserviceMtree),oracles:hs(Ei.OraclesMtree),accounts:hs(Ei.AccountsMtree)},{tag:_i(Ei.Mtree),version:_i(1,!0),values:fs},{tag:_i(Ei.MtreeValue),version:_i(1,!0),key:xi,value:xi},{tag:_i(Ei.ContractsMtree),version:_i(1,!0),payload:ys},{tag:_i(Ei.CallsMtree),version:_i(1,!0),payload:Ns},{tag:_i(Ei.ChannelsMtree),version:_i(1,!0),payload:ws},{tag:_i(Ei.NameserviceMtree),version:_i(1,!0),payload:vs},{tag:_i(Ei.OraclesMtree),version:_i(1,!0),payload:bs},{tag:_i(Ei.AccountsMtree),version:_i(1,!0),payload:gs},{tag:_i(Ei.GaMetaTxAuthData),version:_i(1,!0),fee:Ha,gasPrice:ti,txHash:Wa(cr.TxHash)}],_s=[[Ei.CallsMtree,cr.CallStateTree],[Ei.StateTrees,cr.StateTrees],[Ei.TreesPoi,cr.Poi]];function Cs(e){var t;const n=null!==(t=_s.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:cr.Bytearray;return Di(xs,Ei,e,{packEntry:Cs},n)}function Ss(e,t){return null!=t||(t=_s.find((([,t])=>e.startsWith(t)))?.[0]),Li(xs,Ei,e,t,{unpackEntry:Ss})}function Ts(e,t){return Vi(Ui,Xr,e,t)}function Ps(e){return Di(Ui,Xr,e,{unpackTx:zs,buildTx:Ps,rebuildTx:t=>Ps({...e,...t}),packEntry:Cs},cr.Transaction)}async function As(e){return await Promise.all(Ts(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),Ps(e)}function zs(e,t){return Li(Ui,Xr,e,t,{unpackTx:zs,unpackEntry:Ss})}function Is(e){return Sr(Mr("string"==typeof e&&e.startsWith("tx_")?Cr(e):e),cr.TxHash)}function Es(e){let t=zs(e);if(Xr.SignedTx===t.tag&&(t=t.encodedTx),Xr.ContractCreateTx!==t.tag&&Xr.GaAttachTx!==t.tag)throw new j("contractTx","a contractCreateTx or gaAttach",t.tag);return ea(t.ownerId,t.nonce)}function Ms(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function qs(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const Rs="$",Os="_",ks=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,Bs=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Us(e,t){var n,r;const a=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},a),{body:e.parsedBody});const i=t&&t.bodyMapper,s=Boolean(null==i?void 0:i.nullable),o=null==i?void 0:i.type.name;if("Stream"===o)return Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&i.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(a)for(const e of Object.keys(a))t[e]=a[e];return!s||e.parsedBody||a||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:a,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,m=o,"Composite"!==m&&"Dictionary"!==m&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==m?void 0:m.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,m}class $s{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:a,InclusiveMaximum:i,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:m,Pattern:d,UniqueItems:p}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==a&&t<=a&&r("ExclusiveMinimum",a),void 0!==i&&t>i&&r("InclusiveMaximum",i),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==m&&t%m!=0&&r("MultipleOf",m),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}p&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",p)}}serialize(e,t,n,r={xml:{}}){var a,i,s;const o={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:m}=e;if(l&&m&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!m&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===m&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!Bs.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return ks.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Ms(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(Ms(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,a,i){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,i);if(a&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][Rs]={[e]:o.xmlNamespace}):(c[t]={},c[t][i.xml.xmlCharKey]=s,c[t][Rs]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,a,i){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,i);o[t]=js(s,c,a,i)}if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[Rs]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,a,i){if(Js(e,t)&&(t=Hs(e,t,n,"clientName")),null!=n){const s={},o=Ls(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,m=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Vs(u.serializedName);l=e.pop();for(const t of e){null==m[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(m[t]={}),m=m[t]}}if(null!=m){if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";m[Rs]=Object.assign(Object.assign({},m[Rs]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const d=Js(e,t);d&&d.clientName===c&&null==o&&(o=t.serializedName);const p=e.serialize(u,o,s,i);if(void 0!==p&&null!=l){const e=js(u,p,a,i);a&&u.xmlIsAttribute?(m[Rs]=m[Rs]||{},m[Rs][l]=p):a&&u.xmlIsWrapped?m[l]={[u.xmlElementName]:e}:m[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=Ds(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const a in n)t.every((e=>e!==a))&&(s[a]=e.serialize(c,n[a],r+'["'+a+'"]',i))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var a,i,s,o;const c={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,a){var i,s;const o=null!==(i=a.xml.xmlCharKey)&&void 0!==i?i:Os;Js(e,t)&&(t=Hs(e,t,n,"serializedName"));const c=Ls(e,t,r);let u={};const l=[];for(const i of Object.keys(c)){const m=c[i],d=Vs(c[i].serializedName);l.push(d[0]);const{serializedName:p,xmlName:h,xmlElementName:f}=m;let y=r;""!==p&&void 0!==p&&(y=r+"."+p);const g=m.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(m.type.value,n[r],y,a)),l.push(r);u[i]=t}else if(e.isXML)if(m.xmlIsAttribute&&n[Rs])u[i]=e.deserialize(m,n[Rs][h],y,a);else if(m.xmlIsMsText)void 0!==n[o]?u[i]=n[o]:"string"==typeof n&&(u[i]=n);else{const t=f||h||p;if(m.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[i]=e.deserialize(m,r,y,a),l.push(h)}else{const r=n[t];u[i]=e.deserialize(m,r,y,a),l.push(t)}}else{let r,s=n,o=0;for(const e of d){if(!s)break;o++,s=s[e]}null===s&&o<d.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let p;if(l&&i===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[i])&&""===c[i].serializedName){r=n[i];const t=e.deserialize(m,r,y,a);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===m.defaultValue||(p=e.deserialize(m,r,y,a),u[i]=p)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in c)if(Vs(c[t].serializedName)[0]===e)return!1;return!0};for(const i in n)t(i)&&(u[i]=e.deserialize(m,n[i],r+'["'+i+'"]',a))}else if(n&&!a.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||Fs(e,a)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[Rs]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=qs(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return qs(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,a){var i;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(i=e.modelMappers[s.type.className])&&void 0!==i?i:s);const t=[];for(let i=0;i<n.length;i++)t[i]=e.deserialize(s,n[i],`${r}[${i}]`,a);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,a){const i=t.type.value;if(!i||"object"!=typeof i)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const s of Object.keys(n))t[s]=e.deserialize(i,n[s],r,a);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function Gs(e={},t=!1){return new $s(e,t)}function Vs(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function Ds(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function Ls(e,t,n){let r=t.type.modelProperties;if(!r){const a=Ds(e,t,n);if(!a)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==a?void 0:a.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(a)}" of type "${t.type.className}" for object "${n}".`)}return r}function js(e,t,n,r){if(!n||!e.xmlNamespace)return t;const a=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",i={[a]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[Rs])return t;{const e=Object.assign({},t);return e[Rs]=i,e}}const s={};return s[r.xml.xmlCharKey]=t,s[Rs]=i,s}function Fs(e,t){return[Rs,t.xml.xmlCharKey].includes(e)}function Hs(e,t,n,r){var a;const i=Js(e,t);if(i){let s=i[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const i=n[s],o=null!==(a=t.type.uberParent)&&void 0!==a?a:t.type.className;if("string"==typeof i&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),a=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,a))return e[a];for(const[t,a]of Object.entries(e))t.startsWith(n+".")&&a.type.uberParent===n&&a.type.className&&r.push(a.type.className)}}(e.modelMappers.discriminators,i,o);n&&(t=n)}}}return t}function Js(e,t){return t.type.polymorphicDiscriminator||Ws(e,t.type.uberParent)||Ws(e,t.type.className)}function Ws(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Ks="Sequence",Ys="Stream",Qs={operationRequestMap:new WeakMap};function Xs(e,t,n){let r=t.parameterPath;const a=t.mapper;let i;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(a.isConstant)i=a.defaultValue;else{let t=Zs(e,r);!t.propertyFound&&n&&(t=Zs(n,r));let s=!1;t.propertyFound||(s=a.required||"options"===r[0]&&2===r.length),i=s?a.defaultValue:t.propertyValue}}else{a.required&&(i={});for(const t in r){const s=a.type.modelProperties[t],o=Xs(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(i||(i={}),i[t]=o)}}return i}function Zs(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const eo=Symbol.for("@azure/core-client original request");function to(e){if(function(e){return eo in e}(e))return to(e[eo]);let t=Qs.operationRequestMap.get(e);return t||(t={},Qs.operationRequestMap.set(e,t)),t}const no=["application/json","text/json"],ro=["application/xml","application/atom+xml"];function ao(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function io(e={}){const t=Gn(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t,n,r;const{credential:a,scopes:i,challengeCallbacks:s}=e,o=e.logger||Ot,c={authorizeRequest:null!==(n=null===(t=null==s?void 0:s.authorizeRequest)||void 0===t?void 0:t.bind(s))&&void 0!==n?n:Hn,authorizeRequestOnChallenge:null===(r=null==s?void 0:s.authorizeRequestOnChallenge)||void 0===r?void 0:r.bind(s)},u=a?function(e,t){let n,r=null,a=null;const i=Object.assign(Object.assign({},jn),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==a?void 0:a.refreshAfterTimestamp)&&a.refreshAfterTimestamp<Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-i.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-i.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let a=await r();for(;null===a;)await wn(t),a=await r();return a}((()=>e.getToken(t,o)),i.retryIntervalInMs,null!==(c=null==a?void 0:a.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,a=e,n=o.tenantId,a))).catch((e=>{throw r=null,a=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),i=n!==t.tenantId;return r&&(a=null),i||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),a)}}(a):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,r,a;if(await c.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:u,logger:o}),[n,r]=await Fn(e,t),Jn(n)){let s=Kn(n.headers.get("WWW-Authenticate"));if(s){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}else if(c.authorizeRequestOnChallenge&&(a=await c.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:u,logger:o}),a&&([n,r]=await Fn(e,t)),Jn(n)&&(s=Kn(n.headers.get("WWW-Authenticate")),s))){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}}if(r)throw r;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=to(e),a=null==r?void 0:r.operationSpec,i=null==r?void 0:r.operationArguments;return a&&i&&(function(e,t,n){var r,a;if(n.headerParameters)for(const r of n.headerParameters){let a=Xs(t,r);if(null!=a||r.mapper.required){a=n.serializer.serialize(r.mapper,a,ao(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(a))e.headers.set(t+n,a[n]);else e.headers.set(r.mapper.serializedName||ao(r),a)}}const i=null===(a=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===a?void 0:a.customHeaders;if(i)for(const t of Object.keys(i))e.headers.set(t,i[t])}(e,i,a),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var a,i,s,o,c;const u=null===(a=t.options)||void 0===a?void 0:a.serializerOptions,l={xml:{rootName:null!==(i=null==u?void 0:u.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:Os}},m=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Xs(t,n.requestBody);const a=n.requestBody.mapper,{required:i,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:p,nullable:h}=a,f=a.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||i){const t=ao(n.requestBody);e.body=n.serializer.serialize(a,e.body,t,l);const i=f===Ys;if(n.isXML){const t=p?`xmlns:${p}`:"xmlns",n=function(e,t,n,r,a){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[a.xml.xmlCharKey]=r,n[Rs]={[t]:e},n}return r}(d,t,f,e.body,l);f===Ks?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const a={[t]:e};return a[Rs]={[n]:r},a}(n,u||o||s,t,d),{rootName:o||s,xmlCharKey:m}):i||(e.body=r(n,{rootName:o||s,xmlCharKey:m}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;i||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const a=Xs(t,r);if(null!=a){const t=r.mapper.serializedName||ao(r);e.formData[t]=n.serializer.serialize(r.mapper,a,ao(r),l)}}}}(e,i,a,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,a,i,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:no,u=null!==(a=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==a?a:ro,l=e.parseXML,m=e.serializerOptions,d={xml:{rootName:null!==(i=null==m?void 0:m.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==m?void 0:m.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==m?void 0:m.xml.xmlCharKey)&&void 0!==o?o:Os}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,a){const i=await async function(e,t,n,r,a){var i;if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&n.bodyAsText){const i=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(i),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!a)throw new Error("Parsing XML not supported.");const e=await a(i,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||Un.PARSE_ERROR;throw new Un(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,a);if(!function(e){const t=to(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(i))return i;const s=to(i.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return i;const c=function(e){let t;const n=to(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(i),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var a,i,s,o,c;const u=200<=e.status&&e.status<300,l=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?u:!!n;if(l){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const m=null!=n?n:t.responses.default,d=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,p=new Un(d,{statusCode:e.status,request:e.request,response:e});if(!(m||(null===(s=null===(i=e.parsedBody)||void 0===i?void 0:i.error)||void 0===s?void 0:s.code)&&(null===(c=null===(o=e.parsedBody)||void 0===o?void 0:o.error)||void 0===c?void 0:c.message)))throw p;const h=null==m?void 0:m.bodyMapper,f=null==m?void 0:m.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(h){let e=n;if(t.isXML&&h.type.name===Ks){e=[];const t=h.xmlElementName;"object"==typeof n&&t&&(e=n[t])}a=t.serializer.deserialize(h,e,"error.response.parsedBody",r)}const i=n.error||a||n;p.code=i.code,i.message&&(p.message=i.message),h&&(p.response.parsedBody=a)}e.headers&&f&&(p.response.parsedHeaders=t.serializer.deserialize(f,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){p.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:p,shouldReturnResponse:!1}}(i,o,c,r);if(u)throw u;if(l)return i;if(c){if(c.bodyMapper){let e=i.parsedBody;o.isXML&&c.bodyMapper.type.name===Ks&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{i.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new Un(`Error ${e} occurred in deserializing the responseBody - ${i.bodyAsText}`,{statusCode:i.status,request:i.request,response:i})}}else"HEAD"===o.httpMethod&&(i.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(i.parsedHeaders=o.serializer.deserialize(c.headersMapper,i.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return i}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let so;const oo={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function co(e,t,n,r){const a=function(e,t,n){var r;const a=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let i=Xs(t,r,n);const s=ao(r);i=e.serializer.serialize(r.mapper,i,s),r.skipEncoding||(i=encodeURIComponent(i)),a.set(`{${r.mapper.serializedName||s}}`,i)}return a}(t,n,r);let i=!1,s=uo(e,a);if(t.path){let e=uo(t.path,a);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,i=!0):s=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const a=t.indexOf("?");if(-1!==a){const e=t.substring(0,a),i=t.substring(a+1);r+=e,i&&(n.search=n.search?`${n.search}&${i}`:i)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const a=new Map,i=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&i.add(r.mapper.serializedName);let s=Xs(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,ao(r));const t=r.collectionFormat?oo[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),a.set(r.mapper.serializedName||ao(r),s)}}return{queryParams:a,sequenceParams:i}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const a=new URL(e),i=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),a=t.get(n);a?Array.isArray(a)?a.push(r):t.set(n,[a,r]):t.set(n,r)}return t}(a.search);for(const[e,a]of t){const t=i.get(e);if(Array.isArray(t))if(Array.isArray(a)){t.push(...a);const n=new Set(t);i.set(e,Array.from(n))}else t.push(a);else t?(Array.isArray(a)?a.unshift(t):n.has(e)&&i.set(e,[t,a]),r||i.set(e,a)):i.set(e,a)}const s=[];for(const[e,t]of i)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return a.search=s.length?`?${s.join("&")}`:"",a.toString()}(s,o,c,i),s}function uo(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const lo=It("core-client");class mo{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&lo.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(so||(so=new Vn),so),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return io(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Ln(e)}({url:co(n,t,e,this)});r.method=t.httpMethod;const a=to(r);a.operationSpec=t,a.operationArguments=e;const i=t.contentType||this._requestContentType;i&&t.requestBody&&r.headers.set("Content-Type",i);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(a.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ys&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Us(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Us(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function po(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),a=n(t),i=Math.max(...r,...a)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*i**n),0);return s(r)-s(a)}function ho(e,t,n){return po(e,t)>=0&&(null==n||po(e,n)<0)}const fo="_sdk-big-int-",yo=(...e)=>{const t=Gs(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,a]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,a);if("bigint"!=typeof t)throw null!=r||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,a]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(fo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(fo,""));const i=r.call(this,e,t,n,a);return i instanceof Date?new Date(+i/1e3):i}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new ae(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(fo,""))}})},go=Number.MAX_SAFE_INTEGER.toString().length,No=new RegExp(String.raw`("\w+":\s*)(\d{${go},})(\s*[,}])`,"m"),wo=new RegExp(String.raw`([[,]\s*)(\d{${go},})\b`,"m"),vo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(No,"g"),(e=>{const t=e.match(No);if(null==t)throw new ie;const[,n,r,a]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${fo}${r}"`:r,a].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(wo,"g"),(e=>{const t=e.match(wo);if(null==t)throw new ie;const[,n,r]=t;return`${n}"${fo}${r}"`}))),n}},bo=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const a=t.headers.get("__queue");t.headers.delete("__queue");const i=async()=>n(t);if(null==a)return i();const s=(null!==(r=e.get(a))&&void 0!==r?r:Promise.resolve()).then(i);return e.set(a,s.catch((()=>{}))),s}},position:"perCall"}},xo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);e.set(a,i);try{return await i}finally{e.delete(a)}}},position:"perCall"}},_o=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);return e.set(a,i),i}},position:"perCall"}},Co=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof Un)||null==t.request||t.message.startsWith("Error "))throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const a=null==r?` ${t.response.status} status code`:e(r);throw""!==a&&(t.message+=`:${a}`),t}}},position:"perCall"}),So=(e,t,n,r,a)=>({policy:{name:"version-check",async sendRequest(i,s){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),s(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!ho(...o)){const t=new ne(e,...o);if(!a)throw t;console.warn(t.message)}return s(i)}},position:"perCall"}),To=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var a;if(null!=n.headers.get("__no-retry"))return n.headers.delete("__no-retry"),r(n);const i=null!==(a=n.headers.get("__retry-code"))&&void 0!==a?a:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+i)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new Un("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Qn(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var m;if(!(e instanceof Un))throw e;if(s.includes(null!==(m=e.response?.status)&&void 0!==m?m:0))throw e;l=e}}throw l}},position:"perCall"}),Po={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},Ao={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},zo={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},Io={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},Eo={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Mo={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},qo={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ro={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Oo={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},ko={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Bo={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Uo={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",required:!0,type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"BigInt"}}}}},$o={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},Go={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Vo={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Do={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Lo={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},jo={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},Fo={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},Ho={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Jo={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},Wo={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Ko={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Yo={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Qo={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},Xo={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Zo={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},ec={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},tc={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},flags:{serializedName:"flags",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nc={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},flags:{serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},rc={type:{name:"Composite",className:"PinningTx",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},parentPayload:{serializedName:"parent_payload",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},parentType:{serializedName:"parent_type",required:!0,type:{name:"String"}},parentNetworkId:{serializedName:"parent_network_id",required:!0,type:{name:"String"}}}}},ac={type:{name:"Composite",className:"HCContractPubkeys",modelProperties:{staking:{serializedName:"staking",required:!0,type:{name:"String"}},election:{serializedName:"election",type:{name:"String"}},rewards:{serializedName:"rewards",type:{name:"String"}}}}},ic={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},sc={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},cc={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},uc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointerComplete"}}}}}}},lc={type:{name:"Composite",className:"NamePointerComplete",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",required:!0,type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},mc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},dc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},pc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},hc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},fc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},yc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},gc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},Nc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},wc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},vc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},bc={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},_c={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},Cc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Sc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Tc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},Pc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Ac={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},zc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Ic={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Ec={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Mc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},qc={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Rc={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},kc={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Uc={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},$c={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},Gc={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Vc={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Dc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},Lc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Hc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Jc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Kc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Yc={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Qc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Xc={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Zc={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},eu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},tu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},nu={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},ru={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},au={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},su={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},ou={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},cu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},uu={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},lu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},mu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Uc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let du={OffChainUpdate:Ro,"OffChainUpdate.OffChainCallContract":su,"OffChainUpdate.OffChainDeposit":ou,"OffChainUpdate.OffChainNewContract":cu,"OffChainUpdate.OffChainTransfer":uu,"OffChainUpdate.OffChainWithdrawal":lu};const pu={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},hu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},fu={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},yu={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},gu={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Nu={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},wu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},vu={parameterPath:"body",mapper:Fo},bu={parameterPath:"body",mapper:vc};class xu extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-node/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Cu)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Su)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},Tu)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Pu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Au)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},zu)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Iu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},Eu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},Mu)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},qu)}getCurrency(e){return this.sendOperationRequest({options:e},Ru)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Ou)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},ku)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Bu)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Uu)}getTopHeader(e){return this.sendOperationRequest({options:e},$u)}getPinningTx(e){return this.sendOperationRequest({options:e},Gu)}getHyperchainContractPubkeys(e){return this.sendOperationRequest({options:e},Vu)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},Du)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Lu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},ju)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Fu)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Hu)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ju)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Wu)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Ku)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Yu)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Qu)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Xu)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Zu)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},el)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},tl)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},nl)}getPeerPubkey(e){return this.sendOperationRequest({options:e},rl)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},al)}getStatus(e){return this.sendOperationRequest({options:e},il)}getChainEnds(e){return this.sendOperationRequest({options:e},sl)}getSyncStatus(e){return this.sendOperationRequest({options:e},ol)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},cl)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ul)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ll)}}const _u=yo(a,!1),Cu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Su={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,yu],headerParameters:[pu],serializer:_u},Tu={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0},410:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,gu],headerParameters:[pu],serializer:_u},Pu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:zo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Au={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},zu={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Uo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,Nu],headerParameters:[pu],serializer:_u},Iu={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:$o},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Eu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Go},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Mu={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Vo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},qu={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:Do},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Ru={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:Lo}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Ou={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Yo},400:{bodyMapper:Ao,isError:!0},403:{bodyMapper:Ao,isError:!0}},requestBody:vu,urlParameters:[hu],headerParameters:[pu,wu],mediaType:"json",serializer:_u},ku={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Bu={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Uu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,gu],headerParameters:[pu],serializer:_u},$u={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:nc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Gu={path:"/v3/hyperchain/pin-tx",httpMethod:"GET",responses:{200:{bodyMapper:rc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Vu={path:"/v3/hyperchain/contracts",httpMethod:"GET",responses:{200:{bodyMapper:ac},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Du={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Lu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:ic},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},ju={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:sc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Fu={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Hu={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,gu],headerParameters:[pu],serializer:_u},Ju={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Wu={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:oc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Ku={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Yu={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Qu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[pu],serializer:_u},Xu={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,Nu],headerParameters:[pu],serializer:_u},Zu={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[pu],serializer:_u},el={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:mc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},tl={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},queryParameters:[{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},nl={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[pu],serializer:_u},rl={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:hc}},urlParameters:[hu],headerParameters:[pu],serializer:_u},al={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},il={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:yc}},urlParameters:[hu],headerParameters:[pu],serializer:_u},sl={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},urlParameters:[hu],headerParameters:[pu],serializer:_u},ol={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:wc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},cl={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:bc},400:{bodyMapper:Ao,isError:!0}},requestBody:bu,urlParameters:[hu],headerParameters:[pu,wu],mediaType:"json",serializer:_u},ul={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},ll={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:xc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0},410:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u};function ml(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function dl(e,t){return e.get(hl(e,t))}function pl(e,t,n){return e.set(hl(e,t),n),n}function hl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var fl=new WeakMap,yl=new WeakMap,gl=new WeakMap;class Nl extends xu{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){super(e,{allowInsecureConnection:!0,additionalPolicies:[So("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0",t),bo(),xo(),To(n,r),Co((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...a}),ml(this,fl,void 0),ml(this,yl,void 0),ml(this,gl,void 0),pl(fl,this,t),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=dl(yl,this)?dl(yl,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{pl(yl,this,t)}),(()=>{})),t}async _isHyperchain(){return null!=dl(gl,this)||pl(gl,this,this.getHyperchainContractPubkeys({requestOptions:{customHeaders:{"__no-retry":"true"}}}).then((()=>!0),(e=>{if("v3/hyperchain/contracts error: 404 status code"!==e.message)throw e;return!1}))),dl(gl,this)}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),a=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Kr[a]){const e=a.toString(),t=Object.values(Kr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString(),i=new ne("consensus protocol",e,n,r);if(!dl(fl,this))throw i;console.warn(i.message)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:a}}}function wl(e){const t=zs(e);switch(t.tag){case Xr.SignedTx:return wl(Ps(t.encodedTx));case Xr.GaMetaTx:return t.gaId}const n=Ts(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new D(`Transaction doesn't have nonce: ${Xr[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class vl{}class bl extends Error{constructor(e){super(e),this.name="TypeResolveError"}}var xl=bl;const _l=e=>({name:"bytes",size:e}),Cl=(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),Sl=(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),Tl=e=>({name:"list",valuesType:e}),Pl=(e=[])=>({name:"tuple",valueTypes:e}),Al=(e,t)=>({name:"record",keys:e,valueTypes:t}),zl=e=>({name:"set",valuesType:e}),Il=(e,t)=>({name:"map",keyType:e,valueType:t}),El=e=>({name:"variant",variants:e}),Ml=()=>El([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),ql=()=>El([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),Rl=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[_l()]}];return El(e)},Ol=e=>({name:"tvar",id:e});var kl=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,r=[],a=[];var i;if((i=e)&&"object"==typeof i&&i.constructor===Object&&([[n,r]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,r);return this.resolveType(e,t)}if("variant"!==n&&(a=this.resolveValueTypes(r,t)),"void"===n)return{name:"void"};if("unit"===n)return Pl([]);if("int"===n)return{name:"int"};if("bool"===n)return{name:"bool"};if("string"===n)return{name:"string"};if("bits"===n)return{name:"bits"};if("hash"===n)return{name:"hash"};if("signature"===n)return{name:"signature"};if("address"===n)return{name:"account_pubkey"};if("contract_pubkey"===n)return{name:"contract_pubkey"};if("Chain.ttl"===n)return Ml();if("Chain.ga_meta_tx"===n)return El([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.paying_for_tx"===n)return El([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.base_tx"===n)return El([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]);if("AENS.pointee"===n)return ql();if("AENSv2.pointee"===n)return Rl();if("AENS.name"===n)return(()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},ql())]}];return El(e)})();if("AENSv2.name"===n)return(()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},Rl())]}];return El(e)})();if("Set.set"===n)return zl(...a);if("MCL_BLS12_381.fr"===n)return{name:"bls12_381.fr"};if("MCL_BLS12_381.fp"===n)return{name:"bls12_381.fp"};if("bytes"===n)return _l("any"===r?void 0:r);if("list"===n)return Tl(...a);if("map"===n)return Il(...a);if(("tuple"===n||"record"===n)&&1===a.length)return a[0];if("tuple"===n)return Pl(a);if("record"===n){const e=r.map((e=>e.name));return Al(e,a)}if("variant"===n)return this.resolveVariant(r,t);if("option"===n)return(e=>El([{None:[]},{Some:e}]))(a);if("oracle"===n)return Cl(...a);if("oracle_query"===n)return Sl(...a);throw new xl("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),a=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:a}}));return El(n)}},Bl=class{constructor(){this._internalResolver=new kl}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}};class Ul extends Error{constructor(e){super(e),this.name="InternalError"}}var $l=Ul,Gl=(e,t)=>{if(!e)throw new $l(t)},Vl=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,CONTRACT_BYTEARRAY:143,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5});class Dl extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}var Ll=Dl;const jl={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_BYTES]:_l(),[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Cl(),[Vl.OTYPE_ORACLE_QUERY]:Sl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var Fl=class{createType(e){const t=e[0];if(t===Vl.TRUE||t===Vl.FALSE)return{name:"bool"};if((1&t)===Vl.SMALL_INT||t===Vl.POS_BIG_INT||t===Vl.NEG_BIG_INT)return{name:"int"};if((3&t)===Vl.SHORT_STRING||t===Vl.LONG_STRING||t===Vl.EMPTY_STRING)return{name:"string"};if((15&t)===Vl.SHORT_LIST||t===Vl.LONG_LIST)return Tl();if((15&t)===Vl.SHORT_TUPLE||t===Vl.LONG_TUPLE||t===Vl.EMPTY_TUPLE)return Pl();if(t===Vl.MAP||t===Vl.EMPTY_MAP)return Il();if(t===Vl.POS_BITS||t===Vl.NEG_BITS)return{name:"bits"};if(t===Vl.VARIANT)return El();if(t===Vl.OBJECT){const t=e[1];return Gl(jl.hasOwnProperty(t),`Unsupported object type "${t}"`),jl[t]}if(t===Vl.CONTRACT_BYTEARRAY)return{name:"contract_bytearray"};if(t===Vl.TYPE_INTEGER||t===Vl.TYPE_BOOLEAN||t===Vl.TYPE_LIST||t===Vl.TYPE_TUPLE||t===Vl.TYPE_OBJECT||t===Vl.TYPE_BITS||t===Vl.TYPE_MAP||t===Vl.TYPE_STRING||t===Vl.TYPE_VARIANT||t===Vl.TYPE_BYTES||t===Vl.TYPE_CONTRACT_BYTEARRAY||t===Vl.TYPE_VAR||t===Vl.TYPE_ANY)return{name:"type",type:undefined};throw new Ll(t)}},Hl=class{constructor(e){this.name=e}valueOf(){throw new $l("Not implemented.")}accept(e){return e.visitData(this)}};class Jl extends Error{constructor(e){super(e),this.name="SerializerError"}}var Wl=Jl,Kl=class{constructor(e){this.globalSerializer=e}serialize(e){throw new Wl("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new Wl("Not implemented.")}};const Yl=e=>{const t=BigInt(e);return t<256n?new Uint8Array([Number(t)]):new Uint8Array([...Yl(t>>8n),Number(0xffn&t)])},Ql=e=>[...e].map((e=>e.toString(16).padStart(2,"0"))),Xl=e=>{if(0===e.length)return 0n;const t=Ql(e);return BigInt("0x"+t.join(""))},Zl=e=>Ql(e).join("");class em extends Error{constructor(e){super(e),this.name="FormatError"}}var tm=em;class nm extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}var rm=nm,am=class extends Hl{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return(e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new tm(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))})(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new rm("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=Yl(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new rm(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}get type(){return _l(this._size)}valueOf(){return this._value}},im=class extends am{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}},sm=class extends im{constructor(e){super(e,"account_pubkey","ak")}get type(){return{name:"account_pubkey"}}},om=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ADDRESS,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new sm(n.data),new Uint8Array(n.remainder)]}};function cm(e){return new Uint8Array($i.encode(Yl(e)))}function um(e){const t=$i.decode(e,!0);return[Xl(t.data),t.remainder]}var lm=class extends Hl{constructor(e){super("bits"),this._value=BigInt(e)}get type(){return{name:"bits"}}get value(){return this._value}valueOf(){return this._value}},mm=e=>e>0?e:-1n*e,dm=class extends Kl{serialize(e){return[e.value>=0?Vl.POS_BITS:Vl.NEG_BITS,...cm(mm(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===Vl.POS_BITS?1n:-1n,[r,a]=um(t.slice(1));return[new lm(r*n),new Uint8Array(a)]}},pm=class extends Hl{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return{name:"bool"}}valueOf(){return this._value}},hm=class extends Kl{serialize(e){return!0===e.valueOf()?[Vl.TRUE]:[Vl.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],r=t.slice(1);if(n===Vl.TRUE)return[new pm(!0),r];if(n===Vl.FALSE)return[new pm(!1),r];throw new Ll(n)}},fm=class extends Hl{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return{name:"byte_array"}}valueOf(){return this._value}},ym=class extends Hl{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return{name:"int"}}valueOf(){return this._value}},gm=class extends Kl{serialize(e){const t=e instanceof ym?e.value:BigInt(e),n=mm(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[Vl.NEG_BIG_INT,...cm(n-64n)]:[Vl.POS_BIG_INT,...cm(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new ym(-((126&n)>>1)),t.slice(1)]:[new ym(n>>1),t.slice(1)];if(n===Vl.POS_BIG_INT||n===Vl.NEG_BIG_INT){const e=n===Vl.POS_BIG_INT?1n:-1n,[r,a]=um(t.slice(1));return[new ym((r+64n)*e),new Uint8Array(a)]}throw new Ll(n)}};const Nm=new gm;var wm=class extends Kl{serialize(e){return 0===e.length?[Vl.EMPTY_STRING]:e.length<64?[e.length<<2|Vl.SHORT_STRING,...e.valueOf()]:[Vl.LONG_STRING,...Nm.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===Vl.EMPTY_STRING)return[new fm,t.slice(1)];if(n===Vl.LONG_STRING){const[e,n]=Nm.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new fm(n.slice(0,r)),n.slice(r)]}const r=1+(n>>2);return[new fm(t.slice(1,r)),t.slice(r)]}};const vm=new wm;var bm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_BYTES,...vm.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=vm.deserializeStream(t.slice(2));return[new am(n.valueOf()),r]}},xm=class extends im{constructor(e){super(e,"channel","ch")}get type(){return{name:"channel"}}},_m=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CHANNEL,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new xm(n.data),new Uint8Array(n.remainder)]}},Cm=class extends im{constructor(e){super(e,"contract_pubkey","ct")}get type(){return{name:"contract_pubkey"}}},Sm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CONTRACT,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Cm(n.data),new Uint8Array(n.remainder)]}},Tm=class extends Hl{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return{name:"void"}}valueOf(){return this._value}},Pm=class extends Kl{serialize(){return""}deserialize(){return new Tm}deserializeStream(e){return[new Tm,e]}},Am=class extends Hl{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return Tl(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}},zm=class extends Kl{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|Vl.SHORT_LIST,...t]:[Vl.LONG_LIST,...cm(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a,i,s=0n,o=n.slice(1);r===Vl.LONG_LIST&&([s,o]=um(n.slice(1)),s+=16n),(15&r)===Vl.SHORT_LIST&&(s=BigInt((240&r)>>4)),void 0!==t&&(a=t.valuesType);const c=[];for(let e=0n;e<s;e++)[i,o]=this.globalSerializer.deserializeStream(o,a),c.push(i);return 0n===s?[new Am,o]:(void 0===t&&(a=c[0].type),[new Am(a,c),o])}};const Im=e=>{const[t,n]=e;return{key:t,value:n}};var Em=class extends Hl{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=Il(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(Im)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}},Mm=class extends Hl{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?Pl(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}},qm=class extends Hl{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return zl(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}},Rm=class extends Kl{serialize(e){return this.globalSerializer.serialize(new Em(e.itemsType,Pl(),e.items.map((e=>[e,new Mm]))))}deserializeStream(e,t){const n=Il(t.valuesType,Pl()),[r,a]=this.globalSerializer.deserializeStream(e,n);return[new qm(t.valuesType,r.keys),a]}};const Om=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=Gm(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const a=n(e.items[r],t.items[r]);if(0!==a)return a}return e.length===t.length?0:-1},km=e=>{const t=Gm(e);return(e,n)=>t(e.key,n.key)},Bm=(e,t)=>{const n=new Am({name:"int"},e.valueOf()),r=new Am({name:"int"},t.valueOf());return Om(n,r)},Um=(e,t)=>Number(BigInt(e)-BigInt(t)),$m={int:Um,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),a=t.toString();return r.length===a.length?Bm(n.encode(e),n.encode(t)):r.length-a.length},bits:(e,t)=>e<0||t<0?-Um(e,t):Um(e,t),list:Om,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],a=Gm(r)(e.items[n],t.items[n]);if(0!==a)return a}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new Am(e.aritiesType,e.arities),a=new Am(t.aritiesType,t.arities),i=Gm(r)(r,a);if(0!==i)return i;const s=e.tag-t.tag;return 0!==s?s:Gm(Pl())(new Mm(e.valueTypes,e.value),new Mm(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(km(e.keyType)),r.sort(km(t.keyType));const a=Gm(e.keyType),i=Gm(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=a(t.key,s.key);if(0!==o)return o;const c=i(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:Bm,account_pubkey:Bm,channel:Bm,contract_pubkey:Bm,oracle_query_id:Bm,oracle_pubkey:Bm},Gm=e=>(Gl(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),Gl($m.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),$m[e.name]);var Vm=Gm,Dm=class extends Kl{serialize(e){const t=e.length,n=Vm(e.keyType),r=[...e.items];r.sort(((e,t)=>n(e.key,t.key)));const a=r.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[Vl.MAP,...cm(t),...a.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];if(r!==Vl.MAP)throw new Ll(r);const[a,i]=um(n.slice(1));let s,o,c=i;if(0n===a)return[new Em,c];void 0!==t&&({keyType:s,valueType:o}=t);const u=[];for(let e=0n;e<a;e++){const[e,t]=this.globalSerializer.deserializeStream(c,s),[n,r]=this.globalSerializer.deserializeStream(t,o);u.push([e,n]),c=r}const l=u[0];return void 0===t&&(s=l[0].type,o=l[1].type),[new Em(s,o,u),c]}},Lm=class extends im{constructor(e){super(e,"oracle_query_id","oq")}get type(){return Sl()}},jm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE_QUERY,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Lm(n.data),new Uint8Array(n.remainder)]}},Fm=class extends im{constructor(e){super(e,"oracle_pubkey","ok")}get type(){return Cl()}},Hm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Fm(n.data),new Uint8Array(n.remainder)]}};const Jm=e=>e instanceof Uint8Array?(new TextDecoder).decode(e):e.toString(),Wm=e=>"string"==typeof e?(new TextEncoder).encode(e):e;var Km=class extends Hl{constructor(e){super("string"),this._value=Wm(e)}get type(){return{name:"string"}}toString(){return Jm(this._value)}toBytes(){return this._value}valueOf(){return(e=>{const t=Wm(Jm(e));return Xl(e)===Xl(t)})(this._value)?this.toString():this._value}};const Ym=new wm;var Qm=class extends Kl{serialize(e){let t=e.valueOf();return"string"==typeof t&&(t=(new TextEncoder).encode(t)),Ym.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==Vl.SHORT_STRING&&![Vl.EMPTY_STRING,Vl.LONG_STRING].includes(n))throw new Ll(n);const[r,a]=Ym.deserializeStream(t);return[new Km(r.valueOf()),a]}},Xm=class extends Kl{serialize(e){const t=e.size;if(0===t)return[Vl.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|Vl.SHORT_TUPLE,...n]:[Vl.LONG_TUPLE,...cm(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a=0n,i=n.slice(1);if(r===Vl.EMPTY_TUPLE)return[new Mm,i];(15&r)===Vl.SHORT_TUPLE&&(a=(240&r)>>4),r===Vl.LONG_TUPLE&&([a,i]=um(n.slice(1)),a+=16n);let s=[];void 0!==t&&(s=t.valueTypes);const o=[];let c=null;for(let e=0n;e<a;e++)[c,i]=this.globalSerializer.deserializeStream(i,s[e]),o.push(c);let u=t;return void 0===t&&(u=o.map((e=>e.type))),[new Mm(u,o),i]}},Zm=class extends Hl{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=El(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return{name:"int"}}get variantType(){return Pl(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}},ed=class extends Kl{serialize(e){const t=new Mm(e.valueTypes,e.value);return[Vl.VARIANT,...$i.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),r=$i.decode(n.slice(1),!0),a=[...r.data],i=r.remainder[0],s=r.remainder.slice(1);let o,c=[];void 0!==t&&void 0!==t.variants&&(c=t.variants,o=Pl(Object.values(c[i])[0]));const[u,l]=this.globalSerializer.deserializeStream(s,o);return[new Zm(a,i,u.items,u.valueTypes,c),l]}},td=class extends Hl{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new rm(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new rm(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}},nd=class extends td{constructor(e){super(e,32,"bls12_381.fr")}get type(){return{name:"bls12_381.fr"}}accept(e){return e.visitBls12381Fr(this)}},rd=class extends td{constructor(e){super(e,48,"bls12_381.fp")}get type(){return{name:"bls12_381.fp"}}accept(e){return e.visitBls12381Fp(this)}};const ad=new bm,id=(e,t)=>{switch(e.name){case"bls12_381.fr":return new nd(t);case"bls12_381.fp":return new rd(t);default:throw new Error(`Unsupported type "${e.name}"`)}};var sd=class extends Kl{serialize(e){return ad.serialize(e)}deserializeStream(e,t){const[n,r]=ad.deserializeStream(e);return[id(t,n.valueOf()),r]}},od=class extends Hl{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}},cd=class extends Kl{serialize(e){const t=new fm(e.functionId),n=new Mm(e.argTypes,e.args),r=new Mm([t.type,n.type],[t,n]);return this.globalSerializer.serialize(r)}deserialize(e,t){const n=Pl([{name:"byte_array"},Pl(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,i]=r.items;return new od(a.valueOf(),i.valueTypes,i.items)}};const ud={[Vl.TYPE_INTEGER]:{name:"int"},[Vl.TYPE_BOOLEAN]:{name:"bool"},[Vl.TYPE_BITS]:{name:"bits"},[Vl.TYPE_STRING]:{name:"string"},[Vl.TYPE_ANY]:{name:"any"}},ld={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Cl(),[Vl.OTYPE_ORACLE_QUERY]:Sl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var md=class extends Kl{constructor(e){super(e),this._intSerializer=new gm}serialize(e){const t=Object.entries(ud).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(ld).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([Vl.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([Vl.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([Vl.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([Vl.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([Vl.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([Vl.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([Vl.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new rm(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(ud.hasOwnProperty(n))return[ud[n],t.slice(1)];if(n===Vl.TYPE_OBJECT){const e=t[1];if(!ld.hasOwnProperty(e))throw new Ll(e,"Unsupported object type");return[ld[e],t.slice(2)]}if(n===Vl.TYPE_VAR)return[Ol(t[1]),t.slice(2)];if(n===Vl.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[_l(e.valueOf()),n]}if(n===Vl.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[Tl(e),n]}if(n===Vl.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,a]=this.deserializeStream(n);return[Il(e,r),a]}if(n===Vl.TYPE_TUPLE){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[Pl(n),a]}if(n===Vl.TYPE_VARIANT){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[El(n),a]}throw new Ll(n)}},dd=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}});const pd={3:"immediate",2:"var",1:"arg",0:"stack"};var hd=class extends Kl{constructor(e){super(e),this._typeSerializer=new md}deserialize(e){const t=$i.decode(e,!0),n=$i.decode(t.remainder,!0),r=$i.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(r)}}deserializeFunctions(e,t){let n={},r=e;const a=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),a.push(n);return a}deserializeFunction(e,t){const n=e[0],r=Zl(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const a=t[r],[i,s]=this.deserializeAttributes(e.slice(5)),[o,c,u]=this.deserializeSignature(s),[l,m]=this.deserializeInstructions(u);return[{id:r,name:a,attributes:i,args:o,returnType:c,instructions:l},m]}deserializeInstructions(e){let t={},n=e;const r=[];let a=0,i=!1;for(;n.length&&254!==n[0];)void 0===r[a]&&(r[a]=[]),[t,n,i]=this.deserializeInstruction(n),r[a].push(t),i&&a++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!dd.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=dd[t],{mnemonic:a,end:i}=r;if(0===r.args)return[{mnemonic:a,args:[]},n,i];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:a,args:s},o,i]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),a=e.slice(n),i=((e,t=1)=>{const n=[];let r=Number(Xl(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),s=[];let o,c=a;return i.forEach((e=>{[o,c]=this.deserializeArgument(e,c),s.push(o)})),[s,c]}deserializeArgument(e,t){const n=pd[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,a]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},a]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,a]=this._typeSerializer.deserializeStream(n);return[t,r,a]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),a=[];return 1&r&&a.push("private"),2&r&&a.push("payable"),[a,n]}deserializeSymbols(e){const t=Il({name:"byte_array"},{name:"string"}),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=Zl(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}},fd=class extends Kl{constructor(e){super(),this._bytecodeSerializer=new hd(e),this._intSerializer=new gm}deserializeStream(e){const t=new Uint8Array(e),[n,r]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),i=$i.decode(r.slice(0,a)),s=new TextDecoder;return[{tag:Xl(i[0]),vsn:Xl(i[1]),sourceHash:Zl(i[2]),aevmTypeInfo:i[3],bytecode:this._bytecodeSerializer.deserialize(i[4]),compilerVersion:s.decode(i[5]),payable:Boolean(i[6][0])},r.slice(a)]}},yd=class extends Kl{constructor(){super(),this.typeFactory=new Fl,this._serializers={void:new Pm,bool:new hm,int:new gm,tuple:new Xm(this),record:new Xm(this),list:new zm(this),set:new Rm(this),map:new Dm(this),byte_array:new wm,string:new Qm,hash:new bm,signature:new bm,bits:new dm,variant:new ed(this),bytes:new bm,account_pubkey:new om,contract_pubkey:new Sm,oracle_pubkey:new Hm,oracle_query_id:new jm,channel:new _m,"bls12_381.fr":new sd,"bls12_381.fp":new sd,calldata:new cd(this),contract_bytearray:new fd(this),type:new md}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new Wl("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new Wl("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new Wl("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof Hl))throw new Wl("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}},gd=n(2861);const Nd=e=>(new lr).update(e).digest(),wd=e=>Nd(Nd(e)).slice(0,4),vd=e=>{const t=gd.Buffer.from(e),n=wd(e);return gd.Buffer.concat([t,n],t.length+4)},bd=e=>{const t=gd.Buffer.from(e),n=t.slice(0,-4),r=t.slice(-4),a=wd(n);if(!r.equals(a))throw new tm("Invalid checksum");return new Uint8Array(n)},xd=e=>vd(e).toString("base64"),_d=e=>{const t=gd.Buffer.from(e,"base64");return bd(t)},Cd=e=>ur.encode(vd(e)),Sd=e=>bd(ur.decode(e)),Td={key_block_hash:{tag:"kh",size:32,encoder:s},micro_block_hash:{tag:"mh",size:32,encoder:s},block_pof_hash:{tag:"bf",size:32,encoder:s},block_tx_hash:{tag:"bx",size:32,encoder:s},block_state_hash:{tag:"bs",size:32,encoder:s},contract_bytearray:{tag:"cb",size:0,encoder:i},contract_pubkey:{tag:"ct",size:32,encoder:s},account_pubkey:{tag:"ak",size:32,encoder:s},account_seckey:{tag:"sk",size:32,encoder:s},channel:{tag:"ch",size:32,encoder:s},oracle_pubkey:{tag:"ok",size:32,encoder:s},oracle_query_id:{tag:"oq",size:32,encoder:s},peer_pubkey:{tag:"pp",size:32,encoder:s},name:{tag:"nm",size:0,encoder:s},tx_hash:{tag:"th",size:32,encoder:s},signature:{tag:"sg",size:64,encoder:s},commitment:{tag:"cm",size:32,encoder:s},bytearray:{tag:"ba",size:0,encoder:i}},Pd={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",sk:"account_seckey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};var Ad=class{encode(e,t){if(!Td.hasOwnProperty(e))throw new rm(e,`Unsupported API type ${e}`);const n=Td[e];if(n.size>0&&t.length!==n.size)throw new rm(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!Pd.hasOwnProperty(t))throw new tm(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new tm(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=Td[Pd[t]],r=e.substring(3),a=n.encoder.decode(r);if(n.size>0&&a.length!==n.size)throw new tm(`Invalid API data format. Expected size ${n.size}, but got ${a.length}`);return a}decodeWithType(e,t){const n=e.substring(0,2);if(!Td.hasOwnProperty(t))throw new rm(t,"Unsupported API type");const r=Td[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new rm(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}};const zd={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},Id=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,a]=Id(t,e%t);return[r,n-r*(e/t),a]},Ed=(e,t)=>{const n=zd[t],r=BigInt(e)*n.R%n.N;return Yl(r)},Md=(e,t)=>{const n=zd[t],r=(e=>{const t=Ql(e).reverse();return BigInt("0x"+t.join(""))})(e),a=((e,t)=>{const[n,r,a]=Id(e,t);return(n+t)%t})(n.R,n.N);return r*a%n.N};var qd=class{constructor(){this._apiEncoder=new Ad}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return Md(e.valueOf(),"r")}visitBls12381Fp(e){return Md(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:Zl(t),args:n.map((e=>e.accept(this)))}}},Rd=class extends am{constructor(e){super(e,32,"hash")}},Od=class extends am{constructor(e){super(e,64,"signature")}},kd=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}};const Bd=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];var Ud=class extends kd{supports({name:e,_valueTypes:t}){return Bd.includes(e)}create(e,t){switch(e.name){case"int":return new ym(t);case"bool":return new pm(t);case"string":return new Km(t);case"bits":return new lm(t);case"hash":return new Rd(t);case"bytes":return new am(t,e.valueTypes);case"signature":return new Od(t);case"account_pubkey":return new sm(t);case"contract_pubkey":return new Cm(t);case"channel":return new xm(t);case"oracle_pubkey":return new Fm(t);case"oracle_query_id":return new Lm(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},$d=class extends kd{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new Am(e.valuesType,n)}},Gd=class extends kd{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new qm(e.valuesType,n)}},Vd=class extends kd{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new Em(e.keyType,e.valueType,n)}},Dd=class extends kd{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new Mm(e.valueTypes,n)}},Ld=class extends kd{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new rm(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new rm(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const a=e.keys[r];return this.valueFactory.create(n,t[a])}));return 1===r.length?r[0]:new Mm(Al(e.keys,e.valueTypes),r)}};const jd=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];var Fd=class extends kd{supports({name:e,_valueTypes:t}){return jd.includes(e)}create(e,t){if(!this.isValid(t))throw new rm(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,r]=Object.entries(t)[0],a=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),i=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===i)throw new rm(e.name,`Unknown variant constructor: ${n}`);const[[,s]]=Object.entries(e.variants[i]);if(r.length!==s.length)throw new rm(e.name,`"${n}" variant constructor expects ${s.length} argument(s) but got ${r.length} instead`);const o=this.valueFactory.createMultiple(s,r);return new Zm(a,i,o,s,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}};const Hd=e=>Array.from(or.blake2b(e,null,32)),Jd=["string","signature","bytes"];var Wd=class extends kd{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[r,...a]=t;if("bigint"!=typeof r)throw new xl(`Event name hash (first topic) should be of type "BigInt", got "${typeof r}" instead.`);const i=e.variants.map((e=>Xl(Hd(Object.keys(e)[0])))).findIndex((e=>e===r));if(-1===i)throw new xl("Event name hash does not match any event variant constructor");const s=e.variants[i],o=Object.keys(s)[0],[c]=Object.values(s),u=c.map((e=>this._isData(e)?n:a.shift()));return this.valueFactory.create(e,{[o]:u})}_isData(e){return!(!Jd.includes(e.name)||"bytes"===e.name&&e.size<=32)}};const Kd=["bls12_381.fr","bls12_381.fp"];var Yd=class extends kd{supports({name:e,_valueTypes:t}){return Kd.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new nd(t);case"bls12_381.fp":return new rd(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},Qd=class extends kd{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),r=(a=e.functionName,Hd(a).slice(0,4));var a;return new od(r,e.argumentTypes,n)}},Xd=class{constructor(){this._factories=[new Ud(this),new $d(this),new Gd(this),new Vd(this),new Dd(this),new Ld(this),new Wd(this),new Fd(this),new Yd(this),new Qd(this)]}createMultiple(e,t){return Gl(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),((e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e]))))(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return Gl(n,`Unsupported type "${e.name}"`),n.create(e,t)}},Zd=class{constructor(){this._apiEncoder=new Ad}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new rm("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new rm("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new rm(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),Ed(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),Ed(t,"p")}},ep=class extends Xd{constructor(){super(),this._mapper=new Zd}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}},tp=class{constructor(){this._serializer=new yd,this._apiEncoder=new Ad,this._externalDataFactory=new ep,this._canonicalMapper=new qd}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),a=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",a)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}},np=class{constructor(){this._internalEncoder=new tp}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}},rp=n(2341),ap=n.n(rp);function ip(e){var t;return Mr(null!==(t=ap()(e))&&void 0!==t?t:"")}function sp(e){const t=(new Bl).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return Mr(Cr((new np).encodeWithType(e,t)))}function op(e,t,n){return Mr(Zn([kr,new Uint8Array([0]),sp(n),ip(t),Mr(Cr(e))]))}var cp=n(8287).Buffer;function up(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function lp(e,t,n){const r=[t];n&&r.push("inner_tx");const a=Cr(e);return Zn([cp.from(r.join("-")),Mr(a)])}var mp=new WeakMap;class dp extends vl{constructor(e){super(),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,mp,void 0),this.secretKey=e;const t=sr().sign.keyPair.fromSeed(Cr(e));var n,r;n=mp,r=t.secretKey,n.set(up(n,this),r),this.address=Sr(t.publicKey,cr.AccountAddress)}static generate(){const e=Sr(sr().randomBytes(32),cr.AccountSecretKey);return new dp(e)}async sign(e,t){return this.unsafeSign(e,t)}async unsafeSign(e,t){return sr().sign.detached(cp.from(e),(n=mp).get(up(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new j("networkId","provided",n);const a=Cr(e),i=lp(e,n,!0===t),s=[await this.unsafeSign(i,r)];return Ps({tag:Xr.SignedTx,encodedTx:a,signatures:s})}async signMessage(e,t){return this.unsafeSign(Br(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:a,contractAddress:i,...s}={}){const o=op(e,t,{name:n,version:r,networkId:a,contractAddress:i});return Sr(await this.unsafeSign(o,s),cr.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new j("networkId","provided",t);const n=Zn([kr,new Uint8Array([1]),cp.from(t),Cr(e)]);return Sr(await this.unsafeSign(n),cr.Signature)}}function pp(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:a}={}){const i=zs(e);if(i.tag===Xr.SignedTx)throw new F("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in i&&"freeloader"!==t&&(s+=BigInt(i.fee)),i.tag===Xr.NameClaimTx&&(s+=BigInt(i.nameFee)),i.tag===Xr.OracleQueryTx&&(s+=BigInt(i.queryFee)),i.tag===Xr.OracleRespondTx&&(s-=BigInt(null!=r?r:0)),i.tag===Xr.ChannelSettleTx&&(!0===a&&(s-=BigInt(i.initiatorAmountFinal)),!1===a&&(s-=BigInt(i.responderAmountFinal))),i.tag!==Xr.SpendTx&&i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(i.amount)),i.tag===Xr.ContractCreateTx&&(s+=BigInt(i.deposit)),i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.GaAttachTx&&i.tag!==Xr.GaMetaTx||"freeloader"===t||(s+=BigInt(i.gasPrice)*BigInt(null!=n?n:i.gasLimit)),i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s+=pp(Ps(i.tx.encodedTx),i.tag===Xr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function hp(e,t,n){const r=zs(e,Xr.SignedTx);if(r.encodedTx.tag===Xr.GaMetaTx)return pp(Ps(r.encodedTx),n);const a=Ps(r.encodedTx),i=wl(a),[s,o]=[!0,!1].map((e=>qr(lp(a,t,e),r.signatures[0],i)));if(!s&&!o)throw new D("Can't verify signature");return pp(Ps(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function fp(e,t,{isMined:n,...r}={}){let a=zs(e);const i=a.tag===Xr.SignedTx,s=i&&!0===n&&Is(e);if(a.tag===Xr.SignedTx&&(a=a.encodedTx),null==r.gasUsed&&!1!==s&&[Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(a.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),a=null!=e?e:n;if(null==a)throw new ae(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=a.gasUsed}if(null==r.queryFee&&Xr.OracleRespondTx===a.tag&&(r.queryFee=(await t.getOracleByPubkey(a.oracleId)).queryFee.toString()),null==r.isInitiator&&Xr.ChannelSettleTx===a.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(a.channelId);r.isInitiator=a.fromId===e}return i?hp(e,await t.getNetworkId(),r):pp(e,r)}var yp=n(8287).Buffer;const gp=[];async function Np(e,t,n){const r=wl(Ps(e)),[a,{height:i},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!nr(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(gp.map((async r=>r(e,{node:t,account:a,height:i,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function wp(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new Nl(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[_o()]});return r._getCachedStatus=async()=>t._getCachedStatus(),Np(zs(e),r,[])}gp.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Xr.SignedTx)return[];const{encodedTx:a,signatures:i}=e;if(null==(null!=a?a:i))return[];if(1!==i.length)return[];const s=yp.from([n,...r.includes(Xr.PayingForTx)?["inner_tx"]:[]].join("-")),o=Cr(Ps(a)),c=Zn([s,o]),u=Zn([s,Mr(o)]);return qr(c,i[0],t.id)||qr(u,i[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:Np(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const a=await fp(Ps(e),r).catch((()=>0n));return a<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${a}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Xr.SpendTx||zr(e.recipientId,cr.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!nr(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===Xr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Xr.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const a=Xr.OracleRegisterTx===e.tag,i=Xr.ContractCreateTx===e.tag||Xr.GaAttachTx===e.tag,s=Xr.ContractCallTx===e.tag||Xr.GaMetaTx===e.tag,o=null!==(n=null!==(r=a?"oracle-call":null)&&void 0!==r?r:i?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=ka[t][o];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ie;return!c.abiVersion.includes(u.abiVersion)||i&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(Xr.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof Un)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class vp extends D{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function bp(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:a=!0,confirm:i,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:Is(c),rawTx:c};if(r){const e=await wp(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new vp(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(a){const e=await Na(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=i&&+i>0){const e="boolean"==typeof i?void 0:i;return{...n,confirmationHeight:await va(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw rr(e),Object.assign(e,{rawTx:c,verifyTx:async()=>wp(c,t)})}}var xp=n(8287).Buffer;const _p=e=>xp.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Cp=e=>xp.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Sp=e=>{var t;return _p(null!==(t=ap()(e))&&void 0!==t?t:"")},Tp="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function Pp(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:_p(Cr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${Tp}.${Sp(n)}`,a=await t.unsafeSign(r);return`${r}.${_p(a)}`}function Ap(e,t){var n;const r=e.split(".");if(3!==r.length)throw new j("JWT components count",3,r.length);const[a,i,s]=r;if(a!==Tp)throw new j("JWT header",Tp,a);const o=JSON.parse(Cp(i).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Sr(Cp(c.x),cr.AccountAddress);if(null!=t&&u!==t)throw new j("address",`${u} ("sub_jwk")`,t);if(null!=u&&!qr(xp.from(`${a}.${i}`),Cp(s),u))throw new Fe(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function zp(e){try{return Ap(e),!0}catch(e){return!1}}function Ip(e){Ap(e)}function Ep(e,t){try{const{signer:n}=Ap(e,t);return null!=n}catch(e){return!1}}let Mp=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const qp=La(cr.OracleAddress),Rp={serialize(e){return qp.serialize(Sr(Cr(e),cr.OracleAddress))},deserialize(e){return Sr(Cr(qp.deserialize(e)),cr.OracleQueryId)}},Op=La(cr.ContractAddress),kp=[{tag:_i(Mp.AensWildcard),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.AensName),version:_i(1,!0),accountAddress:La(cr.AccountAddress),nameId:pi,contractAddress:Op},{tag:_i(Mp.AensPreclaim),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.Oracle),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.OracleResponse),version:_i(1,!0),queryId:Rp,contractAddress:Op}];function Bp(e){return Di(kp,Mp,e,{},cr.Bytearray)}function Up(e,t){return Li(kp,Mp,e,t,{})}function $p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class Gp extends re{constructor(e,t){super(`Can't ${t} because ${e} is not an auction name`),this.name="NotAuctionNameError"}}var Vp=new WeakMap;class Dp{constructor(e,t){var n,r,a;a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Vp),r.set(n,a),this.value=e,this.options=t,this.options=t}get id(){return aa(this.value)}async revoke(e={}){const t={...this.options,...e};return bp(await As({_isInternalBuild:!0,...t,tag:Xr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},a={...!0===n&&Object.fromEntries((await r.onNode.getNameEntryByName(this.value)).pointers.map((({key:e,id:t})=>[e,t]))),...e},i=Object.values(a).some((e=>zr(e,cr.Bytearray))),s=await As({_isInternalBuild:!0,...r,tag:Xr.NameUpdateTx,version:i?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(a).map((([e,t])=>({key:e,id:t})))});return bp(s,r)}async transfer(e,t={}){const n={...this.options,...t};return bp(await As({_isInternalBuild:!0,...n,tag:Xr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async getAuctionState(e={}){var t;if(!ha(this.value))throw new Gp(this.value,"get auction state");const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getAuctionEntryByName(this.value);return{...r,id:r.id,highestBidder:r.highestBidder}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return bp(await As({_isInternalBuild:!0,nameSalt:(n=Vp,n.get($p(n,this))),...t,tag:Xr.NameClaimTx,accountId:t.onAccount.address,name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Ir(),r=await As({_isInternalBuild:!0,...t,tag:Xr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:ia(this.value,n)}),a=await bp(r,t);var i,s;return s=n,(i=Vp).set($p(i,this),s),{...a,nameSalt:n}}async bid(e,t={}){if(!ha(this.value))throw new Gp(this.value,"make a bid");const n={...this.options,...t};return bp(await As({_isInternalBuild:!0,...n,tag:Xr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}const Lp=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};var jp=class extends kl{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(Lp);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new xl(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new xl(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new xl("Missing event declaration");return((e,t)=>({name:"event",variantType:e,topics:t}))(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new xl("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const i=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!i)throw new xl("Unknown type definition: "+JSON.stringify(e));const s={};return i.vars.forEach(((e,n)=>{const[[r,a]]=Object.entries(e);s[a]=t[n]})),[s.hasOwnProperty(i.typedef)?s[i.typedef]:i.typedef,s]}},Fp=class{constructor(){this._dataFactory=new Xd,this._apiEncoder=new Ad,this._canonicalMapper=new qd}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}};class Hp extends Error{constructor(e){super(e),this.name="EncoderError"}}var Jp=Hp,Wp=class{constructor(e){this._byteArrayEncoder=new tp,this._typeResolver=new jp(e),this._apiEncoder=new Ad,this._eventEncoder=new Fp,this._canonicalMapper=new qd}encode(e,t,n){const{types:r,required:a}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<a)throw new Jp(`Non matching number of arguments. ${t} expects between ${a} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode({name:"calldata",functionName:t,argumentTypes:r},n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,{name:"string"})}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}},Kp=class{constructor(e){this._internalEncoder=new Wp(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}};function Yp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qp(e,t){return e.get(Xp(e,t))}function Xp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Zp=new WeakSet,eh=new WeakMap;function th({returnType:e,returnValue:t,log:n},r,a,i){let s;switch(e){case"ok":{const e=Xp(Zp,this,rh).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,i)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=Cr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new xe("ACI",`. Error provided by node: "${s}".`);if(/Trying to call undefined function: <<\d+,\d+,\d+,\d+>>/.test(s))throw new xe("ACI",`. Error provided by node: "${s}", function name: ${r}.`);break;default:throw new ae(`Unknown return type: ${e}`)}throw new ze(s,a)}async function nh(e,t,n){const r=await bp(e,{...this.$options,...n});return{hash:r.hash,tx:zs(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function rh(e){const t=Qp(eh,this).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new Ie(e)}function ah(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const a=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),i=a.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${Mr(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(i.length){case 0:throw new Me(t.toString(),e);case 1:return i[0][0];default:throw new qe(e,i)}}const ih=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new F("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new F("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new $(`callInfo is not available for transaction ${e}`);const a=r;return{...Xp(Zp,this,th).call(this,a,t,void 0,n),result:a}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:a}=r;return Math.floor(1.25*a)}async $deploy(e,t){var n;const{callStatic:r,...a}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...a,callStatic:r});if(null!=this.$options.address)throw new _e;if(null==a.onAccount)throw new F("Can't deploy without account");const i=a.onAccount.address;if(null==this.$options.bytecode)throw new F("Can't deploy without bytecode");const s=await As({_isInternalBuild:!0,...a,tag:Xr.ContractCreateTx,gasLimit:null!==(n=a.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,a),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:i}),{hash:o,...c}=await Xp(Zp,this,nh).call(this,s,"init",{...a,onAccount:a.onAccount});return this.$options.address=Es(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,a)},owner:i,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:a,top:i,...s}={...this.$options,...n},o=Xp(Zp,this,rh).call(this,e),{address:c,name:u}=this.$options,l=null!=u?aa(u):c,{onNode:m}=s;if(null==e)throw new Ae;if("init"===e&&!0!==a)throw new Se('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Ee(s.amount,e);let d;try{if(null==s.onAccount)throw new ae("Use fallback account");d=s.onAccount.address}catch(e){if(!0!==a||!(e instanceof X&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof Qe||e instanceof ae&&"Use fallback account"===e.message))throw e;d=Vr.pub}const p=this._calldata.encode(this._name,e,t);if(!0===a){if(null==s.nonce){const e=null!=i&&{["number"==typeof i?"height":"hash"]:i},t=await ba(d,{...e,onNode:m}).catch((e=>{if(!nr(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:m,callData:p};let n;if("init"===e){if(null==this.$options.bytecode)throw new F('Can\'t dry-run "init" without bytecode');n=await As({...t,tag:Xr.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new Te("Can't dry-run contract without address");n=await As({...t,tag:Xr.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...a}=await Ia(n,d,{...s,top:i});if(null==r)throw new ae(`callObj is not available for transaction ${n}`);const o=r;return{...a,...Xp(Zp,this,th).call(this,o,e,n,s),tx:zs(n),result:o,rawTx:n,hash:Is(n),txData:void 0}}if(null!=i)throw new F("Can't handle `top` option in on-chain contract call");if(null==l)throw new Te("Can't call contract without address");const h=await As({_isInternalBuild:!0,...s,tag:Xr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:d,contractId:l,callData:p});if(null==s.onAccount)throw new F("Can't call contract on chain without account");return Xp(Zp,this,nh).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Xp(Zp,this,ah).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Me)return null;throw e}const a=this._calldata.decodeEvent(r,e.data,e.topics),[i,s]=Object.entries(a)[0];return{name:i,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:a,sourceCodePath:i,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;null!=i&&(t=await e.compile(i)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!=n||(n=t.bytecode))}if(null==r)throw new Pe;let l;if(null!=a&&ca(a=await Ra(a,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(l=a),null==a&&null==s&&null==i&&null==n)throw new Te("Can't create instance by ACI without address");if(null!=a&&null==(await t.getContract(a)).active)throw new Ce(a);if(!0===c){if(null==a)throw new Te("Can't validate bytecode without contract address");const r=(await t.getContractCode(a)).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=i){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validate(r,i)}if(!c)throw new xe(null!=(null!=s?s:i)?"source code":"bytecode")}return new ih({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:i,bytecode:n,aci:r,address:a,name:l,fileSystem:o,...u})}constructor({aci:e,...t}){var n;Yp(this,n=Zp),n.add(this),function(e,t){Yp(e,t),t.set(e,void 0)}(this,eh),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new F(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Xp(e,t),n)}(eh,this,r.contract),this._name=Qp(eh,this).name,this._calldata=new Kp(e),this.$options=t,Object.assign(this,Object.fromEntries(Qp(eh,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const a=n.length===t.length+1?n.pop():{};if("object"!=typeof a)throw new X(`Options should be an object: ${a}`);return"init"===e?this.$deploy(n,{callStatic:r,...a}):this.$call(e,n,{callStatic:r,...a})}]}))))}};var sh=ih;function oh(e){return{...e,id:e.id,decodedQuery:Cr(e.query).toString(),decodedResponse:Cr(e.response).toString()}}class ch{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQueries(e={}){const t={...this.options,...e};return(await t.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries.map(oh)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return oh(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function uh(e,t,n){return e.set(mh(e,t),n),n}function lh(e,t){return e.get(mh(e,t))}function mh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var dh=new WeakMap;class ph extends ch{constructor(e,t){var n,r,a;super(Sr(Cr(e.address),cr.OracleAddress),t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=dh),r.set(n,a),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return bp(await As({_isInternalBuild:!0,...r,tag:Xr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return bp(await As({_isInternalBuild:!0,...t,tag:Xr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let a=!1;const i=async()=>{if(a)return;a=!0;const i=(await this.getQueries(n)).filter((({id:e})=>!r.has(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));i.forEach((e=>r.add(e.id))),a=!1,await Promise.all(i.map((t=>e(t))))};i();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await fa("micro-block",n);return setInterval((async()=>i()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return bp(await As({_isInternalBuild:!0,...r,tag:Xr.OracleRespondTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=lh(dh,this))throw new re("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const a=async t=>{const a=await e(t),i=r.then((async()=>this.respondToQuery(t.id,a,n)));r=i.then((()=>{}),(()=>{})),await i};uh(dh,this,Promise.resolve());const i=this.pollQueries((async e=>{const t=a(e);if(null==lh(dh,this))throw new ie;return uh(dh,this,lh(dh,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{i(),await lh(dh,this),uh(dh,this,void 0)}}}class hh extends ch{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,a=await As({_isInternalBuild:!0,...n,tag:Xr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:i}=zs(a,Xr.OracleQueryTx);return{...await bp(a,n),queryId:ta(r,i,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},a=null!==(n=r.interval)&&void 0!==n?n:await fa("micro-block",r);let i,s,o;do{({response:o,ttl:s}=await this.getQuery(e,r));const t=Cr(o);if(t.length>0)return t.toString();await Qn(a),i=await ga({...r,cached:!0})}while(s>=i);throw new Y(i)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function fh(e,t,n){return bp(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:n.onAccount.address,recipientId:await Ra(t,"account_pubkey",n),amount:e}),n)}async function yh(e,t,n){if(+e<0||+e>1)throw new j("fraction","a number between 0 and 1",e);const r=await Ra(t,"account_pubkey",n),a=n.onAccount.address,i=new E(await xa.bind(n.onAccount)(a,n)),s=i.times(e).integerValue(E.ROUND_HALF_UP),{fee:o}=zs(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:s}),Xr.SpendTx),c=s.plus(o).gt(i)?i.minus(o):s;return bp(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:c}),n)}async function gh(e,t){return bp(await As({_isInternalBuild:!0,...t,tag:Xr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var Nh=n(8287).Buffer;async function wh(e,t,{onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var m;const d=n.address;if("generalized"===(await ba(d,{onNode:a})).kind)throw new F(`Account ${d} is already GA`);const p=await sh.initialize({onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await As({_isInternalBuild:!0,...l,tag:Xr.GaAttachTx,onNode:a,code:await p.$compile(),gasLimit:null!==(m=l.gasLimit)&&void 0!==m?m:await p._estimateGas("init",t,l),ownerId:d,callData:p._calldata.encode(p._name,"init",t),authFun:Mr(e)}),{hash:f,rawTx:y}=await bp(h,{onNode:a,onAccount:n,onCompiler:r,...l}),g=Es(y);return Object.freeze({owner:d,transaction:f,rawTx:y,gaContractId:g})}async function vh(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:a,consensusProtocolVersion:i}=await r.getNodeInfo();let s=Mr(Zn([Nh.from(a),Cr(e)]));if(i===Kr.Ceres){if(null==t)throw new j("fee","provided (in Ceres)",t);if(null==n)throw new j("gasPrice","provided (in Ceres)",n);s=Mr(Cr(Cs({tag:Ei.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Sr(s,cr.TxHash)})))}return s}async function bh(e,{onNode:t}){const n=zs(e,Xr.SignedTx);if(n.encodedTx.tag!==Xr.GaMetaTx)throw new j("transaction","to include GaMetaTx",Xr[n.encodedTx.tag]);return vh(Ps(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var xh=n(4997),_h=n(2321),Ch=n(2231);function Sh(e){return Sh="function"==typeof _h&&"symbol"==typeof Ch?function(e){return typeof e}:function(e){return e&&"function"==typeof _h&&e.constructor===_h&&e!==_h.prototype?"symbol":typeof e},Sh(e)}var Th=n(9280);function Ph(e,t,n){return(t=function(e){var t=function(e){if("object"!=Sh(e)||!e)return e;var t=e[Th];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sh(t)?t:t+""}(t))in e?xh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ah(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const zh={...t,sendTransaction:bp,...o,...c};var Ih=new WeakMap;class Eh{constructor(e={}){var t,n;Ph(this,"_options",{}),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Ih,void 0),Object.assign(this._options,e),t=Ih,n={onAccount:ar((()=>this._options.onAccount)),onNode:ar((()=>this._options.onNode)),onCompiler:ar((()=>this._options.onCompiler))},t.set(Ah(t,this),n)}getContext(e={}){return{...this._options,...(t=Ih,t.get(Ah(t,this))),...e};var t}async buildTx(e){return As({...this.getContext(),...e})}}Object.assign(Eh.prototype,Xn(zh,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Mh=Eh;function qh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Rh=new WeakMap;class Oh extends Mh{constructor({nodes:e=[],...t}={}){var n,r;super(t),Ph(this,"pool",new Map),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Rh,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=Rh,r={onNode:ar((()=>this.api)),onCompiler:ar((()=>this.compilerApi)),onAccount:ar((()=>this._resolveAccount()))},n.set(qh(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new U("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new $e(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Ge(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Ge("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new te("Address in AccountResolver");if("object"==typeof e)return e;throw new X(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,t={}){return this.unsafeSign(e,t)}async unsafeSign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).unsafeSign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...(t=Rh,t.get(qh(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class kh extends Oh{constructor({accounts:e,...t}={}){super(t),Ph(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(Cr(t),null==this.accounts[t])throw new se(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new se(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(Cr(e),null==this.accounts[e])throw new se(e);this.selectedAddress=e}}let Bh=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),Uh=function(e){return e.window="window",e.extension="extension",e}({}),$h=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),Gh=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Vh=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const Dh=[];class Lh extends q{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=Dh.find((t=>t.code===e.code));if(null==t)throw new ae(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class jh extends Lh{constructor(e){super("Invalid transaction"),Ph(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}Ph(jh,"code",2),Dh.push(jh);class Fh extends Lh{constructor(e){super("Operation rejected by user"),Ph(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}Ph(Fh,"code",4),Dh.push(Fh);class Hh extends Lh{constructor(){super("Unsupported Protocol Version"),Ph(this,"code",5),this.name="RpcUnsupportedProtocolError"}}Ph(Hh,"code",5),Dh.push(Hh);class Jh extends Lh{constructor(e){super("Wallet deny your connection request"),Ph(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}Ph(Jh,"code",9),Dh.push(Jh);class Wh extends Lh{constructor(){super("You are not connected to the wallet"),Ph(this,"code",10),this.name="RpcNotAuthorizeError"}}Ph(Wh,"code",10),Dh.push(Wh);class Kh extends Lh{constructor(e){super(`You are not subscribed for account ${e}`),Ph(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}Ph(Kh,"code",11),Dh.push(Kh);class Yh extends Lh{constructor(){super("The peer failed to execute your request due to unknown error"),Ph(this,"code",12),this.name="RpcInternalError"}}Ph(Yh,"code",12),Dh.push(Yh);class Qh extends Lh{constructor(e){super(`Wallet can't find a network by id "${e}"`),Ph(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}Ph(Qh,"code",13),Dh.push(Qh);class Xh extends Lh{constructor(){super("Method not found"),Ph(this,"code",-32601),this.name="RpcMethodNotFoundError"}}Ph(Xh,"code",-32601),Dh.push(Xh);var Zh=n(8287).Buffer;class ef extends vl{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){return this.unsafeSign(e)}async unsafeSign(e){const t=Sr(Zh.from(e),cr.Bytearray),{signature:n}=await this._rpcClient.request(Gh.unsafeSign,{onAccount:this.address,data:t});return Cr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new j("networkId","provided",n);const r=await this._rpcClient.request(Gh.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new ee("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(Gh.signMessage,{onAccount:this.address,message:e});return Zh.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:a,networkId:i}={}){const{signature:s}=await this._rpcClient.request(Gh.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:i,contractAddress:a},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(Gh.signDelegation,{delegation:e,onAccount:this.address});return t}}function tf(e,t,n){nf(e,t),t.set(e,n)}function nf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rf(e,t){return e.get(sf(e,t))}function af(e,t,n){return e.set(sf(e,t),n),n}function sf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var of=new WeakMap,cf=new WeakMap,uf=new WeakMap,lf=new WeakSet;class mf{constructor(e,t,n){var r;nf(this,r=lf),r.add(this),tf(this,of,new Map),tf(this,cf,0),tf(this,uf,void 0),this.connection=e,af(uf,this,n),e.connect(sf(lf,this,df).bind(this),t)}async request(e,t){return sf(lf,this,pf).call(this,af(cf,this,rf(cf,this)+1),e,t),new Promise(((e,t)=>{rf(of,this).set(rf(cf,this),{resolve:e,reject:t})}))}notify(e,t){sf(lf,this,pf).call(this,void 0,e,t)}}async function df(e,t){if("2.0"!==e?.jsonrpc)throw new le(JSON.stringify(e));if("result"in e||"error"in e)return void sf(lf,this,ff).call(this,e);const n=e;let r,a;try{if(!(n.method in rf(uf,this)))throw new Xh;const e=n.method;r=await rf(uf,this)[e](n.params,t)}catch(e){rr(e),a=e}if(null!=n.id&&sf(lf,this,hf).call(this,n.id,n.method,r,null==a||a instanceof Lh?a:new Yh),null!=a&&!(a instanceof Lh))throw a}function pf(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function hf(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function ff({id:e,error:t,result:n}){const r=rf(of,this).get(e);if(null==r)throw new me(e);null!=t?r.reject(Lh.deserialize(t)):r.resolve(n),rf(of,this).delete(e)}class yf extends Oh{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...a}){super(a),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if(Cr(t),!this.addresses().includes(t))throw new de(t);this._ensureConnected(),e=new ef(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Ye("You are already connected to wallet");let r;const a=e=>{if(t){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Nl(e.node.url),!0)}this.onNetworkChange(e)},i=new mf(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[Gh.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[Gh.updateNetwork]:a,[Gh.closeConnection]:e=>{r=e,i.connection.disconnect()},[Gh.readyToConnect]:()=>{}}),s=await i.request(Gh.connect,{name:this.name,version:1,connectNode:t});return a(s),this.rpcClient=i,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(Gh.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(Gh.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(Gh.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(Gh.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new Qe("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new he}}var gf=n(228);function Nf(e,t,n){wf(e,t),t.set(e,n)}function wf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vf(e,t,n){return e.set(xf(e,t),n),n}function bf(e,t){return e.get(xf(e,t))}function xf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var _f=new WeakMap,Cf=new WeakSet,Sf=new WeakMap;class Tf extends gf{get isConnected(){return null!=bf(_f,this)}get accounts(){return bf(Sf,this)}constructor(){var e;super(),wf(this,e=Cf),e.add(this),Nf(this,_f,void 0),Nf(this,Sf,[])}static async _connect(e,t,n,r){let a;const i=new mf(t,(()=>{vf(_f,n,void 0),vf(Sf,n,[]),n.emit("disconnect",a)}),{[Gh.updateAddress]:xf(Cf,n,Af).bind(n),[Gh.updateNetwork]:n._updateNetwork.bind(n),[Gh.closeConnection]:e=>{a=e,i.connection.disconnect()},[Gh.readyToConnect]:()=>{}});vf(_f,n,i);const s=await bf(_f,n).request(Gh.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=xf(Cf,this,Pf).call(this);e.notify(Gh.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=xf(Cf,this,Pf).call(this);return(await e.request(Gh.address,void 0)).map((t=>new ef(e,t)))}async subscribeAccounts(e,t){const n=await xf(Cf,this,Pf).call(this).request(Gh.subscribeAddress,{type:e,value:t});return xf(Cf,this,Af).call(this,n.address),bf(Sf,this)}async askToSelectNetwork(e){await xf(Cf,this,Pf).call(this).request(Gh.updateNetwork,e)}}function Pf(){if(null==bf(_f,this))throw new Qe("You are not connected to Wallet");return bf(_f,this)}function Af(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];vf(Sf,this,t.map((e=>new ef(xf(Cf,this,Pf).call(this),e)))),this.emit("accountsChange",bf(Sf,this))}function zf(e,t){return e.get(If(e,t))}function If(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ef=new WeakMap;class Mf extends Tf{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Ef),n.set(t,r)}get networkId(){return zf(Ef,this)}_updateNetwork(e){var t,n;t=Ef,n=e.networkId,t.set(If(t,this),n),this.emit("networkIdChange",zf(Ef,this))}static async connect(e,t){const n=new Mf;return await Mf._connect(e,t,n,!1),n}}function qf(e,t){return e.get(Rf(e,t))}function Rf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Of=new WeakMap;class kf extends Tf{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Of),n.set(t,r)}get node(){return qf(Of,this)}_updateNetwork(e){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");var t,n;t=Of,n=new Nl(e.node.url),t.set(Rf(t,this),n),this.emit("nodeChange",qf(Of,this))}static async connect(e,t){const n=new kf;return await super._connect(e,t,n,!0),n}}var Bf=n(1013);const Uf=n.n(Bf)()({storeAsString:!0}),$f=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Xn(e,(([e,t])=>[e,$f(t)]));if(Array.isArray(e))return e.map((e=>$f(e)));if("string"==typeof e&&new E(e).toString(10)===e){const t=new E(e);return t.toJSON=()=>t.toString(10),t}return e};var Gf={stringify:(...e)=>Uf.stringify($f(e[0]),...e.slice(1)),parse:Uf.parse},Vf=n(8287).Buffer;class Df extends kh{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:a,onDisconnect:i,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),Ph(this,"_clients",new Map),this.onConnection=r,this.onSubscription=a,this.onDisconnect=i,this.onAskAccounts=s,this.onAskToSelectNetwork=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(Gh.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(Gh.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new pe(e);return t}_isRpcClientConnected(e){return Vh.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Vh.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=Vf.from(sr().randomBytes(8)).toString("base64");let n;const r={id:t,status:Vh.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new mf(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[Gh.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[Gh.connect]:async({name:e,version:n,icons:a,connectNode:i},s)=>{if(1!==n)throw new Hh;return await this.onConnection(t,{name:e,icons:a,connectNode:i},s),r.status=Vh.CONNECTED,r.connectNode=i,{...await this.getWalletInfo(),...i&&this._getNode()}},[Gh.subscribeAddress]:async({type:e,value:n},a)=>{if(!this._isRpcClientConnected(t))throw new Wh;switch(e){case $h.subscribe:await this.onSubscription(t,{type:e,value:n},a),r.addressSubscription.add(n);break;case $h.unsubscribe:r.addressSubscription.delete(n);break;default:throw new ae(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[Gh.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskAccounts(t,e,n),this.addresses()},[Gh.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:a},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const s={onAccount:n,aeppOrigin:i,aeppRpcClientId:t,innerTx:a};if(r||!0===a)return{signedTransaction:await this.signTransaction(e,s)};try{return Gf.parse(Gf.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await wp(e,this.api);if(n.length>0)throw new jh(n);throw t}},[Gh.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Vf.from(await this.signMessage(e,a)).toString("hex")}},[Gh.signTypedData]:async({domain:e,aci:n,data:r,onAccount:a=this.address},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(a))throw new Kh(a);const s={...e,onAccount:a,aeppOrigin:i,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[Gh.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Sr(await this.unsafeSign(Cr(e),a),cr.Signature)}},[Gh.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,a)}},[Gh.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(Gh.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function Lf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function jf(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ff(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Lf(e.outputLen),Lf(e.blockLen)}function Hf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Jf(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Wf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Kf=async()=>{};async function Yf(e,t,n){let r=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-r;e>=0&&e<t||(await Kf(),r+=e)}}function Qf(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function Xf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}function Zf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}class ey{}function ty(e){const t=t=>e().update(Xf(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class ny extends ey{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ff(e);const n=Xf(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),Jf(a)}update(e){return Hf(this),this.iHash.update(e),this}digestInto(e){Hf(this),jf(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ry=(e,t,n)=>new ny(e,t).update(n).digest();function ay(e,t,n,r){Ff(e);const a=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:i,dkLen:s,asyncTick:o}=a;if(Lf(i),Lf(s),Lf(o),i<1)throw new Error("iterations (c) should be >= 1");const c=Zf(t),u=Zf(n),l=new Uint8Array(s),m=ry.create(e,c),d=m._cloneInto().update(u);return{c:i,dkLen:s,asyncTick:o,DK:l,PRF:m,PRFSalt:d}}function iy(e,t,n,r,a){return e.destroy(),t.destroy(),r&&r.destroy(),Jf(a),n}ry.create=(e,t)=>new ny(e,t);class sy extends ey{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Wf(this.buffer)}update(e){Hf(this),jf(e=Xf(e));const{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(r-this.pos,a-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Wf(e);for(;r<=a-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Hf(this),function(e,t){jf(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:a}=this;let{pos:i}=this;t[i++]=128,Jf(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const a=BigInt(32),i=BigInt(4294967295),s=Number(n>>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=Wf(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const oy=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),cy=BigInt(2**32-1),uy=BigInt(32);function ly(e,t=!1){return t?{h:Number(e&cy),l:Number(e>>uy&cy)}:{h:0|Number(e>>uy&cy),l:0|Number(e&cy)}}const my=(e,t,n)=>e>>>n,dy=(e,t,n)=>e<<32-n|t>>>n,py=(e,t,n)=>e>>>n|t<<32-n,hy=(e,t,n)=>e<<32-n|t>>>n,fy=(e,t,n)=>e<<64-n|t>>>n-32,yy=(e,t,n)=>e>>>n-32|t<<64-n;function gy(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}}const Ny=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),wy=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vy=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),by=(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,xy=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),_y=(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,Cy=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:s}=ly(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),Sy=(()=>Cy[0])(),Ty=(()=>Cy[1])(),Py=new Uint32Array(80),Ay=new Uint32Array(80);class zy extends sy{constructor(e=64){super(128,e,16,!1),this.Ah=0|oy[0],this.Al=0|oy[1],this.Bh=0|oy[2],this.Bl=0|oy[3],this.Ch=0|oy[4],this.Cl=0|oy[5],this.Dh=0|oy[6],this.Dl=0|oy[7],this.Eh=0|oy[8],this.El=0|oy[9],this.Fh=0|oy[10],this.Fl=0|oy[11],this.Gh=0|oy[12],this.Gl=0|oy[13],this.Hh=0|oy[14],this.Hl=0|oy[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:m,Gh:d,Gl:p,Hh:h,Hl:f}=this;return[e,t,n,r,a,i,s,o,c,u,l,m,d,p,h,f]}set(e,t,n,r,a,i,s,o,c,u,l,m,d,p,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|m,this.Gh=0|d,this.Gl=0|p,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)Py[n]=e.getUint32(t),Ay[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|Py[e-15],n=0|Ay[e-15],r=py(t,n,1)^py(t,n,8)^my(t,0,7),a=hy(t,n,1)^hy(t,n,8)^dy(t,n,7),i=0|Py[e-2],s=0|Ay[e-2],o=py(i,s,19)^fy(i,s,61)^my(i,0,6),c=hy(i,s,19)^yy(i,s,61)^dy(i,s,6),u=vy(a,c,Ay[e-7],Ay[e-16]),l=by(u,r,o,Py[e-7],Py[e-16]);Py[e]=0|l,Ay[e]=0|u}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:m,Fh:d,Fl:p,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=py(l,m,14)^py(l,m,18)^fy(l,m,41),N=hy(l,m,14)^hy(l,m,18)^yy(l,m,41),w=l&d^~l&h,v=xy(g,N,m&p^~m&f,Ty[e],Ay[e]),b=_y(v,y,t,w,Sy[e],Py[e]),x=0|v,_=py(n,r,28)^fy(n,r,34)^fy(n,r,39),C=hy(n,r,28)^yy(n,r,34)^yy(n,r,39),S=n&a^n&s^a&s,T=r&i^r&o^i&o;y=0|h,g=0|f,h=0|d,f=0|p,d=0|l,p=0|m,({h:l,l:m}=gy(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;const P=Ny(x,C,T);n=wy(P,b,_,S),r=0|P}({h:n,l:r}=gy(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=gy(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=gy(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=gy(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:m}=gy(0|this.Eh,0|this.El,0|l,0|m)),({h:d,l:p}=gy(0|this.Fh,0|this.Fl,0|d,0|p)),({h:h,l:f}=gy(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=gy(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,a,i,s,o,c,u,l,m,d,p,h,f,y,g)}roundClean(){Jf(Py,Ay)}destroy(){Jf(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Iy=ty((()=>new zy));function Ey(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function My(e){const t=Ey(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}const qy=e=>Ey("mnemonic"+e);var Ry=n(9234),Oy=n.n(Ry);class ky{async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}var By=n(8287).Buffer;function Uy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $y(e,t){return e.get(Vy(e,t))}function Gy(e,t,n){return e.set(Vy(e,t),n),n}function Vy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Dy=By.from("ed25519 seed");function Ly(e,t){const n=Oy().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function jy(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=By.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),Ly(Zn([By.alloc(1,0),e,r]),t)}),e)}var Fy=new WeakMap,Hy=new WeakSet;class Jy extends ky{constructor(e){var t;super(),Uy(this,t=Hy),t.add(this),function(e,t){Uy(e,t),t.set(e,void 0)}(this,Fy),Gy(Fy,this,e)}async getWallet(){return Vy(Hy,this,Wy).call(this,!1)}getWalletSync(){return Vy(Hy,this,Wy).call(this,!0)}async initialize(e){const t=await this.getWallet();return Vy(Hy,this,Ky).call(this,e,t)}initializeSync(e){const t=this.getWalletSync();return Vy(Hy,this,Ky).call(this,e,t)}}function Wy(e){const t=e=>{const t=jy(Ly(e,Dy),[44,457]);return Gy(Fy,this,{secretKey:Sr(t.secretKey,cr.Bytearray),chainCode:Sr(t.chainCode,cr.Bytearray)}),$y(Fy,this)};if(ArrayBuffer.isView($y(Fy,this))){if(64!==$y(Fy,this).length)throw new j("seed length",64,$y(Fy,this).length);return t($y(Fy,this))}return"object"==typeof $y(Fy,this)?$y(Fy,this):e?t(function(e,t=""){return function(e,t,n){const{c:r,dkLen:a,DK:i,PRF:s,PRFSalt:o}=ay(e,t,n,{c:2048,dkLen:64});let c;const u=new Uint8Array(4),l=Wf(u),m=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){const n=i.subarray(t,t+s.outputLen);l.setInt32(0,e,!1),(c=o._cloneInto(c)).update(u).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<r;e++){s._cloneInto(c).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return iy(s,o,i,c,m)}(Iy,My(e).nfkd,qy(t))}($y(Fy,this))):function(e,t=""){return async function(e,t,n){const{c:r,dkLen:a,asyncTick:i,DK:s,PRF:o,PRFSalt:c}=ay(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),m=Wf(l),d=new Uint8Array(o.outputLen);for(let e=1,t=0;t<a;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);m.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(d),n.set(d.subarray(0,n.length)),await Yf(r-1,i,(()=>{o._cloneInto(u).update(d).digestInto(d);for(let e=0;e<n.length;e++)n[e]^=d[e]}))}return iy(o,c,s,u,d)}(Iy,My(e).nfkd,qy(t))}($y(Fy,this)).then(t)}function Ky(e,t){const n=jy({secretKey:Cr(t.secretKey),chainCode:Cr(t.chainCode)},[e,0,0]).secretKey;return new dp(Sr(n,cr.AccountSecretKey))}function Yy(e,t){return e.get(Qy(e,t))}function Qy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Xy=new WeakMap;class Zy extends vl{constructor(e){var t,n,r;super(),r=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Xy),n.set(t,r),Cr(e),this.address=e}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("Can't sign using generalized account")}async signMessage(){throw new te("Can't sign using generalized account")}async signTypedData(){throw new te("Can't sign using generalized account")}async signDelegation(){throw new te("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new j("authData, onCompiler, onNode","provided",null);const{callData:a,sourceCode:i,args:s,fee:o,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=a?a:await(async()=>{if(null==Yy(Xy,this)){const n=await ba(this.address,{onNode:r});if("generalized"!==n.kind)throw new j("account kind","generalized",n.kind);e=Xy,t=n.authFun,e.set(Qy(e,this),t)}var e,t;if(null==Yy(Xy,this))throw new ae("Account in generalised, but authFun not provided");if(null==i||null==s)throw new be("Auth data must contain sourceCode and args or callData.");const a=await sh.initialize({onCompiler:n,onNode:r,sourceCode:i});return a._calldata.encode(a._name,Yy(Xy,this),s)})(),m=await As({tag:Xr.GaMetaTx,tx:{tag:Xr.SignedTx,encodedTx:Cr(e),signatures:[]},gaId:this.address,authData:l,fee:o,gasLimit:c,gasPrice:u,onNode:r});return Ps({tag:Xr.SignedTx,encodedTx:Cr(m),signatures:[]})}}var eg=n(8287).Buffer;const tg=224;class ng extends vl{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using Ledger HW")}async signTypedData(){throw new te("Typed data signing using Ledger HW")}async signDelegation(){throw new te("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountLedger");if(null==n)throw new j("networkId","provided",n);const r=Cr(e);let a=0;const i=eg.from(n),s=[];for(;a!==r.length;){const e=0===a?141-i.length:150,t=a+e>r.length?r.length-a:e,n=eg.alloc(0===a?9+i.length+t:t);if(0===a){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(i.length,e),e+=i.copy(n,e,0,i.length),r.copy(n,e,0,150-e)}else r.copy(n,0,a,a+t);s.push(n),a+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(tg,4,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)];return Ps({tag:Xr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=eg.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,a=t+e>n.length?n.length-t:e,i=eg.alloc(0===t?8+a:a);0===t?(i.writeUInt32BE(this.index,0),i.writeUInt32BE(n.length,4),n.copy(i,8,t,t+a)):n.copy(i,0,t,t+a),r.push(i),t+=a}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(tg,8,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)}}var rg=n(8287).Buffer;function ag(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ig(e,t){return e.get(og(e,t))}function sg(e,t,n){return e.set(og(e,t),n),n}function og(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cg=new WeakMap,ug=new WeakSet;class lg extends ky{constructor(e){var t;super(),ag(this,t=ug),t.add(this),function(e,t){ag(e,t),t.set(e,void 0)}(this,cg),Ph(this,"_enableExperimentalLedgerAppSupport",!1),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await og(ug,this,dg).call(this),t=[e,"0.4.4","0.5.0"],n=[e,"1.0.0","2.0.0"];if(!(ho(...t)||this._enableExperimentalLedgerAppSupport&&ho(...n)))throw new ne("Aeternity app on Ledger",...t);sg(cg,this,Promise.resolve())}async getAppConfiguration(){return og(ug,this,dg).call(this)}async getAddress(e,t=!1){await og(ug,this,mg).call(this);const n=rg.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(tg,2,t?1:0,0,n),a=r[0];return r.subarray(1,1+a).toString("ascii")}async initialize(e){return new ng(this.transport,e,await this.getAddress(e))}}async function mg(){var e;return null!==(e=ig(cg,this))&&void 0!==e||sg(cg,this,this.ensureReady()),ig(cg,this)}async function dg(){let e=await this.transport.send(tg,6,0,0);return 6===e.length&&(e=e.subarray(1)),{version:[e[0],e[1],e[2]].join(".")}}var pg=n(8287).Buffer;const hg="npm:@aeternity-snap/plugin";async function fg(e,t,n,r){const a=await e.request({method:"wallet_invokeSnap",params:{snapId:hg,request:{method:t,params:n}}});if(null==a)throw new ae("Empty MetaMask response");if(!(r in a))throw new ae(`Key ${r} missed in response ${JSON.stringify(a)}`);return a[r]}class yg extends vl{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using MetaMask")}async signTypedData(){throw new te("Typed data signing using MetaMask")}async signDelegation(){throw new te("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountMetamask");if(null==n)throw new j("networkId","provided",n);return fg(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await fg(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:pg.from(e).toString("base64")},"signature");return pg.from(t,"base64")}}function gg(e,t,n){Ng(e,t),t.set(e,n)}function Ng(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wg(e,t,n){return e.set(bg(e,t),n),n}function vg(e,t){return e.get(bg(e,t))}function bg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const xg="0.0.9",_g="0.1.0";var Cg=new WeakMap,Sg=new WeakSet,Tg=new WeakMap;class Pg extends ky{get provider(){if(null==vg(Cg,this))throw new Z("Metamask is not detected yet");return vg(Cg,this)}constructor(e){var t;if(super(),Ng(this,t=Sg),t.add(this),gg(this,Cg,void 0),gg(this,Tg,void 0),wg(Cg,this,e),null==vg(Cg,this)&&null==window)throw new Z("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider")}async installSnap(){const e=await bg(Sg,this,Ig).call(this);return(await e.request({method:"wallet_requestSnaps",params:{[hg]:{version:xg}}}))[hg]}async requestSnap(e=`>=${xg} <${_g}`){const t=await bg(Sg,this,Ig).call(this);return(await t.request({method:"wallet_requestSnaps",params:{[hg]:{version:e}}}))[hg]}async ensureReady(){const e=[await this.getSnapVersion(),xg,_g];if(!ho(...e))throw new ne("Aeternity snap in MetaMask",...e)}async getSnapVersion(){const e=await bg(Sg,this,Ig).call(this),t=await e.request({method:"wallet_getSnaps"}),n=t[hg]?.version;if(null==n)throw new Z("Aeternity snap is not installed to MetaMask or not connected to this aepp");return n}async initialize(e){await this.requestSnap();const t=await bg(Sg,this,Ig).call(this),n=await fg(t,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new yg(t,e,n)}}async function Ag(){if(!("ethereum"in window)||null==window.ethereum)return;const e=window.ethereum,t=await e.request({method:"web3_clientVersion"});if(null==t)throw new ae("Can't get Ethereum Provider version");return t.startsWith("MetaMask/v")?e:void 0}async function zg(){return setTimeout((()=>window.dispatchEvent(new Event("eip6963:requestProvider")))),new Promise((e=>{const t=n=>{"io.metamask"===n.detail.info.rdns&&(window.removeEventListener("eip6963:announceProvider",t),e(n.detail.provider))};window.addEventListener("eip6963:announceProvider",t),setTimeout((()=>{window.removeEventListener("eip6963:announceProvider",t),e(void 0)}),500)}))}async function Ig(){var e;return null!==(e=vg(Tg,this))&&void 0!==e||wg(Tg,this,(async(e,t)=>{if(null!==(e=vg(Cg,this))&&void 0!==e||wg(Cg,this,null!==(t=await bg(Sg,this,Ag).call(this))&&void 0!==t?t:await bg(Sg,this,zg).call(this)),null==vg(Cg,this))throw new Z("Can't find a Metamask extension as an injected provider and over EIP-6963. Ensure that Metamask is installed or setup a provider.");const n=await vg(Cg,this).request({method:"web3_clientVersion"});if(null==n)throw new ae("Can't get Ethereum Provider version");const r=[n.slice(10),"12.2.4"];if(!ho(...r))throw new ne("Metamask",...r);return vg(Cg,this)})()),vg(Tg,this)}class Eg{}const Mg={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},qg={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Rg={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},Og={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},kg={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},Bg={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Ug={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},$g={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Gg={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Vg={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Dg={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Lg={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},jg={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Fg={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Hg={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Jg={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Wg={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Kg={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Yg={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},Qg={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Zg={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},eN={parameterPath:"body",mapper:Mg},tN={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},nN={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},rN={parameterPath:"body",mapper:Bg},aN={parameterPath:"body",mapper:Ug},iN={parameterPath:"body",mapper:Gg},sN={parameterPath:"body",mapper:Dg},oN={parameterPath:"body",mapper:Fg},cN={parameterPath:"body",mapper:Hg},uN={parameterPath:"body",mapper:Wg};class lN extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-compiler/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},dN)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},pN)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},hN)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},fN)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},yN)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},gN)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},NN)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},wN)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},vN)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},bN)}version(e){return this.sendOperationRequest({options:e},xN)}apiVersion(e){return this.sendOperationRequest({options:e},_N)}api(e){return this.sendOperationRequest({options:e},CN)}}const mN=Gs(u,!1),dN={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},pN={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:kg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},hN={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:rN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},fN={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:$g},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:aN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},yN={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:Vg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:iN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},gN={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:jg,isError:!0}},requestBody:sN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},NN={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:oN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},wN={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Jg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},vN={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:uN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},bN={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Kg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},xN={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Kg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},_N={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Yg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},CN={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN};class SN extends Eg{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new lN(e,{allowInsecureConnection:!0,additionalPolicies:[So("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0",t),Co((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:cn}),this.api.pipeline.removePolicy({name:In})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof Un&&400===e.statusCode)throw new U(e.message);throw e}}async compile(e){throw new te("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof Un&&400===e.statusCode)throw new U(e.message);throw e}}async generateAci(e){throw new te("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new te("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function TN(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var PN=n(952),AN=n.n(PN);const{w3cwebsocket:zN}=AN();function IN(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function EN(e,t){if(null==t)throw new ve;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),kN(e)}function MN(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,IN(e,"statusChanged",t))}function qN(e,t){e._state=t,IN(e,"stateChanged",t)}function RN(e,t){e._debug("send message",t.method,t.params),e._websocket.send(Gf.stringify({jsonrpc:"2.0",...t}))}function ON(e,t,n={}){RN(e,{method:t,params:n})}async function kN(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,EN(e,r)}async function BN(e,t){const{handler:n,state:r}=e._fsm,a=await Promise.resolve(n(e,t,r));if(EN(e,a),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===a?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;IN(e,"newContract",ea(r,n+1))}}function UN(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function $N(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{ON(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{UN(e),IN(e,"error",new ge)}),15e3)}),1e4)}async function GN(e,t,n){return new Promise(((r,a)=>{const i=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(i,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";a(new fe(e.error.message+n))}else r(e.result)})),RN(e,{method:t,id:i,params:n})}))}async function VN(e,t){const{signatures:n,encodedTx:r}=zs(e,Xr.SignedTx),a=Ps(r),i=await t(a);if("string"==typeof i){const{signatures:e}=zs(i,Xr.SignedTx);return Ps({tag:Xr.SignedTx,signatures:n.concat(e),encodedTx:Cr(a)})}return i}async function DN(e,t,n,r){let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new B("Can't find transaction in message");a=await VN(n.signed_tx,r)}const i="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return ON(e,t,i?{error:null!=a?a:1}:{[s]:a}),i}function LN(e,t,n){return n?.reject?.(Object.assign(new Ne(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:QN}}function jN(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:QN};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:QN};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new J("Insufficient balance")):e.includes(1002)?n.reject(new F("Amount cannot be negative")):n.reject(new ye(t.error.message)),{handler:QN}}return LN(0,t,n)}function FN(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(MN(e,r),{handler:WN}):"channel_reestablished"===t.params.data.event?{handler:YN}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:FN}):{handler:FN}}if("channels.error"===t.method)return IN(e,"error",new ye(t?.payload?.message)),{handler:tw}}async function HN(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:YN}:LN(0,t,n)}}):LN(0,t,n)}async function JN(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return qN(e,null==n?"":Ps(n)),{handler:QN}}return LN(0,t,n)}async function WN(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await DN(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:KN}}function KN(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:YN}}if("channels.on_chain_tx"===r.method)return IN(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,MN(e,"signed"),{handler:KN}}function YN(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(qN(e,n.params.data.state),{handler:QN}):LN(0,n,r)}}):LN(0,t,n)}async function QN(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:XN};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return IN(e,TN(t.params.data.event)),{handler:QN};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:QN};case"timeout":case"close_mutual":case"shutdown":return{handler:QN};case"closing":return MN(e,"closing"),{handler:QN};case"closed_confirmed":return MN(e,"closed"),{handler:tw};case"died":return MN(e,"died"),{handler:tw}}break;case"channels.on_chain_tx":return IN(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:QN};case"channels.leave":return{handler:QN};case"channels.update":return qN(e,t.params.data.state),{handler:QN};case"channels.sign.shutdown_sign_ack":return XN(e,t,n)}}async function XN(e,t,n){var r;const[,a]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==a?LN(0,t,n):await DN(e,`channels.${a}`,t.params.data,(async n=>e._options.sign(a,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:QN}:LN(0,r,n)},state:n}:{handler:QN}}async function ZN(e,t,n){return"channels.sign.shutdown_sign"!==t.method?LN(0,t,n):(await DN(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?LN(0,t,n):{handler:tw,state:n}},state:n})}function ew(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),UN(e),{handler:tw}):"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):LN(0,t,n)}function tw(e,t,n){return null==n?{handler:tw}:"closing"===t.params.data.event?{handler:tw,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:tw,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:tw}):{handler:tw,state:n}}QN.enter=e=>{MN(e,"open")};var nw=n(7007),rw=n.n(nw);function aw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}let iw=0;var sw=new WeakMap;class ow{constructor(){var e,t;Ph(this,"_eventEmitter",new(rw())),Ph(this,"_nextRpcMessageId",0),Ph(this,"_rpcCallbacks",new Map),Ph(this,"_messageQueue",[]),Ph(this,"_isMessageQueueLocked",!1),Ph(this,"_actionQueue",[]),Ph(this,"_isActionQueueLocked",!1),Ph(this,"_status","disconnected"),Ph(this,"_state",""),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,sw,void 0),iw+=1,t=iw,(e=sw).set(aw(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=sw,t.get(aw(t,this))}`,...e)}static async initialize(e){return ow._initialize(new ow,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new F("`existingChannelId`, `existingFsmId` should be both provided or missed");const a=l[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...a}){e._options={url:r,...a};const i=new URL(r);Object.entries(a).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>i.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),i.searchParams.set("protocol","json-rpc"),MN(e,"connecting"),e._websocket=new zN(i.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),MN(e,"connected",r),EN(e,{handler:t}),$N(e)},onclose:t=>{MN(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=Gf.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ie;try{await BN(e,t)}catch(n){rr(n),IN(e,"error",new we(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||$N(e):IN(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void IN(e,"error",new B(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?a:FN,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return UN(this)}status(){return this._status}async state(){const e=(t=await GN(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[TN(t)]:n})),{}));var t;return{calls:Ss(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:zs(e.halfSignedTx,Xr.SignedTx)},...""!==e.signedTx&&{signedTx:zs(e.signedTx,Xr.SignedTx)},trees:Ss(e.trees)}}round(){if(""===this._state)return null;const e=zs(this._state,Xr.SignedTx).encodedTx;switch(e.tag){case Xr.ChannelCreateTx:return 1;case Xr.ChannelOffChainTx:case Xr.ChannelWithdrawTx:case Xr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new B("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new B("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,a)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:a}}}})}));return kN(e),r}(this,((e,t)=>t?.handler===QN),e)}async leave(){return this.enqueueAction((()=>(ON(this,"channels.leave"),{handler:ew})))}async shutdown(e){return this.enqueueAction((()=>(ON(this,"channels.shutdown"),{handler:ZN,state:{sign:e}})))}}class cw extends ow{async update(e,t,n,r,a=[]){return this.enqueueAction((()=>{ON(this,"channels.update.new",{from:e,to:t,amount:n,meta:a});const i=async(e,t,n)=>"channels.sign.update"===t.method?await DN(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:i,state:n}:{handler:(e,t)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}:"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):jN(this,t,n);return{handler:i}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await GN(this,"channels.get.poi",{accounts:e,contracts:t});return Ss(n)}async balances(e){return Object.fromEntries((await GN(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return LN(0,t,n);const r=(t,a)=>{if("channels.on_chain_tx"===a.method)return n.onOnChainTx?.(a.params.data.tx),{handler:r,state:n};if("channels.info"===a.method&&[`own_${e}_locked`,`${e}_locked`].includes(a.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",i=a.params.data.event.startsWith("own_");return n[`on${i?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return jN(this,a,n,(()=>(qN(this,a.params.data.state),n.resolve({accepted:!0,signedTx:a.params.data.state}),{handler:QN})))},{sign:a}=n;return await DN(this,`channels.${e}_tx`,t.params.data,(async e=>a(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Qn(500)),ON(this,"channels.message",{info:n,to:t})}}function uw(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[TN(t)]:n})),{})}class lw extends cw{static async initialize(e){return ow._initialize(new lw,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:a},i){return this.enqueueAction((()=>(ON(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:a}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>jN(this,t,n,(()=>{const e=zs(t.params.data.state,Xr.SignedTx).encodedTx;if(e.tag!==Xr.ChannelOffChainTx)throw new B(`Tag should be ${Xr[Xr.ChannelOffChainTx]}, got ${Xr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",a=this._options[r];qN(this,t.params.data.state);const i=ea(a,e.round);return IN(this,"newContract",i),n.resolve({accepted:!0,address:i,signedTx:t.params.data.state}),{handler:QN}})),state:n}),state:{sign:i}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},a){return this.enqueueAction((()=>(ON(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}),state:{sign:a}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:a=1e6,gasPrice:i=Lr},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(ON(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:i,gas:a}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?LN(0,t,n):(await DN(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),IN(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),LN(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return uw(await GN(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return uw(await GN(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await GN(this,"channels.get.contract",{pubkey:e});return uw({...t,contract:uw(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(ON(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:QN}):(n.reject(new Ne("Unexpected message received")),{handler:tw})}})))}}var mw=null;"undefined"!=typeof WebSocket?mw=WebSocket:"undefined"!=typeof MozWebSocket?mw=MozWebSocket:void 0!==n.g?mw=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?mw=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(mw=self.WebSocket||self.MozWebSocket);var dw=mw;function pw(e,t,n){hw(e,t),t.set(e,n)}function hw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fw(e,t,n){return n(Nw(e,t))}function yw(e,t,n){return e.set(Nw(e,t),n),n}function gw(e,t){return e.get(Nw(e,t))}function Nw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ww=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(ww||{});class vw extends q{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class bw extends vw{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var xw=new WeakMap,_w=new WeakMap,Cw=new WeakMap,Sw=new WeakSet;class Tw{get webSocket(){return gw(Cw,this)}constructor(e){var t;hw(this,t=Sw),t.add(this),pw(this,xw,[]),pw(this,_w,[]),pw(this,Cw,void 0),this.url=e}async reconnect(){Nw(Sw,this,Ew).call(this),yw(Cw,this,await new Promise((e=>{const t=new dw(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{Nw(Sw,this,Iw).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new ae("Unknown incoming message type: "+typeof e.data);Nw(Sw,this,Mw).call(this,JSON.parse(e.data))},onclose:e=>{Nw(Sw,this,Iw).call(this,(()=>!0),void 0,new bw(e)),Nw(Sw,this,Ew).call(this,!0)}})}))),await Promise.all([...fw(Sw,this,Pw)].map((e=>Nw(Sw,this,zw).call(this,!0,e))))}subscribeKeyBlocks(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.Middleware,e)}subscribeKeyBlocksNode(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.Node,e)}subscribeKeyBlocksAll(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.All,e)}subscribeMicroBlocks(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.Middleware,e)}subscribeMicroBlocksNode(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.Node,e)}subscribeMicroBlocksAll(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.All,e)}subscribeTransactions(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.Middleware,e)}subscribeTransactionsNode(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.Node,e)}subscribeTransactionsAll(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.All,e)}subscribeObject(e,t){return Nw(Sw,this,qw).call(this,e,ww.Middleware,t)}subscribeObjectNode(e,t){return Nw(Sw,this,qw).call(this,e,ww.Node,t)}subscribeObjectAll(e,t){return Nw(Sw,this,qw).call(this,e,ww.All,t)}}function Pw(e){return new Set(gw(xw,e).map((([e])=>e)))}function Aw(e){if(null==gw(Cw,this))throw new ie;gw(Cw,this).send(JSON.stringify(e))}function zw(e,t){if(null==gw(Cw,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";Nw(Sw,this,Aw).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),gw(_w,this).push([e,t])}function Iw(e,t,n){gw(xw,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function Ew(e=!1){null!=gw(Cw,this)&&(e||gw(Cw,this).close(),Object.assign(gw(Cw,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),yw(Cw,this,void 0))}function Mw(e){if("string"==typeof e||Array.isArray(e)){const t=gw(_w,this).shift();if(null==t)throw new ae("Request queue is empty");const[n,r]=t;let a;return"string"==typeof e&&(a=new vw(e)),e.includes(r)!==n&&(a=new ae(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=a&&Nw(Sw,this,Iw).call(this,(e=>r===e),void 0,a))}Nw(Sw,this,Iw).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==ww.All)),e.payload)}function qw(e,t,n){const r=[e,t,n];return 0===fw(Sw,this,Pw).size&&this.reconnect(),fw(Sw,this,Pw).has(e)||Nw(Sw,this,zw).call(this,!0,e),gw(xw,this).push(r),()=>{yw(xw,this,gw(xw,this).filter((e=>e!==r))),fw(Sw,this,Pw).has(e)||Nw(Sw,this,zw).call(this,!1,e),0===fw(Sw,this,Pw).size&&Nw(Sw,this,Ew).call(this)}}const Rw={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Ow={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},kw={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},Bw={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},Uw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},$w={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},Gw={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Vw={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},Dw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},Lw={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},jw={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},Fw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Hw={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Jw={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},Ww={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},Kw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Yw={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Qw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Xw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(epoch):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Zw={parameterPath:"validator",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"validator",required:!0,type:{name:"String"}}},ev={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},tv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},nv={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},rv={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},av={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},iv={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},sv={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},ov={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},cv={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},uv={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},lv={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},mv={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},dv={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},pv={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},hv={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(time|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},fv={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},yv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},gv={type:{name:"Composite",className:"PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},Nv={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTxEvent","OracleRegisterTxEvent","OracleExtendTxEvent","OracleQueryTxEvent","OracleResponseTxEvent","NamePreclaimTxEvent","NameClaimTxEvent","NameTransferTxEvent","NameUpdateTxEvent","NameRevokeTxEvent","ContractCreateTxEvent","ContractCallTxEvent","GaAttachTxEvent","GaMetaTxEvent","ChannelCreateTxEvent","ChannelDepositTxEvent","ChannelWithdrawTxEvent","ChannelForceProgressTxEvent","ChannelCloseMutualTxEvent","ChannelCloseSoloTxEvent","ChannelSlashTxEvent","ChannelSettleTxEvent","ChannelSnapshotSoloTxEvent","ChannelSetDelegatesTxEvent","ChannelOffchainTxEvent","ChannelClientReconnectTxEvent","PayingForTxEvent"]}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}}}}},wv={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},vv={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"Number"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},bv={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},xv={serializedName:"OffChainUpdate",type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},_v={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Cv={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Sv={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Tv={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",type:{name:"Number"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Pv={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},Av={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},zv={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Iv={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},Ev={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},Mv={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},qv={type:{name:"Composite",className:"Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Rv={type:{name:"Composite",className:"DexSwap",modelProperties:{amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},action:{serializedName:"action",required:!0,type:{name:"Enum",allowedValues:["SWAP","BUY","SELL"]}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Ov={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},kv={type:{name:"Composite",className:"Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Bv={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameClaimTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},Uv={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},$v={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},Gv={type:{name:"Composite",className:"PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},Vv={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},key:{serializedName:"key",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}}}}},Dv={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Lv={type:{name:"Composite",className:"PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema",modelProperties:{contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},jv={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Fv={type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{contractId:{serializedName:"contract_id",type:{name:"Number"}},callerId:{serializedName:"caller_id",type:{name:"Number"}}}}},Hv={type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Jv={type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},Wv={type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Kv={type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Yv={type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},Qv={type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Xv={type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Zv={type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},eb={type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},tb={type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},nb={type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},rb={type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},ab={type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},ib={type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},sb={type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ob={type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},cb={type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ub={type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},lb={type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},mb={type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},db={type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},pb={type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},hb={type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},fb={type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},yb={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},gb={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}}}}},Nb={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},wb={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},vb={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},bb={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xb={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},_b={type:{name:"Composite",className:"Aex141TokenDetailResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},metadata:{serializedName:"metadata",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Cb={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Sb={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Tb={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},Pb={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}}}}},Ab={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},zb={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},Ib={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}}}}},Eb={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},Mb={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},qb={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Rb={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},Ob={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},kb={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},Bb={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},Ub={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},$b={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},Gb={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Composite",className:"ContractCreateTx"}}}}},Vb={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Db={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Lb={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},jb={type:{name:"Composite",className:"Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfo"}}}}}}},Fb={type:{name:"Composite",className:"EpochInfo",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},first:{serializedName:"first",required:!0,type:{name:"Number"}},last:{serializedName:"last",required:!0,type:{name:"Number"}},length:{serializedName:"length",required:!0,type:{name:"Number"}},seed:{serializedName:"seed",required:!0,type:{name:"String"}},lastPinHeight:{serializedName:"last_pin_height",required:!0,type:{name:"Number"}},parentBlockHash:{serializedName:"parent_block_hash",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},epochStartTime:{serializedName:"epoch_start_time",required:!0,type:{name:"Number"}},validators:{serializedName:"validators",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfoValidatorsItem"}}}}}}},Hb={type:{name:"Composite",className:"EpochInfoValidatorsItem",modelProperties:{validator:{serializedName:"validator",type:{name:"String"}},stake:{serializedName:"stake",type:{name:"Number"}}}}},Jb={type:{name:"Composite",className:"Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Schedule"}}}}}}},Wb={type:{name:"Composite",className:"Schedule",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},leader:{serializedName:"leader",required:!0,type:{name:"String"}}}}},Kb={type:{name:"Composite",className:"Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Validator"}}}}}}},Yb={type:{name:"Composite",className:"Validator",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}},totalStakes:{serializedName:"total_stakes",required:!0,type:{name:"Number"}},delegates:{serializedName:"delegates",required:!0,type:{name:"Number"}},rewardsEarned:{serializedName:"rewards_earned",required:!0,type:{name:"Number"}},pinningHistory:{serializedName:"pinning_history",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"}}}}}}},Qb={type:{name:"Composite",className:"Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},Xb={type:{name:"Composite",className:"Delegate",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},delegate:{serializedName:"delegate",required:!0,type:{name:"String"}},stake:{serializedName:"stake",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}}}}},Zb={type:{name:"Composite",className:"PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},ex={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlockExtended"}}}}}}},tx={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nx={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlockExtended"}}}}}}},rx={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},ax={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},ix={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},sx={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},ox={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}},claimsCount:{serializedName:"claims_count",type:{name:"Number"}}}}},cx={type:{name:"Composite",className:"Auction",modelProperties:{auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},claimsCount:{serializedName:"claims_count",required:!0,type:{name:"Number"}}}}},ux={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"AuctionLastBidTx"}}}}},lx={type:{name:"Composite",className:"Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},mx={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},dx={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},px={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},hx={type:{name:"Composite",className:"Components171VsjiSchemasNametxPropertiesTxAllof1",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},fx={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},yx={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},gx={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Nx={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},wx={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTransferTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},vx={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},bx={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},xx={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},_x={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Cx={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}}}}},Sx={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},Tx={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}}}}},Px={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Ax={type:{name:"Composite",className:"Components1Viuqa3SchemasOracletxPropertiesTxAllof1",modelProperties:{oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},zx={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},Ix={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},Ex={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Mx={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},qx={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Rx={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleQuery"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Ox={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},kx={type:{name:"Composite",className:"Stats",modelProperties:{minersCount:{serializedName:"miners_count",type:{name:"Number"}},feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},Bx={type:{name:"Composite",className:"PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Ux={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}}}}},$x={type:{name:"Composite",className:"Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Gx={type:{name:"Composite",className:"Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Vx={type:{name:"Composite",className:"Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Dx={type:{name:"Composite",className:"Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},Lx={type:{name:"Composite",className:"DeltaStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}}}}},jx={type:{name:"Composite",className:"Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Fx={type:{name:"Composite",className:"Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Hx={type:{name:"Composite",className:"Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},Jx={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},Wx={type:{name:"Composite",className:"PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Kx={type:{name:"Composite",className:"Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},Yx={type:{name:"Composite",className:"TotalStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},Qx={type:{name:"Composite",className:"Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Xx={type:{name:"Composite",className:"Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Zx={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},e_={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},t_={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},n_={type:{name:"Composite",className:"PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"PendingTransaction"}}}}}}},r_={type:{name:"Composite",className:"PendingTransaction",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},failures:{serializedName:"failures",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},a_={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},i_={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["reward_dev","reward_block"]}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},s_={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},o_={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},c_={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}}}}},u_={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},l_={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},m_={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},d_={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},p_={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},h_={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},f_={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},y_={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},g_={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},N_={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},w_={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},v_={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},b_={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},x_={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},__={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},C_={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},S_={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},T_={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},P_={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},A_={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},z_={type:{name:"Composite",className:"Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...gv.type.modelProperties,...Pv.type.modelProperties}}},I_={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...zv.type.modelProperties,...Pv.type.modelProperties}}},E_={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Ev.type.modelProperties}}},M_={type:{name:"Composite",className:"PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...qv.type.modelProperties,...Pv.type.modelProperties}}},q_={type:{name:"Composite",className:"Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kv.type.modelProperties,...Pv.type.modelProperties}}},R_={type:{name:"Composite",className:"Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gv.type.modelProperties,...Pv.type.modelProperties}}},O_={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...yb.type.modelProperties,...Pv.type.modelProperties}}},k_={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nb.type.modelProperties,...Pv.type.modelProperties}}},B_={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...vb.type.modelProperties,...Pv.type.modelProperties}}},U_={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...xb.type.modelProperties,...Pv.type.modelProperties}}},$_={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Cb.type.modelProperties,...Pv.type.modelProperties}}},G_={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...Tb.type.modelProperties,...Pv.type.modelProperties}}},V_={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...zb.type.modelProperties,...Pv.type.modelProperties}}},D_={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Mb.type.modelProperties}}},L_={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rb.type.modelProperties,...Pv.type.modelProperties}}},j_={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kb.type.modelProperties,...Pv.type.modelProperties}}},F_={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ub.type.modelProperties,...Pv.type.modelProperties}}},H_={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Db.type.modelProperties,...Pv.type.modelProperties}}},J_={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Lb.type.modelProperties,...Pv.type.modelProperties}}},W_={type:{name:"Composite",className:"Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema",modelProperties:{...jb.type.modelProperties,...Pv.type.modelProperties}}},K_={type:{name:"Composite",className:"Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema",modelProperties:{...Jb.type.modelProperties,...Pv.type.modelProperties}}},Y_={type:{name:"Composite",className:"Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kb.type.modelProperties,...Pv.type.modelProperties}}},Q_={type:{name:"Composite",className:"Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qb.type.modelProperties,...Pv.type.modelProperties}}},X_={type:{name:"Composite",className:"Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zb.type.modelProperties,...Pv.type.modelProperties}}},Z_={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...ex.type.modelProperties,...Pv.type.modelProperties}}},eC={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...nx.type.modelProperties,...Pv.type.modelProperties}}},tC={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...ax.type.modelProperties,...Pv.type.modelProperties}}},nC={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...sx.type.modelProperties,...Pv.type.modelProperties}}},rC={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...fx.type.modelProperties,...Pv.type.modelProperties}}},aC={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gx.type.modelProperties,...Pv.type.modelProperties}}},iC={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nx.type.modelProperties,...Pv.type.modelProperties}}},sC={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...bx.type.modelProperties,...Pv.type.modelProperties}}},oC={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{..._x.type.modelProperties,...Pv.type.modelProperties}}},cC={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...zx.type.modelProperties,...Pv.type.modelProperties}}},uC={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Mx.type.modelProperties,...Pv.type.modelProperties}}},lC={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ox.type.modelProperties,...Pv.type.modelProperties}}},mC={type:{name:"Composite",className:"PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Bx.type.modelProperties,...Pv.type.modelProperties}}},dC={type:{name:"Composite",className:"Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...$x.type.modelProperties,...Pv.type.modelProperties}}},pC={type:{name:"Composite",className:"Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gx.type.modelProperties,...Pv.type.modelProperties}}},hC={type:{name:"Composite",className:"PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Vx.type.modelProperties,...Pv.type.modelProperties}}},fC={type:{name:"Composite",className:"Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema",modelProperties:{...Dx.type.modelProperties,...Pv.type.modelProperties}}},yC={type:{name:"Composite",className:"Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema",modelProperties:{...jx.type.modelProperties,...Pv.type.modelProperties}}},gC={type:{name:"Composite",className:"PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema",modelProperties:{...Fx.type.modelProperties,...Pv.type.modelProperties}}},NC={type:{name:"Composite",className:"PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hx.type.modelProperties,...Pv.type.modelProperties}}},wC={type:{name:"Composite",className:"PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wx.type.modelProperties,...Pv.type.modelProperties}}},vC={type:{name:"Composite",className:"PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kx.type.modelProperties,...Pv.type.modelProperties}}},bC={type:{name:"Composite",className:"Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qx.type.modelProperties,...Pv.type.modelProperties}}},xC={type:{name:"Composite",className:"Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Xx.type.modelProperties,...Pv.type.modelProperties}}},_C={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...t_.type.modelProperties,...Pv.type.modelProperties}}},CC={type:{name:"Composite",className:"PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema",modelProperties:{...n_.type.modelProperties,...Pv.type.modelProperties}}},SC={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...a_.type.modelProperties,...Pv.type.modelProperties}}},TC={type:{name:"Composite",className:"AuctionLastBidTx",modelProperties:{...Uv.type.modelProperties,...lx.type.modelProperties}}},PC={type:{name:"Composite",className:"KeyBlockExtended",modelProperties:{...tx.type.modelProperties,beneficiaryReward:{serializedName:"beneficiary_reward",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}}}}},AC={type:{name:"Composite",className:"MicroBlockExtended",modelProperties:{...rx.type.modelProperties,microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},gas:{serializedName:"gas",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}}}}},zC={type:{name:"Composite",className:"NameTxTx",modelProperties:{...px.type.modelProperties,...hx.type.modelProperties}}},IC={type:{name:"Composite",className:"OracleTxTx",modelProperties:{...Px.type.modelProperties,...Ax.type.modelProperties}}};let EC={"OffChainUpdate.OffChainUpdate":xv};class MC extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-middleware/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountActivities(e,t){return this.sendOperationRequest({accountId:e,options:t},RC)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},OC)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},kC)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},BC)}getAccountNameClaims(e,t){return this.sendOperationRequest({accountId:e,options:t},UC)}getAccountPointees(e,t){return this.sendOperationRequest({accountId:e,options:t},$C)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({accountId:e,options:t},GC)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},VC)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},DC)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},LC)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},jC)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},FC)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},HC)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},JC)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},WC)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},KC)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},YC)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},QC)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},XC)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},ZC)}getChannels(e){return this.sendOperationRequest({options:e},eS)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},tS)}getContractCalls(e){return this.sendOperationRequest({options:e},nS)}getContractLogs(e){return this.sendOperationRequest({options:e},rS)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},aS)}getDexSwaps(e){return this.sendOperationRequest({options:e},iS)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},sS)}getEpochs(e){return this.sendOperationRequest({options:e},oS)}getEpochTop(e){return this.sendOperationRequest({options:e},cS)}getSchedules(e){return this.sendOperationRequest({options:e},uS)}getSchedule(e,t){return this.sendOperationRequest({height:e,options:t},lS)}getValidators(e){return this.sendOperationRequest({options:e},mS)}getValidator(e,t){return this.sendOperationRequest({validator:e,options:t},dS)}getValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},pS)}getTopValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},hS)}getKeyBlocks(e){return this.sendOperationRequest({options:e},fS)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},yS)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},gS)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},NS)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},wS)}getNames(e){return this.sendOperationRequest({options:e},vS)}getNamesAuctions(e){return this.sendOperationRequest({options:e},bS)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},xS)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},_S)}getNamesCount(e){return this.sendOperationRequest({options:e},CS)}getName(e,t){return this.sendOperationRequest({id:e,options:t},SS)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},TS)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},PS)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},AS)}getOracles(e){return this.sendOperationRequest({options:e},zS)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},IS)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},ES)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},MS)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},qS)}getStats(e){return this.sendOperationRequest({options:e},RS)}getActiveAccountsStats(e){return this.sendOperationRequest({options:e},OS)}getAex9TransfersStats(e){return this.sendOperationRequest({options:e},kS)}getBlocksStats(e){return this.sendOperationRequest({options:e},BS)}getContractsStats(e){return this.sendOperationRequest({options:e},US)}getDeltaStats(e){return this.sendOperationRequest({options:e},$S)}getDifficultyStats(e){return this.sendOperationRequest({options:e},GS)}getHashrateStats(e){return this.sendOperationRequest({options:e},VS)}getMinerStats(e){return this.sendOperationRequest({options:e},DS)}getNamesStats(e){return this.sendOperationRequest({options:e},LS)}getTotalStats(e){return this.sendOperationRequest({options:e},jS)}getTotalAccountsStats(e){return this.sendOperationRequest({options:e},FS)}getTransactionsStats(e){return this.sendOperationRequest({options:e},HS)}getStatus(e){return this.sendOperationRequest({options:e},JS)}getTransactions(e){return this.sendOperationRequest({options:e},WS)}getTransactionsCount(e){return this.sendOperationRequest({options:e},KS)}getPendingTransactions(e){return this.sendOperationRequest({options:e},YS)}getPendingTransactionsCount(e){return this.sendOperationRequest({options:e},QS)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},XS)}getTransfers(e){return this.sendOperationRequest({options:e},ZS)}}const qC=yo(m,!1),RC={path:"/v3/accounts/{accountId}/activities",httpMethod:"GET",responses:{200:{bodyMapper:z_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["transactions","aexn","aex9","aex141","contract","transfers","claims","swaps"]}}},Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},OC={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:I_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},$w],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},kC={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:E_},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},BC={path:"/v3/accounts/{accountId}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:M_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},UC={path:"/v3/accounts/{accountId}/names/claims",httpMethod:"GET",responses:{200:{bodyMapper:q_},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},$C={path:"/v3/accounts/{accountId}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:R_},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},GC={path:"/v3/accounts/{accountId}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Lv},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},VC={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:O_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}},Gw,Vw],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},DC={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:k_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},LC={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:B_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},jC={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:U_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},FC={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:_b},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Dw,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},HC={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:$_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Lw,jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},JC={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:gb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},WC={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:G_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Gw,Vw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},KC={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:Ab}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},YC={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:V_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Hw,Jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},QC={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:Eb},400:{bodyMapper:Av,isError:!0}},queryParameters:[Ww],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qC},XC={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:D_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qC},ZC={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Pb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},eS={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:L_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"Enum",allowedValues:["active","inactive"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},tS={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Ob},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,Kw],headerParameters:[Rw],serializer:qC},nS={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:j_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},rS={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:F_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,Yw,{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},aS={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Gb},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},iS={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:H_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},sS={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:J_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Qw],headerParameters:[Rw],serializer:qC},oS={path:"/v3/hyperchain/epochs",httpMethod:"GET",responses:{200:{bodyMapper:W_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Xw],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},cS={path:"/v3/hyperchain/epochs/top",httpMethod:"GET",responses:{200:{bodyMapper:Fb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},uS={path:"/v3/hyperchain/schedule",httpMethod:"GET",responses:{200:{bodyMapper:K_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},lS={path:"/v3/hyperchain/schedule/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Wb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,{parameterPath:"height",mapper:{serializedName:"height",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},mS={path:"/v3/hyperchain/validators",httpMethod:"GET",responses:{200:{bodyMapper:Y_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},dS={path:"/v3/hyperchain/validators/{validator}",httpMethod:"GET",responses:{200:{bodyMapper:Yb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},pS={path:"/v3/hyperchain/validators/{validator}/delegates",httpMethod:"GET",responses:{200:{bodyMapper:Q_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},hS={path:"/v3/hyperchain/validators/{validator}/delegates/top",httpMethod:"GET",responses:{200:{bodyMapper:X_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},fS={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Z_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},yS={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:PC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qC},gS={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:eC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qC},NS={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:AC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qC},wS={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:tC},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qC},vS={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:nC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Gw,Hw,nv,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},bS={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:rC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},xS={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:cx},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},_S={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:yx},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},CS={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Av,isError:!0}},queryParameters:[nv],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},SS={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ox},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},TS={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:aC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},PS={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:iC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},AS={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:sC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},zS={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:oC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},IS={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Cx},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},ES={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:cC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},MS={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:uC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},qS={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:lC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},RS={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:kx},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},OS={path:"/v3/stats/active-accounts",httpMethod:"GET",responses:{200:{bodyMapper:mC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},kS={path:"/v3/stats/aex9-transfers",httpMethod:"GET",responses:{200:{bodyMapper:dC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},sv,ov,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},BS={path:"/v3/stats/blocks",httpMethod:"GET",responses:{200:{bodyMapper:pC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["key","micro"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},US={path:"/v3/stats/contracts",httpMethod:"GET",responses:{200:{bodyMapper:hC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},$S={path:"/v3/stats/delta",httpMethod:"GET",responses:{200:{bodyMapper:fC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},GS={path:"/v3/stats/difficulty",httpMethod:"GET",responses:{200:{bodyMapper:yC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},VS={path:"/v3/stats/hashrate",httpMethod:"GET",responses:{200:{bodyMapper:gC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},DS={path:"/v3/stats/miners",httpMethod:"GET",responses:{200:{bodyMapper:NC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},LS={path:"/v3/stats/names",httpMethod:"GET",responses:{200:{bodyMapper:wC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},jS={path:"/v3/stats/total",httpMethod:"GET",responses:{200:{bodyMapper:vC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},FS={path:"/v3/stats/total-accounts",httpMethod:"GET",responses:{200:{bodyMapper:bC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},HS={path:"/v3/stats/transactions",httpMethod:"GET",responses:{200:{bodyMapper:xC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},cv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},JS={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Zx}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},WS={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:_C},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,$w,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel_close_mutual","channel_close_solo","channel_create","channel_deposit","channel_force_progress","channel_offchain","channel_settle","channel_slash","channel_snapshot_solo","channel_withdraw","contract_call","contract_create","ga_attach","ga_meta","name_claim","name_preclaim","name_revoke","name_transfer","name_update","oracle_extend","oracle_query","oracle_register","oracle_response","paying_for","spend"]}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel","contract","ga","name","oracle","paying_for","spend"]}}}},collectionFormat:"Multi"},uv,lv,mv,dv,pv,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},hv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},KS={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Uw,cv,fv],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},YS={path:"/v3/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:CC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},QS={path:"/v3/transactions/pending/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},XS={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ix},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,yv],headerParameters:[Rw],serializer:qC},ZS={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:SC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},eT=[RC,OC,kC,BC,UC,$C,GC,VC,DC,LC,jC,FC,HC,JC,WC,KC,YC,QC,ZC,eS,tS,nS,rS,aS,iS,sS,oS,cS,uS,lS,mS,dS,pS,hS,fS,yS,gS,NS,wS,vS,bS,xS,_S,CS,SS,TS,PS,AS,zS,IS,ES,MS,qS,RS,OS,kS,BS,US,$S,GS,VS,DS,LS,jS,FS,HS,JS,WS,KS,YS,QS,XS,ZS];function tT(e,t){return e.get(nT(e,t))}function nT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class rT extends q{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var aT=new WeakMap;class iT{constructor(e,t){var n,r;(function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)})(this,aT,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=aT).set(nT(n,this),r)}async next(){if(null==this.nextPath)throw new rT(!0);return tT(aT,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new rT(!1);return tT(aT,this).requestByPath(this.prevPath)}}class sT extends MC{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){let i;super(e,{allowInsecureConnection:!0,additionalPolicies:[So("middleware",(async e=>(null!=i||(i=(await this.getStatus(e)).mdwVersion),i)),"1.81.0","2.0.0",t),bo(),xo(),To(n,r),Co((e=>` ${e.error}`))],...a}),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),a=eT.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new ae(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==a)throw new F(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...a,path:n,urlParameters:a.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new iT(n,this):n}}var oT=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class cT{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ye("You already connected")}disconnect(){if(!this.isConnected())throw new Qe("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function uT(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function lT(e,t){return e.get(dT(e,t))}function mT(e,t,n){return e.set(dT(e,t),n),n}function dT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var pT=new WeakMap,hT=new WeakMap,fT=new WeakMap;class yT extends cT{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:a=Bh.to_aepp,...i}={}){super(i),uT(this,pT,void 0),uT(this,hT,void 0),uT(this,fT,void 0),mT(hT,this,e),mT(fT,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=a}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=lT(hT,this)&&lT(hT,this)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},lT(fT,this).addEventListener("message",this.listener),mT(pT,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==lT(pT,this))throw new ae("Expected to not happen, required for TS");lT(fT,this).removeEventListener("message",this.listener),delete this.listener,lT(pT,this).call(this),mT(pT,this,void 0)}sendMessage(e){var t;if(null==lT(hT,this))throw new Xe("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),lT(hT,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var gT=(e,t)=>{if(null==window)throw new Z("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},a,i)=>{if(e!==Gh.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new yT({target:i,..."extension"===r.type?{sendDirection:Bh.to_waellet,receiveDirection:Bh.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function NT(e,t,n){return e.set(vT(e,t),n),n}function wT(e,t){return e.get(vT(e,t))}function vT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var bT=new WeakMap;class xT extends cT{constructor({port:e,...t}){var n,r,a;super(t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=bT),r.set(n,a),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==wT(bT,this))throw new ie;this.port.onMessage.removeListener(wT(bT,this)[0]),this.port.onDisconnect.removeListener(wT(bT,this)[1]),NT(bT,this,void 0)}connect(e,t){super.connect(e,t),NT(bT,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(wT(bT,this)[0]),this.port.onDisconnect.addListener(wT(bT,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=wT(bT,this)}}}(),r}()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=o(e),s=i[0],c=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,m=c>0?s-4:s;for(n=0;n<m;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],s=16383,o=0,u=r-a;o<u;o+=s)i.push(c(e,o,o+s>u?u:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/m)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,P,C,A,S,T,z,E=j.prototype={constructor:j,toString:null,valueOf:null},I=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,G=!1,$=1,U=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,d,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;d>=10;d/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(d=y.search(/e/i))>0?(l<0&&(l=d),l+=+y.slice(d+1),y=y.substring(0,d)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=d=0,f=y.length;d<f;d++)if(n.indexOf(s=y.charAt(d))<0){if("."==s){if(d>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,d=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(d=0;48===y.charCodeAt(d);d++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(d,++f)){if(f-=d,h&&j.DEBUG&&f>15&&(e>p||e!==o(e)))throw Error(u+g.s*e);if((l=l-d-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],d=(l+1)%m,l<0&&(d+=m),d<f){for(d&&g.c.push(+y.slice(0,d)),f-=m;d<f;)g.c.push(+y.slice(d,d+=m));d=m-(y=y.slice(d)).length}else d-=f;for(;d--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function H(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function F(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,p,h,f,y=e.c,g=d;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,p=y[h=0],f=o(p/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));p=f=0,a=1,c=(i%=m)-m+1}else{for(p=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(p/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?p:p%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?p/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(p/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw G=!n,Error(c+"crypto unavailable");G=n}else G=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),U=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:G,MODULO_MODE:$,POW_PRECISION:U,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return F(arguments,-1)},j.minimum=j.min=function(){return F(arguments,1)},j.random=(_=9007199254740992,P=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],p=new j(I);if(null==e?e=M:w(e,0,f),a=s(e/m),G)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw G=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!G)for(;u<a;)(i=P())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=d[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return p.e=r,p.c=l,p}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=U,U=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),U=m,f.c=t(x(g(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,N,w,i)).c,p=d.r,l=d.e),y=h[u=l+N+1],m=i/2,p=p||u<0||null!=h[u+1],p=w<4?(null!=y||p)&&(0==w||w==(d.s<0?3:2)):y>m||y==m&&(4==w||p||6==w&&1&h[u-1]||w==(d.s<0?8:7)),u<1||!h[0])r=p?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,p,d,h,f,g,N,w,v,b,x,_,P,C,A,S,T,z=r.s==a.s?1:-1,E=r.c,I=a.c;if(!(E&&E[0]&&I&&I[0]))return new j(r.s&&a.s&&(E?!I||E[0]!=I[0]:I)?E&&0==E[0]||!I?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(p=r.e-a.e)+1,c||(c=l,p=y(r.e/m)-y(a.e/m),z=z/m|0),d=0;I[d]==(E[d]||0);d++);if(I[d]>(E[d]||0)&&p--,z<0)v.push(1),h=!0;else{for(C=E.length,S=I.length,d=0,z+=2,(f=o(c/(I[0]+1)))>1&&(I=e(I,f,c),E=e(E,f,c),S=I.length,C=E.length),P=S,x=(b=E.slice(0,S)).length;x<S;b[x++]=0);T=I.slice(),T=[0].concat(T),A=I[0],I[1]>=c/2&&A++;do{if(f=0,(u=t(I,b,S,x))<0){if(_=b[0],S!=x&&(_=_*c+(b[1]||0)),(f=o(_/A))>1)for(f>=c&&(f=c-1),N=(g=e(I,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,S<N?T:I,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=I.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(I,b,S,x)<1;)f++,n(b,S<x?T:I,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[d++]=f,b[0]?b[x++]=E[P]||0:(b=[E[P]],x=1)}while((P++<C||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(d=1,z=v[0];z>=10;z/=10,d++);W(w,i+(w.e=d+p*m-1)+1,s,h)}else w.e=p,w.r=+h;return w}}(),C=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,S=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(T.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(C,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(A,"$1").replace(S,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return N(this,new j(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new j(e,t),M,q)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new j(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,i,u,l,p,d,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?d.mod(t):d;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);U&&(i=s(U/m+2))}for(u?(n=new j(.5),l&&(e.s=1),p=v(e)):p=(a=Math.abs(+K(e)))%2,d=new j(I);;){if(p){if(!(d=d.times(h)).c)break;i?d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}if(a){if(0===(a=o(a/2)))break;p=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)p=v(e);else{if(0==(a=+K(e)))break;p=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?d:(l&&(d=I.div(d)),t?d.mod(t):i?W(d,U,q,void 0):d)},E.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===N(this,new j(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return N(this,new j(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},E.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return N(this,new j(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=N(this,new j(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,p=s.c,d=e.c;if(!c||!u){if(!p||!d)return p?(e.s=-t,e):new j(d?s:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new j(p[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),p=p.slice(),o=c-u){for((i=o<0)?(o=-o,a=p):(u=c,a=d),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=p.length)<(t=d.length))?o:t,o=t=0;t<r;t++)if(p[t]!=d[t]){i=p[t]<d[t];break}if(i&&(a=p,p=d,d=a,e.s=-e.s),(t=(r=d.length)-(n=p.length))>0)for(;t--;p[n++]=0);for(t=l-1;r>o;){if(p[--r]<d[r]){for(n=r;n&&!p[--n];p[n]=t);--p[n],p[r]+=l}p[r]-=d[r]}for(;0==p[0];p.splice(0,1),--u);return p[0]?J(e,p,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,i,s,o,c,u,p,d,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(d=_.length)&&(N=x,x=_,_=N,a=c,c=d,d=a),a=c+d,N=[];a--;N.push(0));for(w=l,v=h,a=d;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(p=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*p,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},E.negated=function(){var e=new j(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},E.precision=E.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},E.shiftedBy=function(e){return w(e,-9007199254740991,p),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},E.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),H(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),H(this,e,t)},E.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],p=s[1],d=a.s<0,h=d?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),d&&(m="-"+m)}r=p?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?p.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):p):m}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,i,s,o,u,l,p,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(I),p=r=new j(I),a=l=new j(I),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=d[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:p:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=l.plus(h.times(i=p)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(p)),r=r.plus(i.times(a)),l.s=p.s=N.s,f=n(p,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[p,a]:[l,r],B=o,f},E.toNumber=function(){return+K(this)},E.toPrecision=function(e,t){return null!=e&&w(e,1,f),H(this,e,t,2)},E.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return K(this)},E._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],p=m[o],d=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,p,d),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),l=new Uint32Array(32),m=new Uint32Array(32);function p(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};d.fill(0),d[0]=e,t&&(d[1]=t.length),d[2]=1,d[3]=1,n&&d.set(n,32),r&&d.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(d,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,p(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;p(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function g(e,t,n,a,i){n=n||64,e=r.normalizeInput(e),a&&(a=r.normalizeInput(a)),i&&(i=r.normalizeInput(i));const s=h(n,t,a,i);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,a,i){const s=g(e,t,n,a,i);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},8287:function(e,t,n){"use strict";const r=n(7526),a=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let r=o(n);const a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const a=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?o(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function m(e){return l(e),o(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(a)return r?-1:F(e).length;t=(""+t).toLowerCase(),a=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,a){let i,s=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let r=-1;for(i=n;i<o;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>o&&(n=o-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(Y(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(F(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return W(J(t),e,n,r)}function P(e,t,n,r){return W(function(e,t){let n,r,a;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a<n;){const t=e[a];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[a+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[a+1],r=e[a+2],o=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),a+=s}return function(e){const t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return m(e)},c.allocUnsafeSlow=function(e){return m(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let a=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))a+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,a){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(i,s),u=this.slice(r,a),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){i=u[e],s=l[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return N(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return N(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function z(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function E(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let a="";for(let r=t;r<n;++r)a+=Q[e[r]];return a}function I(e,t,n){const r=e.slice(t,n);let a="";for(let e=0;e<r.length-1;e+=2)a+=String.fromCharCode(r[e]+256*r[e+1]);return a}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function G(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(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);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(a)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return a*=128,r>=a&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,a=1,i=this[e+--r];for(;r>0&&(a*=256);)i+=this[e+--r]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Z((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Z((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return G(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return G(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const a=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),a},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};const $={};function U(e,t,n){$[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function D(e,t,n,r,a,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let a;throw a=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,a,i)}function L(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=V(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=V(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function F(e,t){let n;t=t||1/0;const r=e.length;let a=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let a;for(a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function Z(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},3144:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(76),s=n(7119);e.exports=s||r.call(i,a)},2205:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(3144);e.exports=function(){return i(r,a,arguments)}},1002:function(e){"use strict";e.exports=Function.prototype.apply},76:function(e){"use strict";e.exports=Function.prototype.call},3126:function(e,t,n){"use strict";var r=n(6743),a=n(9675),i=n(76),s=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new a("a function is required");return s(r,i,e)}},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487:function(e,t,n){"use strict";var r=n(6897),a=n(655),i=n(3126),s=n(2205);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},a?a(e.exports,"apply",{value:s}):e.exports.apply=s},6556:function(e,t,n){"use strict";var r=n(453),a=n(3126),i=a([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?a([n]):n}},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},41:function(e,t,n){"use strict";var r=n(655),a=n(8068),i=n(9675),s=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],m=!!s&&s(e,t);if(r)r(e,t,{configurable:null===u&&m?m.configurable:!u,enumerable:null===o&&m?m.enumerable:!o,value:n,writable:null===c&&m?m.writable:!c});else{if(!l&&(o||c||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},7176:function(e,t,n){"use strict";var r,a=n(3126),i=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!r&&i&&i(Object.prototype,"__proto__"),o=Object,c=o.getPrototypeOf;e.exports=s&&"function"==typeof s.get?a([s.get]):"function"==typeof c&&function(e){return c(null==e?e:o(e))}},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1237:function(e){"use strict";e.exports=EvalError},9383:function(e){"use strict";e.exports=Error},9290:function(e){"use strict";e.exports=RangeError},9538:function(e){"use strict";e.exports=ReferenceError},8068:function(e){"use strict";e.exports=SyntaxError},9675:function(e){"use strict";e.exports=TypeError},5345:function(e){"use strict";e.exports=URIError},9612:function(e){"use strict";e.exports=Object},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var p,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(p=1,c=new Array(m-1);p<m;p++)c[p-1]=arguments[p];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.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 i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,s,u;if(o(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(a=c(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=l.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(i){r.once&&e.removeEventListener(t,a),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},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+".");s=e}}),i.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},i.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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,m(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,m(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,i,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2682:function(e,t,n){"use strict";var r=n(9600),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var s,o;arguments.length>=3&&(s=n),o=e,"[object Array]"===a.call(o)?function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var r=0,a=e.length;r<a;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,s):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s)}},9353:function(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n};e.exports=function(e){var a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw new TypeError("Function.prototype.bind called on incompatible "+a);for(var i,s=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),o=n(0,a.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=a.apply(this,r(s,arguments));return Object(t)===t?t:this}return a.apply(e,r(s,arguments))})),a.prototype){var l=function(){};l.prototype=a.prototype,i.prototype=new l,l.prototype=null}return i}},6743:function(e,t,n){"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},453:function(e,t,n){"use strict";var r,a=n(9612),i=n(9383),s=n(1237),o=n(9290),c=n(9538),u=n(8068),l=n(9675),m=n(5345),p=n(1514),d=n(8968),h=n(6188),f=n(8002),y=n(5880),g=n(414),N=n(3093),w=Function,v=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=n(5795),x=n(655),_=function(){throw new l},P=b?function(){try{return _}catch(e){try{return b(arguments,"callee").get}catch(e){return _}}}():_,C=n(4039)(),A=n(3628),S=n(1064),T=n(8648),z=n(1002),E=n(76),I={},M="undefined"!=typeof Uint8Array&&A?A(Uint8Array):r,q={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":I,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&A?A((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&A?A((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):r,"%Symbol%":C?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":P,"%TypedArray%":M,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":m,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":z,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":S,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":g,"%Math.sign%":N,"%Reflect.getPrototypeOf%":T};if(A)try{null.error}catch(e){var R=A(A(e));q["%Error.prototype%"]=R}var O=function e(t){var n;if("%AsyncFunction%"===t)n=v("async function () {}");else if("%GeneratorFunction%"===t)n=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=v("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&A&&(n=A(a.prototype))}return q[t]=n,n},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=n(6743),G=n(9957),$=B.call(E,Array.prototype.concat),U=B.call(z,Array.prototype.splice),V=B.call(E,String.prototype.replace),D=B.call(E,String.prototype.slice),L=B.call(E,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,F=function(e,t){var n,r=e;if(G(k,r)&&(r="%"+(n=k[r])[0]+"%"),G(q,r)){var a=q[r];if(a===I&&(a=O(r)),void 0===a&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=D(e,0,1),n=D(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return V(e,j,(function(e,t,n,a){r[r.length]=n?V(a,H,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=F("%"+r+"%",t),i=a.name,s=a.value,o=!1,c=a.alias;c&&(r=c[0],U(n,$([0,1],c)));for(var m=1,p=!0;m<n.length;m+=1){var d=n[m],h=D(d,0,1),f=D(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===f||"'"===f||"`"===f)&&h!==f)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(o=!0),G(q,i="%"+(r+="."+d)+"%"))s=q[i];else if(null!=s){if(!(d in s)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&m+1>=n.length){var y=b(s,d);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else p=G(s,d),s=s[d];p&&!o&&(q[i]=s)}}return s}},1064:function(e,t,n){"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:function(e,t,n){"use strict";var r=n(8648),a=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:a?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return a(e)}:i?function(e){return i(e)}:null},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},5795:function(e,t,n){"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},592:function(e,t,n){"use strict";var r=n(655),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},4039:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&a()}},1333:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9092:function(e,t,n){"use strict";var r=n(1333);e.exports=function(){return r()&&!!Symbol.toStringTag}},9957:function(e,t,n){"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,a)},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,p=n?-1:1,d=e[t+m];for(m+=p,i=d&(1<<-l)-1,d>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=u}return(d?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?p/c:p*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+d]=255&o,d+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+d]=255&s,d+=h,s/=256,u-=8);e[n+d-h]|=128*f}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},9600:function(e){"use strict";var t,n,r=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,t)}catch(e){e!==n&&(a=null)}else a=null;var i=/^\s*class\b/,s=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},o=function(e){try{return!s(e)&&(r.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(m=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=a?function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,t)}catch(e){if(e!==n)return!1}return!s(e)&&o(e)}:function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return o(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&o(e)}},5680:function(e,t,n){"use strict";var r=n(5767);e.exports=function(e){return!!r(e)}},4634:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const a=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},m=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},p=function(e){return e&&e!==o&&m("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},d=function(){var e,a="";for("-"===o&&(a="-",p("-"));o>="0"&&o<="9";)a+=o,p();if("."===o)for(a+=".";p()&&o>="0"&&o<="9";)a+=o;if("e"===o||"E"===o)for(a+=o,p(),"-"!==o&&"+"!==o||(a+=o,p());o>="0"&&o<="9";)a+=o,p();if(e=+a,isFinite(e))return null==r&&(r=n(1594)),a.length>15?t.storeAsString?a:t.useNativeBigInt?BigInt(a):new r(a):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;m("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var a=s;p();){if('"'===o)return s-1>a&&(r+=c.substring(a,s-1)),p(),r;if("\\"===o){if(s-1>a&&(r+=c.substring(a,s-1)),p(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(p(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}a=s}}m("Bad string")},f=function(){for(;o&&o<=" ";)p()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(p("{"),f(),"}"===o)return p("}"),n;for(;o;){if(e=h(),f(),p(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&m('Duplicate key "'+e+'"'),!0===a.test(e)?"error"===t.protoAction?m("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?m("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return p("}"),n;p(","),f()}}m("Bad object")}();case"[":return function(){var e=[];if("["===o){if(p("["),f(),"]"===o)return p("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return p("]"),e;p(","),f()}}m("Bad array")}();case'"':return h();case"-":return d();default:return o>="0"&&o<="9"?d():function(){switch(o){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}m("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&m("Syntax error"),"function"==typeof t?function e(n,r){var a,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),a=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(a,i){var s,u,l,m,p,d=e,h=i[a],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(a)),"function"==typeof n&&(h=n.call(i,a,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,p=[],"[object Array]"===Object.prototype.toString.apply(h)){for(m=h.length,s=0;s<m;s+=1)p[s]=c(s,h)||"null";return l=0===p.length?"[]":e?"[\n"+e+p.join(",\n"+e)+"\n"+d+"]":"["+p.join(",")+"]",e=d,l}if(n&&"object"==typeof n)for(m=n.length,s=0;s<m;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&p.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&p.push(o(t)+(e?": ":":")+n)}));return l=0===p.length?"{}":e?"{\n"+e+p.join(",\n"+e)+"\n"+d+"}":"{"+p.join(",")+"}",e=d,l}}"function"!=typeof a.stringify&&(a.stringify=function(r,a,i){var s;if(e="",t="","number"==typeof i)for(s=0;s<i;s+=1)t+=" ";else"string"==typeof i&&(t=i);if(n=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},1514:function(e){"use strict";e.exports=Math.abs},8968:function(e){"use strict";e.exports=Math.floor},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188:function(e){"use strict";e.exports=Math.max},8002:function(e){"use strict";e.exports=Math.min},5880:function(e){"use strict";e.exports=Math.pow},414:function(e){"use strict";e.exports=Math.round},3093:function(e,t,n){"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},6578:function(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:function(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var o,c=[],u=!1,l=-1;function m(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=s(m);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||u||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=p(...t);return p(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:p(i(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function m(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function p(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const a=e[t];n.set(a,r),r+=a.length}return n}function d(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):d(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:p,hexToBytes:m,utf8ToBytes:d};const g={encode:n,decode:s};t.default=g},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6897:function(e,t,n){"use strict";var r=n(453),a=n(41),i=n(592)(),s=n(5795),o=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in e&&s){var l=s(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(u=!1)}return(r||u||!n)&&(i?a(e,"length",t,!0,!0):a(e,"length",t)),e}},392:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(5377);function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=a(e,t||"utf8");for(var n=this._block,r=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%r,u=Math.min(i-o,r-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%r==0&&this._update(n)}return this._len+=i,this},i.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 n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){"use strict";var r=n(6698),a=n(392),i=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,a.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function m(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,a),c.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},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+d(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+p(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.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=c},5377:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(4634),i=n(4372),s=ArrayBuffer.isView||function(e){try{return i(e),!0}catch(e){return!1}},o="undefined"!=typeof Uint8Array,c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,u=c&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(r.isBuffer(e))return e.constructor&&!("isBuffer"in e)?r.from(e):e;if("string"==typeof e)return r.from(e,t);if(c&&s(e)){if(0===e.byteLength)return r.alloc(0);if(u){var n=r.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),l=r.from(i);if(l.length===e.byteLength)return l}if(o&&e instanceof Uint8Array)return r.from(e);var m=a(e);if(m)for(var p=0;p<e.length;p+=1){var d=e[p];if("number"!=typeof d||d<0||d>255||~~d!==d)throw new RangeError("Array items must be numbers in the range 0-255.")}if(m||r.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return r.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128;function n(n,r){var a,i,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),a=0;a<t;a++)s[a]=54;for(a=0;a<r.length;a++)s[a]^=r[a];for(s.set(n,t),i=e.hash(s.subarray(0,t+n.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<r.length;a++)s[a]^=r[a];return s.set(i,t),e.hash(s.subarray(0,t+i.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),o=t([1]),c=t([56129,1]),u=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]),m=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function f(e,t,n,r,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function N(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=i,x=s,_=o,P=c,C=u,A=l,S=m,T=p,z=d,E=h,I=f,M=y,q=g,R=N,O=w,k=v,B=0;B<20;B+=2)b^=(a=(q^=(a=(z^=(a=(C^=(a=b+q|0)<<7|a>>>25)+b|0)<<9|a>>>23)+C|0)<<13|a>>>19)+z|0)<<18|a>>>14,A^=(a=(x^=(a=(R^=(a=(E^=(a=A+x|0)<<7|a>>>25)+A|0)<<9|a>>>23)+E|0)<<13|a>>>19)+R|0)<<18|a>>>14,I^=(a=(S^=(a=(_^=(a=(O^=(a=I+S|0)<<7|a>>>25)+I|0)<<9|a>>>23)+O|0)<<13|a>>>19)+_|0)<<18|a>>>14,k^=(a=(M^=(a=(T^=(a=(P^=(a=k+M|0)<<7|a>>>25)+k|0)<<9|a>>>23)+P|0)<<13|a>>>19)+T|0)<<18|a>>>14,b^=(a=(P^=(a=(_^=(a=(x^=(a=b+P|0)<<7|a>>>25)+b|0)<<9|a>>>23)+x|0)<<13|a>>>19)+_|0)<<18|a>>>14,A^=(a=(C^=(a=(T^=(a=(S^=(a=A+C|0)<<7|a>>>25)+A|0)<<9|a>>>23)+S|0)<<13|a>>>19)+T|0)<<18|a>>>14,I^=(a=(E^=(a=(z^=(a=(M^=(a=I+E|0)<<7|a>>>25)+I|0)<<9|a>>>23)+M|0)<<13|a>>>19)+z|0)<<18|a>>>14,k^=(a=(O^=(a=(R^=(a=(q^=(a=k+O|0)<<7|a>>>25)+k|0)<<9|a>>>23)+q|0)<<13|a>>>19)+R|0)<<18|a>>>14;b=b+i|0,x=x+s|0,_=_+o|0,P=P+c|0,C=C+u|0,A=A+l|0,S=S+m|0,T=T+p|0,z=z+d|0,E=E+h|0,I=I+f|0,M=M+y|0,q=q+g|0,R=R+N|0,O=O+w|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=P>>>0&255,e[13]=P>>>8&255,e[14]=P>>>16&255,e[15]=P>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=S>>>0&255,e[25]=S>>>8&255,e[26]=S>>>16&255,e[27]=S>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=z>>>0&255,e[33]=z>>>8&255,e[34]=z>>>16&255,e[35]=z>>>24&255,e[36]=E>>>0&255,e[37]=E>>>8&255,e[38]=E>>>16&255,e[39]=E>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function w(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)i^=(a=(g^=(a=(d^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+d|0)<<18|a>>>14,l^=(a=(s^=(a=(N^=(a=(h^=(a=l+s|0)<<7|a>>>25)+l|0)<<9|a>>>23)+h|0)<<13|a>>>19)+N|0)<<18|a>>>14,f^=(a=(m^=(a=(o^=(a=(w^=(a=f+m|0)<<7|a>>>25)+f|0)<<9|a>>>23)+w|0)<<13|a>>>19)+o|0)<<18|a>>>14,v^=(a=(y^=(a=(p^=(a=(c^=(a=v+y|0)<<7|a>>>25)+v|0)<<9|a>>>23)+c|0)<<13|a>>>19)+p|0)<<18|a>>>14,i^=(a=(c^=(a=(o^=(a=(s^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+s|0)<<13|a>>>19)+o|0)<<18|a>>>14,l^=(a=(u^=(a=(p^=(a=(m^=(a=l+u|0)<<7|a>>>25)+l|0)<<9|a>>>23)+m|0)<<13|a>>>19)+p|0)<<18|a>>>14,f^=(a=(h^=(a=(d^=(a=(y^=(a=f+h|0)<<7|a>>>25)+f|0)<<9|a>>>23)+y|0)<<13|a>>>19)+d|0)<<18|a>>>14,v^=(a=(w^=(a=(N^=(a=(g^=(a=v+w|0)<<7|a>>>25)+v|0)<<9|a>>>23)+g|0)<<13|a>>>19)+N|0)<<18|a>>>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]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,a,i,s){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;a>=64;){for(N(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;a-=64,t+=64,r+=64}if(a>0)for(N(l,u,s,v),c=0;c<a;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,a){var i,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(N(c,o,a,v),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&o[s])|0,o[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(N(c,o,a,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,a){var i=new Uint8Array(32);w(i,r,a,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,i)}function P(e,t,n,r,a,i,s){var o=new Uint8Array(32);w(o,i,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return b(e,t,n,r,a,c,o)}var C=function(e){var t,n,r,a,i,s,o,c;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,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>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 A(e,t,n,r,a,i){var s=new C(i);return s.update(n,r,a),s.finish(e,t),0}function S(e,t,n,r,a,i){var s=new Uint8Array(16);return A(s,0,n,r,a,i),y(e,t,s,0)}function T(e,t,n,r,a){var i;if(n<32)return-1;for(P(e,0,t,0,n,r,a),A(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function z(e,t,n,r,a){var i,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,a),0!==S(t,16,t,32,n-32,s))return-1;for(P(e,0,t,0,n,r,a),i=0;i<32;i++)e[i]=0;return 0}function E(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,a=~(n-1),i=0;i<16;i++)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function q(e,n){var r,a,i,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),a=0;a<2;a++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function G(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function $(e,t,n){var r,a,i=0,s=0,o=0,c=0,u=0,l=0,m=0,p=0,d=0,h=0,f=0,y=0,g=0,N=0,w=0,v=0,b=0,x=0,_=0,P=0,C=0,A=0,S=0,T=0,z=0,E=0,I=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],G=n[2],$=n[3],U=n[4],V=n[5],D=n[6],L=n[7],j=n[8],H=n[9],F=n[10],J=n[11],W=n[12],K=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*k,s+=r*B,o+=r*G,c+=r*$,u+=r*U,l+=r*V,m+=r*D,p+=r*L,d+=r*j,h+=r*H,f+=r*F,y+=r*J,g+=r*W,N+=r*K,w+=r*Y,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*G,u+=r*$,l+=r*U,m+=r*V,p+=r*D,d+=r*L,h+=r*j,f+=r*H,y+=r*F,g+=r*J,N+=r*W,w+=r*K,v+=r*Y,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*G,l+=r*$,m+=r*U,p+=r*V,d+=r*D,h+=r*L,f+=r*j,y+=r*H,g+=r*F,N+=r*J,w+=r*W,v+=r*K,b+=r*Y,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*G,m+=r*$,p+=r*U,d+=r*V,h+=r*D,f+=r*L,y+=r*j,g+=r*H,N+=r*F,w+=r*J,v+=r*W,b+=r*K,x+=r*Y,_+=r*Q,u+=(r=t[4])*k,l+=r*B,m+=r*G,p+=r*$,d+=r*U,h+=r*V,f+=r*D,y+=r*L,g+=r*j,N+=r*H,w+=r*F,v+=r*J,b+=r*W,x+=r*K,_+=r*Y,P+=r*Q,l+=(r=t[5])*k,m+=r*B,p+=r*G,d+=r*$,h+=r*U,f+=r*V,y+=r*D,g+=r*L,N+=r*j,w+=r*H,v+=r*F,b+=r*J,x+=r*W,_+=r*K,P+=r*Y,C+=r*Q,m+=(r=t[6])*k,p+=r*B,d+=r*G,h+=r*$,f+=r*U,y+=r*V,g+=r*D,N+=r*L,w+=r*j,v+=r*H,b+=r*F,x+=r*J,_+=r*W,P+=r*K,C+=r*Y,A+=r*Q,p+=(r=t[7])*k,d+=r*B,h+=r*G,f+=r*$,y+=r*U,g+=r*V,N+=r*D,w+=r*L,v+=r*j,b+=r*H,x+=r*F,_+=r*J,P+=r*W,C+=r*K,A+=r*Y,S+=r*Q,d+=(r=t[8])*k,h+=r*B,f+=r*G,y+=r*$,g+=r*U,N+=r*V,w+=r*D,v+=r*L,b+=r*j,x+=r*H,_+=r*F,P+=r*J,C+=r*W,A+=r*K,S+=r*Y,T+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*G,g+=r*$,N+=r*U,w+=r*V,v+=r*D,b+=r*L,x+=r*j,_+=r*H,P+=r*F,C+=r*J,A+=r*W,S+=r*K,T+=r*Y,z+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*G,N+=r*$,w+=r*U,v+=r*V,b+=r*D,x+=r*L,_+=r*j,P+=r*H,C+=r*F,A+=r*J,S+=r*W,T+=r*K,z+=r*Y,E+=r*Q,y+=(r=t[11])*k,g+=r*B,N+=r*G,w+=r*$,v+=r*U,b+=r*V,x+=r*D,_+=r*L,P+=r*j,C+=r*H,A+=r*F,S+=r*J,T+=r*W,z+=r*K,E+=r*Y,I+=r*Q,g+=(r=t[12])*k,N+=r*B,w+=r*G,v+=r*$,b+=r*U,x+=r*V,_+=r*D,P+=r*L,C+=r*j,A+=r*H,S+=r*F,T+=r*J,z+=r*W,E+=r*K,I+=r*Y,M+=r*Q,N+=(r=t[13])*k,w+=r*B,v+=r*G,b+=r*$,x+=r*U,_+=r*V,P+=r*D,C+=r*L,A+=r*j,S+=r*H,T+=r*F,z+=r*J,E+=r*W,I+=r*K,M+=r*Y,q+=r*Q,w+=(r=t[14])*k,v+=r*B,b+=r*G,x+=r*$,_+=r*U,P+=r*V,C+=r*D,A+=r*L,S+=r*j,T+=r*H,z+=r*F,E+=r*J,I+=r*W,M+=r*K,q+=r*Y,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*G),o+=38*(_+=r*$),c+=38*(P+=r*U),u+=38*(C+=r*V),l+=38*(A+=r*D),m+=38*(S+=r*L),p+=38*(T+=r*j),d+=38*(z+=r*H),h+=38*(E+=r*F),f+=38*(I+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*K),N+=38*(R+=r*Y),w+=38*(O+=r*Q),i=(r=(i+=38*(b+=r*B))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i=(r=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=m,e[7]=p,e[8]=d,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=N,e[14]=w,e[15]=v}function U(e,t){$(e,t,t)}function V(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=253;r>=0;r--)U(a,a),2!==r&&4!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function D(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=250;r>=0;r--)U(a,a),1!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function L(e,n,r){var a,i,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),m=t(),p=t(),d=t(),h=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),i=0;i<16;i++)l[i]=o[i],p[i]=u[i]=m[i]=0;for(u[0]=p[0]=1,i=254;i>=0;--i)M(u,l,a=s[i>>>3]>>>(7&i)&1),M(m,p,a),B(d,u,m),G(u,u,m),B(m,l,p),G(l,l,p),U(p,d),U(h,u),$(u,m,u),$(m,l,d),B(d,u,m),G(u,u,m),U(l,u),G(m,p,h),$(u,m,c),B(u,u,p),$(m,m,u),$(u,p,h),$(p,l,o),U(l,d),M(u,l,a),M(m,p,a);for(i=0;i<16;i++)o[i+16]=u[i],o[i+32]=m[i],o[i+48]=l[i],o[i+64]=p[i];var f=o.subarray(32),y=o.subarray(16);return V(f,f),$(y,y,f),q(e,y),0}function j(e,t){return L(e,t,i)}function H(e,t){return r(t,32),j(e,t)}function F(e,t,n){var r=new Uint8Array(32);return L(r,n,t),w(e,a,r,v)}C.prototype.blocks=function(e,t,n){for(var r,a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x=this.fin?0:2048,_=this.h[0],P=this.h[1],C=this.h[2],A=this.h[3],S=this.h[4],T=this.h[5],z=this.h[6],E=this.h[7],I=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],G=this.r[5],$=this.r[6],U=this.r[7],V=this.r[8],D=this.r[9];n>=16;)p=m=0,p+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,p+=(P+=8191&(r>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),p+=(C+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(A+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),m=(p+=(S+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,p&=8191,p+=(T+=o>>>1&8191)*(5*G),p+=(z+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),p+=(E+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),p+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),d=m+=(p+=(M+=l>>>5|x)*(5*R))>>>13,d+=_*R,d+=P*q,d+=C*(5*D),d+=A*(5*V),m=(d+=S*(5*U))>>>13,d&=8191,d+=T*(5*$),d+=z*(5*G),d+=E*(5*B),d+=I*(5*k),m+=(d+=M*(5*O))>>>13,d&=8191,h=m,h+=_*O,h+=P*R,h+=C*q,h+=A*(5*D),m=(h+=S*(5*V))>>>13,h&=8191,h+=T*(5*U),h+=z*(5*$),h+=E*(5*G),h+=I*(5*B),f=m+=(h+=M*(5*k))>>>13,f+=_*k,f+=P*O,f+=C*R,f+=A*q,m=(f+=S*(5*D))>>>13,f&=8191,f+=T*(5*V),f+=z*(5*U),f+=E*(5*$),f+=I*(5*G),y=m+=(f+=M*(5*B))>>>13,y+=_*B,y+=P*k,y+=C*O,y+=A*R,m=(y+=S*q)>>>13,y&=8191,y+=T*(5*D),y+=z*(5*V),y+=E*(5*U),y+=I*(5*$),g=m+=(y+=M*(5*G))>>>13,g+=_*G,g+=P*B,g+=C*k,g+=A*O,m=(g+=S*R)>>>13,g&=8191,g+=T*q,g+=z*(5*D),g+=E*(5*V),g+=I*(5*U),N=m+=(g+=M*(5*$))>>>13,N+=_*$,N+=P*G,N+=C*B,N+=A*k,m=(N+=S*O)>>>13,N&=8191,N+=T*R,N+=z*q,N+=E*(5*D),N+=I*(5*V),w=m+=(N+=M*(5*U))>>>13,w+=_*U,w+=P*$,w+=C*G,w+=A*B,m=(w+=S*k)>>>13,w&=8191,w+=T*O,w+=z*R,w+=E*q,w+=I*(5*D),v=m+=(w+=M*(5*V))>>>13,v+=_*V,v+=P*U,v+=C*$,v+=A*G,m=(v+=S*B)>>>13,v&=8191,v+=T*k,v+=z*O,v+=E*R,v+=I*q,b=m+=(v+=M*(5*D))>>>13,b+=_*D,b+=P*V,b+=C*U,b+=A*$,m=(b+=S*G)>>>13,b&=8191,b+=T*B,b+=z*k,b+=E*O,b+=I*R,_=p=8191&(m=(m=((m+=(b+=M*q)>>>13)<<2)+m|0)+(p&=8191)|0),P=d+=m>>>=13,C=h&=8191,A=f&=8191,S=y&=8191,T=g&=8191,z=N&=8191,E=w&=8191,I=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=P,this.h[2]=C,this.h[3]=A,this.h[4]=S,this.h[5]=T,this.h[6]=z,this.h[7]=E,this.h[8]=I,this.h[9]=M},C.prototype.finish=function(e,t){var n,r,a,i,s=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(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[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),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;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},C.prototype.update=function(e,t,n){var r,a;if(this.leftover){for((a=16-this.leftover)>n&&(a=n),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(a=n-n%16,this.blocks(e,t,a),t+=a,n-=a),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=T,W=z,K=[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,n,r){for(var a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x,_,P,C,A,S,T,z,E=new Int32Array(16),I=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],G=e[6],$=e[7],U=t[0],V=t[1],D=t[2],L=t[3],j=t[4],H=t[5],F=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,E[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],I[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(a=M,i=q,s=R,o=O,c=k,u=B,l=G,p=U,d=V,h=D,f=L,y=j,g=H,N=F,A=65535&(C=J),S=C>>>16,T=65535&(P=$),z=P>>>16,A+=65535&(C=(j>>>14|k<<18)^(j>>>18|k<<14)^(k>>>9|j<<23)),S+=C>>>16,T+=65535&(P=(k>>>14|j<<18)^(k>>>18|j<<14)^(j>>>9|k<<23)),z+=P>>>16,A+=65535&(C=j&H^~j&F),S+=C>>>16,T+=65535&(P=k&B^~k&G),z+=P>>>16,A+=65535&(C=K[2*x+1]),S+=C>>>16,T+=65535&(P=K[2*x]),z+=P>>>16,P=E[x%16],S+=(C=I[x%16])>>>16,T+=65535&P,z+=P>>>16,T+=(S+=(A+=65535&C)>>>16)>>>16,A=65535&(C=b=65535&A|S<<16),S=C>>>16,T=65535&(P=v=65535&T|(z+=T>>>16)<<16),z=P>>>16,A+=65535&(C=(U>>>28|M<<4)^(M>>>2|U<<30)^(M>>>7|U<<25)),S+=C>>>16,T+=65535&(P=(M>>>28|U<<4)^(U>>>2|M<<30)^(U>>>7|M<<25)),z+=P>>>16,S+=(C=U&V^U&D^V&D)>>>16,T+=65535&(P=M&q^M&R^q&R),z+=P>>>16,m=65535&(T+=(S+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,w=65535&A|S<<16,A=65535&(C=f),S=C>>>16,T=65535&(P=o),z=P>>>16,S+=(C=b)>>>16,T+=65535&(P=v),z+=P>>>16,q=a,R=i,O=s,k=o=65535&(T+=(S+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,B=c,G=u,$=l,M=m,V=p,D=d,L=h,j=f=65535&A|S<<16,H=y,F=g,J=N,U=w,x%16==15)for(_=0;_<16;_++)P=E[_],A=65535&(C=I[_]),S=C>>>16,T=65535&P,z=P>>>16,P=E[(_+9)%16],A+=65535&(C=I[(_+9)%16]),S+=C>>>16,T+=65535&P,z+=P>>>16,v=E[(_+1)%16],A+=65535&(C=((b=I[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),S+=C>>>16,T+=65535&(P=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),z+=P>>>16,v=E[(_+14)%16],S+=(C=((b=I[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,T+=65535&(P=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,E[_]=65535&T|z<<16,I[_]=65535&A|S<<16;A=65535&(C=U),S=C>>>16,T=65535&(P=M),z=P>>>16,P=e[0],S+=(C=t[0])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[0]=M=65535&T|z<<16,t[0]=U=65535&A|S<<16,A=65535&(C=V),S=C>>>16,T=65535&(P=q),z=P>>>16,P=e[1],S+=(C=t[1])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[1]=q=65535&T|z<<16,t[1]=V=65535&A|S<<16,A=65535&(C=D),S=C>>>16,T=65535&(P=R),z=P>>>16,P=e[2],S+=(C=t[2])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[2]=R=65535&T|z<<16,t[2]=D=65535&A|S<<16,A=65535&(C=L),S=C>>>16,T=65535&(P=O),z=P>>>16,P=e[3],S+=(C=t[3])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[3]=O=65535&T|z<<16,t[3]=L=65535&A|S<<16,A=65535&(C=j),S=C>>>16,T=65535&(P=k),z=P>>>16,P=e[4],S+=(C=t[4])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[4]=k=65535&T|z<<16,t[4]=j=65535&A|S<<16,A=65535&(C=H),S=C>>>16,T=65535&(P=B),z=P>>>16,P=e[5],S+=(C=t[5])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[5]=B=65535&T|z<<16,t[5]=H=65535&A|S<<16,A=65535&(C=F),S=C>>>16,T=65535&(P=G),z=P>>>16,P=e[6],S+=(C=t[6])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[6]=G=65535&T|z<<16,t[6]=F=65535&A|S<<16,A=65535&(C=J),S=C>>>16,T=65535&(P=$),z=P>>>16,P=e[7],S+=(C=t[7])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[7]=$=65535&T|z<<16,t[7]=J=65535&A|S<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[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(a,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),Y(a,i,s,n),r=0;r<8;r++)h(e,8*r,a[r],i[r]);return 0}function Z(e,n){var r=t(),a=t(),i=t(),s=t(),o=t(),c=t(),u=t(),m=t(),p=t();G(r,e[1],e[0]),G(p,n[1],n[0]),$(r,r,p),B(a,e[0],e[1]),B(p,n[0],n[1]),$(a,a,p),$(i,e[3],n[3]),$(i,i,l),$(s,e[2],n[2]),B(s,s,s),G(o,a,r),G(c,s,i),B(u,s,i),B(m,a,r),$(e[0],o,c),$(e[1],m,u),$(e[2],u,c),$(e[3],o,m)}function X(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),a=t(),i=t();V(i,n[2]),$(r,n[0],i),$(a,n[1],i),q(e,a),e[31]^=O(r)<<7}function te(e,t,n){var r,a;for(E(e[0],s),E(e[1],o),E(e[2],o),E(e[3],s),a=255;a>=0;--a)X(e,t,r=n[a/8|0]>>(7&a)&1),Z(t,e),Z(e,e),X(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];E(r[0],m),E(r[1],p),E(r[2],o),$(r[3],m,p),te(e,r,n)}function re(e,n,a){var i,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(a||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),i=0;i<32;i++)n[i+32]=e[i];return 0}var ae=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 n,r,a,i;for(r=63;r>=32;--r){for(n=0,a=r-32,i=r-12;a<i;++a)t[a]+=n-16*t[r]*ae[a-(r-32)],n=Math.floor((t[a]+128)/256),t[a]-=256*n;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;a++)t[a]+=n-(t[31]>>4)*ae[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=n*ae[a];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,n)}function oe(e,n,r,a){var i,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),m=[t(),t(),t(),t()];Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64;var p=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=o[32+i];for(Q(u,e.subarray(32),r+32),se(u),ne(m,u),ee(e,m),i=32;i<64;i++)e[i]=a[i];for(Q(c,e,r+64),se(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=c[i]*o[s];return ie(e.subarray(32),l),p}function ce(e,n,r,a){var i,c=new Uint8Array(32),l=new Uint8Array(64),m=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),a=t(),i=t(),c=t(),l=t(),m=t(),p=t();return E(e[2],o),k(e[1],n),U(i,e[1]),$(c,i,u),G(i,i,e[2]),B(c,e[2],c),U(l,c),U(m,l),$(p,m,l),$(r,p,i),$(r,r,c),D(r,r),$(r,r,i),$(r,r,c),$(r,r,c),$(e[0],r,c),U(a,e[0]),$(a,a,c),R(a,i)&&$(e[0],e[0],d),U(a,e[0]),$(a,a,c),R(a,i)?-1:(O(e[0])===n[31]>>7&&G(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(p,a))return-1;for(i=0;i<r;i++)e[i]=n[i];for(i=0;i<32;i++)e[i+32]=a[i];if(Q(l,e,r),se(l),te(m,p,l),ne(p,n.subarray(32)),Z(m,p),ee(c,m),r-=64,g(n,0,c,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=n[i+64];return r}var ue=64,le=32,me=64;function pe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:P,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:A,crypto_onetimeauth_verify:S,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:T,crypto_secretbox_open:z,crypto_scalarmult:L,crypto_scalarmult_base:j,crypto_box_beforenm:F,crypto_box_afternm:J,crypto_box:function(e,t,n,r,a,i){var s=new Uint8Array(32);return F(s,a,i),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,a,i){var s=new Uint8Array(32);return F(s,a,i),W(e,t,n,r,s)},crypto_box_keypair:H,crypto_hash:Q,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ce,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:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:me,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ae,pack25519:q,unpack25519:k,M:$,A:B,S:U,Z:G,pow2523:D,add:Z,set25519:E,modL:ie,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(32+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return T(a,r,r.length,t,n),a.subarray(16)},e.secretbox.open=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(16+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==z(a,r,r.length,t,n)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return L(n,e,t),n},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return j(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox(t,n,i)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return F(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox.open(t,n,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(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return j(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),t.length!==me)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(de(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i];return a},e.sign.detached=function(t,n){for(var r=e.sign(t,n),a=new Uint8Array(ue),i=0;i<a.length;i++)a[i]=r[i];return a},e.sign.detached.verify=function(e,t,n){if(de(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,a=new Uint8Array(ue+e.length),i=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)a[r]=t[r];for(r=0;r<e.length;r++)a[r+ue]=e[r];return ce(i,a,a.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(me);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==me)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(me),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=me,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){de(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,a=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(a.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=a[r];he(a)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,a=t.randomBytes(n);for(r=0;r<n;r++)e[r]=a[r];he(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},4372:function(e,t,n){"use strict";var r=n(9675),a=n(6556)("TypedArray.prototype.buffer",!0),i=n(5680);e.exports=a||function(e){if(!i(e))throw new r("Not a Typed Array");return e.buffer}},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},9840:function(e,t,n){e.exports=n(9003).version},5767:function(e,t,n){"use strict";var r=n(2682),a=n(9209),i=n(487),s=n(6556),o=n(5795),c=n(3628),u=s("Object.prototype.toString"),l=n(9092)(),m="undefined"==typeof globalThis?n.g:globalThis,p=a(),d=s("String.prototype.slice"),h=s("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},f={__proto__:null};r(p,l&&o&&c?function(e){var t=new m[e];if(Symbol.toStringTag in t&&c){var n=c(t),r=o(n,Symbol.toStringTag);if(!r&&n){var a=c(n);r=o(a,Symbol.toStringTag)}f["$"+e]=i(r.get)}}:function(e){var t=new m[e],n=t.slice||t.set;n&&(f["$"+e]=i(n))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t=d(u(e),8,-1);return h(p,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(f,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return o?function(e){var t=!1;return r(f,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},1281:function(){},9209:function(e,t,n){"use strict";var r=n(6578),a="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof a[r[t]]&&(e[e.length]=r[t]);return e}},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.sham=!0)},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},2159:function(e,t,n){"use strict";var r=n(2250),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),a=n(4849),i=n(575),s=function(e){return function(t,n,s){var o=r(t),c=i(o);if(0===c)return!e&&-1;var u,l=a(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,p=7===e,d=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),P=0,C=g||c,A=t?C(h,x):n||p?C(h,0):void 0;x>P;P++)if((d||P in b)&&(w=_(N=b[P],P,v),e))if(t)A[P]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return P;case 2:u(A,N)}else switch(e){case 4:return!1;case 7:u(A,N)}return m?-1:a||l?l:A}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7171:function(e,t,n){"use strict";var r=n(8828),a=n(6264),i=n(798),s=a("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},4010:function(e,t,n){"use strict";var r=n(1793),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},5807:function(e,t,n){"use strict";var r=n(1907),a=r({}.toString),i=r("".slice);e.exports=function(e){return i(a(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(t.callee)?"Arguments":r}},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},1626:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=function(e,t,n){r?a.f(e,t,i(0,n)):e[t]=n}},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,a){return a&&a.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(e,t,n){"use strict";var r=n(5951),a=n(6285),i=r.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6794:function(e,t,n){"use strict";var r=n(5951).navigator,a=r&&r.userAgent;e.exports=a?String(a):""},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),p=n(9724);n(6128);var d=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,P=e.proto,C=x?r:_?r[b]:r[b]&&r[b].prototype,A=x?u:u[b]||m(u,b,{})[b],S=A.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&C&&p(C,f),g=A[f],a&&(N=e.dontCallGetSet?(v=o(C,f))&&v.value:C[f]),y=a&&N?N:t[f],(n||P||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?d(y):P&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(A,f,w),P&&(p(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&S&&(n||!S[f])&&m(S,f,y)))}},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.apply,s=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),a=n(2159),i=n(1505),s=r(r.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),a=n(9724),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),a=n(5951),i=n(2250),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),a=n(1793),i=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(i(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,m=!0;return function(e,t){if(m)return m=!1,t;if(a(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},9367:function(e,t,n){"use strict";var r=n(2159),a=n(7136);e.exports=function(e,t){var n=e[t];return a(n)?void 0:r(n)}},5951:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:function(e,t,n){"use strict";var r=n(1907),a=n(9298),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(e),t)}},8530:function(e){"use strict";e.exports={}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},3648:function(e,t,n){"use strict";var r=n(9447),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(5807),s=Object,o=r("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):s(e)}:s},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},4932:function(e,t,n){"use strict";var r,a,i,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),m=n(6128),p=n(2522),d=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||m.state){var g=m.state||(m.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var N=p("state");d[N]=!0,r=function(e,t){if(l(e,N))throw new f(h);return t.facade=e,u(e,N,t),t},a=function(e){return l(e,N)?e[N]:{}},i=function(e){return l(e,N)}}e.exports={set:r,get:a,has:i,enforce:function(e){return i(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=a(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5468:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),m=/^\s*(?:class|function)\b/,p=r(m.exec),d=!m.test(u),h=function(e){if(!i(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(m,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||a((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},7463:function(e,t,n){"use strict";var r=n(8828),a=n(2250),i=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(a(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},7136:function(e){"use strict";e.exports=function(e){return null==e}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},7376:function(e){"use strict";e.exports=!0},5594:function(e,t,n){"use strict";var r=n(5582),a=n(2250),i=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&i(t.prototype,o(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,a=n(8075),i=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=a(r,{next:i(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),p=n(1626),d=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",P="entries",C=function(){return this};e.exports=function(e,t,n,s,h,y,A){c(n,t,s);var S,T,z,E=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case P:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||E(h),k="Array"===t&&q.entries||R;if(k&&(S=u(k.call(new e)))!==Object.prototype&&S.next&&(i||u(S)===w||(l?l(S,w):o(S[b])||d(S,b,C)),m(S,I,!0,!0),i&&(f[I]=C)),g&&h===_&&R&&R.name!==_&&(!i&&N?p(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(T={values:E(_),keys:y?O:E(x),entries:E(P)},A)for(z in T)(v||M||!(z in q))&&d(q,z,T[z]);else r({target:t,proto:!0,forced:v||M},T);return i&&!A||q[b]===O||d(q,b,O,{name:h}),f[t]=O,T}},5116:function(e,t,n){"use strict";var r,a,i,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),m=n(8055),p=n(6264),d=n(7376),h=p("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(r=a):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:d&&(r=u(r)),o(r[h])||m(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},3742:function(e){"use strict";e.exports={}},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8075:function(e,t,n){"use strict";var r,a=n(6624),i=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),m="prototype",p="script",d=l("IE_PROTO"),h=function(){},f=function(e){return"<"+p+">"+e+"</"+p+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var a=s.length;a--;)delete g[m][s[a]];return g()};o[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[m]=a(e),n=new h,h[m]=null,n[d]=e):n=g(),void 0===t?n:i.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),a=n(3648),i=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m="enumerable",p="configurable",d="writable";t.f=r?i?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=l(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:m in n?n[m]:r[m],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),a)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},3846:function(e,t,n){"use strict";var r=n(9447),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),a=n(7374),i=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},4443:function(e,t,n){"use strict";var r=n(3045),a=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),a=n(2250),i=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},3045:function(e,t,n){"use strict";var r=n(1907),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),a=n(6285),i=n(4239),s=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),s(r),a(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),a=n(3948);e.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},2046:function(e){"use strict";e.exports={}},4239:function(e,t,n){"use strict";var r=n(7136),a=TypeError;e.exports=function(e){if(r(e))throw new a("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),a=n(4284).f,i=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||a(l,c,{configurable:!0,value:t}),u&&!r&&i(l,"toString",o))}},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},6128:function(e,t,n){"use strict";var r=n(7376),a=n(5951),i=n(2532),s="__core-js_shared__",o=e.exports=a[s]||i(s,{});(o.versions||(o.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(e,t,n){"use strict";var r=n(6128);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),p=a(n),d=m.length;return p<0||p>=d?e?"":void 0:(r=c(m,p))<55296||r>56319||p+1===d||(l=c(m,p+1))<56320||l>57343?e?o(m,p):r:e?u(m,p,p+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9846:function(e,t,n){"use strict";var r=n(798),a=n(8828),i=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),a=n(5582),i=n(1907),s=n(5594),o=n(6264),c=a("Symbol"),u=c.isWellKnownSymbol,l=a("Object","getOwnPropertyNames"),m=i(c.prototype.valueOf),p=r("wks"),d=0,h=l(c),f=h.length;d<f;d++)try{var y=h[d];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=m(e),n=0,r=l(p),a=r.length;n<a;n++)if(p[r[n]]==t)return!0}catch(e){}return!1}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4849:function(e,t,n){"use strict";var r=n(5482),a=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):i(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),a=n(4239);e.exports=function(e){return r(a(e))}},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3121:function(e,t,n){"use strict";var r=n(5482),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),a=Object;e.exports=function(e){return a(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),a=n(6285),i=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!a(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},160:function(e,t,n){"use strict";var r=n(3948),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(e)}},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:function(e,t,n){"use strict";var r=n(1907),a=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,36)}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(e,t,n){"use strict";var r=n(9447),a=n(8828);e.exports=r&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.f(e)})}},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},6264:function(e,t,n){"use strict";var r=n(5951),a=n(5816),i=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=a("wks"),m=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=o&&i(u,e)?u[e]:m("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),a=n(8828),i=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),m=n(6968),p=n(7171),d=n(6264),h=n(798),f=d("isConcatSpreadable"),y=h>=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!p("concat")},{concat:function(e){var t,n,r,a,i,s=o(this),p=m(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(a=c(i),u(d+a),n=0;n<a;n++,d++)n in i&&l(p,d,i[n]);else u(d+1),l(p,d++,i);return p.length=d,p}})},9363:function(e,t,n){"use strict";var r=n(7374),a=n(2156),i=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),m=n(9447),p="Array Iterator",d=s.set,h=s.getterFor(p);e.exports=c(Array,"Array",(function(e,t){d(this,{type:p,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var f=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&m&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),m=n(3427),p=n(6656),d=n(9846),h=String,f=a("JSON","stringify"),y=o(/./.exec),g=o("".charAt),N=o("".charCodeAt),w=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,P=!d||c((function(){var e=a("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),C=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),A=function(e,t){var n=m(arguments),r=p(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(f,null,n)},S=function(e,t,n){var r=g(n,t-1),a=g(n,t+1);return y(x,e)&&!y(_,a)||y(_,e)&&!y(x,r)?"\\u"+v(N(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:P||C},{stringify:function(e,t,n){var r=m(arguments),a=i(P?A:f,null,r);return C&&"string"==typeof a?w(a,b,S):a}})},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),a=n(9447),i=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!a},{defineProperty:i})},5264:function(e,t,n){"use strict";var r=n(1091),a=n(9846),i=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!a||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,a=n(160),i=n(4932),s=n(183),o=n(9550),c="String Iterator",u=i.set,l=i.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:a(e),index:0})}),(function(){var e,t=l(this),n=t.string,a=t.index;return a>=n.length?o(void 0,!0):(e=r(n,a),t.index+=e.length,o(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),p=n(8280),d=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),P=n(4284),C=n(2220),A=n(2574),S=n(8055),T=n(9251),z=n(5816),E=n(2522),I=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),G=n(4932),$=n(726).forEach,U=E("hidden"),V="Symbol",D="prototype",L=G.set,j=G.getterFor(V),H=Object[D],F=a.Symbol,J=F&&F[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,Z=P.f,X=b.f,ee=A.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(H,t);r&&delete H[t],Z(e,t,n),r&&e!==H&&Z(H,t,r)},oe=c&&l((function(){return 7!==N(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?se:Z,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===H&&ue(re,t,n),d(e);var r=f(t);return d(n),m(ne,r)?(n.enumerable?(m(e,U)&&e[U][r]&&(e[U][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,U)||Z(e,U,g(1,N(null))),e[U][r]=!0),oe(e,r,n)):Z(e,r,n)},le=function(e,t){d(e);var n=h(t),r=w(n).concat(he(n));return $(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===H&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,U)&&this[U][t])||n)},pe=function(e,t){var n=h(e),r=f(t);if(n!==H||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,U)&&n[U][r]||(a.enumerable=!0),a}},de=function(e){var t=X(h(e)),n=[];return $(t,(function(e){m(ne,e)||m(I,e)||te(n,e)})),n},he=function(e){var t=e===H,n=X(t?re:h(e)),r=[];return $(n,(function(e){!m(ne,e)||t&&!m(H,e)||te(r,ne[e])})),r};u||(F=function(){if(p(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===H&&i(n,re,e),m(r,U)&&m(r[U],t)&&(r[U][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(H,t,{configurable:!0,set:n}),ce(t,e)},S(J=F[D],"toString",(function(){return j(this).tag})),S(F,"withoutSetter",(function(e){return ce(M(e),e)})),A.f=me,P.f=ue,C.f=le,_.f=pe,v.f=b.f=de,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(T(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||S(H,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:F}),$(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:pe}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:de}),k(),B(F,V),I[U]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("Symbol")(t);return u[t]=n,l[n]=t,n}})},2596:function(e,t,n){"use strict";n(366)("hasInstance")},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},4954:function(e,t,n){"use strict";n(366)("iterator")},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(e,t,n){"use strict";var r=n(1091),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(u,e))return u[e]}})},3377:function(e,t,n){"use strict";n(366)("matchAll")},4123:function(e,t,n){"use strict";n(366)("match")},2230:function(e,t,n){"use strict";n(366)("replace")},5344:function(e,t,n){"use strict";n(366)("search")},1660:function(e,t,n){"use strict";n(366)("species")},4610:function(e,t,n){"use strict";n(366)("split")},3669:function(e,t,n){"use strict";var r=n(366),a=n(3467);r("toPrimitive"),a()},4810:function(e,t,n){"use strict";var r=n(5582),a=n(366),i=n(4840);a("toStringTag"),i(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},7152:function(e,t,n){"use strict";n(366)("dispose")},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(e,t,n){"use strict";n(366)("matcher")},6878:function(e,t,n){"use strict";n(366)("metadataKey")},1372:function(e,t,n){"use strict";n(366)("metadata")},4664:function(e,t,n){"use strict";n(366)("observable")},9671:function(e,t,n){"use strict";n(366)("patternMatch")},359:function(e,t,n){"use strict";n(366)("replaceAll")},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.Array},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},9003:function(e){"use strict";e.exports={version:"1.0.35"}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Xe},AbiVersion:function(){return Zr},AccountBase:function(){return Fm},AccountError:function(){return R},AccountGeneralized:function(){return AN},AccountLedger:function(){return zN},AccountLedgerFactory:function(){return BN},AccountMemory:function(){return Gh},AccountMetamask:function(){return LN},AccountMetamaskFactory:function(){return ew},AccountMnemonicFactory:function(){return vN},AeSdk:function(){return ly},AeSdkAepp:function(){return Ly},AeSdkBase:function(){return uy},AeSdkMethods:function(){return sy},AeSdkWallet:function(){return fg},AensError:function(){return O},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ye},AmbiguousEventDefinitionError:function(){return qe},ArgumentCountMismatchError:function(){return F},ArgumentError:function(){return j},BaseError:function(){return q},BrowserRuntimeConnection:function(){return KS},BrowserWindowMessageConnection:function(){return LS},BytecodeMismatchError:function(){return xe},CallReturnType:function(){return ts},Channel:function(){return Bv},ChannelCallError:function(){return fe},ChannelConnectionError:function(){return ye},ChannelError:function(){return B},ChannelIncomingMessageError:function(){return we},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return aw},CompilerError:function(){return G},CompilerHttp:function(){return Zw},ConsensusProtocolVersion:function(){return Yr},Contract:function(){return qf},ContractError:function(){return $},CryptographyError:function(){return U},DRY_RUN_ACCOUNT:function(){return Dr},DecodeError:function(){return Ve},DelegationTag:function(){return af},DryRunError:function(){return Le},DuplicateContractError:function(){return _e},DuplicateNodeError:function(){return $e},Encoded:function(){return e},Encoding:function(){return ur},EntryTag:function(){return ns},IllegalArgumentError:function(){return H},IllegalBidFeeError:function(){return je},InactiveContractError:function(){return Pe},InsufficientBalanceError:function(){return J},InsufficientNameFeeError:function(){return ce},InternalError:function(){return ae},InvalidAensNameError:function(){return ue},InvalidAuthDataError:function(){return be},InvalidChecksumError:function(){return Re},InvalidMethodInvocationError:function(){return Ce},InvalidRpcMessageError:function(){return le},InvalidSignatureError:function(){return He},InvalidTxError:function(){return Fh},LogicError:function(){return re},MAX_AUTH_FUN_GAS:function(){return Lr},MESSAGE_DIRECTION:function(){return my},METHODS:function(){return hy},MIN_GAS_PRICE:function(){return jr},MemoryAccount:function(){return Gh},MerkleTreeHashMismatchError:function(){return Oe},Middleware:function(){return qS},MiddlewarePageMissed:function(){return ES},MiddlewareSubscriber:function(){return Xv},MiddlewareSubscriberDisconnected:function(){return Wv},MiddlewareSubscriberError:function(){return Jv},MissingCallbackError:function(){return me},MissingContractAddressError:function(){return Ae},MissingContractDefError:function(){return Se},MissingEventDefinitionError:function(){return Me},MissingFunctionNameError:function(){return Te},MissingNodeInTreeError:function(){return ke},MissingParamError:function(){return W},NAME_BID_RANGES:function(){return Kr},NAME_BID_TIMEOUT_BLOCKS:function(){return Jr},NAME_FEE_BID_INCREMENT:function(){return Fr},NAME_FEE_MULTIPLIER:function(){return Hr},NAME_MAX_LENGTH_FEE:function(){return Wr},Name:function(){return ff},NoSerializerFoundError:function(){return K},NoSuchContractFunctionError:function(){return Ee},NoWalletConnectedError:function(){return Qe},Node:function(){return jm},NodeError:function(){return V},NodeInvocationError:function(){return ze},NodeNotFoundError:function(){return Ue},NotImplementedError:function(){return te},NotPayableFunctionError:function(){return Ie},ORACLE_TTL_TYPES:function(){return rs},Oracle:function(){return Uf},OracleClient:function(){return Vf},PayloadLengthError:function(){return De},PrefixNotFoundError:function(){return Fe},RPC_STATUS:function(){return fy},RequestTimedOutError:function(){return Y},RpcConnectionDenyError:function(){return by},RpcConnectionError:function(){return Ze},RpcError:function(){return gy},RpcInternalError:function(){return Py},RpcInvalidTransactionError:function(){return Ny},RpcMethodNotFoundError:function(){return Ay},RpcNoNetworkById:function(){return Cy},RpcNotAuthorizeError:function(){return xy},RpcPermissionDenyError:function(){return _y},RpcRejectedByUserError:function(){return wy},RpcUnsupportedProtocolError:function(){return vy},SUBSCRIPTION_TYPES:function(){return dy},SchemaNotFoundError:function(){return Je},Tag:function(){return Xr},TagNotFoundError:function(){return We},TransactionError:function(){return D},TxNotInChainError:function(){return Ke},TxTimedOutError:function(){return Q},TypeError:function(){return Z},UnAuthorizedAccountError:function(){return pe},UnavailableAccountError:function(){return se},UnexpectedChannelMessageError:function(){return Ne},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return ve},UnknownNodeLengthError:function(){return Be},UnknownPathNibbleError:function(){return Ge},UnknownRpcClientError:function(){return de},UnsubscribedAccountError:function(){return he},UnsupportedPlatformError:function(){return X},UnsupportedProtocolError:function(){return ee},UnsupportedVersionError:function(){return ne},VmVersion:function(){return Qr},WALLET_TYPE:function(){return py},WalletConnectorFrame:function(){return ig},WalletConnectorFrameWithNode:function(){return ug},WalletError:function(){return L},_getPollInterval:function(){return ya},awaitHeight:function(){return va},buildAuthTxHash:function(){return Wf},buildAuthTxHashByGaMetaTx:function(){return Kf},buildContractId:function(){return ta},buildContractIdByContractTx:function(){return io},buildTx:function(){return Zs},buildTxAsync:function(){return no},buildTxHash:function(){return ao},commitmentHash:function(){return sa},computeAuctionEndBlock:function(){return ha},computeBidFee:function(){return da},connectionProxy:function(){return RS},createGeneralizedAccount:function(){return Ff},decode:function(){return Cr},defaultProtocolParameters:function(){return ai},encode:function(){return Ar},encodeContractAddress:function(){return ta},encodeUnsigned:function(){return Mr},ensureEncoded:function(){return zr},ensureJwt:function(){return nf},ensureName:function(){return ca},formatAmount:function(){return tt},genSalt:function(){return Ir},getAccount:function(){return xa},getBalance:function(){return _a},getCachedProtocolParameters:function(){return xi},getContract:function(){return qa},getContractByteCode:function(){return Ma},getCurrentGeneration:function(){return Pa},getDefaultPointerKey:function(){return ma},getExecutionCost:function(){return $h},getExecutionCostBySignedTx:function(){return Uh},getExecutionCostUsingNode:function(){return Vh},getGeneration:function(){return Ca},getHeight:function(){return Na},getKeyBlock:function(){return Sa},getMicroBlockHeader:function(){return Ta},getMicroBlockTransactions:function(){return Aa},getMinimumNameFee:function(){return pa},getName:function(){return Ra},getTransactionSignerAddress:function(){return Hm},hash:function(){return qr},hashDomain:function(){return Mh},hashJson:function(){return Ih},hashMessage:function(){return Gr},hashTypedData:function(){return qh},isAddressValid:function(){return Tr},isAuctionName:function(){return fa},isEncoded:function(){return Er},isJwt:function(){return tf},isName:function(){return ua},isNameValid:function(){return ua},messageToHash:function(){return Gr},oracleQueryId:function(){return na},packDelegation:function(){return lf},packEntry:function(){return Ks},payForTransaction:function(){return jf},poll:function(){return wa},prefixedAmount:function(){return ot},produceNameId:function(){return ia},readInt:function(){return oa},rebuildUnpackedTx:function(){return Xs},resolveName:function(){return Oa},sendTransaction:function(){return Jh},signJwt:function(){return Xh},spend:function(){return Df},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return Vr},transferFunds:function(){return Lf},txDryRun:function(){return Ia},unpackDelegation:function(){return mf},unpackEntry:function(){return Ys},unpackJwt:function(){return ef},unpackTx:function(){return ro},verify:function(){return Rr},verifyJwt:function(){return rf},verifyMessage:function(){return $r},verifyMessageSignature:function(){return $r},verifySignature:function(){return Rr},verifyTransaction:function(){return Hh},waitForTxConfirm:function(){return ba},walletDetector:function(){return jS}});var e={};n.r(e),n.d(e,{Encoding:function(){return ur}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return ya},awaitHeight:function(){return va},getAccount:function(){return xa},getBalance:function(){return _a},getContract:function(){return qa},getContractByteCode:function(){return Ma},getCurrentGeneration:function(){return Pa},getGeneration:function(){return Ca},getHeight:function(){return Na},getKeyBlock:function(){return Sa},getMicroBlockHeader:function(){return Ta},getMicroBlockTransactions:function(){return Aa},getName:function(){return Ra},poll:function(){return wa},resolveName:function(){return Oa},txDryRun:function(){return Ia},waitForTxConfirm:function(){return ba}});var a={};n.r(a),n.d(a,{Account:function(){return tc},AuctionEntry:function(){return pc},ByteCode:function(){return fc},Channel:function(){return dc},ChannelCloseMutualTx:function(){return ru},ChannelCloseSoloTx:function(){return au},ChannelCreateTx:function(){return iu},ChannelDepositTx:function(){return su},ChannelForceProgressTx:function(){return ou},ChannelSetDelegatesTx:function(){return cu},ChannelSettleTx:function(){return uu},ChannelSlashTx:function(){return lu},ChannelSnapshotSoloTx:function(){return mu},ChannelWithdrawTx:function(){return pu},CheckTxInPoolResponse:function(){return du},CommitmentId:function(){return hu},ContractCallObject:function(){return Ac},ContractCallTx:function(){return fu},ContractCreateTx:function(){return yu},ContractObject:function(){return hc},ContractTxBaseGas:function(){return Hc},ContractVersion:function(){return Wc},CountResponse:function(){return kc},CreateContractUnsignedTx:function(){return Hu},Currency:function(){return gc},Delegates:function(){return oc},DryRunAccount:function(){return vc},DryRunCallContext:function(){return _c},DryRunCallReq:function(){return xc},DryRunInput:function(){return wc},DryRunInputItem:function(){return bc},DryRunResult:function(){return Cc},DryRunResults:function(){return Pc},EncodedTx:function(){return Xc},ErrorModel:function(){return nc},Event:function(){return Sc},GAAttachTx:function(){return gu},GAMetaTx:function(){return Nu},GAObject:function(){return nu},GasPricesItem:function(){return Dc},Generation:function(){return Tc},HCContractPubkeys:function(){return Mc},HashResponse:function(){return qc},Header:function(){return Ec},HeightResponse:function(){return Rc},Image:function(){return Nc},KeyBlock:function(){return zc},MicroBlockHeader:function(){return Oc},NameAuctionTimeout:function(){return Jc},NameClaimTx:function(){return wu},NameEntry:function(){return Bc},NameEntryPointersItem:function(){return Lu},NameHash:function(){return vu},NamePointer:function(){return mc},NamePreclaimTx:function(){return bu},NameRevokeTx:function(){return xu},NameTransferTx:function(){return _u},NameUpdateTx:function(){return Pu},NextNonceResponse:function(){return rc},NodeGetAccountByPubkeyAndHashExceptionHeaders:function(){return Wu},NodeGetAccountByPubkeyAndHeightExceptionHeaders:function(){return Ku},NodeGetAccountByPubkeyExceptionHeaders:function(){return Ju},NodeGetAccountNextNonceExceptionHeaders:function(){return Yu},NodeGetAuctionEntryByNameExceptionHeaders:function(){return Zu},NodeGetChainEndsExceptionHeaders:function(){return Il},NodeGetChannelByPubkeyExceptionHeaders:function(){return Xu},NodeGetContractCodeExceptionHeaders:function(){return tl},NodeGetContractExceptionHeaders:function(){return el},NodeGetContractPoIExceptionHeaders:function(){return nl},NodeGetCurrencyExceptionHeaders:function(){return rl},NodeGetCurrentGenerationExceptionHeaders:function(){return il},NodeGetCurrentKeyBlockExceptionHeaders:function(){return ml},NodeGetCurrentKeyBlockHashExceptionHeaders:function(){return pl},NodeGetCurrentKeyBlockHeightExceptionHeaders:function(){return dl},NodeGetGenerationByHashExceptionHeaders:function(){return sl},NodeGetGenerationByHeightExceptionHeaders:function(){return ol},NodeGetHyperchainContractPubkeysExceptionHeaders:function(){return ll},NodeGetKeyBlockByHashExceptionHeaders:function(){return hl},NodeGetKeyBlockByHeightExceptionHeaders:function(){return fl},NodeGetMicroBlockHeaderByHashExceptionHeaders:function(){return gl},NodeGetMicroBlockTransactionByHashAndIndexExceptionHeaders:function(){return vl},NodeGetMicroBlockTransactionsByHashExceptionHeaders:function(){return Nl},NodeGetMicroBlockTransactionsCountByHashExceptionHeaders:function(){return wl},NodeGetNameEntryByNameExceptionHeaders:function(){return bl},NodeGetNameEntryByNameHashExceptionHeaders:function(){return xl},NodeGetNodeSettingsExceptionHeaders:function(){return Tl},NodeGetOracleByPubkeyExceptionHeaders:function(){return _l},NodeGetOracleQueriesByPubkeyExceptionHeaders:function(){return Pl},NodeGetOracleQueryByPubkeyAndQueryIdExceptionHeaders:function(){return Cl},NodeGetPeerPubkeyExceptionHeaders:function(){return Al},NodeGetPendingAccountTransactionsByPubkeyExceptionHeaders:function(){return Qu},NodeGetPendingKeyBlockExceptionHeaders:function(){return yl},NodeGetPinningTxExceptionHeaders:function(){return ul},NodeGetProtocolParametersExceptionHeaders:function(){return zl},NodeGetRecentGasPricesExceptionHeaders:function(){return Sl},NodeGetStatusExceptionHeaders:function(){return El},NodeGetSyncStatusExceptionHeaders:function(){return Ml},NodeGetTopHeaderExceptionHeaders:function(){return cl},NodeGetTransactionByHashExceptionHeaders:function(){return Rl},NodeGetTransactionInfoByHashExceptionHeaders:function(){return Ol},NodePostTransactionExceptionHeaders:function(){return ql},NodeProtectedDryRunTxsExceptionHeaders:function(){return al},NodeSettings:function(){return Lc},OffChainCallContract:function(){return Gu},OffChainDeposit:function(){return $u},OffChainNewContract:function(){return Uu},OffChainTransfer:function(){return Vu},OffChainUpdate:function(){return cc},OffChainWithdrawal:function(){return Du},OracleExtendTx:function(){return Au},OracleQueries:function(){return $c},OracleQuery:function(){return Uc},OracleQueryTx:function(){return Su},OracleRegisterTx:function(){return Tu},OracleRespondTx:function(){return zu},PayingForTx:function(){return Eu},PeerConnections:function(){return Qc},PeerCount:function(){return Iu},PeerCountAvailable:function(){return qu},PeerCountConnected:function(){return Mu},PeerDetails:function(){return Cu},PeerPubKey:function(){return Vc},Peers:function(){return Ru},PinningTx:function(){return Ic},PoI:function(){return yc},PostTxResponse:function(){return eu},Protocol:function(){return Kc},ProtocolConsensusParameters:function(){return ju},ProtocolParameters:function(){return jc},PubKey:function(){return Ou},RegisteredOracle:function(){return Gc},RelativeTTL:function(){return uc},SignedTx:function(){return ic},SignedTxs:function(){return ac},SpendTx:function(){return Fu},SpendTxInput:function(){return ku},StateGasPerBlock:function(){return Fc},Status:function(){return Yc},SyncStatus:function(){return Zc},TokenSupply:function(){return Bu},Ttl:function(){return lc},Tx:function(){return sc},TxInfoObject:function(){return tu},discriminators:function(){return kl}});var i={};n.r(i),n.d(i,{addChecksum:function(){return Fd},decode:function(){return Kd},encode:function(){return Wd},getPayload:function(){return Jd}});var s={};n.r(s),n.d(s,{decode:function(){return Qd},encode:function(){return Yd}});var o={};n.r(o),n.d(o,{payForTransaction:function(){return jf},spend:function(){return Df},transferFunds:function(){return Lf}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return Wf},buildAuthTxHashByGaMetaTx:function(){return Kf},createGeneralizedAccount:function(){return Ff}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return _w},ByteCodeInput:function(){return ww},BytecodeCallResultInput:function(){return mw},Calldata:function(){return hw},CompileOpts:function(){return sw},CompileResult:function(){return uw},CompilerError:function(){return ow},CompilerVersion:function(){return xw},Contract:function(){return iw},DecodeCalldataBytecode:function(){return fw},DecodeCalldataSource:function(){return Nw},DecodedCalldata:function(){return yw},DecodedCallresult:function(){return pw},ErrorModel:function(){return gw},ErrorPos:function(){return cw},FateAssembler:function(){return vw},FunctionCallInput:function(){return dw},SophiaBinaryData:function(){return Pw},SophiaCallResultInput:function(){return lw},SophiaJsonData:function(){return Cw},ValidateByteCodeInput:function(){return bw}});var l={};n.r(l),n.d(l,{appendSignature:function(){return hv},awaitingChannelCreateTx:function(){return bv},awaitingCompletion:function(){return gv},awaitingConnection:function(){return Nv},awaitingLeave:function(){return Sv},awaitingOnChainTx:function(){return xv},awaitingReconnection:function(){return vv},awaitingReestablish:function(){return wv},awaitingShutdownTx:function(){return Av},channelClosed:function(){return Tv},channelOpen:function(){return Pv},handleUnexpectedMessage:function(){return yv},signAndNotify:function(){return fv}});var m={};n.r(m),n.d(m,{Activity:function(){return Hb},ActivityPayload:function(){return Fb},Aex141Response:function(){return jx},Aex141TemplateTokensResponse:function(){return Wx},Aex141TemplatesResponse:function(){return Fx},Aex141TokenDetailResponse:function(){return Yx},Aex141TokenResponse:function(){return rx},Aex141TransferEvent:function(){return Zx},Aex9BalanceResponse:function(){return ix},Aex9ContractBalanceResponse:function(){return r_},Aex9Response:function(){return e_},Aex9TransferEvent:function(){return qP},Aex9TransferResponse:function(){return RP},Auction:function(){return O_},AuctionLastBid:function(){return k_},AuctionLastBidTx:function(){return XC},Channel:function(){return c_},ChannelCloseMutualTx:function(){return LP},ChannelCloseSoloTx:function(){return jP},ChannelCreateTx:function(){return $P},ChannelDepositTx:function(){return UP},ChannelForceProgressTx:function(){return DP},ChannelSetDelegatesTx:function(){return WP},ChannelSettleTx:function(){return FP},ChannelSlashTx:function(){return HP},ChannelSnapshotSoloTx:function(){return JP},ChannelWithdrawTx:function(){return VP},Components171VsjiSchemasNametxPropertiesTxAllof1:function(){return V_},Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1:function(){return B_},Components1Viuqa3SchemasOracletxPropertiesTxAllof1:function(){return tP},Contract:function(){return d_},ContractCall:function(){return l_},ContractCallTx:function(){return ZP},ContractCreateTx:function(){return h_},ContractLog:function(){return p_},Delegate:function(){return C_},Delegates:function(){return Wb},DeltaStat:function(){return yP},DexSwap:function(){return ox},DexSwapAmounts:function(){return cx},EpochInfo:function(){return N_},EpochInfoValidatorsItem:function(){return w_},ErrorResponse:function(){return tx},GAAttachTx:function(){return XP},GAMetaTx:function(){return eC},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return s_},Get200ApplicationJsonProperties:function(){return gx},InternalContractCallEvent:function(){return OP},InternalTransferEvent:function(){return kP},KeyBlock:function(){return T_},KeyBlockExtended:function(){return eA},MicroBlockExtended:function(){return tA},MicroBlockHeader:function(){return E_},Miner:function(){return vP},Name:function(){return R_},NameClaim:function(){return lx},NameClaimEvent:function(){return BP},NameClaimTx:function(){return mx},NameOwnership:function(){return G_},NamePointer:function(){return Zb},NamePreclaimTx:function(){return QP},NameRevokeTx:function(){return U_},NameTransfer:function(){return F_},NameTransferTx:function(){return J_},NameTx:function(){return $_},NameTxTx:function(){return nA},NameUpdate:function(){return K_},NameUpdateTx:function(){return fx},NotFoundResponse:function(){return px},OffChainUpdate:function(){return Kb},Oracle:function(){return Q_},OracleExtend:function(){return rP},OracleExtendTx:function(){return aP},OracleFormat:function(){return Z_},OracleQuery:function(){return sP},OracleQueryTx:function(){return KP},OracleRegisterTx:function(){return eP},OracleRespondTx:function(){return YP},OracleResponse:function(){return oP},OracleTx:function(){return X_},OracleTxTx:function(){return rA},PaginatedResponse:function(){return ex},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return i_},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return m_},Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sx},Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return Px},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return SC},Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return Vx},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return zC},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return TC},Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema:function(){return WC},Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema:function(){return CC},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return lC},Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema:function(){return sC},Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ux},Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return kx},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return uC},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return q_},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return u_},Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema:function(){return bC},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return t_},Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dP},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qx},Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return xx},Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema:function(){return LC},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return wC},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return RC},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return qC},Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema:function(){return nC},Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return g_},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return IC},Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return pP},Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema:function(){return PC},Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema:function(){return _C},Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return KC},Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0:function(){return NP},Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fP},Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return Cx},Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xP},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return OC},Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return wx},Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return oC},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return hC},Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return Ux},Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return Bx},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return pC},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return YC},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nx},Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return x_},Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return Ex},Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gP},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return D_},Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return Mx},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return MC},Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema:function(){return xC},Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return vx},Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema:function(){return UC},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cP},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kx},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return gC},Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return $x},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return H_},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return iP},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xx},Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema:function(){return $C},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return fC},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return dC},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return cC},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return AC},Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return PP},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return yC},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return rC},Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return Dx},Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return wP},Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return zx},Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema:function(){return DC},Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return CP},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return y_},Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return hP},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return NC},Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return P_},Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0:function(){return v_},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return kC},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Lx},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return f_},PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dx},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return ZC},PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema:function(){return HC},PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jb},PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return Ix},PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema:function(){return FC},PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema:function(){return GC},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return L_},PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return Sx},PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bP},PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0:function(){return A_},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return n_},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return S_},PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Nx},PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return Tx},PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return lP},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Y_},PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return _x},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return TP},PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zP},PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema:function(){return JC},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return EC},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return aC},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return a_},PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return qx},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return vC},PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return Gx},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return j_},PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Ax},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return z_},PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return Rx},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return o_},PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema:function(){return jC},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Jx},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return W_},PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx:function(){return bx},PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return Ox},PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema:function(){return QC},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return IP},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return BC},PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema:function(){return VC},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hx},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return mC},PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema:function(){return yx},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return I_},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nP},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return ax},PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return iC},PayingForTx:function(){return tC},PendingTransaction:function(){return EP},Pointee:function(){return hx},RelativeTTL:function(){return Yb},Schedule:function(){return b_},SignedTx:function(){return Xb},SpendTx:function(){return GP},Stat:function(){return mP},Stats:function(){return uP},Status:function(){return AP},StatusMdwAsyncTasks:function(){return SP},TotalStat:function(){return _P},Transaction:function(){return M_},Transfer:function(){return MP},Ttl:function(){return Qb},Tx:function(){return Jb},Validator:function(){return __},discriminators:function(){return aA}});var p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,h=Math.floor,f="[BigNumber Error] ",y=f+"Number primitive has more than 15 significant digits: ",g=1e14,N=14,w=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,x=1e9;function _(e){var t=0|e;return e>0||e===t?t:t-1}function P(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=N-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function C(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function A(e,t,n,r){if(e<t||e>n||e!==h(e))throw Error(f+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function S(e){var t=e.c.length-1;return _(e.e/N)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function z(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var E=function e(t){var n,r,a,i,s,o,c,u,l,m,E=j.prototype={constructor:j,toString:null,valueOf:null},I=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,G=!1,$=1,U=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,i,s,o,c,u,l,m,d=this;if(!(d instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>B?d.c=d.e=null:e.e<k?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?d.c=d.e=null:(d.e=o,d.c=[e]))}m=String(e)}else{if(!p.test(m=String(e)))return a(d,m,u);d.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(A(t,2,D.length,"Base"),10==t&&L)return W(d=new j(e),M+d.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return a(d,m,u,t);if(d.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(y+e)}else d.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=D.slice(0,t),o=c=0,l=m.length;c<l;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>o){o=l;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return a(d,String(e),u,t)}u=!1,(o=(m=r(m,t,10,d.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(l=m.length;48===m.charCodeAt(--l););if(m=m.slice(c,++l)){if(l-=c,u&&j.DEBUG&&l>15&&(e>w||e!==h(e)))throw Error(y+d.s*e);if((o=o-c-1)>B)d.c=d.e=null;else if(o<k)d.c=[d.e=0];else{if(d.e=o,d.c=[],c=(o+1)%N,o<0&&(c+=N),c<l){for(c&&d.c.push(+m.slice(0,c)),l-=N;c<l;)d.c.push(+m.slice(c,c+=N));c=N-(m=m.slice(c)).length}else c-=l;for(;c--;m+="0");d.c.push(+m)}}else d.c=[d.e=0]}function H(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:A(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=P(e.c),c=1==r||2==r&&(s<=R||s>=O)?T(c,s):z(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=P(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=T(c,i)}else if(t-=s,c=z(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function F(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=C(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*N-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,s,o,c,u,l,m=e.c,p=v;if(m){e:{for(a=1,o=m[0];o>=10;o/=10,a++);if((i=t-a)<0)i+=N,s=t,c=m[u=0],l=h(c/p[a-s-1]%10);else if((u=d((i+1)/N))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,a=1,s=(i%=N)-N+1}else{for(c=o=m[u],a=1;o>=10;o/=10,a++);l=(s=(i%=N)-N+a)<0?0:h(c/p[a-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%p[a-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?c/p[a-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=p[(N-t%N)%N],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=u,o=1,u--):(m.length=u+1,o=p[N-i],m[u]=s>0?h(c/p[a-s]%p[s])*o:0),r)for(;;){if(0==u){for(i=1,s=m[0];s>=10;s/=10,i++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);i!=o&&(e.e++,m[0]==g&&(m[0]=1));break}if(m[u]+=o,m[u]!=g)break;m[u--]=0,o=1}for(i=m.length;0===m[--i];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=P(e.c),t=n<=R||n>=O?T(t,n):z(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(A(n=e[t],0,x,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(A(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(A(n[0],-x,0,t),A(n[1],0,x,t),R=n[0],O=n[1]):(A(n,-x,x,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)A(n[0],-x,-1,t),A(n[1],1,x,t),k=n[0],B=n[1];else{if(A(n,-x,x,t),!n)throw Error(f+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(f+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw G=!n,Error(f+"crypto unavailable");G=n}else G=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(A(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(A(n=e[t],0,x,t),U=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(f+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:G,MODULO_MODE:$,POW_PRECISION:U,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-x&&a<=x&&a===h(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%N)<1&&(t+=N),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==h(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(f+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return F(arguments,-1)},j.minimum=j.min=function(){return F(arguments,1)},j.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return h(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,o=0,c=[],u=new j(I);if(null==e?e=M:A(e,0,x),a=d(e/N),G)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));o<a;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(i%1e14),o+=2);o=a/2}else{if(!crypto.randomBytes)throw G=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(a*=7);o<a;)(i=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(c.push(i%1e14),o+=7);o=a/7}if(!G)for(;o<a;)(i=s())<9e15&&(c[o++]=i%1e14);for(a=c[--o],e%=N,a&&e&&(i=v[N-e],c[o]=h(a/i)*i);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=N);for(o=1,i=c[0];i>=10;i/=10,o++);o<N&&(r-=N-o)}return u.e=r,u.c=c,u}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),g=M,N=q;for(y>=0&&(m=U,U=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),U=m,f.c=t(z(P(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,g,N,i)).c,p=d.r,l=d.e),y=h[u=l+g+1],m=i/2,p=p||u<0||null!=h[u+1],p=N<4?(null!=y||p)&&(0==N||N==(d.s<0?3:2)):y>m||y==m&&(4==N||p||6==N&&1&h[u-1]||N==(d.s<0?8:7)),u<1||!h[0])r=p?z(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=z(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%b,l=t/b|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%b)+(r=l*i+(s=e[c]/b|0)*u)%b*b+o)/n|0)+(r/b|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,o){var c,u,l,m,p,d,f,y,w,v,b,x,P,C,A,S,T,z=r.s==a.s?1:-1,E=r.c,I=a.c;if(!(E&&E[0]&&I&&I[0]))return new j(r.s&&a.s&&(E?!I||E[0]!=I[0]:I)?E&&0==E[0]||!I?0*z:z/0:NaN);for(w=(y=new j(z)).c=[],z=i+(u=r.e-a.e)+1,o||(o=g,u=_(r.e/N)-_(a.e/N),z=z/N|0),l=0;I[l]==(E[l]||0);l++);if(I[l]>(E[l]||0)&&u--,z<0)w.push(1),m=!0;else{for(C=E.length,S=I.length,l=0,z+=2,(p=h(o/(I[0]+1)))>1&&(I=e(I,p,o),E=e(E,p,o),S=I.length,C=E.length),P=S,b=(v=E.slice(0,S)).length;b<S;v[b++]=0);T=I.slice(),T=[0].concat(T),A=I[0],I[1]>=o/2&&A++;do{if(p=0,(c=t(I,v,S,b))<0){if(x=v[0],S!=b&&(x=x*o+(v[1]||0)),(p=h(x/A))>1)for(p>=o&&(p=o-1),f=(d=e(I,p,o)).length,b=v.length;1==t(d,v,f,b);)p--,n(d,S<f?T:I,f,o),f=d.length,c=1;else 0==p&&(c=p=1),f=(d=I.slice()).length;if(f<b&&(d=[0].concat(d)),n(v,d,b,o),b=v.length,-1==c)for(;t(I,v,S,b)<1;)p++,n(v,S<b?T:I,b,o),b=v.length}else 0===c&&(p++,v=[0]);w[l++]=p,v[0]?v[b++]=E[P]||0:(v=[E[P]],b=1)}while((P++<C||null!=v[0])&&z--);m=null!=v[0],w[0]||w.splice(0,1)}if(o==g){for(l=1,z=w[0];z>=10;z/=10,l++);W(y,i+(y.e=l+u*N-1)+1,s,m)}else y.e=u,y.r=+m;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(m,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(o,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(c,"$1").replace(u,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(f+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return C(this,new j(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a,i=this;if(null!=e)return A(e,0,x),null==t?t=q:A(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-_(this.e/N))*N,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new j(e,t),M,q)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new j(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,i,s,o,c,u,l=this;if((e=new j(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new j(Math.pow(+K(l),s?e.s*(2-S(e)):+K(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!o&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&S(e)?-0:0,l.e>-1&&(i=1/i),new j(o?1/i:i);U&&(i=d(U/N+2))}for(s?(n=new j(.5),o&&(e.s=1),c=S(e)):c=(a=Math.abs(+K(e)))%2,u=new j(I);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(a){if(0===(a=h(a/2)))break;c=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=S(e);else{if(0==(a=+K(e)))break;c=a%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(o&&(u=I.div(u)),t?u.mod(t):i?W(u,U,q,void 0):u)},E.integerValue=function(e){var t=new j(this);return null==e?e=q:A(e,0,8),W(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===C(this,new j(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return C(this,new j(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=C(this,new j(e,t)))||0===t},E.isInteger=function(){return!!this.c&&_(this.e/N)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return C(this,new j(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=C(this,new j(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/N,u=e.e/N,l=s.c,m=e.c;if(!c||!u){if(!l||!m)return l?(e.s=-t,e):new j(m?s:NaN);if(!l[0]||!m[0])return m[0]?(e.s=-t,e):new j(l[0]?s:3==q?-0:0)}if(c=_(c),u=_(u),l=l.slice(),o=c-u){for((i=o<0)?(o=-o,a=l):(u=c,a=m),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=l.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(l[t]!=m[t]){i=l[t]<m[t];break}if(i&&(a=l,l=m,m=a,e.s=-e.s),(t=(r=m.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>o;){if(l[--r]<m[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=m[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,w=this,v=w.c,x=(e=new j(e,t)).c;if(!(v&&x&&v[0]&&x[0]))return!w.s||!e.s||v&&!v[0]&&!x||x&&!x[0]&&!v?e.c=e.e=e.s=null:(e.s*=w.s,v&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(w.e/N)+_(e.e/N),e.s*=w.s,(c=v.length)<(m=x.length)&&(h=v,v=x,x=h,a=c,c=m,m=a),a=c+m,h=[];a--;h.push(0));for(f=g,y=b,a=m;--a>=0;){for(n=0,p=x[a]%y,d=x[a]/y|0,i=a+(s=c);i>a;)n=((u=p*(u=v[--s]%y)+(o=d*u+(l=v[s]/y|0)*p)%y*y+h[i]+n)/f|0)+(o/y|0)+d*l,h[i--]=u%f;h[i]=n}return n?++r:h.splice(0,1),J(e,h,r)},E.negated=function(){var e=new j(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/N,s=e.e/N,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=_(i),s=_(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/g|0,o[t]=g===o[t]?0:o[t]%g;return a&&(o=[a].concat(o),++s),J(e,o,s)},E.precision=E.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return A(e,1,x),null==t?t=q:A(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*N+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},E.shiftedBy=function(e){return A(e,-9007199254740991,w),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=P(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=_((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),P(i.c).slice(0,c)===(t=P(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},E.toExponential=function(e,t){return null!=e&&(A(e,0,x),e++),H(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(A(e,0,x),e=e+this.e+1),H(this,e,t)},E.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(f+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],m=s[1],p=a.s<0,d=p?l.slice(1):l,h=d.length;if(c&&(i=o,o=c,c=i,h-=i),o>0&&h>0){for(i=h%o||o,l=d.substr(0,i);i<h;i+=o)l+=u+d.substr(i,o);c>0&&(l+=u+d.slice(i)),p&&(l="-"+l)}r=m?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):l}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,i,s,o,c,u,l,m,p,d,h=this,y=h.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!y)return new j(h);for(t=new j(I),l=r=new j(I),a=u=new j(I),d=P(y),s=t.e=d.length-h.e-1,t.c[0]=v[(o=s%N)<0?N+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new j(d),u.c[0]=0;m=n(c,t,0,1),1!=(i=r.plus(m.times(a))).comparedTo(e);)r=a,a=i,l=u.plus(m.times(i=l)),u=i,t=c.minus(m.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(a)),u.s=l.s=h.s,p=n(l,a,s*=2,q).minus(h).abs().comparedTo(n(u,r,s,q).minus(h).abs())<1?[l,a]:[u,r],B=o,p},E.toNumber=function(){return+K(this)},E.toPrecision=function(e,t){return null!=e&&A(e,1,x),H(this,e,t,2)},E.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?T(P(n.c),i):z(P(n.c),i,"0"):10===e&&L?t=z(P((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(A(e,2,D.length,"Base"),t=r(z(P(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return K(this)},E._isBigNumber=!0,E[Symbol.toStringTag]="BigNumber",E[Symbol.for("nodejs.util.inspect.custom")]=E.valueOf,null!=t&&j.set(t),j}(),I=E;const M=e=>e.integerValue(I.ROUND_CEIL);class q extends Error{constructor(e){super(e),this.name="BaseError"}}class R extends q{constructor(e){super(e),this.name="AccountError"}}class O extends q{constructor(e){super(e),this.name="AensError"}}class k extends q{constructor(e){super(e),this.name="AeppError"}}class B extends q{constructor(e){super(e),this.name="ChannelError"}}class G extends q{constructor(e){super(e),this.name="CompilerError"}}class $ extends q{constructor(e){super(e),this.name="ContractError"}}class U extends q{constructor(e){super(e),this.name="CryptographyError"}}class V extends q{constructor(e){super(e),this.name="NodeError"}}class D extends q{constructor(e){super(e),this.name="TransactionError"}}class L extends q{constructor(e){super(e),this.name="WalletError"}}class j extends q{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class H extends U{constructor(e){super(e),this.name="IllegalArgumentError"}}class F extends q{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class J extends q{constructor(e){super(e),this.name="InsufficientBalanceError"}}class W extends q{constructor(e){super(e),this.name="MissingParamError"}}class K extends q{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class Y extends q{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class Q extends q{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class Z extends q{constructor(e){super(e),this.name="TypeError"}}class X extends q{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class ee extends q{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class te extends q{constructor(e){super(e),this.name="NotImplementedError"}}class ne extends q{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class re extends q{constructor(e){super(e),this.name="LogicError"}}class ae extends q{constructor(e){super(e),this.name="InternalError"}}class ie extends ae{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class se extends R{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends O{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ce extends O{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ue extends O{constructor(e){super(e),this.name="InvalidAensNameError"}}class le extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class me extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class pe extends k{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class de extends k{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class he extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class fe extends B{constructor(e){super(e),this.name="ChannelCallError"}}class ye extends B{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends B{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class Ne extends B{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class we extends B{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ve extends B{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class be extends G{constructor(e){super(e),this.name="InvalidAuthDataError"}}class xe extends ${constructor(e,t=""){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`+t),this.name="BytecodeMismatchError"}}class _e extends ${constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Pe extends ${constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Ce extends ${constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class Ae extends ${constructor(e){super(e),this.name="MissingContractAddressError"}}class Se extends ${constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Te extends ${constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class ze extends ${constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ee extends ${constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Ie extends ${constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Me extends ${constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class qe extends ${constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class Re extends U{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Oe extends U{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class ke extends U{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Be extends U{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Ge extends U{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class $e extends V{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Ue extends V{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ve extends D{constructor(e){super(e),this.name="DecodeError"}}class De extends D{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends D{constructor(e){super(e),this.name="DryRunError"}}class je extends D{constructor(e){super(e),this.name="IllegalBidFeeError"}}class He extends D{constructor(e){super(e),this.name="InvalidSignatureError"}}class Fe extends D{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Je extends D{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class We extends D{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Ke extends D{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ye extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class Qe extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Ze extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Xe=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const et={[Xe.AE]:0,[Xe.MILI_AE]:-3,[Xe.MICRO_AE]:-6,[Xe.NANO_AE]:-9,[Xe.PICO_AE]:-12,[Xe.FEMTO_AE]:-15,[Xe.AETTOS]:-18},tt=(e,{denomination:t=Xe.AETTOS,targetDenomination:n=Xe.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!I.isBigNumber(r)))throw new j("value","a number",e);var r;return new I("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Xe.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Xe.AE}),rt=(e,{denomination:t=Xe.AE}={})=>tt(e,{denomination:t}),at=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],it=e=>at.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),st=e=>{var t;return null!==(t=at.find((t=>t.magnitude<=e)))&&void 0!==t?t:at[at.length-1]},ot=e=>{var t;const n=new I(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:a,magnitude:i}=(r<0?it:st)(r);return`${n.shiftedBy(-i).precision(9+Math.min(r-i,0)).toFixed()}${""!==a?" ":""}${a}`},ct=new Set(["Deserialize","Serialize","Retry","Sign"]);class ut{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!ct.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ct.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new ut(this._policies)}static create(){return new ut}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),a=n("None"),i=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,a,i,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?i:"Sign"===e?o:a}for(const e of this._policies){const n=e.policy,r=e.options,a=n.name;if(t.has(a))throw new Error("Duplicate policy names not allowed in pipeline");const i={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(a,i),u(r.phase).policies.add(i)}for(const e of this._policies){const{policy:n,options:r}=e,a=n.name,i=t.get(a);if(!i)throw new Error(`Missing node for policy ${a}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(i.dependsOn.add(n),n.dependants.add(i))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(i),i.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function m(){for(const e of c){if(l(e),e.policies.size>0&&e!==a)return void(a.hasRun||l(a));e.hasAfterPolicies&&l(a)}}let p=0;for(;t.size>0;){p++;const t=e.length;if(m(),e.length<=t&&p>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var lt=n(5606);const mt=void 0!==lt&<.env&<.env.DEBUG||void 0;let pt,dt=[],ht=[];const ft=[];mt&>(mt);const yt=Object.assign((e=>wt(e)),{enable:gt,enabled:Nt,disable:function(){const e=pt||"";return gt(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function gt(e){pt=e,dt=[],ht=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?ht.push(new RegExp(`^${e.substr(1)}$`)):dt.push(new RegExp(`^${e}$`));for(const e of ft)e.enabled=Nt(e.namespace)}function Nt(e){if(e.endsWith("*"))return!0;for(const t of ht)if(t.test(e))return!1;for(const t of dt)if(t.test(e))return!0;return!1}function wt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Nt(e),destroy:vt,log:yt.log,namespace:e,extend:bt});return ft.push(t),t}function vt(){const e=ft.indexOf(this);return e>=0&&(ft.splice(e,1),!0)}function bt(e){const t=wt(`${this.namespace}:${e}`);return t.log=this.log,t}var xt=yt,_t=n(5606);const Pt=new Set,Ct=void 0!==_t&&_t.env&&_t.env.AZURE_LOG_LEVEL||void 0;let At;const St=xt("azure");St.log=(...e)=>{xt.log(...e)};const Tt=["verbose","info","warning","error"];Ct&&(Rt(Ct)?function(e){if(e&&!Rt(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Tt.join(",")}`);At=e;const t=[];for(const e of Pt)qt(e)&&t.push(e.namespace);xt.enable(t.join(","))}(Ct):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Ct}'; logging is not enabled. Acceptable values: ${Tt.join(", ")}.`));const zt={verbose:400,info:300,warning:200,error:100};function Et(e){const t=St.extend(e);return It(St,t),{error:Mt(t,"error"),warning:Mt(t,"warning"),info:Mt(t,"info"),verbose:Mt(t,"verbose")}}function It(e,t){t.log=(...t)=>{e.log(...t)}}function Mt(e,t){const n=Object.assign(e.extend(t),{level:t});if(It(e,n),qt(n)){const e=xt.disable();xt.enable(e+","+n.namespace)}return Pt.add(n),n}function qt(e){return Boolean(At&&zt[e.level]<=zt[At])}function Rt(e){return Tt.includes(e)}const Ot=Et("core-rest-pipeline");class kt extends Error{constructor(e){super(e),this.name="AbortError"}}function Bt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Gt(e){if(Bt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function $t(e){if(Gt(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Ut(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Vt(e);case"base64url":return function(e){return Vt(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],a=e[2*n+1];if(!Dt.has(r)||!Dt.has(a))return t.slice(0,n);t[n]=parseInt(`${r}${a}`,16)}return t}(e)}}function Vt(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Dt=new Set("0123456789abcdefABCDEF");var Lt;const jt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ht(){return jt()}var Ft,Jt,Wt,Kt;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ft=self.constructor)||void 0===Ft?void 0:Ft.name)||"ServiceWorkerGlobalScope"===(null===(Jt=self.constructor)||void 0===Jt?void 0:Jt.name)||null===(Wt=self.constructor)||void 0===Wt||Wt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Yt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Kt=globalThis.process.versions)||void 0===Kt?void 0:Kt.node),Qt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Zt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Xt=["api-version"];class en{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Zt.concat(e),t=Xt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||Bt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,Qt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}}const tn=["GET","HEAD"];function nn(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return rn(n,r,t)}}}async function rn(e,t,n,r=0){const{request:a,status:i,headers:s}=t,o=s.get("location");if(o&&(300===i||301===i&&tn.includes(a.method)||302===i&&tn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&r<n){const t=new URL(o,a.url);a.url=t.toString(),303===i&&(a.method="GET",a.headers.delete("Content-Length"),delete a.body),a.headers.delete("Authorization");const s=await e(a);return rn(e,s,n,r+1)}return t}const an="1.19.1";async function sn(e){const t=new Map;t.set("core-rest-pipeline",an),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const a=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);a&&e.set(a.brand,a.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const on="x-ms-useragent",cn="userAgentPolicy",un=Symbol("rawContent");function ln(e){return"function"==typeof e[un]?e[un]():e.stream()}function mn(e){return Boolean(e&&"function"==typeof e.pipe)}function pn(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function dn(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(pn(e))return new Response(e).blob();const t=ln(e);if(mn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return dn(t)}function hn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function fn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const yn="multipartPolicy",gn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Nn(){return{name:yn,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const a=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",i=a.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${a}`);const[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!gn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ht()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Ut(`--${n}`,"utf-8"),...t.flatMap((e=>[Ut("\r\n","utf-8"),Ut(hn(e.headers),"utf-8"),Ut("\r\n","utf-8"),e.body,Ut(`\r\n--${n}`,"utf-8")])),Ut("--\r\n\r\n","utf-8")],a=function(e){let t=0;for(const n of e){const e=fn(n);if(void 0===e)return;t+=e}return t}(r);a&&e.headers.set("Content-Length",a),e.body=await async function(e){const t=[];for(const n of e)t.push(await dn("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function wn(e,t,n){return new Promise(((r,a)=>{let i,s;const o=()=>a(new kt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(i&&clearTimeout(i),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();i=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function vn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const bn="Retry-After",xn=["retry-after-ms","x-ms-retry-after-ms",bn];function _n(e){if(e&&[429,503].includes(e.status))try{for(const t of xn){const n=vn(e,t);if(0===n||n)return n*(t===bn?1e3:1)}const t=e.headers.get(bn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Pn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,a=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=!!(m=i)&&("ETIMEDOUT"===m.code||"ESOCKETTIMEDOUT"===m.code||"ECONNREFUSED"===m.code||"ECONNRESET"===m.code||"ENOENT"===m.code||"ENOTFOUND"===m.code),o=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(_n(e))}(n)||!c);var m;return l||u||o?{skipStrategy:!0}:!i||s||c?function(e,t){const n=t.retryDelayInMs*Math.pow(2,e),r=Math.min(t.maxRetryDelayInMs,n);var a,i;return{retryAfterInMs:r/2+(a=0,i=r/2,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)}}(t,{retryDelayInMs:r,maxRetryDelayInMs:a}):{errorToThrow:i}}}}const Cn=Et("core-rest-pipeline retryPolicy");function An(e,t={maxRetries:3}){const n=t.logger||Cn;return{name:"retryPolicy",async sendRequest(r,a){var i,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await a(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;o=c.response}if(null===(i=r.abortSignal)||void 0===i?void 0:i.aborted)throw n.error(`Retry ${u}: Request aborted.`),new kt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||Cn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:a,retryAfterInMs:i,redirectTo:s}=n;if(a)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,a),a;if(i||0===i){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${i}`),await wn(i,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Sn(e){return e.toLowerCase()}class Tn{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Sn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Sn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Sn(e))}delete(e){this._headersMap.delete(Sn(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function zn(e){return new Tn(e)}const En="setClientRequestIdPolicy",In={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Mn(e={}){let t=new qn(e.parentContext);return e.span&&(t=t.setValue(In.span,e.span)),e.namespace&&(t=t.setValue(In.namespace,e.namespace)),t}class qn{constructor(e){this._contextMap=e instanceof qn?new Map(e._contextMap):new Map}setValue(e,t){const n=new qn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qn(this);return t._contextMap.delete(e),t}}const Rn={instrumenterImplementation:void 0};function On(){return Rn.instrumenterImplementation||(Rn.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Mn({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),Rn.instrumenterImplementation}const kn={},Bn=new en;class Gn extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Gn.prototype)}[kn](){return`RestError: ${this.message} \n ${Bn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function $n(e){return e instanceof Gn||Gt(e)&&"RestError"===e.name}function Un(e){var t;const n=ut.create();var r,a;return Yt&&(e.agent&&n.addPolicy((a=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=a),t(e))})),e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Yt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,a]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(a);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:zn({"Content-Disposition":`form-data; name="${t}"`}),body:Ut(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",a=zn();a.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),a.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:a,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[yn]}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix);return{name:cn,async sendRequest(e,n){return e.headers.has(on)||e.headers.set(on,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:En,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(Nn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:An([{name:"throttlingRetryStrategy",retry({response:e}){const t=_n(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Pn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix),n=new en({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function a(e,a,i){var s;const o=On().startSpan(e,Object.assign(Object.assign({},i),{packageName:n,packageVersion:r,tracingContext:null===(s=null==a?void 0:a.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(In.namespace)||(c=c.setValue(In.namespace,t)),u.setAttribute("az.namespace",c.getValue(In.namespace)),{span:u,updatedOptions:Object.assign({},a,{tracingOptions:Object.assign(Object.assign({},null==a?void 0:a.tracingOptions),{tracingContext:c})})}}function i(e,t,...n){return On().withContext(e,t,...n)}return{startSpan:a,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=a(e,t,r);try{const e=await i(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:i,parseTraceparentHeader:function(e){return On().parseTraceparentHeader(e)},createRequestHeaders:function(e){return On().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:an})}catch(e){return void Ot.warning(`Error when creating the TracingClient: ${$t(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,a){var i;if(!r)return a(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(i=function(e,t,n){try{const{span:r,updatedOptions:a}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const i=e.createRequestHeaders(a.tracingOptions.tracingContext);for(const[e,n]of Object.entries(i))t.headers.set(e,n);return{span:r,tracingContext:a.tracingOptions.tracingContext}}catch(e){return void Ot.warning(`Skipping creating a tracing span due to an error: ${$t(e)}`)}}(r,e,o))&&void 0!==i?i:{};if(!c||!u)return a(e);try{const t=await r.withContext(u,a,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Gt(t)?t:void 0}),$n(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Yt&&n.addPolicy(nn(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Ot.info,r=new en({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const a=await t(e);return n(`Response status code: ${a.status}`),n(`Headers: ${r.sanitize(a.headers)}`),a}}}(e.loggingOptions),{afterPhase:"Sign"}),n}Gn.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Gn.PARSE_ERROR="PARSE_ERROR";class Vn{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new kt("The operation was aborted. Request has already been canceled.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:a,body:i}=function(e){const t="function"==typeof e.body?e.body():e.body;if(mn(t))throw new Error("Node streams are not supported in browser environment.");return pn(t)?{streaming:!0,body:Dn(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:i,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});a&&(s.duplex="half");const o=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,a;const i=function(e){const t=zn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:i,status:e.status},o=pn(e.body)?Dn(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(a=t.streamResponseStatusCodes)||void 0===a?void 0:a.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new Gn(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:Gn.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Dn(e,t={}){let n=0;const{onProgress:r,onEnd:a}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==a||a()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var i;const{done:s,value:o}=await t.read();if(s||!o)return null==a||a(),e.close(),void t.releaseLock();n+=null!==(i=null==o?void 0:o.length)&&void 0!==i?i:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==a||a(),t.cancel(e)}})}}class Ln{constructor(e){var t,n,r,a,i,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:zn(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(a=e.disableKeepAlive)&&void 0!==a&&a,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(i=e.withCredentials)&&void 0!==i&&i,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ht(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o,this.agent=e.agent,this.tlsSettings=e.tlsSettings}}const jn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Hn(e,t){try{return[await t(e),void 0]}catch(e){if($n(e)&&e.response)return[e.response,e];throw e}}async function Fn(e){const{scopes:t,getAccessToken:n,request:r}=e,a={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0},i=await n(t,a);i&&e.request.headers.set("Authorization",`Bearer ${i.token}`)}function Jn(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function Wn(e,t){var n;const{scopes:r}=e,a=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!a&&(e.request.headers.set("Authorization",`${null!==(n=a.tokenType)&&void 0!==n?n:"Bearer"} ${a.token}`),!0)}function Kn(e){var t;if(!e)return;const n=function(e){const t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[];let a;for(;null!==(a=t.exec(e));){const e=a[1],t=a[2],i={};let s;for(;null!==(s=n.exec(t));)i[s[1]]=s[2];r.push({scheme:e,params:i})}return r}(e);return null===(t=n.find((e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)))||void 0===t?void 0:t.params.claims}var Yn=n(8287).Buffer;const Qn=async e=>new Promise((t=>{setTimeout(t,e)})),Zn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),Xn=(()=>{try{return Yn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Yn.concat(e.map((e=>Yn.from(e))),t):Yn.concat;function er(e,t){return e in t}function tr(e,t){return t.includes(e)}function nr(e){return e instanceof Gn&&404===e.statusCode&&e.message.includes("Account not found")}function rr(e){if(!(e instanceof Error))throw e}function ar(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const a=e();if(null==a)throw new j("wrapped value","defined",a);if("get"===t&&"_wrappedValue"===r[0])return a;const i=Reflect[t](a,...r);return"function"==typeof i&&"get"===t?i.bind(a):i}]))))}function ir(e){var t;return null!==(t=e._wrappedValue)&&void 0!==t?t:e}var sr=n(8947),or=n.n(sr),cr=n(4156);let ur=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.AccountSecretKey="sk",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var lr=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),a=r.charCodeAt(0);if(255!==t[a])throw new TypeError(r+" is ambiguous");t[a]=n}const n=e.length,r=e.charAt(0),a=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,o=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*a+1>>>0,u=new Uint8Array(c);for(;i<e.length;){const r=e.charCodeAt(i);if(r>255)return;let a=t[r];if(255===a)return;let s=0;for(let e=c-1;(0!==a||s<o)&&-1!==e;e--,s++)a+=n*u[e]>>>0,u[e]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");o=s,i++}let l=c-o;for(;l!==c&&0===u[l];)l++;const m=new Uint8Array(s+(c-l));let p=s;for(;l!==c;)m[p++]=u[l++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let a=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,a++;const u=(c-o)*i+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let m=u-s;for(;m!==u&&0===l[m];)m++;let p=r.repeat(a);for(;m<u;++m)p+=e.charAt(l[m]);return p},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),mr=n(4107),pr=n.n(mr),dr=n(8287).Buffer;function hr(e){return(new(pr())).update(e).digest()}const fr=[ur.ContractBytearray,ur.ContractStoreKey,ur.ContractStoreValue,ur.Transaction,ur.OracleQuery,ur.OracleResponse,ur.State,ur.Poi,ur.StateTrees,ur.CallStateTree,ur.Bytearray],yr=[ur.KeyBlockHash,ur.MicroBlockHash,ur.BlockPofHash,ur.BlockTxHash,ur.BlockStateHash,ur.Channel,ur.ContractAddress,ur.TxHash,ur.OracleAddress,ur.OracleQueryId,ur.AccountAddress,ur.AccountSecretKey,ur.Signature,ur.Commitment,ur.PeerPubkey,ur.Name],gr={[ur.KeyBlockHash]:32,[ur.MicroBlockHash]:32,[ur.BlockPofHash]:32,[ur.BlockTxHash]:32,[ur.BlockStateHash]:32,[ur.Channel]:32,[ur.ContractAddress]:32,[ur.TxHash]:32,[ur.OracleAddress]:32,[ur.OracleQueryId]:32,[ur.AccountAddress]:32,[ur.AccountSecretKey]:32,[ur.Signature]:64,[ur.Commitment]:32,[ur.PeerPubkey]:32,[ur.State]:32};function Nr(e,t){if(!er(t,gr))return;const n=gr[t];if(null!=n&&e.length!==n)throw new De(`Payload should be ${n} bytes, got ${e.length} instead`)}const wr=e=>hr(hr(e)).slice(0,4),vr=e=>Xn([e,wr(e)]);function br(e){const t=e.slice(0,-4);if(!wr(t).equals(e.slice(-4)))throw new Re;return t}const xr={encode:e=>vr(e).toString("base64"),decode:e=>br(dr.from(e,"base64"))},_r={encode:e=>lr.encode(vr(e)),decode:e=>br(dr.from(lr.decode(e)))},Pr=e=>{const t=fr.find((t=>t===e));if(null!=t)return[t,xr];const n=yr.find((t=>t===e));if(null!=n)return[n,_r];throw new j("prefix",`one of ${[...yr,...fr].join(", ")}`,e)};function Cr(e){const[t,n,r]=e.split("_");if(null==n)throw new Ve(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ve(`Encoded string have extra parts: ${e}`);const[a,i]=Pr(t),s=i.decode(n);return Nr(s,a),s}function Ar(e,t){const[,n]=Pr(t);return Nr(e,t),`${t}_${n.encode(e)}`}var Sr=n(8287).Buffer;function Tr(e,...t){0===t.length&&(t=[ur.AccountAddress]);try{Cr(e);const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function zr(e,...t){if(Cr(e),0===t.length)return;const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n)}function Er(e,...t){try{return zr(e,...t),!0}catch(e){return!1}}function Ir(){const[e]=new BigUint64Array(or().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Mr(e){const t=Sr.allocUnsafe(4);return t.writeUInt32BE(e),t.subarray(t.findIndex((e=>0!==e)))}function qr(e){return Sr.from((0,cr.blake2b)(e,void 0,32))}function Rr(e,t,n){return or().sign.detached.verify(e,t,Cr(n))}function Or(e){return e<253?Sr.from([e]):Xn(e<=65535?[Sr.from([253]),Sr.from(new Uint16Array([e]).buffer)]:e<=4294967295?[Sr.from([254]),Sr.from(new Uint32Array([e]).buffer)]:[Sr.from([255]),Sr.from(new BigUint64Array([BigInt(e)]).buffer)])}const kr=Sr.from("aeternity Signed Message:\n","utf8"),Br=Or(kr.length);function Gr(e){const t=Sr.from(e,"utf8");return qr(Xn([Br,kr,Or(t.length),t]))}function $r(e,t,n){return Rr(Gr(e),t,n)}var Ur=n(8287).Buffer;function Vr(e,t=!1){if(null==e)return Ur.from([]);if(Number.isInteger(e)||I.isBigNumber(e)||t){if(I.isBigNumber(e)||(e=new I(e)),!e.isInteger())throw new Z(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),Ur.from(t,"hex")}if("string"==typeof e)return Ur.from(e);throw new K}const Dr={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},Lr=5e4,jr=1e9,Hr=1e14,Fr=.05,Jr=480,Wr=31,Kr=Zn({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new I(t).times(Hr)]));let Yr=function(e){return e[e.Ceres=6]="Ceres",e[e.Arcus=7]="Arcus",e}({}),Qr=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),Zr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Xr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleRespondTx=24]="OracleRespondTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var ea=n(8287).Buffer;function ta(e,t){return Ar(qr(ea.from([...Cr(e),...Vr(t)])),ur.ContractAddress)}function na(e,t,n){return Ar(qr(ea.from([...Cr(e),...function(e){const t=Vr(e,!0);return Xn([ea.alloc(32-t.length),t])}(t),...Cr(n)])),ur.OracleQueryId)}const ra=".chain";function aa(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new j("aens name","including only one dot",e);if(n!==ra.slice(1))throw new j("aens name",`suffixed with ${ra}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new j("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new j("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new j("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new j("aens name",'ending with no "-" char',e);let a;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new j("aens name","valid",e);a=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new j("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(a))throw new j("aens name","without illegal chars",e);if(a.length>63+ra.length)throw new j("aens name","not too long",e);return a}function ia(e){return Ar(qr(aa(e)),ur.Name)}function sa(e,t=Ir()){return Ar(qr(Xn([ea.from(aa(e)),ea.from(t.toString(16).padStart(64,"0"),"hex")])),ur.Commitment)}function oa(e=ea.from([])){return BigInt("0x"+ea.from(e).toString("hex")).toString()}function ca(e){aa(e)}function ua(e){try{return ca(e),!0}catch(e){return!1}}const la=[[ur.AccountAddress,"account_pubkey"],[ur.OracleAddress,"oracle_pubkey"],[ur.ContractAddress,"contract_pubkey"],[ur.Channel,"channel"]];function ma(e){Cr(e);const t=e.substring(0,2),n=la.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new j("identifier",`prefixed with one of ${la.map((([e])=>`${e}_`)).join(", ")}`,e)}function pa(e){const t=aa(e).length-ra.length;return Kr[Math.min(t,Wr)]}function da(e,{startFee:t,increment:n=Fr}={}){if(Number(n)!==n||n%1==0)throw new je(`Increment must be float. Current increment ${n}`);if(n<Fr)throw new je(`minimum increment percentage is ${Fr}`);return M(new I(null!=t?t:pa(e)).times(new I(Fr).plus(1)))}function ha(e,t){var n,r,a;const i=aa(e).length-ra.length;return(null!==(n=null!==(r=null!==(a=i<=4?2400:null)&&void 0!==a?a:i<=8?960:null)&&void 0!==r?r:i<=12?480:null)&&void 0!==n?n:0)+t}function fa(e){return aa(e).length<13+ra.length}async function ya(e,t){return Math.floor(await async function(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){if(null!=t&&"key-block"===e)return t;if(null!=n&&"micro-block"===e)return n;const a=await r.getNetworkId();return"ae_dev"===a?0:!["ae_mainnet","ae_uat"].includes(a)&&await r._isHyperchain()?3e3:"key-block"===e?18e4:3e3}(e,t)/3)}const ga=new WeakMap;async function Na({cached:e=!1,...t}){const n=ir(t.onNode);if(e){const e=ga.get(n);if(null!=e&&e.time>Date.now()-await ya("key-block",t))return e.height}const{height:r}=await n.getCurrentKeyBlockHeight();return ga.set(n,{height:r,time:Date.now()}),r}async function wa(e,{blocks:t=5,interval:n,...r}){let a;null!=n||(n=await ya("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await Na({...r,cached:!0})+t),await Qn(n)}while(-1===a||await Na({...r,cached:!0})<a);throw new Q(t,e)}async function va(e,{interval:t,...n}){let r;null!=t||(t=Math.min(await ya("key-block",n),5e3));do{null!=r&&await Qn(t),r=await Na(n)}while(r<e);return r}async function ba(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:a}=await n.getTransactionByHash(e),i=await va(a+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new Ke(e);case a:return i;default:return ba(e,{onNode:n,confirm:t,...r})}}async function xa(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function _a(e,{format:t=Xe.AETTOS,...n}){const r=e.startsWith("ok_")?Ar(Cr(e),ur.AccountAddress):e,{balance:a}=await xa(r,n).catch((e=>{if(!nr(e))throw e;return{balance:0n}}));return tt(a,{targetDenomination:t})}async function Pa({onNode:e}){return e.getCurrentGeneration()}async function Ca(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Aa(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function Sa(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function Ta(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const za=new Map;async function Ea(e,t){const n=za.get(e);if(za.delete(e),null==n)throw new ae("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await t.getKeyBlockByHeight(n[0].top)).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:Dr.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:a,txEvents:i}=r;a.forEach((({result:e,reason:t,...r},a)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[a];"ok"===e?s({...r,txEvents:i}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ia(e,t,{top:n,txEvents:r,combine:a,onNode:i}){var s;const o=!0===a?[n,r].join():"immediate",c=null!==(s=za.get(o))&&void 0!==s?s:[];return za.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===a?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{Ea(o,i)}))):Ea(o,i)}))}async function Ma(e,{onNode:t}){return t.getContractCode(e)}async function qa(e,{onNode:t}){return t.getContract(e)}async function Ra(e,{onNode:t}){return t.getNameEntryByName(e)}async function Oa(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:a}){if(ua(e)){if(n||r){const n=(await a.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return ia(e)}try{return Cr(e),e}catch(t){throw new ue(`Invalid name or address: ${e}`)}}var ka=n(8287).Buffer;const Ba={[Yr.Ceres]:{"contract-create":{vmVersion:[Qr.Fate3],abiVersion:[Zr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Zr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Zr.NoAbi,Zr.Fate]}},[Yr.Arcus]:{"contract-create":{vmVersion:[Qr.Fate3],abiVersion:[Zr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Zr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Zr.NoAbi,Zr.Fate]}}};function Ga(e,t){var n;const r=Ba[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Qr.Fate2,abiVersion:r.abiVersion[0]}}var $a={serialize(e,t,{consensusProtocolVersion:n=Yr.Ceres}){return null!=e||(e=Ga(n,"contract-create")),ka.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Yr).length&&null!=n.onNode?Ga((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}};const Ua=Symbol("serializeAsIs");var Va=n(8287).Buffer,Da={_getProtocolDetails(e,t){return Ga(e,Xr.ContractCallTx===t||Xr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Yr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return Va.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Yr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},La=n(8287).Buffer;const ja=[ur.AccountAddress,ur.Name,ur.Commitment,ur.OracleAddress,ur.ContractAddress,ur.Channel];function Ha(...e){return{serialize(t){const n=t.slice(0,2);if(!tr(n,ja))throw new We(n);if(!tr(n,e))throw new j("Address encoding",e.join(", "),n);const r=ja.indexOf(n)+1;return La.from([...Vr(r),...Cr(t)])},deserialize(t){const n=La.from(t).readUIntBE(0,1),r=ja[n-1];if(null==r)throw new Fe(n);if(!tr(r,e))throw new j("Address encoding",e.join(", "),r);return Ar(t.subarray(1),r)}}}function Fa(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Ja={serialize(e){if(Number(e)<0)throw new j("value","greater or equal to 0",e);return Vr(e,!0)},deserialize(e){return oa(e)}},Wa={...Ja,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Xe.AETTOS,...r}){return Ja.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}},Ka=n(8287).Buffer;function Ya(e,t){return{serialize(e){if(null==e){if(!0===t)return Ka.from([]);throw new j("Encoded data","provided",e)}return Cr(e)},deserialize(t){return Ar(t,e)}}}var Qa=n(8287).Buffer;function Za(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Qa.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(Ar(t,ur.Bytearray),e)}}}var Xa=n(8287).Buffer;function ei(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new j("value","to be a number",e);if(e>255)throw new j("value","to be less than 256",e);if(!tr(e,t))throw new j("value","to be a value of Enum",e);return Xa.from([e])},deserialize(e){if(1!==e.length)throw new j("buffer","to have single element",e.length);const n=e[0];if(!tr(n,t))throw new j("value","to be a value of Enum",n);return n}}}const ti=15e3,ni={part:32e3,whole:Math.floor(175200)};function ri(e){return Object.values(e.contractTxBaseGas).forEach(Object.freeze),Object.values(e.stateGasPerBlock).forEach(Object.freeze),Object.freeze(e.txBaseGas),Object.freeze(e.contractTxBaseGas),Object.freeze(e.stateGasPerBlock),Object.freeze(e)}const ai=ri({minGasPrice:BigInt(jr),minMinerGasPrice:BigInt(jr),gasPerByte:20,blockGasLimit:6e6,maxAuthFunGas:Lr,txBaseGas:{...Object.fromEntries(Object.values(Xr).filter((e=>"number"==typeof e)).filter((e=>![Xr.SignedTx,Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(e))).map((e=>[e,ti]))),[Xr.ChannelForceProgressTx]:30*ti,[Xr.ChannelOffChainTx]:0,[Xr.PayingForTx]:ti/5},contractTxBaseGas:{[Xr.ContractCreateTx]:{[Zr.Sophia]:5*ti,[Zr.Fate]:5*ti},[Xr.ContractCallTx]:{[Zr.Sophia]:12*ti,[Zr.Fate]:12*ti},[Xr.GaAttachTx]:{[Zr.Sophia]:5*ti,[Zr.Fate]:5*ti},[Xr.GaMetaTx]:{[Zr.Sophia]:5*ti,[Zr.Fate]:5*ti}},stateGasPerBlock:Object.fromEntries([Xr.OracleRegisterTx,Xr.OracleExtendTx,Xr.OracleQueryTx,Xr.OracleRespondTx].map((e=>[e,{...ni}])))}),ii={GAAttachTx:Xr.GaAttachTx,GAMetaTx:Xr.GaMetaTx};function si(e){const t=t=>Object.prototype.hasOwnProperty.call(t,e);if(t(ii)&&er(e,ii))return ii[e];if(!t(Xr)||!er(e,Xr))return;const n=Xr[e];return"number"==typeof n?n:void 0}const oi=1e3;function ci(e,t,n){return new V(`Node reports ${e} as ${String(t)}, which is outside of the range the SDK considers plausible (0..${n}). Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`)}function ui(e,t){return new ae(`Node reports ${e} as ${String(t)}, which doesn't match the schema it declares for it`)}function li(e,t,n){const r=e=>0===n?1:e/n,a=n*oi;if("bigint"==typeof t){if(t<0n||t>BigInt(a))throw ci(e,t,a);return r(Number(t))}if(!Number.isSafeInteger(t))throw ui(e,t);if(t<0||t>a)throw ci(e,t,a);return r(t)}function mi(e){return e.reduce(((e,t)=>t>e?t:e),-1/0)}const pi=new WeakMap,di=new WeakSet;function hi(e,t){if(!Number.isSafeInteger(t)||t<0)throw new j(`protocolParameters.${e}`,"a non-negative safe integer",t)}function fi(e){if(!pi.has(e)&&!di.has(e)){if("bigint"!=typeof e.minGasPrice||e.minGasPrice<1n)throw new j("protocolParameters.minGasPrice","a positive bigint (a transaction can’t be priced against 0)",e.minGasPrice);if("bigint"!=typeof e.minMinerGasPrice||e.minMinerGasPrice<0n)throw new j("protocolParameters.minMinerGasPrice","a non-negative bigint",e.minMinerGasPrice);hi("gasPerByte",e.gasPerByte),hi("blockGasLimit",e.blockGasLimit),hi("maxAuthFunGas",e.maxAuthFunGas),Object.entries(e.txBaseGas).forEach((([e,t])=>{var n;return hi(`txBaseGas.${null!==(n=Xr[+e])&&void 0!==n?n:e}`,t)})),Object.entries(e.contractTxBaseGas).forEach((([e,t])=>Object.entries(null!=t?t:{}).forEach((([t,n])=>{var r;return hi(`contractTxBaseGas.${null!==(r=Xr[+e])&&void 0!==r?r:e}.${t}`,n)})))),Object.entries(e.stateGasPerBlock).forEach((([e,t])=>{var n,r;const a=`stateGasPerBlock.${null!==(n=Xr[+e])&&void 0!==n?n:e}`;if(hi(`${a}.part`,t?.part),!Number.isSafeInteger(t?.whole)||(null!==(r=t?.whole)&&void 0!==r?r:0)<1)throw new j(`${a}.whole`,"a positive safe integer",t?.whole)})),di.add(e)}}function yi(e){var t;const n=ai,r=[n.txBaseGas[e],...Object.values(null!==(t=n.contractTxBaseGas[e])&&void 0!==t?t:{})].filter((e=>null!=e)),a=0!==r.length?mi(r):ti;return 0!==a?a:ti}function gi(e,t){if(!(t<=oi))throw new V(`Node reports parameters raising ${e} ${Math.round(t)} times above the one of the SDK release, more than the ${oi} times the SDK considers plausible. Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`)}function Ni(e,t){return Object.fromEntries(e.map((([e,n])=>[si(e),t(n)])).filter((e=>null!=e[0])))}const wi=new WeakMap,vi=6e5,bi=3e4;async function xi(e){const t=ir(e),n=wi.get(t);if(null!=n&&n.expiresAt>Date.now())return n.parameters;let r=vi;const a=(async()=>{const e=e=>(r=bi,console.warn(`Can't get protocol parameters from node, using the ones of the SDK release instead. A transaction may be rejected if this node runs other parameters. Reason: ${e instanceof Error?e.message:String(e)}`),ai);if("function"!=typeof t.getProtocolParameters||"function"!=typeof t.getNodeSettings)return ai;const n={requestOptions:{customHeaders:{"__no-retry":"true"}}};let a,i;try{[a,i]=await Promise.all([t.getProtocolParameters(n),t.getNodeSettings(n)])}catch(t){const{statusCode:n}=t;return 404===n||403===n?ai:e(t)}try{return function(e,t){const{currentProtocolVersion:n,protocols:r}=e,a=r.find((({version:e})=>e===n));if(null==a)throw new ae(`Node doesn't provide parameters of the current protocol ${n}`);const i=Object.fromEntries(Object.entries(ai.contractTxBaseGas).map((([e,t])=>[e,{...t}])));a.contractTxBaseGas.forEach((({txType:e,abiVersion:t,txBaseGas:n})=>{var r;const a=si(e);null!=a&&Number.isInteger(t)&&((null!==(r=i[a])&&void 0!==r?r:i[a]={})[t]=n)}));const s=Ni(Object.entries(a.txBaseGas),(e=>e)),o=ri({minGasPrice:a.minimumGasPrice,minMinerGasPrice:t.minMinerGasPrice,gasPerByte:a.gasPerByte,blockGasLimit:t.blockGasLimit,maxAuthFunGas:t.maxAuthFunGas,txBaseGas:{...ai.txBaseGas,...s},contractTxBaseGas:i,stateGasPerBlock:{...ai.stateGasPerBlock,...Ni(Object.entries(a.stateGasPerBlock),(e=>({part:e.part,whole:e.whole})))}});return pi.set(o,function(e){const t=ai,n=Number(t.minGasPrice);if(e.minGasPrice<1n)throw new V(`Node reports the minimum gas price as ${e.minGasPrice}, a transaction can't be priced against it. Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`);const r=mi([li("the minimum gas price",e.minGasPrice,n),li("the miner minimum gas price",e.minMinerGasPrice,n)]),a=[li("the gas per byte",e.gasPerByte,t.gasPerByte)];Object.entries(e.txBaseGas).forEach((([e,t])=>{a.push(li(`the base gas of ${Xr[+e]}`,t,yi(+e)))})),Object.entries(e.contractTxBaseGas).forEach((([e,t])=>{const n=yi(+e);Object.entries(t).forEach((([t,r])=>{const i=`the base gas of ${Xr[+e]} at abi version ${t}`;a.push(li(i,r,n))}))}));const i=ni.part/ni.whole;Object.entries(e.stateGasPerBlock).forEach((([e,t])=>{const n=`the state gas per block of ${Xr[+e]}`;a.push(function(e,{part:t,whole:n},r){if(!Number.isSafeInteger(t)||!Number.isSafeInteger(n))throw ui(e,`${String(t)}/${String(n)}`);const a=r*oi,i=t>=0&&n>0?t/n:NaN;if(!(i>=0)||i>a)throw ci(e,`${t}/${n}`,a);return i/r}(n,t,i))}));const s=mi(a);gi("the minimum transaction fee",r*s);const o=li("the block gas limit",e.blockGasLimit,t.blockGasLimit),c=li("the max auth fun gas",e.maxAuthFunGas,t.maxAuthFunGas);return gi("the cost of a contract transaction",r*mi([o,c])),{fee:mi([1,s]),blockGasLimit:mi([1,o]),maxAuthFunGas:mi([1,c])}}(o)),o}(a,i)}catch(t){if(t instanceof V)throw t;return e(t)}})(),i={expiresAt:Date.now()+vi,parameters:a};return a.then((()=>{i.expiresAt=Date.now()+r}),(()=>{i.expiresAt=Date.now()+bi})),wi.set(t,i),a}const _i=new WeakMap,Pi=100000n*ai.minGasPrice;async function Ci(e,t){const n=ir(e),r=function(e){const t=_i.get(e);if(null!=t&&t.time>Date.now()-2e4)return t;const n=(async()=>{const{minGasPrice:t,utilization:n}=(await e.getRecentGasPrices())[0],r=n<70?0n:BigInt(new I(t.toString()).times(1.01).integerValue().toFixed());return r<=Pi?r:(console.warn(`Estimated gas price ${r} exceeds the maximum safe value for unknown reason. It will be limited to ${Pi}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),Pi)})(),r={gasPrice:n,time:Date.now()};return _i.set(e,r),n.then((()=>{r.time=Date.now()}),(()=>{_i.get(e)===r&&_i.delete(e)})),r}(n),[a,i]=await Promise.all([null!=t?t:xi(n),r.gasPrice]);let s=i;const o=a.minMinerGasPrice>a.minGasPrice?a.minMinerGasPrice:0n;s<o&&(s=o);const c=BigInt(Math.ceil(1e3*function(e){var t;return null!==(t=pi.get(e)?.fee)&&void 0!==t?t:1}(a))),u=1000n*Pi/c;return s>u&&(c>1000n&&!0!==r.ceilingWarned&&(r.ceilingWarned=!0,console.warn(`Estimated gas price ${s} exceeds the maximum safe value ${u} for the protocol parameters node reports. It will be limited to it, so the transaction may be not mined while the demand stays above it. To overcome this restriction provide \`gasPrice\`/\`fee\`, or \`protocolParameters\` in options.`)),s=u),s}var Ai={...Wa,async prepare(e,t,{onNode:n,denomination:r,protocolParameters:a}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `gasPrice` instead)",n);const i=await Ci(n,a);return 0n!==i?tt(i,{targetDenomination:r}):void 0},serializeAettos(e,t,{protocolParameters:n=ai}){const r=n.minGasPrice.toString();if(null==e)return r;if(!0===t[Ua])return e;if(new I(e).lt(r))throw new H(`Gas price ${e} must be bigger than ${r}`);return e}};function Si(e){const t={[Xr.OracleRegisterTx]:"oracleTtlValue",[Xr.OracleExtendTx]:"oracleTtlValue",[Xr.OracleQueryTx]:"queryTtlValue",[Xr.OracleRespondTx]:"responseTtlValue"},{tag:n}=e;return er(n,t)?e[t[n]]:1}function Ti(e,t,n,r){const{length:a}=Cr(e),i=t(e);let s=0;return i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s=Cr(n({...i.tx.encodedTx,[Ua]:!0})).length),function(e,t){const{tag:n}=e,r=t.contractTxBaseGas[n];if(null!=r){var a;const t=null!==(a=e.ctVersion?.abiVersion)&&void 0!==a?a:e.abiVersion,n=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;if(null!=n)return n;const i=Object.values(r);if(0!==i.length)return mi(i)}const i=t.txBaseGas[n];if(null==i)throw new ae(`Base gas of ${Xr[n]} is not known`);return i}(i,r)+function(e,t,{relativeTtl:n,innerTxSize:r},a){const{gasPerByte:i}=a,s=(e===Xr.GaMetaTx||e===Xr.PayingForTx?t-r:t)*i,o=a.stateGasPerBlock[e];return null==o?s:s+Math.ceil(o.part*n/o.whole)}(i.tag,a,{relativeTtl:Si(i),innerTxSize:s},r)}const zi="_gas-price:";var Ei={...Wa,async prepare(e,t,{onNode:n,protocolParameters:r}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `fee` instead)",n);const a=await Ci(n,r);return 0n!==a?zi+a:void 0},serializeAettos(e,t,{_canIncreaseFee:n,protocolParameters:r=ai}){const{rebuildTx:a,unpackTx:i,buildTx:s,_computingMinFee:o}=t;if(null!=o)return o.toFixed();if(!0===t[Ua]&&null!=e)return new I(e).toFixed();const c=function(e,t,n,r){const a=new I(r.minGasPrice.toString());let i,s=new I(0);do{i=s,s=a.times(Ti(e(s),t,n,r))}while(!s.eq(i));return s}((e=>a({_computingMinFee:e})),i,s,r),u=!0===e?.startsWith(zi)?c.dividedBy(r.minGasPrice.toString()).times(e.replace(zi,"")):new I(null!=e?e:c);if(c.gt(u)){if(!0===n)return c.toFixed();throw new H(`Fee ${u.toString()} must be bigger than ${c}`)}return u.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(zi)?Ja.serialize(this.serializeAettos(e,t,n)):Wa.serialize.call(this,e,t,n)}},Ii={serialize(e){return Ja.serialize(e)},deserialize(e){return+Ja.deserialize(e)}},Mi={...Ii,serialize(e,t,{gasMax:n,protocolParameters:r=ai}){const{tag:a,rebuildTx:i,unpackTx:s,buildTx:o,_computingGasLimit:c}=t;if(null!=c)return Ii.serialize(c);if(!0===t[Ua]&&null!=e)return Ii.serialize(e);const u=a===Xr.GaMetaTx?r.maxAuthFunGas:function(e,t,n,r,a){return e-+Ti(t(e),n,r,a)}(null!=n?n:r.blockGasLimit,(e=>i({_computingGasLimit:e,_canIncreaseFee:!0})),s,o,r),l=null!=n&&a!==Xr.GaMetaTx?1:function(e,t){const n=pi.get(e);return null==n?1:t===Xr.GaMetaTx?n.maxAuthFunGas:n.blockGasLimit}(r,a),m=null!=e?e:l>1?Math.floor(u/l):u;if(m>u)throw new H(`Gas limit ${m} must be less or equal to ${u}`);return Ii.serialize(m)}},qi=n(8287).Buffer,Ri={serialize(e){return qi.from(e)},deserialize(e){return e.toString()}},Oi={serialize(e){return Ri.serialize(e)},deserialize(e){return Ri.deserialize(e)}},ki={...Wa,serializeAettos(e,t){if(!0===t[Ua]&&null!=e)return new I(e).toFixed();const n=pa(t.name),r=new I(null!=e?e:n);if(n.gt(r))throw new ce(r,n);return r.toFixed()},serialize(e,t,n){return Wa.serialize.call(this,e,t,n)}};const Bi=Ha(ur.Name);var Gi={...Bi,serialize(e){return Bi.serialize(ua(e)?ia(e):e)}};function $i(e){return{...Ii,serialize(e,{tag:t}){if(Xr.GaAttachTx===t&&1!==e)throw new j("nonce","equal 1 if GaAttachTx",e);return Ii.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:a,strategy:i}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==a)throw new j("onNode",o,a);if(null==s)throw new j("senderId",o,s);return(await a.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:i}).catch((e=>{if(!nr(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var Ui=n(8287).Buffer;const Vi=Ui.from([1]),Di=Ui.from([2]),Li=Ha(...ja);var ji=e=>({serialize(t,n){if(!0!==n[Ua]&&t.length>32)throw new H(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(Er(n,...ja)&&(r=[...e?[Vi]:[],Li.serialize(n)]),Er(n,ur.Bytearray)){const e=Cr(n);if(e.length>1024)throw new j("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[Di,e]}if(null==r)throw new Ve(`Unknown AENS pointer value: ${n}`);return[Vr(t),Ui.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:Li.deserialize(n)};const r=n.subarray(0,1),a=n.subarray(1);let i;if(r.equals(Vi)&&(i=Li.deserialize(a)),r.equals(Di)&&(i=Ar(a,ur.Bytearray)),null==i)throw new Ve(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:i}}))}}),Hi={...Wa,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:a}=n,i="provided (or provide `queryFee` instead)";if(null==r)throw new j("onNode",i,r);if(null==a)throw new j("oracleId",i,a);return(await r.getOracleByPubkey(a)).queryFee.toString()}},Fi=n(8287).Buffer,Ji={serialize(e){return Fi.from(e)},deserialize(e){return e}};function Wi(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new j("ShortUIntConst",e,n);return Ii.serialize(e)},deserialize(t){const n=Ii.deserialize(t);if(n!==e)throw new j("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Ki={serialize(e){return Vr(e)},deserialize(e){return e.toString()}},Yi=n(8287).Buffer;function Qi(e){return{nestedTransaction:!0,serialize(t,n){const{buildTx:r,protocolParameters:a}=n;return ArrayBuffer.isView(t)?Yi.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(r({...t,...null!=e&&{tag:e},...null!=a&&{protocolParameters:a},...!0===n[Ua]&&{[Ua]:!0}}))},deserialize(t,{unpackTx:n}){return n(Ar(t,ur.Transaction),e)}}}var Zi={...Ii,serialize(e){return Ii.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,...a}){if(!0!==r&&0!==e&&null!=e){if(null==n)throw new j("onNode","provided",n);e+=await Na({...a,onNode:n,cached:!0})}return e}};function Xi(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function es(e,t){return{...t,serialize(n,r,a){return t.serialize(e(n,r),r,a)}}}let ts=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),ns=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.Channel=58]="Channel",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),rs=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const as=Qi(),is=Qi(Xr.SignedTx),ss=Za(ns.TreesPoi),os=Xi(3600,Ii),cs=es(((e,t)=>{const n=18e4;if(null!=e||(e=n),!0===t[Ua])return e;if(e>=1&&e<=n)return e;throw new j("nameTtl","a number between 1 and 180000 blocks",e)}),Ii),us=[{tag:Wi(Xr.SignedTx),version:Wi(1,!0),signatures:Fa(Ji),encodedTx:as},{tag:Wi(Xr.SpendTx),version:Wi(1,!0),senderId:Ha(ur.AccountAddress),recipientId:Ha(ur.AccountAddress,ur.ContractAddress,ur.Name),amount:Wa,fee:Ei,ttl:Zi,nonce:$i("senderId"),payload:Ya(ur.Bytearray,!0)},{tag:Wi(Xr.NamePreclaimTx),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),commitmentId:Ha(ur.Commitment),fee:Ei,ttl:Zi},{tag:Wi(Xr.NameClaimTx),version:Wi(2,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),name:Oi,nameSalt:Xi(0,Ja),nameFee:ki,fee:Ei,ttl:Zi},{tag:Wi(Xr.NameUpdateTx),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),nameId:Gi,nameTtl:cs,pointers:ji(!1),clientTtl:os,fee:Ei,ttl:Zi},{tag:Wi(Xr.NameUpdateTx),version:Wi(2),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),nameId:Gi,nameTtl:cs,pointers:ji(!0),clientTtl:os,fee:Ei,ttl:Zi},{tag:Wi(Xr.NameTransferTx),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),nameId:Gi,recipientId:Ha(ur.AccountAddress,ur.Name),fee:Ei,ttl:Zi},{tag:Wi(Xr.NameRevokeTx),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),nameId:Gi,fee:Ei,ttl:Zi},{tag:Wi(Xr.ContractCreateTx),version:Wi(1,!0),ownerId:Ha(ur.AccountAddress),nonce:$i("ownerId"),code:Ya(ur.ContractBytearray),ctVersion:$a,fee:Ei,ttl:Zi,deposit:es(((e=0)=>{if(0==+e)return e;throw new j("deposit","equal 0 (because is not refundable)",e)}),Wa),amount:Wa,gasLimit:Mi,gasPrice:Ai,callData:Ya(ur.ContractBytearray)},{tag:Wi(Xr.ContractCallTx),version:Wi(1,!0),callerId:Ha(ur.AccountAddress),nonce:$i("callerId"),contractId:Ha(ur.ContractAddress,ur.Name),abiVersion:Da,fee:Ei,ttl:Zi,amount:Wa,gasLimit:Mi,gasPrice:Ai,callData:Ya(ur.ContractBytearray)},{tag:Wi(Xr.OracleRegisterTx),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nonce:$i("accountId"),queryFormat:Ki,responseFormat:Ki,queryFee:Wa,oracleTtlType:Xi(rs.delta,ei(rs)),oracleTtlValue:Xi(500,Ii),fee:Ei,ttl:Zi,abiVersion:Da},{tag:Wi(Xr.OracleExtendTx),version:Wi(1,!0),oracleId:Ha(ur.OracleAddress,ur.Name),nonce:$i("oracleId"),oracleTtlType:Xi(rs.delta,ei(rs)),oracleTtlValue:Xi(500,Ii),fee:Ei,ttl:Zi},{tag:Wi(Xr.OracleQueryTx),version:Wi(1,!0),senderId:Ha(ur.AccountAddress),nonce:$i("senderId"),oracleId:Ha(ur.OracleAddress,ur.Name),query:Ki,queryFee:Hi,queryTtlType:Xi(rs.delta,ei(rs)),queryTtlValue:Xi(10,Ii),responseTtlType:Xi(rs.delta,ei(rs)),responseTtlValue:Xi(10,Ii),fee:Ei,ttl:Zi},{tag:Wi(Xr.OracleRespondTx),version:Wi(1,!0),oracleId:Ha(ur.OracleAddress),nonce:$i("oracleId"),queryId:Ya(ur.OracleQueryId),response:Ki,responseTtlType:Xi(rs.delta,ei(rs)),responseTtlValue:Xi(10,Ii),fee:Ei,ttl:Zi},{tag:Wi(Xr.ChannelCreateTx),version:Wi(2,!0),initiator:Ha(ur.AccountAddress),initiatorAmount:Ja,responder:Ha(ur.AccountAddress),responderAmount:Ja,channelReserve:Ja,lockPeriod:Ja,ttl:Zi,fee:Ei,initiatorDelegateIds:Fa(Ha(...ja)),responderDelegateIds:Fa(Ha(...ja)),stateHash:Ya(ur.State),nonce:$i("initiator")},{tag:Wi(Xr.ChannelCloseMutualTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),initiatorAmountFinal:Ja,responderAmountFinal:Ja,ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.ChannelCloseSoloTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),payload:Ya(ur.Transaction),poi:ss,ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.ChannelSlashTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),payload:Ya(ur.Transaction),poi:ss,ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.ChannelDepositTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),amount:Ja,ttl:Zi,fee:Ei,stateHash:Ya(ur.State),round:Ii,nonce:$i("fromId")},{tag:Wi(Xr.ChannelWithdrawTx),version:Wi(1,!0),channelId:Ha(ur.Channel),toId:Ha(ur.AccountAddress),amount:Ja,ttl:Zi,fee:Ei,stateHash:Ya(ur.State),round:Ii,nonce:$i("fromId")},{tag:Wi(Xr.ChannelSettleTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),initiatorAmountFinal:Ja,responderAmountFinal:Ja,ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.ChannelForceProgressTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),payload:Ya(ur.Transaction),round:Ii,update:Ya(ur.ContractBytearray),stateHash:Ya(ur.State),offChainTrees:Ya(ur.StateTrees),ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.ChannelOffChainTx),version:Wi(2,!0),channelId:Ha(ur.Channel),round:Ii,stateHash:Ya(ur.State)},{tag:Wi(Xr.ChannelSnapshotSoloTx),version:Wi(1,!0),channelId:Ha(ur.Channel),fromId:Ha(ur.AccountAddress),payload:Ya(ur.Transaction),ttl:Zi,fee:Ei,nonce:$i("fromId")},{tag:Wi(Xr.GaAttachTx),version:Wi(1,!0),ownerId:Ha(ur.AccountAddress),nonce:$i("ownerId"),code:Ya(ur.ContractBytearray),authFun:Ji,ctVersion:$a,fee:Ei,ttl:Zi,gasLimit:Mi,gasPrice:Ai,callData:Ya(ur.ContractBytearray)},{tag:Wi(Xr.GaMetaTx),version:Wi(2,!0),gaId:Ha(ur.AccountAddress),authData:Ya(ur.ContractBytearray),abiVersion:Da,fee:Ei,gasLimit:Mi,gasPrice:Ai,tx:is},{tag:Wi(Xr.PayingForTx),version:Wi(1,!0),payerId:Ha(ur.AccountAddress),nonce:$i("payerId"),fee:Ei,tx:is}];var ls=n(858),ms=n(8287).Buffer;function ps(e,t,n,r){const a=e.filter((e=>e.tag.constValue===n));if(0===a.length)throw new Je(`${t[n]} (${n})`,0);if(null==r){const e=a.find((e=>e.version.constValueOptional));if(null==e)throw new ae(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const i=a.find((e=>e.version.constValue===r));if(null==i)throw new Je(`${t[n]} (${n})`,r);return Object.entries(i)}function ds(e,t,n,r,a){const i=ps(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Ar((0,ls.encode)(i),a)}function hs(e,t,n,r,a){const i=(0,ls.decode)(Cr(n));if(!ArrayBuffer.isView(i[0])||!ArrayBuffer.isView(i[1]))throw new Ve("Can't parse tag or version in provided RLP");const s=ms.from(i[0]).readUintBE(0,i[0].length),o=ps(e,t,s,ms.from(i[1]).readUintBE(0,i[1].length));if(null!=r&&r!==s)throw new Ve(`Expected ${t[r]} tag, got ${t[s]} instead`);if(i.length!==o.length)throw new j("RLP length",o.length,i.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(i[n],a)])))}var fs=n(8287).Buffer,ys={serialize(e){return fs.from([e?1:0])},deserialize(e){return 1===e[0]}};function gs(e,t){return{serialize(e,{packEntry:n}){return Cr(n({tag:ns.Mtree,values:Object.entries(e).map((([e,r])=>({tag:ns.MtreeValue,key:Cr(e),value:Cr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:a}=r(Ar(n,ur.Bytearray),ns.Mtree);return Object.fromEntries(a.filter((({key:t})=>e!==ur.ContractAddress||32===t.length)).map((({key:n,value:a})=>[Ar(n,e),r(Ar(a,ur.Bytearray),t)])))},recursiveType:!0}}var Ns,ws=n(8287).Buffer;function vs(e,t,n){bs(e,t),t.set(e,n)}function bs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xs(e,t,n){return e.set(Ps(e,t),n),n}function _s(e,t){return e.get(Ps(e,t))}function Ps(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Cs=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Cs||{}),As=new WeakMap,Ss=new WeakMap,Ts=new WeakMap,zs=new WeakMap,Es=new WeakMap,Is=new WeakMap,Ms=new WeakSet;class qs{get isComplete(){return _s(Ss,this)}constructor(e,t,n,r){var a;if(bs(this,a=Ms),a.add(this),vs(this,As,void 0),vs(this,Ss,!0),vs(this,Ts,void 0),vs(this,zs,void 0),vs(this,Es,void 0),vs(this,Is,void 0),xs(zs,this,t),xs(Es,this,n),xs(Is,this,r),xs(As,this,e[0].toString("hex")),xs(Ts,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=_s(Ts,this)[_s(As,this)])Object.entries(_s(Ts,this)).forEach((([e,t])=>{if(Rs.call(qs,t)!==e)throw new Oe;const{type:n}=Os.call(qs,t);switch(n){case Cs.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==_s(Ts,this)[e.toString("hex")]&&xs(Ss,this,!1)}));break;case Cs.Extension:if(null==_s(Ts,this)[t[1].toString("hex")])throw new ke("Can't find a node by hash in extension node");break;case Cs.Leaf:break;default:throw new ae(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(_s(Ts,this)).length)throw new ke("Can't find a node by root hash");xs(Ss,this,!1)}}isEqual(e){return _s(As,this)===_s(As,e)}serialize(){return[ws.from(_s(As,this),"hex"),Object.entries(_s(Ts,this)).map((([e,t])=>[ws.from(e,"hex"),t]))]}get(e){const t=Ps(Ms,this,ks).call(this,Cr(e).toString("hex"));return null==t?t:_s(Is,this).call(this,Ar(t,ur.Bytearray),_s(Es,this))}toObject(){return Object.fromEntries(Ps(Ms,this,Bs).call(this).filter((([e])=>_s(zs,this)!==ur.ContractAddress||66!==e.length)).map((([e,t])=>[Ar(ws.from(e,"hex"),_s(zs,this)),_s(Is,this).call(this,Ar(t,ur.Bytearray),_s(Es,this))])))}}function Rs(e){return ws.from(qr((0,ls.encode)(e))).toString("hex")}function Os(e){switch(e.length){case 17:return{type:Cs.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Ge(t);const n=t<=1?Cs.Extension:Cs.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Cs.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Be(e.length)}}function ks(e){let t=_s(As,this),n=e;for(;;){const e=_s(Ts,this)[t];if(null==e){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:r,value:a,path:i}=Os.call(Ns,e);switch(r){case Cs.Branch:if(0===n.length)return a;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Cs.Extension:if(n.substring(0,i?.length)!==i)return;t=e[1].toString("hex"),n=n.substring(i.length);break;case Cs.Leaf:if(i!==n)return;return a;default:throw new ae(`Unknown MPTree node type: ${r}`)}}}function Bs(){const e=[],t=(n,r)=>{const a=_s(Ts,this)[n];if(null==a){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:i,value:s,path:o}=Os.call(Ns,a);switch(i){case Cs.Branch:a.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case Cs.Extension:t(a[1].toString("hex"),r+o);break;case Cs.Leaf:if(null==s)throw new ie;e.push([r+o,s]);break;default:throw new ae(`Unknown MPTree node type: ${i}`)}};return t(_s(As,this),""),e}function Gs(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new qs(n,e,t,r)}}}function $s(e){return{serialize(t,{packEntry:n}){return Cr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(Ar(t,ur.Bytearray),e).payload},recursiveType:!0}}Ns=qs;const Us=Fa(Za(ns.MtreeValue)),Vs=gs(ur.ContractAddress,ns.Contract),Ds=gs(ur.AccountAddress,ns.Account),Ls=gs(ur.Bytearray,ns.ContractCall),js=gs(ur.Channel,ns.Channel),Hs=gs(ur.Name,ns.Name),Fs=gs(ur.OracleAddress,ns.Oracle),Js=[{tag:Wi(ns.Account),version:Wi(1),nonce:Ii,balance:Ja},{tag:Wi(ns.Account),version:Wi(2,!0),flags:Ja,nonce:Ii,balance:Ja,gaContract:Ha(ur.ContractAddress,ur.Name),gaAuthFun:Ya(ur.ContractBytearray)},{tag:Wi(ns.Name),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),nameTtl:Ii,status:Ji,clientTtl:Ii,pointers:ji},{tag:Wi(ns.Contract),version:Wi(1,!0),owner:Ha(ur.AccountAddress),ctVersion:$a,code:Ya(ur.ContractBytearray),log:Ya(ur.ContractBytearray),active:ys,referers:Fa(Ha(ur.AccountAddress)),deposit:Wa},{tag:Wi(ns.ContractCall),version:Wi(2,!0),callerId:Ha(ur.AccountAddress),callerNonce:Ii,height:Ii,contractId:Ha(ur.ContractAddress),gasPrice:Ja,gasUsed:Ii,returnValue:Ya(ur.ContractBytearray),returnType:ei(ts),log:Fa(Ji)},{tag:Wi(ns.Oracle),version:Wi(1,!0),accountId:Ha(ur.AccountAddress),queryFormat:Ki,responseFormat:Ki,queryFee:Wa,oracleTtlValue:Ii,abiVersion:Da},{tag:Wi(ns.Channel),version:Wi(3,!0),initiator:Ha(ur.AccountAddress),responder:Ha(ur.AccountAddress),channelAmount:Ja,initiatorAmount:Ja,responderAmount:Ja,channelReserve:Ja,initiatorDelegateIds:Fa(Ha(...ja)),responderDelegateIds:Fa(Ha(...ja)),stateHash:Ya(ur.State),round:Ii,soloRound:Ja,lockPeriod:Ja,lockedUntil:Ja,initiatorAuth:Ya(ur.ContractBytearray),responderAuth:Ya(ur.ContractBytearray)},{tag:Wi(ns.ChannelOffChainUpdateTransfer),version:Wi(1,!0),from:Ha(ur.AccountAddress),to:Ha(ur.AccountAddress),amount:Ja},{tag:Wi(ns.ChannelOffChainUpdateDeposit),version:Wi(1,!0),from:Ha(ur.AccountAddress),amount:Ja},{tag:Wi(ns.ChannelOffChainUpdateWithdraw),version:Wi(1,!0),from:Ha(ur.AccountAddress),amount:Ja},{tag:Wi(ns.ChannelOffChainUpdateCreateContract),version:Wi(1,!0),owner:Ha(ur.AccountAddress),ctVersion:$a,code:Ya(ur.ContractBytearray),deposit:Ja,callData:Ya(ur.ContractBytearray)},{tag:Wi(ns.ChannelOffChainUpdateCallContract),version:Wi(1,!0),caller:Ha(ur.AccountAddress),contract:Ha(ur.ContractAddress),abiVersion:Da,amount:Ja,callData:Ya(ur.ContractBytearray),callStack:Ji,gasPrice:Ai,gasLimit:Mi},{tag:Wi(ns.TreesPoi),version:Wi(1,!0),accounts:Fa(Gs(ur.AccountAddress,ns.Account)),calls:Fa(Gs(ur.Bytearray,ns.ContractCall)),channels:Fa(Gs(ur.Channel,ns.Channel)),contracts:Fa(Gs(ur.ContractAddress,ns.Contract)),ns:Fa(Gs(ur.Name,ns.Name)),oracles:Fa(Gs(ur.OracleAddress,ns.Oracle))},{tag:Wi(ns.StateTrees),version:Wi(0,!0),contracts:$s(ns.ContractsMtree),calls:$s(ns.CallsMtree),channels:$s(ns.ChannelsMtree),ns:$s(ns.NameserviceMtree),oracles:$s(ns.OraclesMtree),accounts:$s(ns.AccountsMtree)},{tag:Wi(ns.Mtree),version:Wi(1,!0),values:Us},{tag:Wi(ns.MtreeValue),version:Wi(1,!0),key:Ji,value:Ji},{tag:Wi(ns.ContractsMtree),version:Wi(1,!0),payload:Vs},{tag:Wi(ns.CallsMtree),version:Wi(1,!0),payload:Ls},{tag:Wi(ns.ChannelsMtree),version:Wi(1,!0),payload:js},{tag:Wi(ns.NameserviceMtree),version:Wi(1,!0),payload:Hs},{tag:Wi(ns.OraclesMtree),version:Wi(1,!0),payload:Fs},{tag:Wi(ns.AccountsMtree),version:Wi(1,!0),payload:Ds},{tag:Wi(ns.GaMetaTxAuthData),version:Wi(1,!0),fee:Wa,gasPrice:Ai,txHash:Ya(ur.TxHash)}],Ws=[[ns.CallsMtree,ur.CallStateTree],[ns.StateTrees,ur.StateTrees],[ns.TreesPoi,ur.Poi]];function Ks(e){var t;const{protocolParameters:n}=e;null!=n&&fi(n);const r=null!==(t=Ws.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:ur.Bytearray;return ds(Js,ns,e,{packEntry:Ks},r)}function Ys(e,t){return null!=t||(t=Ws.find((([,t])=>e.startsWith(t)))?.[0]),hs(Js,ns,e,t,{unpackEntry:Ys})}function Qs(e,t){return ps(us,Xr,e,t)}function Zs(e){const{protocolParameters:t}=e;return null!=t&&fi(t),ds(us,Xr,e,{unpackTx:ro,buildTx:Zs,rebuildTx:t=>Zs({...e,...t}),packEntry:Ks},ur.Transaction)}function Xs(e){return Zs({...e,[Ua]:!0})}const eo=["fee","gasPrice","gasLimit"];function to(e,t){return e.some((([e,n])=>{const r=t[e];if(eo.includes(e))return null==r;if(!0!==n.nestedTransaction)return!1;if(null==r||"string"==typeof r||ArrayBuffer.isView(r))return!1;const a=r;let i;try{i=Qs(a.tag,a.version)}catch{return!0}return to(i,a)}))}async function no(e){var t;const n={...e},{onNode:r}=n,a=n,i=Qs(n.tag,n.version),s=null!=r?function(e){try{return ir(e)}catch{return}}(r):void 0,o=null!=s&&null==a.protocolParameters&&to(i,n)?xi(s):void 0;o?.catch((()=>{})),await Promise.all(i.map((async([e,t])=>{null!=t.prepare&&(n[e]=await t.prepare(n[e],n,n))})));const c=null!==(t=a.protocolParameters)&&void 0!==t?t:await o;return Zs({...n,...null!=c&&{protocolParameters:c}})}function ro(e,t){return hs(us,Xr,e,t,{unpackTx:ro,unpackEntry:Ys})}function ao(e){return Ar(qr("string"==typeof e&&e.startsWith("tx_")?Cr(e):e),ur.TxHash)}function io(e){let t=ro(e);if(Xr.SignedTx===t.tag&&(t=t.encodedTx),Xr.ContractCreateTx!==t.tag&&Xr.GaAttachTx!==t.tag)throw new j("contractTx","a contractCreateTx or gaAttach",t.tag);return ta(t.ownerId,t.nonce)}function so(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function oo(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const co="$",uo="_",lo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,mo=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function po(e,t){var n,r;const a=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},a),{body:e.parsedBody});const i=t&&t.bodyMapper,s=Boolean(null==i?void 0:i.nullable),o=null==i?void 0:i.type.name;if("Stream"===o)return Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&i.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(a)for(const e of Object.keys(a))t[e]=a[e];return!s||e.parsedBody||a||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:a,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,m=o,"Composite"!==m&&"Dictionary"!==m&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==m?void 0:m.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,m}class ho{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:a,InclusiveMaximum:i,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:m,Pattern:p,UniqueItems:d}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==a&&t<=a&&r("ExclusiveMinimum",a),void 0!==i&&t>i&&r("InclusiveMaximum",i),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==m&&t%m!=0&&r("MultipleOf",m),p){const e="string"==typeof p?new RegExp(p):p;"string"==typeof t&&null!==t.match(e)||r("Pattern",p)}d&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",d)}}serialize(e,t,n,r={xml:{}}){var a,i,s;const o={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:uo}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:m}=e;if(l&&m&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!m&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===m&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!mo.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return lo.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=so(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(so(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,a,i){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,i);if(a&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][co]={[e]:o.xmlNamespace}):(c[t]={},c[t][i.xml.xmlCharKey]=s,c[t][co]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,a,i){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,i);o[t]=wo(s,c,a,i)}if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[co]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,a,i){if(xo(e,t)&&(t=bo(e,t,n,"clientName")),null!=n){const s={},o=No(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,m=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=yo(u.serializedName);l=e.pop();for(const t of e){null==m[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(m[t]={}),m=m[t]}}if(null!=m){if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";m[co]=Object.assign(Object.assign({},m[co]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const p=xo(e,t);p&&p.clientName===c&&null==o&&(o=t.serializedName);const d=e.serialize(u,o,s,i);if(void 0!==d&&null!=l){const e=wo(u,d,a,i);a&&u.xmlIsAttribute?(m[co]=m[co]||{},m[co][l]=d):a&&u.xmlIsWrapped?m[l]={[u.xmlElementName]:e}:m[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=go(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const a in n)t.every((e=>e!==a))&&(s[a]=e.serialize(c,n[a],r+'["'+a+'"]',i))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var a,i,s,o;const c={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:uo},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,a){var i,s;const o=null!==(i=a.xml.xmlCharKey)&&void 0!==i?i:uo;xo(e,t)&&(t=bo(e,t,n,"serializedName"));const c=No(e,t,r);let u={};const l=[];for(const i of Object.keys(c)){const m=c[i],p=yo(c[i].serializedName);l.push(p[0]);const{serializedName:d,xmlName:h,xmlElementName:f}=m;let y=r;""!==d&&void 0!==d&&(y=r+"."+d);const g=m.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(m.type.value,n[r],y,a)),l.push(r);u[i]=t}else if(e.isXML)if(m.xmlIsAttribute&&n[co])u[i]=e.deserialize(m,n[co][h],y,a);else if(m.xmlIsMsText)void 0!==n[o]?u[i]=n[o]:"string"==typeof n&&(u[i]=n);else{const t=f||h||d;if(m.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[i]=e.deserialize(m,r,y,a),l.push(h)}else{const r=n[t];u[i]=e.deserialize(m,r,y,a),l.push(t)}}else{let r,s=n,o=0;for(const e of p){if(!s)break;o++,s=s[e]}null===s&&o<p.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let d;if(l&&i===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[i])&&""===c[i].serializedName){r=n[i];const t=e.deserialize(m,r,y,a);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===m.defaultValue||(d=e.deserialize(m,r,y,a),u[i]=d)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in c)if(yo(c[t].serializedName)[0]===e)return!1;return!0};for(const i in n)t(i)&&(u[i]=e.deserialize(m,n[i],r+'["'+i+'"]',a))}else if(n&&!a.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||vo(e,a)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[co]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=oo(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return oo(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,a){var i;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(i=e.modelMappers[s.type.className])&&void 0!==i?i:s);const t=[];for(let i=0;i<n.length;i++)t[i]=e.deserialize(s,n[i],`${r}[${i}]`,a);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,a){const i=t.type.value;if(!i||"object"!=typeof i)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const s of Object.keys(n))t[s]=e.deserialize(i,n[s],r,a);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function fo(e={},t=!1){return new ho(e,t)}function yo(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function go(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function No(e,t,n){let r=t.type.modelProperties;if(!r){const a=go(e,t,n);if(!a)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==a?void 0:a.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(a)}" of type "${t.type.className}" for object "${n}".`)}return r}function wo(e,t,n,r){if(!n||!e.xmlNamespace)return t;const a=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",i={[a]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[co])return t;{const e=Object.assign({},t);return e[co]=i,e}}const s={};return s[r.xml.xmlCharKey]=t,s[co]=i,s}function vo(e,t){return[co,t.xml.xmlCharKey].includes(e)}function bo(e,t,n,r){var a;const i=xo(e,t);if(i){let s=i[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const i=n[s],o=null!==(a=t.type.uberParent)&&void 0!==a?a:t.type.className;if("string"==typeof i&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),a=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,a))return e[a];for(const[t,a]of Object.entries(e))t.startsWith(n+".")&&a.type.uberParent===n&&a.type.className&&r.push(a.type.className)}}(e.modelMappers.discriminators,i,o);n&&(t=n)}}}return t}function xo(e,t){return t.type.polymorphicDiscriminator||_o(e,t.type.uberParent)||_o(e,t.type.className)}function _o(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Po="Sequence",Co="Stream",Ao={operationRequestMap:new WeakMap};function So(e,t,n){let r=t.parameterPath;const a=t.mapper;let i;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(a.isConstant)i=a.defaultValue;else{let t=To(e,r);!t.propertyFound&&n&&(t=To(n,r));let s=!1;t.propertyFound||(s=a.required||"options"===r[0]&&2===r.length),i=s?a.defaultValue:t.propertyValue}}else{a.required&&(i={});for(const t in r){const s=a.type.modelProperties[t],o=So(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(i||(i={}),i[t]=o)}}return i}function To(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const zo=Symbol.for("@azure/core-client original request");function Eo(e){if(function(e){return zo in e}(e))return Eo(e[zo]);let t=Ao.operationRequestMap.get(e);return t||(t={},Ao.operationRequestMap.set(e,t)),t}const Io=["application/json","text/json"],Mo=["application/xml","application/atom+xml"];function qo(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function Ro(e={}){const t=Un(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t,n,r;const{credential:a,scopes:i,challengeCallbacks:s}=e,o=e.logger||Ot,c={authorizeRequest:null!==(n=null===(t=null==s?void 0:s.authorizeRequest)||void 0===t?void 0:t.bind(s))&&void 0!==n?n:Fn,authorizeRequestOnChallenge:null===(r=null==s?void 0:s.authorizeRequestOnChallenge)||void 0===r?void 0:r.bind(s)},u=a?function(e,t){let n,r=null,a=null;const i=Object.assign(Object.assign({},jn),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==a?void 0:a.refreshAfterTimestamp)&&a.refreshAfterTimestamp<Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-i.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-i.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let a=await r();for(;null===a;)await wn(t),a=await r();return a}((()=>e.getToken(t,o)),i.retryIntervalInMs,null!==(c=null==a?void 0:a.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,a=e,n=o.tenantId,a))).catch((e=>{throw r=null,a=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),i=n!==t.tenantId;return r&&(a=null),i||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),a)}}(a):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,r,a;if(await c.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:u,logger:o}),[n,r]=await Hn(e,t),Jn(n)){let s=Kn(n.headers.get("WWW-Authenticate"));if(s){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Hn(e,t))}else if(c.authorizeRequestOnChallenge&&(a=await c.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:u,logger:o}),a&&([n,r]=await Hn(e,t)),Jn(n)&&(s=Kn(n.headers.get("WWW-Authenticate")),s))){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Hn(e,t))}}if(r)throw r;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=Eo(e),a=null==r?void 0:r.operationSpec,i=null==r?void 0:r.operationArguments;return a&&i&&(function(e,t,n){var r,a;if(n.headerParameters)for(const r of n.headerParameters){let a=So(t,r);if(null!=a||r.mapper.required){a=n.serializer.serialize(r.mapper,a,qo(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(a))e.headers.set(t+n,a[n]);else e.headers.set(r.mapper.serializedName||qo(r),a)}}const i=null===(a=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===a?void 0:a.customHeaders;if(i)for(const t of Object.keys(i))e.headers.set(t,i[t])}(e,i,a),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var a,i,s,o,c;const u=null===(a=t.options)||void 0===a?void 0:a.serializerOptions,l={xml:{rootName:null!==(i=null==u?void 0:u.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:uo}},m=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=So(t,n.requestBody);const a=n.requestBody.mapper,{required:i,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:p,xmlNamespacePrefix:d,nullable:h}=a,f=a.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||i){const t=qo(n.requestBody);e.body=n.serializer.serialize(a,e.body,t,l);const i=f===Co;if(n.isXML){const t=d?`xmlns:${d}`:"xmlns",n=function(e,t,n,r,a){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[a.xml.xmlCharKey]=r,n[co]={[t]:e},n}return r}(p,t,f,e.body,l);f===Po?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const a={[t]:e};return a[co]={[n]:r},a}(n,u||o||s,t,p),{rootName:o||s,xmlCharKey:m}):i||(e.body=r(n,{rootName:o||s,xmlCharKey:m}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;i||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const a=So(t,r);if(null!=a){const t=r.mapper.serializedName||qo(r);e.formData[t]=n.serializer.serialize(r.mapper,a,qo(r),l)}}}}(e,i,a,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,a,i,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Io,u=null!==(a=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==a?a:Mo,l=e.parseXML,m=e.serializerOptions,p={xml:{rootName:null!==(i=null==m?void 0:m.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==m?void 0:m.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==m?void 0:m.xml.xmlCharKey)&&void 0!==o?o:uo}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,a){const i=await async function(e,t,n,r,a){var i;if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&n.bodyAsText){const i=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(i),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!a)throw new Error("Parsing XML not supported.");const e=await a(i,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||Gn.PARSE_ERROR;throw new Gn(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,a);if(!function(e){const t=Eo(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(i))return i;const s=Eo(i.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return i;const c=function(e){let t;const n=Eo(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(i),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var a,i,s,o,c;const u=200<=e.status&&e.status<300,l=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?u:!!n;if(l){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const m=null!=n?n:t.responses.default,p=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,d=new Gn(p,{statusCode:e.status,request:e.request,response:e});if(!(m||(null===(s=null===(i=e.parsedBody)||void 0===i?void 0:i.error)||void 0===s?void 0:s.code)&&(null===(c=null===(o=e.parsedBody)||void 0===o?void 0:o.error)||void 0===c?void 0:c.message)))throw d;const h=null==m?void 0:m.bodyMapper,f=null==m?void 0:m.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(h){let e=n;if(t.isXML&&h.type.name===Po){e=[];const t=h.xmlElementName;"object"==typeof n&&t&&(e=n[t])}a=t.serializer.deserialize(h,e,"error.response.parsedBody",r)}const i=n.error||a||n;d.code=i.code,i.message&&(d.message=i.message),h&&(d.response.parsedBody=a)}e.headers&&f&&(d.response.parsedHeaders=t.serializer.deserialize(f,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){d.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}(i,o,c,r);if(u)throw u;if(l)return i;if(c){if(c.bodyMapper){let e=i.parsedBody;o.isXML&&c.bodyMapper.type.name===Po&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{i.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new Gn(`Error ${e} occurred in deserializing the responseBody - ${i.bodyAsText}`,{statusCode:i.status,request:i.request,response:i})}}else"HEAD"===o.httpMethod&&(i.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(i.parsedHeaders=o.serializer.deserialize(c.headersMapper,i.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return i}(c,u,n,p,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let Oo;const ko={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function Bo(e,t,n,r){const a=function(e,t,n){var r;const a=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let i=So(t,r,n);const s=qo(r);i=e.serializer.serialize(r.mapper,i,s),r.skipEncoding||(i=encodeURIComponent(i)),a.set(`{${r.mapper.serializedName||s}}`,i)}return a}(t,n,r);let i=!1,s=Go(e,a);if(t.path){let e=Go(t.path,a);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,i=!0):s=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const a=t.indexOf("?");if(-1!==a){const e=t.substring(0,a),i=t.substring(a+1);r+=e,i&&(n.search=n.search?`${n.search}&${i}`:i)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const a=new Map,i=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&i.add(r.mapper.serializedName);let s=So(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,qo(r));const t=r.collectionFormat?ko[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),a.set(r.mapper.serializedName||qo(r),s)}}return{queryParams:a,sequenceParams:i}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const a=new URL(e),i=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),a=t.get(n);a?Array.isArray(a)?a.push(r):t.set(n,[a,r]):t.set(n,r)}return t}(a.search);for(const[e,a]of t){const t=i.get(e);if(Array.isArray(t))if(Array.isArray(a)){t.push(...a);const n=new Set(t);i.set(e,Array.from(n))}else t.push(a);else t?(Array.isArray(a)?a.unshift(t):n.has(e)&&i.set(e,[t,a]),r||i.set(e,a)):i.set(e,a)}const s=[];for(const[e,t]of i)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return a.search=s.length?`?${s.join("&")}`:"",a.toString()}(s,o,c,i),s}function Go(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const $o=Et("core-client");class Uo{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&$o.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(Oo||(Oo=new Vn),Oo),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return Ro(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Ln(e)}({url:Bo(n,t,e,this)});r.method=t.httpMethod;const a=Eo(r);a.operationSpec=t,a.operationArguments=e;const i=t.contentType||this._requestContentType;i&&t.requestBody&&r.headers.set("Content-Type",i);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(a.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Co&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=po(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=po(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function Vo(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),a=n(t),i=Math.max(...r,...a)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*i**n),0);return s(r)-s(a)}function Do(e,t,n){return Vo(e,t)>=0&&(null==n||Vo(e,n)<0)}const Lo="_sdk-big-int-",jo=(...e)=>{const t=fo(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,a]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,a);if("bigint"!=typeof t)throw null!=r||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,a]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(Lo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(Lo,""));const i=r.call(this,e,t,n,a);return i instanceof Date?new Date(+i/1e3):i}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new ae(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(Lo,""))}})},Ho=Number.MAX_SAFE_INTEGER.toString().length,Fo=new RegExp(String.raw`("\w+":\s*)(\d{${Ho},})(\s*[,}])`,"m"),Jo=new RegExp(String.raw`([[,]\s*)(\d{${Ho},})\b`,"m"),Wo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(Fo,"g"),(e=>{const t=e.match(Fo);if(null==t)throw new ie;const[,n,r,a]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${Lo}${r}"`:r,a].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(Jo,"g"),(e=>{const t=e.match(Jo);if(null==t)throw new ie;const[,n,r]=t;return`${n}"${Lo}${r}"`}))),n}},Ko=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const a=t.headers.get("__queue");t.headers.delete("__queue");const i=async()=>n(t);if(null==a)return i();const s=(null!==(r=e.get(a))&&void 0!==r?r:Promise.resolve()).then(i);return e.set(a,s.catch((()=>{}))),s}},position:"perCall"}},Yo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);e.set(a,i);try{return await i}finally{e.delete(a)}}},position:"perCall"}},Qo=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);return e.set(a,i),i}},position:"perCall"}},Zo=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof Gn)||null==t.request||t.message.startsWith("Error "))throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const a=null==r?` ${t.response.status} status code`:e(r);throw""!==a&&(t.message+=`:${a}`),t}}},position:"perCall"}),Xo=(e,t,n,r,a)=>({policy:{name:"version-check",async sendRequest(i,s){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),s(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!Do(...o)){const t=new ne(e,...o);if(!a)throw t;console.warn(t.message)}return s(i)}},position:"perCall"}),ec=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var a;if(null!=n.headers.get("__no-retry"))return n.headers.delete("__no-retry"),r(n);const i=null!==(a=n.headers.get("__retry-code"))&&void 0!==a?a:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+i)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new Gn("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Qn(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var m;if(!(e instanceof Gn))throw e;if(s.includes(null!==(m=e.response?.status)&&void 0!==m?m:0))throw e;l=e}}throw l}},position:"perCall"}),tc={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},nc={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},rc={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},ac={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},ic={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}}}}},sc={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{constraints:{Pattern:new RegExp("^ss_[0-9A-Za-z+/=]+$")},serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w+$")},serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},oc={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},cc={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},uc={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},lc={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},mc={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",required:!0,type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"BigInt"}}}}},dc={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},hc={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},fc={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"bytecode",required:!0,type:{name:"String"}}}}},yc={type:{name:"Composite",className:"PoI",modelProperties:{poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",required:!0,type:{name:"String"}}}}},gc={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},Nc={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},wc={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},vc={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},bc={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},xc={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},_c={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Pc={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Cc={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},Ac={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Sc={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"data",required:!0,type:{name:"String"}}}}},Tc={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},zc={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"info",required:!0,type:{name:"String"}}}}},Ec={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"info",type:{name:"String"}},pofHash:{constraints:{Pattern:new RegExp("^(no_fraud|bf_\\w+)$")},serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",type:{name:"String"}}}}},Ic={type:{name:"Composite",className:"PinningTx",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},parentPayload:{serializedName:"parent_payload",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},parentType:{serializedName:"parent_type",required:!0,type:{name:"String"}},parentNetworkId:{serializedName:"parent_network_id",required:!0,type:{name:"String"}}}}},Mc={type:{name:"Composite",className:"HCContractPubkeys",modelProperties:{staking:{serializedName:"staking",required:!0,type:{name:"String"}},election:{serializedName:"election",type:{name:"String"}},rewards:{serializedName:"rewards",type:{name:"String"}}}}},qc={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},Rc={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},Oc={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{constraints:{Pattern:new RegExp("^(no_fraud|bf_\\w+)$")},serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}}}}},kc={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},Bc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameEntryPointersItem"}}}}}}},Gc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},$c={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},Uc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{constraints:{Pattern:new RegExp("^oq_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},Vc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},Dc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},Lc={type:{name:"Composite",className:"NodeSettings",modelProperties:{minMinerGasPrice:{serializedName:"min_miner_gas_price",required:!0,type:{name:"BigInt"}},maxAuthFunGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"max_auth_fun_gas",required:!0,type:{name:"Number"}},mempoolTxTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"mempool_tx_ttl",required:!0,type:{name:"Number"}},mempoolNonceOffset:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"mempool_nonce_offset",required:!0,type:{name:"Number"}},dryRunGasLimit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"dry_run_gas_limit",required:!0,type:{name:"Number"}},blockGasLimit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"block_gas_limit",required:!0,type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"ProtocolParameters",modelProperties:{networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},currentProtocolVersion:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"current_protocol_version",required:!0,type:{name:"Number"}},lockedCoinsHolderAccount:{serializedName:"locked_coins_holder_account",required:!0,type:{name:"String"}},expectedBlockMineRate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"expected_block_mine_rate",type:{name:"Number"}},childBlockTime:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"child_block_time",type:{name:"Number"}},microBlockCycle:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"micro_block_cycle",required:!0,type:{name:"Number"}},protocols:{constraints:{MinItems:1},serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ProtocolConsensusParameters"}}}}}}},Hc={type:{name:"Composite",className:"ContractTxBaseGas",modelProperties:{txType:{serializedName:"tx_type",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},txBaseGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"tx_base_gas",required:!0,type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"StateGasPerBlock",modelProperties:{part:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"part",required:!0,type:{name:"Number"}},whole:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"whole",required:!0,type:{name:"Number"}}}}},Jc={type:{name:"Composite",className:"NameAuctionTimeout",modelProperties:{length:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"length",required:!0,type:{name:"Number"}},bidTimeout:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"bid_timeout",required:!0,type:{name:"Number"}},bidExtension:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"bid_extension",required:!0,type:{name:"Number"}}}}},Wc={type:{name:"Composite",className:"ContractVersion",modelProperties:{vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},Kc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},Yc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},Qc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},Zc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},Xc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",required:!0,type:{name:"String"}}}}},eu={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},tu={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},nu={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},ru={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},au={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},su={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},ou={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{constraints:{Pattern:new RegExp("^ss_[0-9A-Za-z+/=]+$")},serializedName:"offchain_trees",type:{name:"String"}}}}},cu={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},uu={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},lu={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",required:!0,type:{name:"String"}}}}},mu={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},pu={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},du={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},hu={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},fu={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},yu={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},gu={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},Nu={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},wu={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},vu={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}}}}},bu={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},xu={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},_u={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Pu={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Cu={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},Au={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Su={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Tu={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},zu={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{constraints:{Pattern:new RegExp("^oq_\\w+$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Eu={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Iu={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},Mu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},qu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},Ru={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ou={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},ku={type:{name:"Composite",className:"SpendTxInput",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"any"}}}}},Bu={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},Gu={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:cc.type.polymorphicDiscriminator,modelProperties:{...cc.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},$u={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:cc.type.polymorphicDiscriminator,modelProperties:{...cc.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Uu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:cc.type.polymorphicDiscriminator,modelProperties:{...cc.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},Vu={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:cc.type.polymorphicDiscriminator,modelProperties:{...cc.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Du={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:cc.type.polymorphicDiscriminator,modelProperties:{...cc.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Lu={type:{name:"Composite",className:"NameEntryPointersItem",modelProperties:{...mc.type.modelProperties}}},ju={type:{name:"Composite",className:"ProtocolConsensusParameters",modelProperties:{...Kc.type.modelProperties,minimumGasPrice:{serializedName:"minimum_gas_price",required:!0,type:{name:"BigInt"}},gasPerByte:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_per_byte",required:!0,type:{name:"Number"}},storeByteGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"store_byte_gas",required:!0,type:{name:"Number"}},txBaseGas:{serializedName:"tx_base_gas",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"},constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0}}}},contractTxBaseGas:{serializedName:"contract_tx_base_gas",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractTxBaseGas"}}}},stateGasPerBlock:{serializedName:"state_gas_per_block",required:!0,type:{name:"Dictionary",value:{type:{name:"Composite",className:"StateGasPerBlock"}}}},nameClaimFees:{constraints:{MinItems:31,MaxItems:31},serializedName:"name_claim_fees",required:!0,type:{name:"Sequence",element:{type:{name:"BigInt"}}}},nameAuctionTimeouts:{serializedName:"name_auction_timeouts",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameAuctionTimeout"}}}},nameClaimBidIncrement:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_bid_increment",required:!0,type:{name:"Number"}},nameMaxLengthStartingAuction:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_max_length_starting_auction",required:!0,type:{name:"Number"}},nameClaimMaxExpiration:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_max_expiration",required:!0,type:{name:"Number"}},nameRegistrars:{serializedName:"name_registrars",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},namePointersMaxCount:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_pointers_max_count",type:{name:"Number"}},namePointerMaxKeySize:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_pointer_max_key_size",type:{name:"Number"}},namePreclaimExpiration:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_preclaim_expiration",required:!0,type:{name:"Number"}},nameClaimPreclaimDelta:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_preclaim_delta",required:!0,type:{name:"Number"}},nameProtectionPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_protection_period",required:!0,type:{name:"Number"}},nameClaimLockedFee:{serializedName:"name_claim_locked_fee",required:!0,type:{name:"BigInt"}},allowedContractVersions:{serializedName:"allowed_contract_versions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractVersion"}}}},allowedOracleAbiVersions:{serializedName:"allowed_oracle_abi_versions",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},type:{name:"Number"}}}}}}},Hu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Xc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}},Fu={type:{name:"Composite",className:"SpendTx",modelProperties:{...ku.type.modelProperties}}},Ju={type:{name:"Composite",className:"NodeGetAccountByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Wu={type:{name:"Composite",className:"NodeGetAccountByPubkeyAndHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Ku={type:{name:"Composite",className:"NodeGetAccountByPubkeyAndHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Yu={type:{name:"Composite",className:"NodeGetAccountNextNonceExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Qu={type:{name:"Composite",className:"NodeGetPendingAccountTransactionsByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Zu={type:{name:"Composite",className:"NodeGetAuctionEntryByNameExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Xu={type:{name:"Composite",className:"NodeGetChannelByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},el={type:{name:"Composite",className:"NodeGetContractExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},tl={type:{name:"Composite",className:"NodeGetContractCodeExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},nl={type:{name:"Composite",className:"NodeGetContractPoIExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},rl={type:{name:"Composite",className:"NodeGetCurrencyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},al={type:{name:"Composite",className:"NodeProtectedDryRunTxsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},il={type:{name:"Composite",className:"NodeGetCurrentGenerationExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},sl={type:{name:"Composite",className:"NodeGetGenerationByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ol={type:{name:"Composite",className:"NodeGetGenerationByHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},cl={type:{name:"Composite",className:"NodeGetTopHeaderExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ul={type:{name:"Composite",className:"NodeGetPinningTxExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ll={type:{name:"Composite",className:"NodeGetHyperchainContractPubkeysExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ml={type:{name:"Composite",className:"NodeGetCurrentKeyBlockExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},pl={type:{name:"Composite",className:"NodeGetCurrentKeyBlockHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},dl={type:{name:"Composite",className:"NodeGetCurrentKeyBlockHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},hl={type:{name:"Composite",className:"NodeGetKeyBlockByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},fl={type:{name:"Composite",className:"NodeGetKeyBlockByHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},yl={type:{name:"Composite",className:"NodeGetPendingKeyBlockExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},gl={type:{name:"Composite",className:"NodeGetMicroBlockHeaderByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Nl={type:{name:"Composite",className:"NodeGetMicroBlockTransactionsByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},wl={type:{name:"Composite",className:"NodeGetMicroBlockTransactionsCountByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},vl={type:{name:"Composite",className:"NodeGetMicroBlockTransactionByHashAndIndexExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},bl={type:{name:"Composite",className:"NodeGetNameEntryByNameExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},xl={type:{name:"Composite",className:"NodeGetNameEntryByNameHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},_l={type:{name:"Composite",className:"NodeGetOracleByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Pl={type:{name:"Composite",className:"NodeGetOracleQueriesByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Cl={type:{name:"Composite",className:"NodeGetOracleQueryByPubkeyAndQueryIdExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Al={type:{name:"Composite",className:"NodeGetPeerPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Sl={type:{name:"Composite",className:"NodeGetRecentGasPricesExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Tl={type:{name:"Composite",className:"NodeGetNodeSettingsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},zl={type:{name:"Composite",className:"NodeGetProtocolParametersExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},El={type:{name:"Composite",className:"NodeGetStatusExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Il={type:{name:"Composite",className:"NodeGetChainEndsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Ml={type:{name:"Composite",className:"NodeGetSyncStatusExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ql={type:{name:"Composite",className:"NodePostTransactionExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Rl={type:{name:"Composite",className:"NodeGetTransactionByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Ol={type:{name:"Composite",className:"NodeGetTransactionInfoByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}};let kl={OffChainUpdate:cc,"OffChainUpdate.OffChainCallContract":Gu,"OffChainUpdate.OffChainDeposit":$u,"OffChainUpdate.OffChainNewContract":Uu,"OffChainUpdate.OffChainTransfer":Vu,"OffChainUpdate.OffChainWithdrawal":Du};const Bl={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Gl={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},$l={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},Ul={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},Vl={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Dl={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},Ll={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},jl={parameterPath:"body",mapper:wc},Hl={parameterPath:"body",mapper:Xc};class Fl extends Uo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-node/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Wl)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Kl)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},Yl)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Ql)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Zl)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Xl)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},em)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},tm)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},nm)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},rm)}getCurrency(e){return this.sendOperationRequest({options:e},am)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},im)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},sm)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},om)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},cm)}getTopHeader(e){return this.sendOperationRequest({options:e},um)}getPinningTx(e){return this.sendOperationRequest({options:e},lm)}getHyperchainContractPubkeys(e){return this.sendOperationRequest({options:e},mm)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},pm)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},dm)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},hm)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},fm)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},ym)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},gm)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Nm)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},wm)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},vm)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},bm)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},xm)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},_m)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Pm)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Cm)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},Am)}getPeerPubkey(e){return this.sendOperationRequest({options:e},Sm)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},Tm)}getNodeSettings(e){return this.sendOperationRequest({options:e},zm)}getProtocolParameters(e){return this.sendOperationRequest({options:e},Em)}getStatus(e){return this.sendOperationRequest({options:e},Im)}getChainEnds(e){return this.sendOperationRequest({options:e},Mm)}getSyncStatus(e){return this.sendOperationRequest({options:e},qm)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Rm)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Om)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},km)}}const Jl=jo(a,!1),Wl={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Ju,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},Kl={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Wu,isError:!0}},urlParameters:[Gl,$l,Ul],headerParameters:[Bl],serializer:Jl},Yl={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},410:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Ku,isError:!0}},urlParameters:[Gl,$l,Vl],headerParameters:[Bl],serializer:Jl},Ql={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:rc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Yu,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},Zl={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:ac},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Qu,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},Xl={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Zu,isError:!0}},urlParameters:[Gl,Dl],headerParameters:[Bl],serializer:Jl},em={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Xu,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},tm={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:hc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:el,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},nm={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:fc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:tl,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},rm={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:yc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:nl,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},am={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:gc},503:{bodyMapper:nc,headersMapper:rl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},im={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Pc},400:{bodyMapper:nc,isError:!0},403:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:al,isError:!0}},requestBody:jl,urlParameters:[Gl],headerParameters:[Bl,Ll],mediaType:"json",serializer:Jl},sm={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Tc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:il,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},om={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Tc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:sl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},cm={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Tc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:ol,isError:!0}},urlParameters:[Gl,Vl],headerParameters:[Bl],serializer:Jl},um={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:Ec},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:cl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},lm={path:"/v3/hyperchain/pin-tx",httpMethod:"GET",responses:{200:{bodyMapper:Ic},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:ul,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},mm={path:"/v3/hyperchain/contracts",httpMethod:"GET",responses:{200:{bodyMapper:Mc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:ll,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},pm={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:zc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:ml,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},dm={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:qc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:pl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},hm={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:Rc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:dl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},fm={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:zc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:hl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},ym={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:zc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:fl,isError:!0}},urlParameters:[Gl,Vl],headerParameters:[Bl],serializer:Jl},gm={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:zc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:yl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Nm={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Oc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:gl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},wm={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:ac},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Nl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},vm={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:kc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:wl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},bm={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:ic},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:vl,isError:!0}},urlParameters:[Gl,Ul,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[Bl],serializer:Jl},xm={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Bc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:bl,isError:!0}},urlParameters:[Gl,Dl],headerParameters:[Bl],serializer:Jl},_m={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:Bc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:xl,isError:!0}},urlParameters:[Gl,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[Bl],serializer:Jl},Pm={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Gc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:_l,isError:!0}},urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},Cm={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:$c},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Pl,isError:!0}},queryParameters:[{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[Gl,$l],headerParameters:[Bl],serializer:Jl},Am={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:Uc},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Cl,isError:!0}},urlParameters:[Gl,$l,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[Bl],serializer:Jl},Sm={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:Vc},503:{bodyMapper:nc,headersMapper:Al,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Tm={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Sl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},zm={path:"/v3/node-settings",httpMethod:"GET",responses:{200:{bodyMapper:Lc},503:{bodyMapper:nc,headersMapper:Tl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Em={path:"/v3/protocol-parameters",httpMethod:"GET",responses:{200:{bodyMapper:jc},503:{bodyMapper:nc,headersMapper:zl,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Im={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Yc},503:{bodyMapper:nc,headersMapper:El,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Mm={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}},503:{bodyMapper:nc,headersMapper:Il,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},qm={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:Zc},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Ml,isError:!0}},urlParameters:[Gl],headerParameters:[Bl],serializer:Jl},Rm={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:eu},400:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:ql,isError:!0}},requestBody:Hl,urlParameters:[Gl],headerParameters:[Bl,Ll],mediaType:"json",serializer:Jl},Om={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ic},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Rl,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl},km={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:tu},400:{bodyMapper:nc,isError:!0},404:{bodyMapper:nc,isError:!0},410:{bodyMapper:nc,isError:!0},503:{bodyMapper:nc,headersMapper:Ol,isError:!0}},urlParameters:[Gl,Ul],headerParameters:[Bl],serializer:Jl};function Bm(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Gm(e,t){return e.get(Um(e,t))}function $m(e,t,n){return e.set(Um(e,t),n),n}function Um(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Vm=new WeakMap,Dm=new WeakMap,Lm=new WeakMap;class jm extends Fl{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){super(e,{allowInsecureConnection:!0,additionalPolicies:[Xo("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0",t),Ko(),Yo(),ec(n,r),Zo((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...a}),Bm(this,Vm,void 0),Bm(this,Dm,void 0),Bm(this,Lm,void 0),$m(Vm,this,t),this.pipeline.addPolicy(Wo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:En}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=Gm(Dm,this)?Gm(Dm,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{$m(Dm,this,t)}),(()=>{})),t}async _isHyperchain(){return null!=Gm(Lm,this)||$m(Lm,this,this.getHyperchainContractPubkeys({requestOptions:{customHeaders:{"__no-retry":"true"}}}).then((()=>!0),(e=>{if("v3/hyperchain/contracts error: 404 status code"!==e.message)throw e;return!1}))),Gm(Lm,this)}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),a=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Yr[a]){const e=a.toString(),t=Object.values(Yr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString(),i=new ne("consensus protocol",e,n,r);if(!Gm(Vm,this))throw i;console.warn(i.message)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:a}}}function Hm(e){const t=ro(e);switch(t.tag){case Xr.SignedTx:return Hm(Xs(t.encodedTx));case Xr.GaMetaTx:return t.gaId}const n=Qs(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new D(`Transaction doesn't have nonce: ${Xr[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class Fm{}class Jm extends Error{constructor(e){super(e),this.name="TypeResolveError"}}var Wm=Jm;const Km=e=>({name:"bytes",size:e}),Ym=(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),Qm=(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),Zm=e=>({name:"list",valuesType:e}),Xm=(e=[])=>({name:"tuple",valueTypes:e}),ep=(e,t)=>({name:"record",keys:e,valueTypes:t}),tp=e=>({name:"set",valuesType:e}),np=(e,t)=>({name:"map",keyType:e,valueType:t}),rp=e=>({name:"variant",variants:e}),ap=()=>rp([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),ip=()=>rp([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),sp=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[Km()]}];return rp(e)},op=e=>({name:"tvar",id:e});var cp=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,r=[],a=[];var i;if((i=e)&&"object"==typeof i&&i.constructor===Object&&([[n,r]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,r);return this.resolveType(e,t)}if("variant"!==n&&(a=this.resolveValueTypes(r,t)),"void"===n)return{name:"void"};if("unit"===n)return Xm([]);if("int"===n)return{name:"int"};if("bool"===n)return{name:"bool"};if("string"===n)return{name:"string"};if("bits"===n)return{name:"bits"};if("hash"===n)return{name:"hash"};if("signature"===n)return{name:"signature"};if("address"===n)return{name:"account_pubkey"};if("contract_pubkey"===n)return{name:"contract_pubkey"};if("Chain.ttl"===n)return ap();if("Chain.ga_meta_tx"===n)return rp([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.paying_for_tx"===n)return rp([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.base_tx"===n)return rp([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]);if("AENS.pointee"===n)return ip();if("AENSv2.pointee"===n)return sp();if("AENS.name"===n)return(()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},ap(),np({name:"string"},ip())]}];return rp(e)})();if("AENSv2.name"===n)return(()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},ap(),np({name:"string"},sp())]}];return rp(e)})();if("Set.set"===n)return tp(...a);if("MCL_BLS12_381.fr"===n)return{name:"bls12_381.fr"};if("MCL_BLS12_381.fp"===n)return{name:"bls12_381.fp"};if("bytes"===n)return Km("any"===r?void 0:r);if("list"===n)return Zm(...a);if("map"===n)return np(...a);if(("tuple"===n||"record"===n)&&1===a.length)return a[0];if("tuple"===n)return Xm(a);if("record"===n){const e=r.map((e=>e.name));return ep(e,a)}if("variant"===n)return this.resolveVariant(r,t);if("option"===n)return(e=>rp([{None:[]},{Some:e}]))(a);if("oracle"===n)return Ym(...a);if("oracle_query"===n)return Qm(...a);throw new Wm("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),a=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:a}}));return rp(n)}},up=class{constructor(){this._internalResolver=new cp}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}};class lp extends Error{constructor(e){super(e),this.name="InternalError"}}var mp=lp,pp=(e,t)=>{if(!e)throw new mp(t)},dp=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,CONTRACT_BYTEARRAY:143,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5});class hp extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}var fp=hp;const yp={[dp.OTYPE_ADDRESS]:{name:"account_pubkey"},[dp.OTYPE_BYTES]:Km(),[dp.OTYPE_CONTRACT]:{name:"contract_pubkey"},[dp.OTYPE_ORACLE]:Ym(),[dp.OTYPE_ORACLE_QUERY]:Qm(),[dp.OTYPE_CHANNEL]:{name:"channel"}};var gp=class{createType(e){const t=e[0];if(t===dp.TRUE||t===dp.FALSE)return{name:"bool"};if((1&t)===dp.SMALL_INT||t===dp.POS_BIG_INT||t===dp.NEG_BIG_INT)return{name:"int"};if((3&t)===dp.SHORT_STRING||t===dp.LONG_STRING||t===dp.EMPTY_STRING)return{name:"string"};if((15&t)===dp.SHORT_LIST||t===dp.LONG_LIST)return Zm();if((15&t)===dp.SHORT_TUPLE||t===dp.LONG_TUPLE||t===dp.EMPTY_TUPLE)return Xm();if(t===dp.MAP||t===dp.EMPTY_MAP)return np();if(t===dp.POS_BITS||t===dp.NEG_BITS)return{name:"bits"};if(t===dp.VARIANT)return rp();if(t===dp.OBJECT){const t=e[1];return pp(yp.hasOwnProperty(t),`Unsupported object type "${t}"`),yp[t]}if(t===dp.CONTRACT_BYTEARRAY)return{name:"contract_bytearray"};if(t===dp.TYPE_INTEGER||t===dp.TYPE_BOOLEAN||t===dp.TYPE_LIST||t===dp.TYPE_TUPLE||t===dp.TYPE_OBJECT||t===dp.TYPE_BITS||t===dp.TYPE_MAP||t===dp.TYPE_STRING||t===dp.TYPE_VARIANT||t===dp.TYPE_BYTES||t===dp.TYPE_CONTRACT_BYTEARRAY||t===dp.TYPE_VAR||t===dp.TYPE_ANY)return{name:"type",type:undefined};throw new fp(t)}},Np=class{constructor(e){this.name=e}valueOf(){throw new mp("Not implemented.")}accept(e){return e.visitData(this)}};class wp extends Error{constructor(e){super(e),this.name="SerializerError"}}var vp=wp,bp=class{constructor(e){this.globalSerializer=e}serialize(e){throw new vp("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new vp("Not implemented.")}};const xp=e=>{const t=BigInt(e);return t<256n?new Uint8Array([Number(t)]):new Uint8Array([...xp(t>>8n),Number(0xffn&t)])},_p=e=>[...e].map((e=>e.toString(16).padStart(2,"0"))),Pp=e=>{if(0===e.length)return 0n;const t=_p(e);return BigInt("0x"+t.join(""))},Cp=e=>_p(e).join("");class Ap extends Error{constructor(e){super(e),this.name="FormatError"}}var Sp=Ap;class Tp extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}var zp=Tp,Ep=class extends Np{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return(e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new Sp(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))})(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new zp("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=xp(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new zp(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}get type(){return Km(this._size)}valueOf(){return this._value}},Ip=class extends Ep{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}},Mp=class extends Ip{constructor(e){super(e,"account_pubkey","ak")}get type(){return{name:"account_pubkey"}}},qp=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_ADDRESS,...ls.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ls.decode(t.slice(2),!0);return[new Mp(n.data),new Uint8Array(n.remainder)]}};function Rp(e){return new Uint8Array(ls.encode(xp(e)))}function Op(e){const t=ls.decode(e,!0);return[Pp(t.data),t.remainder]}var kp=class extends Np{constructor(e){super("bits"),this._value=BigInt(e)}get type(){return{name:"bits"}}get value(){return this._value}valueOf(){return this._value}},Bp=e=>e>0?e:-1n*e,Gp=class extends bp{serialize(e){return[e.value>=0?dp.POS_BITS:dp.NEG_BITS,...Rp(Bp(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===dp.POS_BITS?1n:-1n,[r,a]=Op(t.slice(1));return[new kp(r*n),new Uint8Array(a)]}},$p=class extends Np{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return{name:"bool"}}valueOf(){return this._value}},Up=class extends bp{serialize(e){return!0===e.valueOf()?[dp.TRUE]:[dp.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],r=t.slice(1);if(n===dp.TRUE)return[new $p(!0),r];if(n===dp.FALSE)return[new $p(!1),r];throw new fp(n)}},Vp=class extends Np{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return{name:"byte_array"}}valueOf(){return this._value}},Dp=class extends Np{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return{name:"int"}}valueOf(){return this._value}},Lp=class extends bp{serialize(e){const t=e instanceof Dp?e.value:BigInt(e),n=Bp(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[dp.NEG_BIG_INT,...Rp(n-64n)]:[dp.POS_BIG_INT,...Rp(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new Dp(-((126&n)>>1)),t.slice(1)]:[new Dp(n>>1),t.slice(1)];if(n===dp.POS_BIG_INT||n===dp.NEG_BIG_INT){const e=n===dp.POS_BIG_INT?1n:-1n,[r,a]=Op(t.slice(1));return[new Dp((r+64n)*e),new Uint8Array(a)]}throw new fp(n)}};const jp=new Lp;var Hp=class extends bp{serialize(e){return 0===e.length?[dp.EMPTY_STRING]:e.length<64?[e.length<<2|dp.SHORT_STRING,...e.valueOf()]:[dp.LONG_STRING,...jp.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===dp.EMPTY_STRING)return[new Vp,t.slice(1)];if(n===dp.LONG_STRING){const[e,n]=jp.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new Vp(n.slice(0,r)),n.slice(r)]}const r=1+(n>>2);return[new Vp(t.slice(1,r)),t.slice(r)]}};const Fp=new Hp;var Jp=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_BYTES,...Fp.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=Fp.deserializeStream(t.slice(2));return[new Ep(n.valueOf()),r]}},Wp=class extends Ip{constructor(e){super(e,"channel","ch")}get type(){return{name:"channel"}}},Kp=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_CHANNEL,...ls.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ls.decode(t.slice(2),!0);return[new Wp(n.data),new Uint8Array(n.remainder)]}},Yp=class extends Ip{constructor(e){super(e,"contract_pubkey","ct")}get type(){return{name:"contract_pubkey"}}},Qp=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_CONTRACT,...ls.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ls.decode(t.slice(2),!0);return[new Yp(n.data),new Uint8Array(n.remainder)]}},Zp=class extends Np{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return{name:"void"}}valueOf(){return this._value}},Xp=class extends bp{serialize(){return""}deserialize(){return new Zp}deserializeStream(e){return[new Zp,e]}},ed=class extends Np{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return Zm(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}},td=class extends bp{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|dp.SHORT_LIST,...t]:[dp.LONG_LIST,...Rp(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a,i,s=0n,o=n.slice(1);r===dp.LONG_LIST&&([s,o]=Op(n.slice(1)),s+=16n),(15&r)===dp.SHORT_LIST&&(s=BigInt((240&r)>>4)),void 0!==t&&(a=t.valuesType);const c=[];for(let e=0n;e<s;e++)[i,o]=this.globalSerializer.deserializeStream(o,a),c.push(i);return 0n===s?[new ed,o]:(void 0===t&&(a=c[0].type),[new ed(a,c),o])}};const nd=e=>{const[t,n]=e;return{key:t,value:n}};var rd=class extends Np{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=np(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(nd)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}},ad=class extends Np{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?Xm(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}},id=class extends Np{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return tp(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}},sd=class extends bp{serialize(e){return this.globalSerializer.serialize(new rd(e.itemsType,Xm(),e.items.map((e=>[e,new ad]))))}deserializeStream(e,t){const n=np(t.valuesType,Xm()),[r,a]=this.globalSerializer.deserializeStream(e,n);return[new id(t.valuesType,r.keys),a]}};const od=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=pd(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const a=n(e.items[r],t.items[r]);if(0!==a)return a}return e.length===t.length?0:-1},cd=e=>{const t=pd(e);return(e,n)=>t(e.key,n.key)},ud=(e,t)=>{const n=new ed({name:"int"},e.valueOf()),r=new ed({name:"int"},t.valueOf());return od(n,r)},ld=(e,t)=>Number(BigInt(e)-BigInt(t)),md={int:ld,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),a=t.toString();return r.length===a.length?ud(n.encode(e),n.encode(t)):r.length-a.length},bits:(e,t)=>e<0||t<0?-ld(e,t):ld(e,t),list:od,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],a=pd(r)(e.items[n],t.items[n]);if(0!==a)return a}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new ed(e.aritiesType,e.arities),a=new ed(t.aritiesType,t.arities),i=pd(r)(r,a);if(0!==i)return i;const s=e.tag-t.tag;return 0!==s?s:pd(Xm())(new ad(e.valueTypes,e.value),new ad(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(cd(e.keyType)),r.sort(cd(t.keyType));const a=pd(e.keyType),i=pd(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=a(t.key,s.key);if(0!==o)return o;const c=i(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:ud,account_pubkey:ud,channel:ud,contract_pubkey:ud,oracle_query_id:ud,oracle_pubkey:ud},pd=e=>(pp(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),pp(md.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),md[e.name]);var dd=pd,hd=class extends bp{serialize(e){const t=e.length,n=dd(e.keyType),r=[...e.items];r.sort(((e,t)=>n(e.key,t.key)));const a=r.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[dp.MAP,...Rp(t),...a.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];if(r!==dp.MAP)throw new fp(r);const[a,i]=Op(n.slice(1));let s,o,c=i;if(0n===a)return[new rd,c];void 0!==t&&({keyType:s,valueType:o}=t);const u=[];for(let e=0n;e<a;e++){const[e,t]=this.globalSerializer.deserializeStream(c,s),[n,r]=this.globalSerializer.deserializeStream(t,o);u.push([e,n]),c=r}const l=u[0];return void 0===t&&(s=l[0].type,o=l[1].type),[new rd(s,o,u),c]}},fd=class extends Ip{constructor(e){super(e,"oracle_query_id","oq")}get type(){return Qm()}},yd=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_ORACLE_QUERY,...ls.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ls.decode(t.slice(2),!0);return[new fd(n.data),new Uint8Array(n.remainder)]}},gd=class extends Ip{constructor(e){super(e,"oracle_pubkey","ok")}get type(){return Ym()}},Nd=class extends bp{serialize(e){return[dp.OBJECT,dp.OTYPE_ORACLE,...ls.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ls.decode(t.slice(2),!0);return[new gd(n.data),new Uint8Array(n.remainder)]}};const wd=e=>e instanceof Uint8Array?(new TextDecoder).decode(e):e.toString(),vd=e=>"string"==typeof e?(new TextEncoder).encode(e):e;var bd=class extends Np{constructor(e){super("string"),this._value=vd(e)}get type(){return{name:"string"}}toString(){return wd(this._value)}toBytes(){return this._value}valueOf(){return(e=>{const t=vd(wd(e));return Pp(e)===Pp(t)})(this._value)?this.toString():this._value}};const xd=new Hp;var _d=class extends bp{serialize(e){let t=e.valueOf();return"string"==typeof t&&(t=(new TextEncoder).encode(t)),xd.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==dp.SHORT_STRING&&![dp.EMPTY_STRING,dp.LONG_STRING].includes(n))throw new fp(n);const[r,a]=xd.deserializeStream(t);return[new bd(r.valueOf()),a]}},Pd=class extends bp{serialize(e){const t=e.size;if(0===t)return[dp.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|dp.SHORT_TUPLE,...n]:[dp.LONG_TUPLE,...Rp(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a=0n,i=n.slice(1);if(r===dp.EMPTY_TUPLE)return[new ad,i];(15&r)===dp.SHORT_TUPLE&&(a=(240&r)>>4),r===dp.LONG_TUPLE&&([a,i]=Op(n.slice(1)),a+=16n);let s=[];void 0!==t&&(s=t.valueTypes);const o=[];let c=null;for(let e=0n;e<a;e++)[c,i]=this.globalSerializer.deserializeStream(i,s[e]),o.push(c);let u=t;return void 0===t&&(u=o.map((e=>e.type))),[new ad(u,o),i]}},Cd=class extends Np{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=rp(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return{name:"int"}}get variantType(){return Xm(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}},Ad=class extends bp{serialize(e){const t=new ad(e.valueTypes,e.value);return[dp.VARIANT,...ls.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),r=ls.decode(n.slice(1),!0),a=[...r.data],i=r.remainder[0],s=r.remainder.slice(1);let o,c=[];void 0!==t&&void 0!==t.variants&&(c=t.variants,o=Xm(Object.values(c[i])[0]));const[u,l]=this.globalSerializer.deserializeStream(s,o);return[new Cd(a,i,u.items,u.valueTypes,c),l]}},Sd=class extends Np{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new zp(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new zp(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}},Td=class extends Sd{constructor(e){super(e,32,"bls12_381.fr")}get type(){return{name:"bls12_381.fr"}}accept(e){return e.visitBls12381Fr(this)}},zd=class extends Sd{constructor(e){super(e,48,"bls12_381.fp")}get type(){return{name:"bls12_381.fp"}}accept(e){return e.visitBls12381Fp(this)}};const Ed=new Jp,Id=(e,t)=>{switch(e.name){case"bls12_381.fr":return new Td(t);case"bls12_381.fp":return new zd(t);default:throw new Error(`Unsupported type "${e.name}"`)}};var Md=class extends bp{serialize(e){return Ed.serialize(e)}deserializeStream(e,t){const[n,r]=Ed.deserializeStream(e);return[Id(t,n.valueOf()),r]}},qd=class extends Np{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}},Rd=class extends bp{serialize(e){const t=new Vp(e.functionId),n=new ad(e.argTypes,e.args),r=new ad([t.type,n.type],[t,n]);return this.globalSerializer.serialize(r)}deserialize(e,t){const n=Xm([{name:"byte_array"},Xm(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,i]=r.items;return new qd(a.valueOf(),i.valueTypes,i.items)}};const Od={[dp.TYPE_INTEGER]:{name:"int"},[dp.TYPE_BOOLEAN]:{name:"bool"},[dp.TYPE_BITS]:{name:"bits"},[dp.TYPE_STRING]:{name:"string"},[dp.TYPE_ANY]:{name:"any"}},kd={[dp.OTYPE_ADDRESS]:{name:"account_pubkey"},[dp.OTYPE_CONTRACT]:{name:"contract_pubkey"},[dp.OTYPE_ORACLE]:Ym(),[dp.OTYPE_ORACLE_QUERY]:Qm(),[dp.OTYPE_CHANNEL]:{name:"channel"}};var Bd=class extends bp{constructor(e){super(e),this._intSerializer=new Lp}serialize(e){const t=Object.entries(Od).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(kd).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([dp.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([dp.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([dp.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([dp.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([dp.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([dp.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([dp.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new zp(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(Od.hasOwnProperty(n))return[Od[n],t.slice(1)];if(n===dp.TYPE_OBJECT){const e=t[1];if(!kd.hasOwnProperty(e))throw new fp(e,"Unsupported object type");return[kd[e],t.slice(2)]}if(n===dp.TYPE_VAR)return[op(t[1]),t.slice(2)];if(n===dp.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[Km(e.valueOf()),n]}if(n===dp.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[Zm(e),n]}if(n===dp.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,a]=this.deserializeStream(n);return[np(e,r),a]}if(n===dp.TYPE_TUPLE){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[Xm(n),a]}if(n===dp.TYPE_VARIANT){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[rp(n),a]}throw new fp(n)}},Gd=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}});const $d={3:"immediate",2:"var",1:"arg",0:"stack"};var Ud=class extends bp{constructor(e){super(e),this._typeSerializer=new Bd}deserialize(e){const t=ls.decode(e,!0),n=ls.decode(t.remainder,!0),r=ls.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(r)}}deserializeFunctions(e,t){let n={},r=e;const a=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),a.push(n);return a}deserializeFunction(e,t){const n=e[0],r=Cp(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const a=t[r],[i,s]=this.deserializeAttributes(e.slice(5)),[o,c,u]=this.deserializeSignature(s),[l,m]=this.deserializeInstructions(u);return[{id:r,name:a,attributes:i,args:o,returnType:c,instructions:l},m]}deserializeInstructions(e){let t={},n=e;const r=[];let a=0,i=!1;for(;n.length&&254!==n[0];)void 0===r[a]&&(r[a]=[]),[t,n,i]=this.deserializeInstruction(n),r[a].push(t),i&&a++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!Gd.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=Gd[t],{mnemonic:a,end:i}=r;if(0===r.args)return[{mnemonic:a,args:[]},n,i];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:a,args:s},o,i]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),a=e.slice(n),i=((e,t=1)=>{const n=[];let r=Number(Pp(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),s=[];let o,c=a;return i.forEach((e=>{[o,c]=this.deserializeArgument(e,c),s.push(o)})),[s,c]}deserializeArgument(e,t){const n=$d[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,a]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},a]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,a]=this._typeSerializer.deserializeStream(n);return[t,r,a]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),a=[];return 1&r&&a.push("private"),2&r&&a.push("payable"),[a,n]}deserializeSymbols(e){const t=np({name:"byte_array"},{name:"string"}),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=Cp(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}},Vd=class extends bp{constructor(e){super(),this._bytecodeSerializer=new Ud(e),this._intSerializer=new Lp}deserializeStream(e){const t=new Uint8Array(e),[n,r]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),i=ls.decode(r.slice(0,a)),s=new TextDecoder;return[{tag:Pp(i[0]),vsn:Pp(i[1]),sourceHash:Cp(i[2]),aevmTypeInfo:i[3],bytecode:this._bytecodeSerializer.deserialize(i[4]),compilerVersion:s.decode(i[5]),payable:Boolean(i[6][0])},r.slice(a)]}},Dd=class extends bp{constructor(){super(),this.typeFactory=new gp,this._serializers={void:new Xp,bool:new Up,int:new Lp,tuple:new Pd(this),record:new Pd(this),list:new td(this),set:new sd(this),map:new hd(this),byte_array:new Hp,string:new _d,hash:new Jp,signature:new Jp,bits:new Gp,variant:new Ad(this),bytes:new Jp,account_pubkey:new qp,contract_pubkey:new Qp,oracle_pubkey:new Nd,oracle_query_id:new yd,channel:new Kp,"bls12_381.fr":new Md,"bls12_381.fp":new Md,calldata:new Rd(this),contract_bytearray:new Vd(this),type:new Bd}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new vp("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new vp("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new vp("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof Np))throw new vp("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new vp("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new vp("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new vp("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}},Ld=n(2861);const jd=e=>(new mr).update(e).digest(),Hd=e=>jd(jd(e)).slice(0,4),Fd=e=>{const t=Ld.Buffer.from(e),n=Hd(e);return Ld.Buffer.concat([t,n],t.length+4)},Jd=e=>{const t=Ld.Buffer.from(e),n=t.slice(0,-4),r=t.slice(-4),a=Hd(n);if(!r.equals(a))throw new Sp("Invalid checksum");return new Uint8Array(n)},Wd=e=>Fd(e).toString("base64"),Kd=e=>{const t=Ld.Buffer.from(e,"base64");return Jd(t)},Yd=e=>lr.encode(Fd(e)),Qd=e=>Jd(lr.decode(e)),Zd={key_block_hash:{tag:"kh",size:32,encoder:s},micro_block_hash:{tag:"mh",size:32,encoder:s},block_pof_hash:{tag:"bf",size:32,encoder:s},block_tx_hash:{tag:"bx",size:32,encoder:s},block_state_hash:{tag:"bs",size:32,encoder:s},contract_bytearray:{tag:"cb",size:0,encoder:i},contract_pubkey:{tag:"ct",size:32,encoder:s},account_pubkey:{tag:"ak",size:32,encoder:s},account_seckey:{tag:"sk",size:32,encoder:s},channel:{tag:"ch",size:32,encoder:s},oracle_pubkey:{tag:"ok",size:32,encoder:s},oracle_query_id:{tag:"oq",size:32,encoder:s},peer_pubkey:{tag:"pp",size:32,encoder:s},name:{tag:"nm",size:0,encoder:s},tx_hash:{tag:"th",size:32,encoder:s},signature:{tag:"sg",size:64,encoder:s},commitment:{tag:"cm",size:32,encoder:s},bytearray:{tag:"ba",size:0,encoder:i}},Xd={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",sk:"account_seckey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};var eh=class{encode(e,t){if(!Zd.hasOwnProperty(e))throw new zp(e,`Unsupported API type ${e}`);const n=Zd[e];if(n.size>0&&t.length!==n.size)throw new zp(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!Xd.hasOwnProperty(t))throw new Sp(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new Sp(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=Zd[Xd[t]],r=e.substring(3),a=n.encoder.decode(r);if(n.size>0&&a.length!==n.size)throw new Sp(`Invalid API data format. Expected size ${n.size}, but got ${a.length}`);return a}decodeWithType(e,t){const n=e.substring(0,2);if(!Zd.hasOwnProperty(t))throw new zp(t,"Unsupported API type");const r=Zd[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new zp(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}};const th={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},nh=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,a]=nh(t,e%t);return[r,n-r*(e/t),a]},rh=(e,t)=>{const n=th[t],r=BigInt(e)*n.R%n.N;return xp(r)},ah=(e,t)=>{const n=th[t],r=(e=>{const t=_p(e).reverse();return BigInt("0x"+t.join(""))})(e),a=((e,t)=>{const[n,r,a]=nh(e,t);return(n+t)%t})(n.R,n.N);return r*a%n.N};var ih=class{constructor(){this._apiEncoder=new eh}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return ah(e.valueOf(),"r")}visitBls12381Fp(e){return ah(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:Cp(t),args:n.map((e=>e.accept(this)))}}},sh=class extends Ep{constructor(e){super(e,32,"hash")}},oh=class extends Ep{constructor(e){super(e,64,"signature")}},ch=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}};const uh=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];var lh=class extends ch{supports({name:e,_valueTypes:t}){return uh.includes(e)}create(e,t){switch(e.name){case"int":return new Dp(t);case"bool":return new $p(t);case"string":return new bd(t);case"bits":return new kp(t);case"hash":return new sh(t);case"bytes":return new Ep(t,e.valueTypes);case"signature":return new oh(t);case"account_pubkey":return new Mp(t);case"contract_pubkey":return new Yp(t);case"channel":return new Wp(t);case"oracle_pubkey":return new gd(t);case"oracle_query_id":return new fd(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},mh=class extends ch{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new zp(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new ed(e.valuesType,n)}},ph=class extends ch{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new id(e.valuesType,n)}},dh=class extends ch{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new rd(e.keyType,e.valueType,n)}},hh=class extends ch{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new zp(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new ad(e.valueTypes,n)}},fh=class extends ch{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new zp(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new zp(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const a=e.keys[r];return this.valueFactory.create(n,t[a])}));return 1===r.length?r[0]:new ad(ep(e.keys,e.valueTypes),r)}};const yh=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];var gh=class extends ch{supports({name:e,_valueTypes:t}){return yh.includes(e)}create(e,t){if(!this.isValid(t))throw new zp(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,r]=Object.entries(t)[0],a=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),i=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===i)throw new zp(e.name,`Unknown variant constructor: ${n}`);const[[,s]]=Object.entries(e.variants[i]);if(r.length!==s.length)throw new zp(e.name,`"${n}" variant constructor expects ${s.length} argument(s) but got ${r.length} instead`);const o=this.valueFactory.createMultiple(s,r);return new Cd(a,i,o,s,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}};const Nh=e=>Array.from(cr.blake2b(e,null,32)),wh=["string","signature","bytes"];var vh=class extends ch{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[r,...a]=t;if("bigint"!=typeof r)throw new Wm(`Event name hash (first topic) should be of type "BigInt", got "${typeof r}" instead.`);const i=e.variants.map((e=>Pp(Nh(Object.keys(e)[0])))).findIndex((e=>e===r));if(-1===i)throw new Wm("Event name hash does not match any event variant constructor");const s=e.variants[i],o=Object.keys(s)[0],[c]=Object.values(s),u=c.map((e=>this._isData(e)?n:a.shift()));return this.valueFactory.create(e,{[o]:u})}_isData(e){return!(!wh.includes(e.name)||"bytes"===e.name&&e.size<=32)}};const bh=["bls12_381.fr","bls12_381.fp"];var xh=class extends ch{supports({name:e,_valueTypes:t}){return bh.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new Td(t);case"bls12_381.fp":return new zd(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},_h=class extends ch{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new zp(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),r=(a=e.functionName,Nh(a).slice(0,4));var a;return new qd(r,e.argumentTypes,n)}},Ph=class{constructor(){this._factories=[new lh(this),new mh(this),new ph(this),new dh(this),new hh(this),new fh(this),new vh(this),new gh(this),new xh(this),new _h(this)]}createMultiple(e,t){return pp(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),((e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e]))))(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return pp(n,`Unsupported type "${e.name}"`),n.create(e,t)}},Ch=class{constructor(){this._apiEncoder=new eh}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new zp("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new zp("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new zp(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),rh(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),rh(t,"p")}},Ah=class extends Ph{constructor(){super(),this._mapper=new Ch}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}},Sh=class{constructor(){this._serializer=new Dd,this._apiEncoder=new eh,this._externalDataFactory=new Ah,this._canonicalMapper=new ih}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),a=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",a)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}},Th=class{constructor(){this._internalEncoder=new Sh}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}},zh=n(2341),Eh=n.n(zh);function Ih(e){var t;return qr(null!==(t=Eh()(e))&&void 0!==t?t:"")}function Mh(e){const t=(new up).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return qr(Cr((new Th).encodeWithType(e,t)))}function qh(e,t,n){return qr(Xn([Br,new Uint8Array([0]),Mh(n),Ih(t),qr(Cr(e))]))}var Rh=n(8287).Buffer;function Oh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function kh(e,t,n){const r=[t];n&&r.push("inner_tx");const a=Cr(e);return Xn([Rh.from(r.join("-")),qr(a)])}var Bh=new WeakMap;class Gh extends Fm{constructor(e){super(),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Bh,void 0),this.secretKey=e;const t=or().sign.keyPair.fromSeed(Cr(e));var n,r;n=Bh,r=t.secretKey,n.set(Oh(n,this),r),this.address=Ar(t.publicKey,ur.AccountAddress)}static generate(){const e=Ar(or().randomBytes(32),ur.AccountSecretKey);return new Gh(e)}async sign(e,t){return this.unsafeSign(e,t)}async unsafeSign(e,t){return or().sign.detached(Rh.from(e),(n=Bh).get(Oh(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new j("networkId","provided",n);const a=Cr(e),i=kh(e,n,!0===t),s=[await this.unsafeSign(i,r)];return Zs({tag:Xr.SignedTx,encodedTx:a,signatures:s})}async signMessage(e,t){return this.unsafeSign(Gr(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:a,contractAddress:i,...s}={}){const o=qh(e,t,{name:n,version:r,networkId:a,contractAddress:i});return Ar(await this.unsafeSign(o,s),ur.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new j("networkId","provided",t);const n=Xn([Br,new Uint8Array([1]),Rh.from(t),Cr(e)]);return Ar(await this.unsafeSign(n),ur.Signature)}}function $h(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:a}={}){const i=ro(e);if(i.tag===Xr.SignedTx)throw new H("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in i&&"freeloader"!==t&&(s+=BigInt(i.fee)),i.tag===Xr.NameClaimTx&&(s+=BigInt(i.nameFee)),i.tag===Xr.OracleQueryTx&&(s+=BigInt(i.queryFee)),i.tag===Xr.OracleRespondTx&&(s-=BigInt(null!=r?r:0)),i.tag===Xr.ChannelSettleTx&&(!0===a&&(s-=BigInt(i.initiatorAmountFinal)),!1===a&&(s-=BigInt(i.responderAmountFinal))),i.tag!==Xr.SpendTx&&i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(i.amount)),i.tag===Xr.ContractCreateTx&&(s+=BigInt(i.deposit)),i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.GaAttachTx&&i.tag!==Xr.GaMetaTx||"freeloader"===t||(s+=BigInt(i.gasPrice)*BigInt(null!=n?n:i.gasLimit)),i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s+=$h(Xs(i.tx.encodedTx),i.tag===Xr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function Uh(e,t,n){const r=ro(e,Xr.SignedTx);if(r.encodedTx.tag===Xr.GaMetaTx)return $h(Xs(r.encodedTx),n);const a=Xs(r.encodedTx),i=Hm(a),[s,o]=[!0,!1].map((e=>Rr(kh(a,t,e),r.signatures[0],i)));if(!s&&!o)throw new D("Can't verify signature");return $h(Xs(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function Vh(e,t,{isMined:n,...r}={}){let a=ro(e);const i=a.tag===Xr.SignedTx,s=i&&!0===n&&ao(e);if(a.tag===Xr.SignedTx&&(a=a.encodedTx),null==r.gasUsed&&!1!==s&&[Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(a.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),a=null!=e?e:n;if(null==a)throw new ae(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=a.gasUsed}if(null==r.queryFee&&Xr.OracleRespondTx===a.tag&&(r.queryFee=(await t.getOracleByPubkey(a.oracleId)).queryFee.toString()),null==r.isInitiator&&Xr.ChannelSettleTx===a.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(a.channelId);r.isInitiator=a.fromId===e}return i?Uh(e,await t.getNetworkId(),r):$h(e,r)}var Dh=n(8287).Buffer;const Lh=[];async function jh(e,t,n){const r=Hm(Xs(e)),[a,{height:i},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!nr(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(Lh.map((async r=>r(e,{node:t,account:a,height:i,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function Hh(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new jm(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[Qo()]});return r._getCachedStatus=async()=>t._getCachedStatus(),jh(ro(e),r,[])}Lh.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Xr.SignedTx)return[];const{encodedTx:a,signatures:i}=e;if(null==(null!=a?a:i))return[];if(1!==i.length)return[];const s=Dh.from([n,...r.includes(Xr.PayingForTx)?["inner_tx"]:[]].join("-")),o=Cr(Xs(a)),c=Xn([s,o]),u=Xn([s,qr(o)]);return Rr(c,i[0],t.id)||Rr(u,i[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:jh(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const a=await Vh(Xs(e),r).catch((()=>0n));return a<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${a}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Xr.SpendTx||Er(e.recipientId,ur.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!nr(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===Xr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Xr.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const a=Xr.OracleRegisterTx===e.tag,i=Xr.ContractCreateTx===e.tag||Xr.GaAttachTx===e.tag,s=Xr.ContractCallTx===e.tag||Xr.GaMetaTx===e.tag,o=null!==(n=null!==(r=a?"oracle-call":null)&&void 0!==r?r:i?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=Ba[t][o];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ie;return!c.abiVersion.includes(u.abiVersion)||i&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(Xr.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof Gn)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class Fh extends D{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function Jh(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:a=!0,confirm:i,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:ao(c),rawTx:c};if(r){const e=await Hh(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new Fh(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(a){const e=await wa(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=i&&+i>0){const e="boolean"==typeof i?void 0:i;return{...n,confirmationHeight:await ba(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw rr(e),Object.assign(e,{rawTx:c,verifyTx:async()=>Hh(c,t)})}}var Wh=n(8287).Buffer;const Kh=e=>Wh.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Yh=e=>Wh.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Qh=e=>{var t;return Kh(null!==(t=Eh()(e))&&void 0!==t?t:"")},Zh="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function Xh(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:Kh(Cr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${Zh}.${Qh(n)}`,a=await t.unsafeSign(r);return`${r}.${Kh(a)}`}function ef(e,t){var n;const r=e.split(".");if(3!==r.length)throw new j("JWT components count",3,r.length);const[a,i,s]=r;if(a!==Zh)throw new j("JWT header",Zh,a);const o=JSON.parse(Yh(i).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Ar(Yh(c.x),ur.AccountAddress);if(null!=t&&u!==t)throw new j("address",`${u} ("sub_jwk")`,t);if(null!=u&&!Rr(Wh.from(`${a}.${i}`),Yh(s),u))throw new He(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function tf(e){try{return ef(e),!0}catch(e){return!1}}function nf(e){ef(e)}function rf(e,t){try{const{signer:n}=ef(e,t);return null!=n}catch(e){return!1}}let af=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const sf=Ha(ur.OracleAddress),of={serialize(e){return sf.serialize(Ar(Cr(e),ur.OracleAddress))},deserialize(e){return Ar(Cr(sf.deserialize(e)),ur.OracleQueryId)}},cf=Ha(ur.ContractAddress),uf=[{tag:Wi(af.AensWildcard),version:Wi(1,!0),accountAddress:Ha(ur.AccountAddress),contractAddress:cf},{tag:Wi(af.AensName),version:Wi(1,!0),accountAddress:Ha(ur.AccountAddress),nameId:Gi,contractAddress:cf},{tag:Wi(af.AensPreclaim),version:Wi(1,!0),accountAddress:Ha(ur.AccountAddress),contractAddress:cf},{tag:Wi(af.Oracle),version:Wi(1,!0),accountAddress:Ha(ur.AccountAddress),contractAddress:cf},{tag:Wi(af.OracleResponse),version:Wi(1,!0),queryId:of,contractAddress:cf}];function lf(e){return ds(uf,af,e,{},ur.Bytearray)}function mf(e,t){return hs(uf,af,e,t,{})}function pf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class df extends re{constructor(e,t){super(`Can't ${t} because ${e} is not an auction name`),this.name="NotAuctionNameError"}}var hf=new WeakMap;class ff{constructor(e,t){var n,r,a;a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=hf),r.set(n,a),this.value=e,this.options=t,this.options=t}get id(){return ia(this.value)}async revoke(e={}){const t={...this.options,...e};return Jh(await no({_isInternalBuild:!0,...t,tag:Xr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},a={...!0===n&&Object.fromEntries((await r.onNode.getNameEntryByName(this.value)).pointers.map((({key:e,id:t})=>[e,t]))),...e},i=Object.values(a).some((e=>Er(e,ur.Bytearray))),s=await no({_isInternalBuild:!0,...r,tag:Xr.NameUpdateTx,version:i?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(a).map((([e,t])=>({key:e,id:t})))});return Jh(s,r)}async transfer(e,t={}){const n={...this.options,...t};return Jh(await no({_isInternalBuild:!0,...n,tag:Xr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async getAuctionState(e={}){var t;if(!fa(this.value))throw new df(this.value,"get auction state");const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getAuctionEntryByName(this.value);return{...r,id:r.id,highestBidder:r.highestBidder}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return Jh(await no({_isInternalBuild:!0,nameSalt:(n=hf,n.get(pf(n,this))),...t,tag:Xr.NameClaimTx,accountId:t.onAccount.address,name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Ir(),r=await no({_isInternalBuild:!0,...t,tag:Xr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:sa(this.value,n)}),a=await Jh(r,t);var i,s;return s=n,(i=hf).set(pf(i,this),s),{...a,nameSalt:n}}async bid(e,t={}){if(!fa(this.value))throw new df(this.value,"make a bid");const n={...this.options,...t};return Jh(await no({_isInternalBuild:!0,...n,tag:Xr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}const yf=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};var gf=class extends cp{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(yf);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new Wm(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new Wm(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new Wm("Missing event declaration");return((e,t)=>({name:"event",variantType:e,topics:t}))(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new Wm("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const i=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!i)throw new Wm("Unknown type definition: "+JSON.stringify(e));const s={};return i.vars.forEach(((e,n)=>{const[[r,a]]=Object.entries(e);s[a]=t[n]})),[s.hasOwnProperty(i.typedef)?s[i.typedef]:i.typedef,s]}},Nf=class{constructor(){this._dataFactory=new Ph,this._apiEncoder=new eh,this._canonicalMapper=new ih}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}};class wf extends Error{constructor(e){super(e),this.name="EncoderError"}}var vf=wf,bf=class{constructor(e){this._byteArrayEncoder=new Sh,this._typeResolver=new gf(e),this._apiEncoder=new eh,this._eventEncoder=new Nf,this._canonicalMapper=new ih}encode(e,t,n){const{types:r,required:a}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<a)throw new vf(`Non matching number of arguments. ${t} expects between ${a} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode({name:"calldata",functionName:t,argumentTypes:r},n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,{name:"string"})}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}},xf=class{constructor(e){this._internalEncoder=new bf(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}};function _f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pf(e,t){return e.get(Cf(e,t))}function Cf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Af=new WeakSet,Sf=new WeakMap;function Tf({returnType:e,returnValue:t,log:n},r,a,i){let s;switch(e){case"ok":{const e=Cf(Af,this,Ef).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,i)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=Cr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new xe("ACI",`. Error provided by node: "${s}".`);if(/Trying to call undefined function: <<\d+,\d+,\d+,\d+>>/.test(s))throw new xe("ACI",`. Error provided by node: "${s}", function name: ${r}.`);break;default:throw new ae(`Unknown return type: ${e}`)}throw new ze(s,a)}async function zf(e,t,n){const r=await Jh(e,{...this.$options,...n});return{hash:r.hash,tx:ro(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function Ef(e){const t=Pf(Sf,this).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new Ee(e)}function If(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const a=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),i=a.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${qr(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(i.length){case 0:throw new Me(t.toString(),e);case 1:return i[0][0];default:throw new qe(e,i)}}const Mf=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new H("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new H("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new $(`callInfo is not available for transaction ${e}`);const a=r;return{...Cf(Af,this,Tf).call(this,a,t,void 0,n),result:a}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:a}=r;return Math.floor(1.25*a)}async $deploy(e,t){var n;const{callStatic:r,...a}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...a,callStatic:r});if(null!=this.$options.address)throw new _e;if(null==a.onAccount)throw new H("Can't deploy without account");const i=a.onAccount.address;if(null==this.$options.bytecode)throw new H("Can't deploy without bytecode");const s=await no({_isInternalBuild:!0,...a,tag:Xr.ContractCreateTx,gasLimit:null!==(n=a.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,a),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:i}),{hash:o,...c}=await Cf(Af,this,zf).call(this,s,"init",{...a,onAccount:a.onAccount});return this.$options.address=io(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,a)},owner:i,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:a,top:i,...s}={...this.$options,...n},o=Cf(Af,this,Ef).call(this,e),{address:c,name:u}=this.$options,l=null!=u?ia(u):c,{onNode:m}=s;if(null==e)throw new Te;if("init"===e&&!0!==a)throw new Ce('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Ie(s.amount,e);let p;try{if(null==s.onAccount)throw new ae("Use fallback account");p=s.onAccount.address}catch(e){if(!0!==a||!(e instanceof Z&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof Qe||e instanceof ae&&"Use fallback account"===e.message))throw e;p=Dr.pub}const d=this._calldata.encode(this._name,e,t);if(!0===a){if(null==s.nonce){const e=null!=i&&{["number"==typeof i?"height":"hash"]:i},t=await xa(p,{...e,onNode:m}).catch((e=>{if(!nr(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:m,callData:d};let n;if("init"===e){if(null==this.$options.bytecode)throw new H('Can\'t dry-run "init" without bytecode');n=await no({...t,tag:Xr.ContractCreateTx,code:this.$options.bytecode,ownerId:p})}else{if(null==l)throw new Ae("Can't dry-run contract without address");n=await no({...t,tag:Xr.ContractCallTx,callerId:p,contractId:l})}const{callObj:r,...a}=await Ia(n,p,{...s,top:i});if(null==r)throw new ae(`callObj is not available for transaction ${n}`);const o=r;return{...a,...Cf(Af,this,Tf).call(this,o,e,n,s),tx:ro(n),result:o,rawTx:n,hash:ao(n),txData:void 0}}if(null!=i)throw new H("Can't handle `top` option in on-chain contract call");if(null==l)throw new Ae("Can't call contract without address");const h=await no({_isInternalBuild:!0,...s,tag:Xr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:p,contractId:l,callData:d});if(null==s.onAccount)throw new H("Can't call contract on chain without account");return Cf(Af,this,zf).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Cf(Af,this,If).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Me)return null;throw e}const a=this._calldata.decodeEvent(r,e.data,e.topics),[i,s]=Object.entries(a)[0];return{name:i,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:a,sourceCodePath:i,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;null!=i&&(t=await e.compile(i)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!=n||(n=t.bytecode))}if(null==r)throw new Se;let l;if(null!=a&&ua(a=await Oa(a,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(l=a),null==a&&null==s&&null==i&&null==n)throw new Ae("Can't create instance by ACI without address");if(null!=a&&null==(await t.getContract(a)).active)throw new Pe(a);if(!0===c){if(null==a)throw new Ae("Can't validate bytecode without contract address");const r=(await t.getContractCode(a)).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=i){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validate(r,i)}if(!c)throw new xe(null!=(null!=s?s:i)?"source code":"bytecode")}return new Mf({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:i,bytecode:n,aci:r,address:a,name:l,fileSystem:o,...u})}constructor({aci:e,...t}){var n;_f(this,n=Af),n.add(this),function(e,t){_f(e,t),t.set(e,void 0)}(this,Sf),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new H(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Cf(e,t),n)}(Sf,this,r.contract),this._name=Pf(Sf,this).name,this._calldata=new xf(e),this.$options=t,Object.assign(this,Object.fromEntries(Pf(Sf,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const a=n.length===t.length+1?n.pop():{};if("object"!=typeof a)throw new Z(`Options should be an object: ${a}`);return"init"===e?this.$deploy(n,{callStatic:r,...a}):this.$call(e,n,{callStatic:r,...a})}]}))))}};var qf=Mf;function Rf(e){return{...e,id:e.id,decodedQuery:Cr(e.query).toString(),decodedResponse:Cr(e.response).toString()}}class Of{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQueries(e={}){const t={...this.options,...e};return(await t.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries.map(Rf)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return Rf(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function kf(e,t,n){return e.set(Gf(e,t),n),n}function Bf(e,t){return e.get(Gf(e,t))}function Gf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var $f=new WeakMap;class Uf extends Of{constructor(e,t){var n,r,a;super(Ar(Cr(e.address),ur.OracleAddress),t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=$f),r.set(n,a),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return Jh(await no({_isInternalBuild:!0,...r,tag:Xr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return Jh(await no({_isInternalBuild:!0,...t,tag:Xr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let a=!1;const i=async()=>{if(a)return;a=!0;const i=(await this.getQueries(n)).filter((({id:e})=>!r.has(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));i.forEach((e=>r.add(e.id))),a=!1,await Promise.all(i.map((t=>e(t))))};i();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await ya("micro-block",n);return setInterval((async()=>i()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return Jh(await no({_isInternalBuild:!0,...r,tag:Xr.OracleRespondTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=Bf($f,this))throw new re("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const a=async t=>{const a=await e(t),i=r.then((async()=>this.respondToQuery(t.id,a,n)));r=i.then((()=>{}),(()=>{})),await i};kf($f,this,Promise.resolve());const i=this.pollQueries((async e=>{const t=a(e);if(null==Bf($f,this))throw new ie;return kf($f,this,Bf($f,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{i(),await Bf($f,this),kf($f,this,void 0)}}}class Vf extends Of{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,a=await no({_isInternalBuild:!0,...n,tag:Xr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:i}=ro(a,Xr.OracleQueryTx);return{...await Jh(a,n),queryId:na(r,i,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},a=null!==(n=r.interval)&&void 0!==n?n:await ya("micro-block",r);let i,s,o;do{({response:o,ttl:s}=await this.getQuery(e,r));const t=Cr(o);if(t.length>0)return t.toString();await Qn(a),i=await Na({...r,cached:!0})}while(s>=i);throw new Y(i)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function Df(e,t,n){return Jh(await no({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:n.onAccount.address,recipientId:await Oa(t,"account_pubkey",n),amount:e}),n)}async function Lf(e,t,n){if(+e<0||+e>1)throw new j("fraction","a number between 0 and 1",e);const r=await Oa(t,"account_pubkey",n),a=n.onAccount.address,i=new I(await _a.bind(n.onAccount)(a,n)),s=i.times(e).integerValue(I.ROUND_HALF_UP),{fee:o}=ro(await no({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:s}),Xr.SpendTx),c=s.plus(o).gt(i)?i.minus(o):s;return Jh(await no({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:c}),n)}async function jf(e,t){return Jh(await no({_isInternalBuild:!0,...t,tag:Xr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var Hf=n(8287).Buffer;async function Ff(e,t,{onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var m;const p=n.address;if("generalized"===(await xa(p,{onNode:a})).kind)throw new H(`Account ${p} is already GA`);const d=await qf.initialize({onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await no({_isInternalBuild:!0,...l,tag:Xr.GaAttachTx,onNode:a,code:await d.$compile(),gasLimit:null!==(m=l.gasLimit)&&void 0!==m?m:await d._estimateGas("init",t,l),ownerId:p,callData:d._calldata.encode(d._name,"init",t),authFun:qr(e)}),{hash:f,rawTx:y}=await Jh(h,{onNode:a,onAccount:n,onCompiler:r,...l}),g=io(y);return Object.freeze({owner:p,transaction:f,rawTx:y,gaContractId:g})}async function Jf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a,...i}){const{nodeNetworkId:s}=await r.getNodeInfo();let o=qr(Xn([Hf.from(s),Cr(e)]));if(null==t)throw new j("fee","provided (in Ceres)",t);if(null==n)throw new j("gasPrice","provided (in Ceres)",n);return o=qr(Cr(Ks({tag:ns.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Ar(o,ur.TxHash),...!0===i[Ua]?{[Ua]:!0}:{protocolParameters:null!=a?a:await xi(r)}}))),o}async function Wf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a}){return Jf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a})}async function Kf(e,{onNode:t}){const n=ro(e,Xr.SignedTx);if(n.encodedTx.tag!==Xr.GaMetaTx)throw new j("transaction","to include GaMetaTx",Xr[n.encodedTx.tag]);return Jf(Xs(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t,[Ua]:!0})}var Yf=n(4997),Qf=n(2321),Zf=n(2231);function Xf(e){return Xf="function"==typeof Qf&&"symbol"==typeof Zf?function(e){return typeof e}:function(e){return e&&"function"==typeof Qf&&e.constructor===Qf&&e!==Qf.prototype?"symbol":typeof e},Xf(e)}var ey=n(9280);function ty(e,t,n){return(t=function(e){var t=function(e){if("object"!=Xf(e)||!e)return e;var t=e[ey];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xf(t)?t:t+""}(t))in e?Yf(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ny(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ry={...t,sendTransaction:Jh,...o,...c};var ay=new WeakMap;class iy{constructor(e={}){var t,n;ty(this,"_options",{}),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,ay,void 0),Object.assign(this._options,e),t=ay,n={onAccount:ar((()=>this._options.onAccount)),onNode:ar((()=>this._options.onNode)),onCompiler:ar((()=>this._options.onCompiler))},t.set(ny(t,this),n)}getContext(e={}){return{...this._options,...(t=ay,t.get(ny(t,this))),...e};var t}async buildTx(e){return no({...this.getContext(),...e})}}Object.assign(iy.prototype,Zn(ry,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var sy=iy;function oy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cy=new WeakMap;class uy extends sy{constructor({nodes:e=[],...t}={}){var n,r;super(t),ty(this,"pool",new Map),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,cy,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=cy,r={onNode:ar((()=>this.api)),onCompiler:ar((()=>this.compilerApi)),onAccount:ar((()=>this._resolveAccount()))},n.set(oy(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new G("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new $e(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Ue(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Ue("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new te("Address in AccountResolver");if("object"==typeof e)return e;throw new Z(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,t={}){return this.unsafeSign(e,t)}async unsafeSign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).unsafeSign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...(t=cy,t.get(oy(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class ly extends uy{constructor({accounts:e,...t}={}){super(t),ty(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(Cr(t),null==this.accounts[t])throw new se(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new se(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(Cr(e),null==this.accounts[e])throw new se(e);this.selectedAddress=e}}let my=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),py=function(e){return e.window="window",e.extension="extension",e}({}),dy=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),hy=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),fy=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const yy=[];class gy extends q{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=yy.find((t=>t.code===e.code));if(null==t)throw new ae(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class Ny extends gy{constructor(e){super("Invalid transaction"),ty(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}ty(Ny,"code",2),yy.push(Ny);class wy extends gy{constructor(e){super("Operation rejected by user"),ty(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}ty(wy,"code",4),yy.push(wy);class vy extends gy{constructor(){super("Unsupported Protocol Version"),ty(this,"code",5),this.name="RpcUnsupportedProtocolError"}}ty(vy,"code",5),yy.push(vy);class by extends gy{constructor(e){super("Wallet deny your connection request"),ty(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}ty(by,"code",9),yy.push(by);class xy extends gy{constructor(){super("You are not connected to the wallet"),ty(this,"code",10),this.name="RpcNotAuthorizeError"}}ty(xy,"code",10),yy.push(xy);class _y extends gy{constructor(e){super(`You are not subscribed for account ${e}`),ty(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}ty(_y,"code",11),yy.push(_y);class Py extends gy{constructor(){super("The peer failed to execute your request due to unknown error"),ty(this,"code",12),this.name="RpcInternalError"}}ty(Py,"code",12),yy.push(Py);class Cy extends gy{constructor(e){super(`Wallet can't find a network by id "${e}"`),ty(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}ty(Cy,"code",13),yy.push(Cy);class Ay extends gy{constructor(){super("Method not found"),ty(this,"code",-32601),this.name="RpcMethodNotFoundError"}}ty(Ay,"code",-32601),yy.push(Ay);var Sy=n(8287).Buffer;class Ty extends Fm{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){return this.unsafeSign(e)}async unsafeSign(e){const t=Ar(Sy.from(e),ur.Bytearray),{signature:n}=await this._rpcClient.request(hy.unsafeSign,{onAccount:this.address,data:t});return Cr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new j("networkId","provided",n);const r=await this._rpcClient.request(hy.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new ee("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(hy.signMessage,{onAccount:this.address,message:e});return Sy.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:a,networkId:i}={}){const{signature:s}=await this._rpcClient.request(hy.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:i,contractAddress:a},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(hy.signDelegation,{delegation:e,onAccount:this.address});return t}}function zy(e,t,n){Ey(e,t),t.set(e,n)}function Ey(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Iy(e,t){return e.get(qy(e,t))}function My(e,t,n){return e.set(qy(e,t),n),n}function qy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ry=new WeakMap,Oy=new WeakMap,ky=new WeakMap,By=new WeakSet;class Gy{constructor(e,t,n){var r;Ey(this,r=By),r.add(this),zy(this,Ry,new Map),zy(this,Oy,0),zy(this,ky,void 0),this.connection=e,My(ky,this,n),e.connect(qy(By,this,$y).bind(this),t)}async request(e,t){return qy(By,this,Uy).call(this,My(Oy,this,Iy(Oy,this)+1),e,t),new Promise(((e,t)=>{Iy(Ry,this).set(Iy(Oy,this),{resolve:e,reject:t})}))}notify(e,t){qy(By,this,Uy).call(this,void 0,e,t)}}async function $y(e,t){if("2.0"!==e?.jsonrpc)throw new le(JSON.stringify(e));if("result"in e||"error"in e)return void qy(By,this,Dy).call(this,e);const n=e;let r,a;try{if(!(n.method in Iy(ky,this)))throw new Ay;const e=n.method;r=await Iy(ky,this)[e](n.params,t)}catch(e){rr(e),a=e}if(null!=n.id&&qy(By,this,Vy).call(this,n.id,n.method,r,null==a||a instanceof gy?a:new Py),null!=a&&!(a instanceof gy))throw a}function Uy(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function Vy(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function Dy({id:e,error:t,result:n}){const r=Iy(Ry,this).get(e);if(null==r)throw new me(e);null!=t?r.reject(gy.deserialize(t)):r.resolve(n),Iy(Ry,this).delete(e)}class Ly extends uy{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...a}){super(a),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if(Cr(t),!this.addresses().includes(t))throw new pe(t);this._ensureConnected(),e=new Ty(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Ye("You are already connected to wallet");let r;const a=e=>{if(t){if(null==e.node?.url)throw new Ze("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new jm(e.node.url),!0)}this.onNetworkChange(e)},i=new Gy(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[hy.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[hy.updateNetwork]:a,[hy.closeConnection]:e=>{r=e,i.connection.disconnect()},[hy.readyToConnect]:()=>{}}),s=await i.request(hy.connect,{name:this.name,version:1,connectNode:t});return a(s),this.rpcClient=i,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(hy.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(hy.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(hy.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(hy.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new Qe("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new he}}var jy=n(228);function Hy(e,t,n){Fy(e,t),t.set(e,n)}function Fy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jy(e,t,n){return e.set(Ky(e,t),n),n}function Wy(e,t){return e.get(Ky(e,t))}function Ky(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Yy=new WeakMap,Qy=new WeakSet,Zy=new WeakMap;class Xy extends jy{get isConnected(){return null!=Wy(Yy,this)}get accounts(){return Wy(Zy,this)}constructor(){var e;super(),Fy(this,e=Qy),e.add(this),Hy(this,Yy,void 0),Hy(this,Zy,[])}static async _connect(e,t,n,r){let a;const i=new Gy(t,(()=>{Jy(Yy,n,void 0),Jy(Zy,n,[]),n.emit("disconnect",a)}),{[hy.updateAddress]:Ky(Qy,n,tg).bind(n),[hy.updateNetwork]:n._updateNetwork.bind(n),[hy.closeConnection]:e=>{a=e,i.connection.disconnect()},[hy.readyToConnect]:()=>{}});Jy(Yy,n,i);const s=await Wy(Yy,n).request(hy.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=Ky(Qy,this,eg).call(this);e.notify(hy.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=Ky(Qy,this,eg).call(this);return(await e.request(hy.address,void 0)).map((t=>new Ty(e,t)))}async subscribeAccounts(e,t){const n=await Ky(Qy,this,eg).call(this).request(hy.subscribeAddress,{type:e,value:t});return Ky(Qy,this,tg).call(this,n.address),Wy(Zy,this)}async askToSelectNetwork(e){await Ky(Qy,this,eg).call(this).request(hy.updateNetwork,e)}}function eg(){if(null==Wy(Yy,this))throw new Qe("You are not connected to Wallet");return Wy(Yy,this)}function tg(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];Jy(Zy,this,t.map((e=>new Ty(Ky(Qy,this,eg).call(this),e)))),this.emit("accountsChange",Wy(Zy,this))}function ng(e,t){return e.get(rg(e,t))}function rg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ag=new WeakMap;class ig extends Xy{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=ag),n.set(t,r)}get networkId(){return ng(ag,this)}_updateNetwork(e){var t,n;t=ag,n=e.networkId,t.set(rg(t,this),n),this.emit("networkIdChange",ng(ag,this))}static async connect(e,t){const n=new ig;return await ig._connect(e,t,n,!1),n}}function sg(e,t){return e.get(og(e,t))}function og(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cg=new WeakMap;class ug extends Xy{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=cg),n.set(t,r)}get node(){return sg(cg,this)}_updateNetwork(e){if(null==e.node?.url)throw new Ze("Missing URLs of the Node");var t,n;t=cg,n=new jm(e.node.url),t.set(og(t,this),n),this.emit("nodeChange",sg(cg,this))}static async connect(e,t){const n=new ug;return await super._connect(e,t,n,!0),n}}var lg=n(1013);const mg=n.n(lg)()({storeAsString:!0}),pg=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Zn(e,(([e,t])=>[e,pg(t)]));if(Array.isArray(e))return e.map((e=>pg(e)));if("string"==typeof e&&new I(e).toString(10)===e){const t=new I(e);return t.toJSON=()=>t.toString(10),t}return e};var dg={stringify:(...e)=>mg.stringify(pg(e[0]),...e.slice(1)),parse:mg.parse},hg=n(8287).Buffer;class fg extends ly{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:a,onDisconnect:i,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),ty(this,"_clients",new Map),this.onConnection=r,this.onSubscription=a,this.onDisconnect=i,this.onAskAccounts=s,this.onAskToSelectNetwork=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(hy.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(hy.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new de(e);return t}_isRpcClientConnected(e){return fy.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=fy.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=hg.from(or().randomBytes(8)).toString("base64");let n;const r={id:t,status:fy.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new Gy(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[hy.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[hy.connect]:async({name:e,version:n,icons:a,connectNode:i},s)=>{if(1!==n)throw new vy;return await this.onConnection(t,{name:e,icons:a,connectNode:i},s),r.status=fy.CONNECTED,r.connectNode=i,{...await this.getWalletInfo(),...i&&this._getNode()}},[hy.subscribeAddress]:async({type:e,value:n},a)=>{if(!this._isRpcClientConnected(t))throw new xy;switch(e){case dy.subscribe:await this.onSubscription(t,{type:e,value:n},a),r.addressSubscription.add(n);break;case dy.unsubscribe:r.addressSubscription.delete(n);break;default:throw new ae(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[hy.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new xy;return await this.onAskAccounts(t,e,n),this.addresses()},[hy.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:a},i)=>{if(!this._isRpcClientConnected(t))throw new xy;if(!this.addresses().includes(n))throw new _y(n);const s={onAccount:n,aeppOrigin:i,aeppRpcClientId:t,innerTx:a};if(r||!0===a)return{signedTransaction:await this.signTransaction(e,s)};try{return dg.parse(dg.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await Hh(e,this.api);if(n.length>0)throw new Ny(n);throw t}},[hy.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new xy;if(!this.addresses().includes(n))throw new _y(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:hg.from(await this.signMessage(e,a)).toString("hex")}},[hy.signTypedData]:async({domain:e,aci:n,data:r,onAccount:a=this.address},i)=>{if(!this._isRpcClientConnected(t))throw new xy;if(!this.addresses().includes(a))throw new _y(a);const s={...e,onAccount:a,aeppOrigin:i,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[hy.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new xy;if(!this.addresses().includes(n))throw new _y(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Ar(await this.unsafeSign(Cr(e),a),ur.Signature)}},[hy.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new xy;if(!this.addresses().includes(n))throw new _y(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,a)}},[hy.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new xy;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(hy.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function yg(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function gg(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ng(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");yg(e.outputLen),yg(e.blockLen)}function wg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function vg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bg(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const xg=async()=>{};async function _g(e,t,n){let r=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-r;e>=0&&e<t||(await xg(),r+=e)}}function Pg(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function Cg(e){return"string"==typeof e&&(e=Pg(e)),gg(e),e}function Ag(e){return"string"==typeof e&&(e=Pg(e)),gg(e),e}class Sg{}function Tg(e){const t=t=>e().update(Cg(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class zg extends Sg{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ng(e);const n=Cg(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),vg(a)}update(e){return wg(this),this.iHash.update(e),this}digestInto(e){wg(this),gg(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Eg=(e,t,n)=>new zg(e,t).update(n).digest();function Ig(e,t,n,r){Ng(e);const a=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:i,dkLen:s,asyncTick:o}=a;if(yg(i),yg(s),yg(o),i<1)throw new Error("iterations (c) should be >= 1");const c=Ag(t),u=Ag(n),l=new Uint8Array(s),m=Eg.create(e,c),p=m._cloneInto().update(u);return{c:i,dkLen:s,asyncTick:o,DK:l,PRF:m,PRFSalt:p}}function Mg(e,t,n,r,a){return e.destroy(),t.destroy(),r&&r.destroy(),vg(a),n}Eg.create=(e,t)=>new zg(e,t);class qg extends Sg{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=bg(this.buffer)}update(e){wg(this),gg(e=Cg(e));const{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(r-this.pos,a-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=bg(e);for(;r<=a-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){wg(this),function(e,t){gg(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:a}=this;let{pos:i}=this;t[i++]=128,vg(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const a=BigInt(32),i=BigInt(4294967295),s=Number(n>>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=bg(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Rg=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Og=BigInt(2**32-1),kg=BigInt(32);function Bg(e,t=!1){return t?{h:Number(e&Og),l:Number(e>>kg&Og)}:{h:0|Number(e>>kg&Og),l:0|Number(e&Og)}}const Gg=(e,t,n)=>e>>>n,$g=(e,t,n)=>e<<32-n|t>>>n,Ug=(e,t,n)=>e>>>n|t<<32-n,Vg=(e,t,n)=>e<<32-n|t>>>n,Dg=(e,t,n)=>e<<64-n|t>>>n-32,Lg=(e,t,n)=>e>>>n-32|t<<64-n;function jg(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}}const Hg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Fg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Jg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Wg=(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,Kg=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),Yg=(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,Qg=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:s}=Bg(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),Zg=(()=>Qg[0])(),Xg=(()=>Qg[1])(),eN=new Uint32Array(80),tN=new Uint32Array(80);class nN extends qg{constructor(e=64){super(128,e,16,!1),this.Ah=0|Rg[0],this.Al=0|Rg[1],this.Bh=0|Rg[2],this.Bl=0|Rg[3],this.Ch=0|Rg[4],this.Cl=0|Rg[5],this.Dh=0|Rg[6],this.Dl=0|Rg[7],this.Eh=0|Rg[8],this.El=0|Rg[9],this.Fh=0|Rg[10],this.Fl=0|Rg[11],this.Gh=0|Rg[12],this.Gl=0|Rg[13],this.Hh=0|Rg[14],this.Hl=0|Rg[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:m,Gh:p,Gl:d,Hh:h,Hl:f}=this;return[e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f]}set(e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|m,this.Gh=0|p,this.Gl=0|d,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)eN[n]=e.getUint32(t),tN[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|eN[e-15],n=0|tN[e-15],r=Ug(t,n,1)^Ug(t,n,8)^Gg(t,0,7),a=Vg(t,n,1)^Vg(t,n,8)^$g(t,n,7),i=0|eN[e-2],s=0|tN[e-2],o=Ug(i,s,19)^Dg(i,s,61)^Gg(i,0,6),c=Vg(i,s,19)^Lg(i,s,61)^$g(i,s,6),u=Jg(a,c,tN[e-7],tN[e-16]),l=Wg(u,r,o,eN[e-7],eN[e-16]);eN[e]=0|l,tN[e]=0|u}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:m,Fh:p,Fl:d,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=Ug(l,m,14)^Ug(l,m,18)^Dg(l,m,41),N=Vg(l,m,14)^Vg(l,m,18)^Lg(l,m,41),w=l&p^~l&h,v=Kg(g,N,m&d^~m&f,Xg[e],tN[e]),b=Yg(v,y,t,w,Zg[e],eN[e]),x=0|v,_=Ug(n,r,28)^Dg(n,r,34)^Dg(n,r,39),P=Vg(n,r,28)^Lg(n,r,34)^Lg(n,r,39),C=n&a^n&s^a&s,A=r&i^r&o^i&o;y=0|h,g=0|f,h=0|p,f=0|d,p=0|l,d=0|m,({h:l,l:m}=jg(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;const S=Hg(x,P,A);n=Fg(S,b,_,C),r=0|S}({h:n,l:r}=jg(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=jg(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=jg(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=jg(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:m}=jg(0|this.Eh,0|this.El,0|l,0|m)),({h:p,l:d}=jg(0|this.Fh,0|this.Fl,0|p,0|d)),({h:h,l:f}=jg(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=jg(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,g)}roundClean(){vg(eN,tN)}destroy(){vg(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const rN=Tg((()=>new nN));function aN(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function iN(e){const t=aN(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}const sN=e=>aN("mnemonic"+e);var oN=n(9234),cN=n.n(oN);class uN{async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}var lN=n(8287).Buffer;function mN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pN(e,t){return e.get(hN(e,t))}function dN(e,t,n){return e.set(hN(e,t),n),n}function hN(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const fN=lN.from("ed25519 seed");function yN(e,t){const n=cN().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function gN(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=lN.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),yN(Xn([lN.alloc(1,0),e,r]),t)}),e)}var NN=new WeakMap,wN=new WeakSet;class vN extends uN{constructor(e){var t;super(),mN(this,t=wN),t.add(this),function(e,t){mN(e,t),t.set(e,void 0)}(this,NN),dN(NN,this,e)}async getWallet(){return hN(wN,this,bN).call(this,!1)}getWalletSync(){return hN(wN,this,bN).call(this,!0)}async initialize(e){const t=await this.getWallet();return hN(wN,this,xN).call(this,e,t)}initializeSync(e){const t=this.getWalletSync();return hN(wN,this,xN).call(this,e,t)}}function bN(e){const t=e=>{const t=gN(yN(e,fN),[44,457]);return dN(NN,this,{secretKey:Ar(t.secretKey,ur.Bytearray),chainCode:Ar(t.chainCode,ur.Bytearray)}),pN(NN,this)};if(ArrayBuffer.isView(pN(NN,this))){if(64!==pN(NN,this).length)throw new j("seed length",64,pN(NN,this).length);return t(pN(NN,this))}return"object"==typeof pN(NN,this)?pN(NN,this):e?t(function(e,t=""){return function(e,t,n){const{c:r,dkLen:a,DK:i,PRF:s,PRFSalt:o}=Ig(e,t,n,{c:2048,dkLen:64});let c;const u=new Uint8Array(4),l=bg(u),m=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){const n=i.subarray(t,t+s.outputLen);l.setInt32(0,e,!1),(c=o._cloneInto(c)).update(u).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<r;e++){s._cloneInto(c).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return Mg(s,o,i,c,m)}(rN,iN(e).nfkd,sN(t))}(pN(NN,this))):function(e,t=""){return async function(e,t,n){const{c:r,dkLen:a,asyncTick:i,DK:s,PRF:o,PRFSalt:c}=Ig(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),m=bg(l),p=new Uint8Array(o.outputLen);for(let e=1,t=0;t<a;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);m.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(p),n.set(p.subarray(0,n.length)),await _g(r-1,i,(()=>{o._cloneInto(u).update(p).digestInto(p);for(let e=0;e<n.length;e++)n[e]^=p[e]}))}return Mg(o,c,s,u,p)}(rN,iN(e).nfkd,sN(t))}(pN(NN,this)).then(t)}function xN(e,t){const n=gN({secretKey:Cr(t.secretKey),chainCode:Cr(t.chainCode)},[e,0,0]).secretKey;return new Gh(Ar(n,ur.AccountSecretKey))}function _N(e,t){return e.get(PN(e,t))}function PN(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var CN=new WeakMap;class AN extends Fm{constructor(e){var t,n,r;super(),r=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=CN),n.set(t,r),Cr(e),this.address=e}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("Can't sign using generalized account")}async signMessage(){throw new te("Can't sign using generalized account")}async signTypedData(){throw new te("Can't sign using generalized account")}async signDelegation(){throw new te("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r,protocolParameters:a}){if(null==t||null==n||null==r)throw new j("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:s,args:o,fee:c,gasLimit:u,gasPrice:l}="function"==typeof t?await t(e):t,m=null!=i?i:await(async()=>{if(null==_N(CN,this)){const n=await xa(this.address,{onNode:r});if("generalized"!==n.kind)throw new j("account kind","generalized",n.kind);e=CN,t=n.authFun,e.set(PN(e,this),t)}var e,t;if(null==_N(CN,this))throw new ae("Account in generalised, but authFun not provided");if(null==s||null==o)throw new be("Auth data must contain sourceCode and args or callData.");const a=await qf.initialize({onCompiler:n,onNode:r,sourceCode:s});return a._calldata.encode(a._name,_N(CN,this),o)})(),p=await no({tag:Xr.GaMetaTx,tx:{tag:Xr.SignedTx,encodedTx:Cr(e),signatures:[]},gaId:this.address,authData:m,fee:c,gasLimit:u,gasPrice:l,...null!=a&&{protocolParameters:a},onNode:r});return Zs({tag:Xr.SignedTx,encodedTx:Cr(p),signatures:[]})}}var SN=n(8287).Buffer;const TN=224;class zN extends Fm{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using Ledger HW")}async signTypedData(){throw new te("Typed data signing using Ledger HW")}async signDelegation(){throw new te("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountLedger");if(null==n)throw new j("networkId","provided",n);const r=Cr(e);let a=0;const i=SN.from(n),s=[];for(;a!==r.length;){const e=0===a?141-i.length:150,t=a+e>r.length?r.length-a:e,n=SN.alloc(0===a?9+i.length+t:t);if(0===a){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(i.length,e),e+=i.copy(n,e,0,i.length),r.copy(n,e,0,150-e)}else r.copy(n,0,a,a+t);s.push(n),a+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(TN,4,0===n?0:128,0,t))),Promise.resolve(SN.alloc(0)))).subarray(0,64)];return Zs({tag:Xr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=SN.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,a=t+e>n.length?n.length-t:e,i=SN.alloc(0===t?8+a:a);0===t?(i.writeUInt32BE(this.index,0),i.writeUInt32BE(n.length,4),n.copy(i,8,t,t+a)):n.copy(i,0,t,t+a),r.push(i),t+=a}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(TN,8,0===n?0:128,0,t))),Promise.resolve(SN.alloc(0)))).subarray(0,64)}}var EN=n(8287).Buffer;function IN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function MN(e,t){return e.get(RN(e,t))}function qN(e,t,n){return e.set(RN(e,t),n),n}function RN(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ON=new WeakMap,kN=new WeakSet;class BN extends uN{constructor(e){var t;super(),IN(this,t=kN),t.add(this),function(e,t){IN(e,t),t.set(e,void 0)}(this,ON),ty(this,"_enableExperimentalLedgerAppSupport",!1),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await RN(kN,this,$N).call(this),t=[e,"0.4.4","0.5.0"],n=[e,"1.0.0","2.0.0"];if(!(Do(...t)||this._enableExperimentalLedgerAppSupport&&Do(...n)))throw new ne("Aeternity app on Ledger",...t);qN(ON,this,Promise.resolve())}async getAppConfiguration(){return RN(kN,this,$N).call(this)}async getAddress(e,t=!1){await RN(kN,this,GN).call(this);const n=EN.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(TN,2,t?1:0,0,n),a=r[0];return r.subarray(1,1+a).toString("ascii")}async initialize(e){return new zN(this.transport,e,await this.getAddress(e))}}async function GN(){var e;return null!==(e=MN(ON,this))&&void 0!==e||qN(ON,this,this.ensureReady()),MN(ON,this)}async function $N(){let e=await this.transport.send(TN,6,0,0);return 6===e.length&&(e=e.subarray(1)),{version:[e[0],e[1],e[2]].join(".")}}var UN=n(8287).Buffer;const VN="npm:@aeternity-snap/plugin";async function DN(e,t,n,r){const a=await e.request({method:"wallet_invokeSnap",params:{snapId:VN,request:{method:t,params:n}}});if(null==a)throw new ae("Empty MetaMask response");if(!(r in a))throw new ae(`Key ${r} missed in response ${JSON.stringify(a)}`);return a[r]}class LN extends Fm{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using MetaMask")}async signTypedData(){throw new te("Typed data signing using MetaMask")}async signDelegation(){throw new te("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountMetamask");if(null==n)throw new j("networkId","provided",n);return DN(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await DN(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:UN.from(e).toString("base64")},"signature");return UN.from(t,"base64")}}function jN(e,t,n){HN(e,t),t.set(e,n)}function HN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FN(e,t,n){return e.set(WN(e,t),n),n}function JN(e,t){return e.get(WN(e,t))}function WN(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const KN="0.0.9",YN="0.1.0";var QN=new WeakMap,ZN=new WeakSet,XN=new WeakMap;class ew extends uN{get provider(){if(null==JN(QN,this))throw new X("Metamask is not detected yet");return JN(QN,this)}constructor(e){var t;if(super(),HN(this,t=ZN),t.add(this),jN(this,QN,void 0),jN(this,XN,void 0),FN(QN,this,e),null==JN(QN,this)&&null==window)throw new X("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider")}async installSnap(){const e=await WN(ZN,this,rw).call(this);return(await e.request({method:"wallet_requestSnaps",params:{[VN]:{version:KN}}}))[VN]}async requestSnap(e=`>=${KN} <${YN}`){const t=await WN(ZN,this,rw).call(this);return(await t.request({method:"wallet_requestSnaps",params:{[VN]:{version:e}}}))[VN]}async ensureReady(){const e=[await this.getSnapVersion(),KN,YN];if(!Do(...e))throw new ne("Aeternity snap in MetaMask",...e)}async getSnapVersion(){const e=await WN(ZN,this,rw).call(this),t=await e.request({method:"wallet_getSnaps"}),n=t[VN]?.version;if(null==n)throw new X("Aeternity snap is not installed to MetaMask or not connected to this aepp");return n}async initialize(e){await this.requestSnap();const t=await WN(ZN,this,rw).call(this),n=await DN(t,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new LN(t,e,n)}}async function tw(){if(!("ethereum"in window)||null==window.ethereum)return;const e=window.ethereum,t=await e.request({method:"web3_clientVersion"});if(null==t)throw new ae("Can't get Ethereum Provider version");return t.startsWith("MetaMask/v")?e:void 0}async function nw(){return setTimeout((()=>window.dispatchEvent(new Event("eip6963:requestProvider")))),new Promise((e=>{const t=n=>{"io.metamask"===n.detail.info.rdns&&(window.removeEventListener("eip6963:announceProvider",t),e(n.detail.provider))};window.addEventListener("eip6963:announceProvider",t),setTimeout((()=>{window.removeEventListener("eip6963:announceProvider",t),e(void 0)}),500)}))}async function rw(){var e;return null!==(e=JN(XN,this))&&void 0!==e||FN(XN,this,(async(e,t)=>{if(null!==(e=JN(QN,this))&&void 0!==e||FN(QN,this,null!==(t=await WN(ZN,this,tw).call(this))&&void 0!==t?t:await WN(ZN,this,nw).call(this)),null==JN(QN,this))throw new X("Can't find a Metamask extension as an injected provider and over EIP-6963. Ensure that Metamask is installed or setup a provider.");const n=await JN(QN,this).request({method:"web3_clientVersion"});if(null==n)throw new ae("Can't get Ethereum Provider version");const r=[n.slice(10),"12.2.4"];if(!Do(...r))throw new ne("Metamask",...r);return JN(QN,this)})()),JN(XN,this)}class aw{}const iw={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},sw={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},ow={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},cw={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},uw={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},lw={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},mw={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},pw={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},dw={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},hw={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},fw={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},yw={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},gw={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Nw={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},ww={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},vw={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},bw={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},xw={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},_w={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},Pw={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Cw={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Aw={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Sw={parameterPath:"body",mapper:iw},Tw={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},zw={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Ew={parameterPath:"body",mapper:lw},Iw={parameterPath:"body",mapper:mw},Mw={parameterPath:"body",mapper:dw},qw={parameterPath:"body",mapper:fw},Rw={parameterPath:"body",mapper:Nw},Ow={parameterPath:"body",mapper:ww},kw={parameterPath:"body",mapper:bw};class Bw extends Uo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-compiler/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},$w)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},Uw)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},Vw)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},Dw)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},Lw)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},jw)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},Hw)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},Fw)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},Jw)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},Ww)}version(e){return this.sendOperationRequest({options:e},Kw)}apiVersion(e){return this.sendOperationRequest({options:e},Yw)}api(e){return this.sendOperationRequest({options:e},Qw)}}const Gw=fo(u,!1),$w={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Sw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Uw={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:uw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Sw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Vw={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Ew,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Dw={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:pw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Iw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Lw={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:hw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Mw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},jw={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:yw},400:{bodyMapper:gw,isError:!0}},requestBody:qw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Hw={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:yw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Rw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Fw={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:vw},400:{bodyMapper:gw,isError:!0}},requestBody:Ow,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Jw={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:kw,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Ww={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:xw},400:{bodyMapper:gw,isError:!0}},requestBody:Ow,urlParameters:[zw],headerParameters:[Aw,Tw],mediaType:"json",serializer:Gw},Kw={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:xw},500:{bodyMapper:gw,isError:!0}},urlParameters:[zw],headerParameters:[Tw],serializer:Gw},Yw={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:_w},500:{bodyMapper:gw,isError:!0}},urlParameters:[zw],headerParameters:[Tw],serializer:Gw},Qw={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:gw,isError:!0}},urlParameters:[zw],headerParameters:[Tw],serializer:Gw};class Zw extends aw{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new Bw(e,{allowInsecureConnection:!0,additionalPolicies:[Xo("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0",t),Zo((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:cn}),this.api.pipeline.removePolicy({name:En})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof Gn&&400===e.statusCode)throw new G(e.message);throw e}}async compile(e){throw new te("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof Gn&&400===e.statusCode)throw new G(e.message);throw e}}async generateAci(e){throw new te("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new te("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function Xw(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var ev=n(952),tv=n.n(ev);const{w3cwebsocket:nv}=tv();function rv(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function av(e,t){if(null==t)throw new ve;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),uv(e)}function iv(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,rv(e,"statusChanged",t))}function sv(e,t){e._state=t,rv(e,"stateChanged",t)}function ov(e,t){e._debug("send message",t.method,t.params),e._websocket.send(dg.stringify({jsonrpc:"2.0",...t}))}function cv(e,t,n={}){ov(e,{method:t,params:n})}async function uv(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,av(e,r)}async function lv(e,t){const{handler:n,state:r}=e._fsm,a=await Promise.resolve(n(e,t,r));if(av(e,a),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===a?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;rv(e,"newContract",ta(r,n+1))}}function mv(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function pv(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{cv(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{mv(e),rv(e,"error",new ge)}),15e3)}),1e4)}async function dv(e,t,n){return new Promise(((r,a)=>{const i=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(i,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";a(new fe(e.error.message+n))}else r(e.result)})),ov(e,{method:t,id:i,params:n})}))}async function hv(e,t){const{signatures:n,encodedTx:r}=ro(e,Xr.SignedTx),a=Xs(r),i=await t(a);if("string"==typeof i){const{signatures:e}=ro(i,Xr.SignedTx);return Zs({tag:Xr.SignedTx,signatures:n.concat(e),encodedTx:Cr(a)})}return i}async function fv(e,t,n,r){let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new B("Can't find transaction in message");a=await hv(n.signed_tx,r)}const i="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return cv(e,t,i?{error:null!=a?a:1}:{[s]:a}),i}function yv(e,t,n){return n?.reject?.(Object.assign(new Ne(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Pv}}function gv(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:Pv};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Pv};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new J("Insufficient balance")):e.includes(1002)?n.reject(new H("Amount cannot be negative")):n.reject(new ye(t.error.message)),{handler:Pv}}return yv(0,t,n)}function Nv(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(iv(e,r),{handler:bv}):"channel_reestablished"===t.params.data.event?{handler:_v}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:Nv}):{handler:Nv}}if("channels.error"===t.method)return rv(e,"error",new ye(t?.payload?.message)),{handler:Tv}}async function wv(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:_v}:yv(0,t,n)}}):yv(0,t,n)}async function vv(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return sv(e,null==n?"":Xs(n)),{handler:Pv}}return yv(0,t,n)}async function bv(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await fv(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:xv}}function xv(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:_v}}if("channels.on_chain_tx"===r.method)return rv(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,iv(e,"signed"),{handler:xv}}function _v(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(sv(e,n.params.data.state),{handler:Pv}):yv(0,n,r)}}):yv(0,t,n)}async function Pv(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:Cv};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return rv(e,Xw(t.params.data.event)),{handler:Pv};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Pv};case"timeout":case"close_mutual":case"shutdown":return{handler:Pv};case"closing":return iv(e,"closing"),{handler:Pv};case"closed_confirmed":return iv(e,"closed"),{handler:Tv};case"died":return iv(e,"died"),{handler:Tv}}break;case"channels.on_chain_tx":return rv(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Pv};case"channels.leave":return{handler:Pv};case"channels.update":return sv(e,t.params.data.state),{handler:Pv};case"channels.sign.shutdown_sign_ack":return Cv(e,t,n)}}async function Cv(e,t,n){var r;const[,a]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==a?yv(0,t,n):await fv(e,`channels.${a}`,t.params.data,(async n=>e._options.sign(a,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Pv}:yv(0,r,n)},state:n}:{handler:Pv}}async function Av(e,t,n){return"channels.sign.shutdown_sign"!==t.method?yv(0,t,n):(await fv(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?yv(0,t,n):{handler:Tv,state:n}},state:n})}function Sv(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),mv(e),{handler:Tv}):"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:Pv}):yv(0,t,n)}function Tv(e,t,n){return null==n?{handler:Tv}:"closing"===t.params.data.event?{handler:Tv,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:Tv,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:Tv}):{handler:Tv,state:n}}Pv.enter=e=>{iv(e,"open")};var zv=n(7007),Ev=n.n(zv);function Iv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}let Mv=0;var qv=new WeakMap;class Rv{constructor(){var e,t;ty(this,"_eventEmitter",new(Ev())),ty(this,"_nextRpcMessageId",0),ty(this,"_rpcCallbacks",new Map),ty(this,"_messageQueue",[]),ty(this,"_isMessageQueueLocked",!1),ty(this,"_actionQueue",[]),ty(this,"_isActionQueueLocked",!1),ty(this,"_status","disconnected"),ty(this,"_state",""),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,qv,void 0),Mv+=1,t=Mv,(e=qv).set(Iv(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=qv,t.get(Iv(t,this))}`,...e)}static async initialize(e){return Rv._initialize(new Rv,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new H("`existingChannelId`, `existingFsmId` should be both provided or missed");const a=l[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...a}){e._options={url:r,...a};const i=new URL(r);Object.entries(a).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>i.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),i.searchParams.set("protocol","json-rpc"),iv(e,"connecting"),e._websocket=new nv(i.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),iv(e,"connected",r),av(e,{handler:t}),pv(e)},onclose:t=>{iv(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=dg.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ie;try{await lv(e,t)}catch(n){rr(n),rv(e,"error",new we(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||pv(e):rv(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void rv(e,"error",new B(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?a:Nv,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return mv(this)}status(){return this._status}async state(){const e=(t=await dv(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[Xw(t)]:n})),{}));var t;return{calls:Ys(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:ro(e.halfSignedTx,Xr.SignedTx)},...""!==e.signedTx&&{signedTx:ro(e.signedTx,Xr.SignedTx)},trees:Ys(e.trees)}}round(){if(""===this._state)return null;const e=ro(this._state,Xr.SignedTx).encodedTx;switch(e.tag){case Xr.ChannelCreateTx:return 1;case Xr.ChannelOffChainTx:case Xr.ChannelWithdrawTx:case Xr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new B("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new B("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,a)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:a}}}})}));return uv(e),r}(this,((e,t)=>t?.handler===Pv),e)}async leave(){return this.enqueueAction((()=>(cv(this,"channels.leave"),{handler:Sv})))}async shutdown(e){return this.enqueueAction((()=>(cv(this,"channels.shutdown"),{handler:Av,state:{sign:e}})))}}class Ov extends Rv{async update(e,t,n,r,a=[]){return this.enqueueAction((()=>{cv(this,"channels.update.new",{from:e,to:t,amount:n,meta:a});const i=async(e,t,n)=>"channels.sign.update"===t.method?await fv(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:i,state:n}:{handler:(e,t)=>gv(this,t,n,(()=>(sv(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Pv}))),state:n}:"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:Pv}):gv(this,t,n);return{handler:i}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await dv(this,"channels.get.poi",{accounts:e,contracts:t});return Ys(n)}async balances(e){return Object.fromEntries((await dv(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return yv(0,t,n);const r=(t,a)=>{if("channels.on_chain_tx"===a.method)return n.onOnChainTx?.(a.params.data.tx),{handler:r,state:n};if("channels.info"===a.method&&[`own_${e}_locked`,`${e}_locked`].includes(a.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",i=a.params.data.event.startsWith("own_");return n[`on${i?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return gv(this,a,n,(()=>(sv(this,a.params.data.state),n.resolve({accepted:!0,signedTx:a.params.data.state}),{handler:Pv})))},{sign:a}=n;return await fv(this,`channels.${e}_tx`,t.params.data,(async e=>a(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}={}){return this.enqueueAction((()=>(cv(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}={}){return this.enqueueAction((()=>(cv(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Qn(500)),cv(this,"channels.message",{info:n,to:t})}}function kv(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[Xw(t)]:n})),{})}class Bv extends Ov{static async initialize(e){return Rv._initialize(new Bv,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:a},i){return this.enqueueAction((()=>(cv(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:a}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?yv(0,t,n):(await fv(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>gv(this,t,n,(()=>{const e=ro(t.params.data.state,Xr.SignedTx).encodedTx;if(e.tag!==Xr.ChannelOffChainTx)throw new B(`Tag should be ${Xr[Xr.ChannelOffChainTx]}, got ${Xr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",a=this._options[r];sv(this,t.params.data.state);const i=ta(a,e.round);return rv(this,"newContract",i),n.resolve({accepted:!0,address:i,signedTx:t.params.data.state}),{handler:Pv}})),state:n}),state:{sign:i}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},a){return this.enqueueAction((()=>(cv(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?yv(0,t,n):(await fv(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>gv(this,t,n,(()=>(sv(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Pv}))),state:n}),state:{sign:a}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:a=1e6,gasPrice:i=Number(ai.minGasPrice)},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(cv(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:i,gas:a}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?yv(0,t,n):(await fv(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),rv(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),yv(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return kv(await dv(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return kv(await dv(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await dv(this,"channels.get.contract",{pubkey:e});return kv({...t,contract:kv(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(cv(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Pv}):(n.reject(new Ne("Unexpected message received")),{handler:Tv})}})))}}var Gv=null;"undefined"!=typeof WebSocket?Gv=WebSocket:"undefined"!=typeof MozWebSocket?Gv=MozWebSocket:void 0!==n.g?Gv=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?Gv=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(Gv=self.WebSocket||self.MozWebSocket);var $v=Gv;function Uv(e,t,n){Vv(e,t),t.set(e,n)}function Vv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dv(e,t,n){return n(Hv(e,t))}function Lv(e,t,n){return e.set(Hv(e,t),n),n}function jv(e,t){return e.get(Hv(e,t))}function Hv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Fv=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(Fv||{});class Jv extends q{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class Wv extends Jv{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var Kv=new WeakMap,Yv=new WeakMap,Qv=new WeakMap,Zv=new WeakSet;class Xv{get webSocket(){return jv(Qv,this)}constructor(e){var t;Vv(this,t=Zv),t.add(this),Uv(this,Kv,[]),Uv(this,Yv,[]),Uv(this,Qv,void 0),this.url=e}async reconnect(){Hv(Zv,this,ab).call(this),Lv(Qv,this,await new Promise((e=>{const t=new $v(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{Hv(Zv,this,rb).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new ae("Unknown incoming message type: "+typeof e.data);Hv(Zv,this,ib).call(this,JSON.parse(e.data))},onclose:e=>{Hv(Zv,this,rb).call(this,(()=>!0),void 0,new Wv(e)),Hv(Zv,this,ab).call(this,!0)}})}))),await Promise.all([...Dv(Zv,this,eb)].map((e=>Hv(Zv,this,nb).call(this,!0,e))))}subscribeKeyBlocks(e){return Hv(Zv,this,sb).call(this,"KeyBlocks",Fv.Middleware,e)}subscribeKeyBlocksNode(e){return Hv(Zv,this,sb).call(this,"KeyBlocks",Fv.Node,e)}subscribeKeyBlocksAll(e){return Hv(Zv,this,sb).call(this,"KeyBlocks",Fv.All,e)}subscribeMicroBlocks(e){return Hv(Zv,this,sb).call(this,"MicroBlocks",Fv.Middleware,e)}subscribeMicroBlocksNode(e){return Hv(Zv,this,sb).call(this,"MicroBlocks",Fv.Node,e)}subscribeMicroBlocksAll(e){return Hv(Zv,this,sb).call(this,"MicroBlocks",Fv.All,e)}subscribeTransactions(e){return Hv(Zv,this,sb).call(this,"Transactions",Fv.Middleware,e)}subscribeTransactionsNode(e){return Hv(Zv,this,sb).call(this,"Transactions",Fv.Node,e)}subscribeTransactionsAll(e){return Hv(Zv,this,sb).call(this,"Transactions",Fv.All,e)}subscribeObject(e,t){return Hv(Zv,this,sb).call(this,e,Fv.Middleware,t)}subscribeObjectNode(e,t){return Hv(Zv,this,sb).call(this,e,Fv.Node,t)}subscribeObjectAll(e,t){return Hv(Zv,this,sb).call(this,e,Fv.All,t)}}function eb(e){return new Set(jv(Kv,e).map((([e])=>e)))}function tb(e){if(null==jv(Qv,this))throw new ie;jv(Qv,this).send(JSON.stringify(e))}function nb(e,t){if(null==jv(Qv,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";Hv(Zv,this,tb).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),jv(Yv,this).push([e,t])}function rb(e,t,n){jv(Kv,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function ab(e=!1){null!=jv(Qv,this)&&(e||jv(Qv,this).close(),Object.assign(jv(Qv,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),Lv(Qv,this,void 0))}function ib(e){if("string"==typeof e||Array.isArray(e)){const t=jv(Yv,this).shift();if(null==t)throw new ae("Request queue is empty");const[n,r]=t;let a;return"string"==typeof e&&(a=new Jv(e)),e.includes(r)!==n&&(a=new ae(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=a&&Hv(Zv,this,rb).call(this,(e=>r===e),void 0,a))}Hv(Zv,this,rb).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==Fv.All)),e.payload)}function sb(e,t,n){const r=[e,t,n];return 0===Dv(Zv,this,eb).size&&this.reconnect(),Dv(Zv,this,eb).has(e)||Hv(Zv,this,nb).call(this,!0,e),jv(Kv,this).push(r),()=>{Lv(Kv,this,jv(Kv,this).filter((e=>e!==r))),Dv(Zv,this,eb).has(e)||Hv(Zv,this,nb).call(this,!1,e),0===Dv(Zv,this,eb).size&&Hv(Zv,this,ab).call(this)}}const ob={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},cb={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},ub={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},lb={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},mb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},pb={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},db={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},hb={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},fb={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},yb={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},gb={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},Nb={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},wb={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},vb={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},bb={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},xb={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},_b={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Pb={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Cb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(epoch):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Ab={parameterPath:"validator",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"validator",required:!0,type:{name:"String"}}},Sb={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Tb={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},zb={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},Eb={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Ib={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},Mb={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},qb={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},Rb={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},Ob={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},kb={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},Bb={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},Gb={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},$b={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},Ub={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},Vb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(time|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Db={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},Lb={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},jb={type:{name:"Composite",className:"PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},Hb={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTxEvent","OracleRegisterTxEvent","OracleExtendTxEvent","OracleQueryTxEvent","OracleResponseTxEvent","NamePreclaimTxEvent","NameClaimTxEvent","NameTransferTxEvent","NameUpdateTxEvent","NameRevokeTxEvent","ContractCreateTxEvent","ContractCallTxEvent","GaAttachTxEvent","GaMetaTxEvent","ChannelCreateTxEvent","ChannelDepositTxEvent","ChannelWithdrawTxEvent","ChannelForceProgressTxEvent","ChannelCloseMutualTxEvent","ChannelCloseSoloTxEvent","ChannelSlashTxEvent","ChannelSettleTxEvent","ChannelSnapshotSoloTxEvent","ChannelSetDelegatesTxEvent","ChannelOffchainTxEvent","ChannelClientReconnectTxEvent","PayingForTxEvent"]}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}}}}},Fb={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},Jb={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"Number"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},Wb={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Kb={serializedName:"OffChainUpdate",type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Yb={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Qb={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Zb={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Xb={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",type:{name:"Number"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},ex={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},tx={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},nx={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},rx={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},ax={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},ix={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},sx={type:{name:"Composite",className:"Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},ox={type:{name:"Composite",className:"DexSwap",modelProperties:{amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},action:{serializedName:"action",required:!0,type:{name:"Enum",allowedValues:["SWAP","BUY","SELL"]}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},cx={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},ux={type:{name:"Composite",className:"Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},lx={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameClaimTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},mx={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},px={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},dx={type:{name:"Composite",className:"PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},hx={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},key:{serializedName:"key",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}}}}},fx={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},yx={type:{name:"Composite",className:"PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema",modelProperties:{contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},gx={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Nx={type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{contractId:{serializedName:"contract_id",type:{name:"Number"}},callerId:{serializedName:"caller_id",type:{name:"Number"}}}}},wx={type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},vx={type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},bx={type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},xx={type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},_x={type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},Px={type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Cx={type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ax={type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Sx={type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Tx={type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},zx={type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ex={type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},Ix={type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Mx={type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},qx={type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},Rx={type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},Ox={type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},kx={type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Bx={type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Gx={type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},$x={type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Ux={type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},Vx={type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},Dx={type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},Lx={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},jx={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}}}}},Hx={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},Fx={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Jx={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Wx={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Kx={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Yx={type:{name:"Composite",className:"Aex141TokenDetailResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},metadata:{serializedName:"metadata",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Qx={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Zx={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Xx={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},e_={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}}}}},t_={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},n_={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},r_={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}}}}},a_={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},i_={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},s_={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},o_={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},c_={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},u_={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},l_={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},m_={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},p_={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},d_={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Composite",className:"ContractCreateTx"}}}}},h_={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},f_={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},y_={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},g_={type:{name:"Composite",className:"Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfo"}}}}}}},N_={type:{name:"Composite",className:"EpochInfo",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},first:{serializedName:"first",required:!0,type:{name:"Number"}},last:{serializedName:"last",required:!0,type:{name:"Number"}},length:{serializedName:"length",required:!0,type:{name:"Number"}},seed:{serializedName:"seed",required:!0,type:{name:"String"}},lastPinHeight:{serializedName:"last_pin_height",required:!0,type:{name:"Number"}},parentBlockHash:{serializedName:"parent_block_hash",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},epochStartTime:{serializedName:"epoch_start_time",required:!0,type:{name:"Number"}},validators:{serializedName:"validators",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfoValidatorsItem"}}}}}}},w_={type:{name:"Composite",className:"EpochInfoValidatorsItem",modelProperties:{validator:{serializedName:"validator",type:{name:"String"}},stake:{serializedName:"stake",type:{name:"Number"}}}}},v_={type:{name:"Composite",className:"Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Schedule"}}}}}}},b_={type:{name:"Composite",className:"Schedule",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},leader:{serializedName:"leader",required:!0,type:{name:"String"}}}}},x_={type:{name:"Composite",className:"Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Validator"}}}}}}},__={type:{name:"Composite",className:"Validator",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}},totalStakes:{serializedName:"total_stakes",required:!0,type:{name:"Number"}},delegates:{serializedName:"delegates",required:!0,type:{name:"Number"}},rewardsEarned:{serializedName:"rewards_earned",required:!0,type:{name:"Number"}},pinningHistory:{serializedName:"pinning_history",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"}}}}}}},P_={type:{name:"Composite",className:"Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},C_={type:{name:"Composite",className:"Delegate",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},delegate:{serializedName:"delegate",required:!0,type:{name:"String"}},stake:{serializedName:"stake",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}}}}},A_={type:{name:"Composite",className:"PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},S_={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlockExtended"}}}}}}},T_={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},z_={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlockExtended"}}}}}}},E_={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},I_={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},M_={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},q_={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},R_={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}},claimsCount:{serializedName:"claims_count",type:{name:"Number"}}}}},O_={type:{name:"Composite",className:"Auction",modelProperties:{auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},claimsCount:{serializedName:"claims_count",required:!0,type:{name:"Number"}}}}},k_={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"AuctionLastBidTx"}}}}},B_={type:{name:"Composite",className:"Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},G_={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},$_={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},U_={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},V_={type:{name:"Composite",className:"Components171VsjiSchemasNametxPropertiesTxAllof1",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},D_={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},L_={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},j_={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},H_={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},F_={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTransferTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},J_={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},W_={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},K_={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},Y_={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Q_={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}}}}},Z_={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},X_={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}}}}},eP={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},tP={type:{name:"Composite",className:"Components1Viuqa3SchemasOracletxPropertiesTxAllof1",modelProperties:{oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},nP={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},rP={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},aP={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},iP={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},sP={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},oP={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleQuery"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},cP={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},uP={type:{name:"Composite",className:"Stats",modelProperties:{minersCount:{serializedName:"miners_count",type:{name:"Number"}},feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},lP={type:{name:"Composite",className:"PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},mP={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}}}}},pP={type:{name:"Composite",className:"Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},dP={type:{name:"Composite",className:"Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},hP={type:{name:"Composite",className:"Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},fP={type:{name:"Composite",className:"Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},yP={type:{name:"Composite",className:"DeltaStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}}}}},gP={type:{name:"Composite",className:"Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},NP={type:{name:"Composite",className:"Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},wP={type:{name:"Composite",className:"Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},vP={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},bP={type:{name:"Composite",className:"PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},xP={type:{name:"Composite",className:"Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},_P={type:{name:"Composite",className:"TotalStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},PP={type:{name:"Composite",className:"Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},CP={type:{name:"Composite",className:"Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},AP={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},SP={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},TP={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},zP={type:{name:"Composite",className:"PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"PendingTransaction"}}}}}}},EP={type:{name:"Composite",className:"PendingTransaction",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},failures:{serializedName:"failures",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},IP={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},MP={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["reward_dev","reward_block"]}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},qP={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},RP={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},OP={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}}}}},kP={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},BP={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},GP={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},$P={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},UP={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},VP={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},DP={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},LP={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},jP={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},HP={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},FP={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},JP={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},WP={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},KP={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},YP={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},QP={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},ZP={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},XP={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},eC={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},tC={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},nC={type:{name:"Composite",className:"Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...jb.type.modelProperties,...ex.type.modelProperties}}},rC={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...nx.type.modelProperties,...ex.type.modelProperties}}},aC={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...ex.type.modelProperties,...ax.type.modelProperties}}},iC={type:{name:"Composite",className:"PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...sx.type.modelProperties,...ex.type.modelProperties}}},sC={type:{name:"Composite",className:"Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...ux.type.modelProperties,...ex.type.modelProperties}}},oC={type:{name:"Composite",className:"Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...dx.type.modelProperties,...ex.type.modelProperties}}},cC={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...Lx.type.modelProperties,...ex.type.modelProperties}}},uC={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hx.type.modelProperties,...ex.type.modelProperties}}},lC={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Jx.type.modelProperties,...ex.type.modelProperties}}},mC={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kx.type.modelProperties,...ex.type.modelProperties}}},pC={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qx.type.modelProperties,...ex.type.modelProperties}}},dC={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...Xx.type.modelProperties,...ex.type.modelProperties}}},hC={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...n_.type.modelProperties,...ex.type.modelProperties}}},fC={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...ex.type.modelProperties,...i_.type.modelProperties}}},yC={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...o_.type.modelProperties,...ex.type.modelProperties}}},gC={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...u_.type.modelProperties,...ex.type.modelProperties}}},NC={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...m_.type.modelProperties,...ex.type.modelProperties}}},wC={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...f_.type.modelProperties,...ex.type.modelProperties}}},vC={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...y_.type.modelProperties,...ex.type.modelProperties}}},bC={type:{name:"Composite",className:"Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema",modelProperties:{...g_.type.modelProperties,...ex.type.modelProperties}}},xC={type:{name:"Composite",className:"Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema",modelProperties:{...v_.type.modelProperties,...ex.type.modelProperties}}},_C={type:{name:"Composite",className:"Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema",modelProperties:{...x_.type.modelProperties,...ex.type.modelProperties}}},PC={type:{name:"Composite",className:"Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...P_.type.modelProperties,...ex.type.modelProperties}}},CC={type:{name:"Composite",className:"Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema",modelProperties:{...A_.type.modelProperties,...ex.type.modelProperties}}},AC={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...S_.type.modelProperties,...ex.type.modelProperties}}},SC={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...z_.type.modelProperties,...ex.type.modelProperties}}},TC={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...I_.type.modelProperties,...ex.type.modelProperties}}},zC={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...q_.type.modelProperties,...ex.type.modelProperties}}},EC={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...D_.type.modelProperties,...ex.type.modelProperties}}},IC={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...j_.type.modelProperties,...ex.type.modelProperties}}},MC={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...H_.type.modelProperties,...ex.type.modelProperties}}},qC={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...W_.type.modelProperties,...ex.type.modelProperties}}},RC={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Y_.type.modelProperties,...ex.type.modelProperties}}},OC={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...nP.type.modelProperties,...ex.type.modelProperties}}},kC={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...iP.type.modelProperties,...ex.type.modelProperties}}},BC={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...cP.type.modelProperties,...ex.type.modelProperties}}},GC={type:{name:"Composite",className:"PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...lP.type.modelProperties,...ex.type.modelProperties}}},$C={type:{name:"Composite",className:"Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...pP.type.modelProperties,...ex.type.modelProperties}}},UC={type:{name:"Composite",className:"Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...dP.type.modelProperties,...ex.type.modelProperties}}},VC={type:{name:"Composite",className:"PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema",modelProperties:{...hP.type.modelProperties,...ex.type.modelProperties}}},DC={type:{name:"Composite",className:"Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema",modelProperties:{...fP.type.modelProperties,...ex.type.modelProperties}}},LC={type:{name:"Composite",className:"Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema",modelProperties:{...gP.type.modelProperties,...ex.type.modelProperties}}},jC={type:{name:"Composite",className:"PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema",modelProperties:{...NP.type.modelProperties,...ex.type.modelProperties}}},HC={type:{name:"Composite",className:"PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema",modelProperties:{...wP.type.modelProperties,...ex.type.modelProperties}}},FC={type:{name:"Composite",className:"PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...bP.type.modelProperties,...ex.type.modelProperties}}},JC={type:{name:"Composite",className:"PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema",modelProperties:{...xP.type.modelProperties,...ex.type.modelProperties}}},WC={type:{name:"Composite",className:"Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...PP.type.modelProperties,...ex.type.modelProperties}}},KC={type:{name:"Composite",className:"Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...CP.type.modelProperties,...ex.type.modelProperties}}},YC={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...TP.type.modelProperties,...ex.type.modelProperties}}},QC={type:{name:"Composite",className:"PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema",modelProperties:{...zP.type.modelProperties,...ex.type.modelProperties}}},ZC={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...IP.type.modelProperties,...ex.type.modelProperties}}},XC={type:{name:"Composite",className:"AuctionLastBidTx",modelProperties:{...mx.type.modelProperties,...B_.type.modelProperties}}},eA={type:{name:"Composite",className:"KeyBlockExtended",modelProperties:{...T_.type.modelProperties,beneficiaryReward:{serializedName:"beneficiary_reward",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}}}}},tA={type:{name:"Composite",className:"MicroBlockExtended",modelProperties:{...E_.type.modelProperties,microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},gas:{serializedName:"gas",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}}}}},nA={type:{name:"Composite",className:"NameTxTx",modelProperties:{...U_.type.modelProperties,...V_.type.modelProperties}}},rA={type:{name:"Composite",className:"OracleTxTx",modelProperties:{...eP.type.modelProperties,...tP.type.modelProperties}}};let aA={"OffChainUpdate.OffChainUpdate":Kb};class iA extends Uo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-middleware/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountActivities(e,t){return this.sendOperationRequest({accountId:e,options:t},oA)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},cA)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},uA)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},lA)}getAccountNameClaims(e,t){return this.sendOperationRequest({accountId:e,options:t},mA)}getAccountPointees(e,t){return this.sendOperationRequest({accountId:e,options:t},pA)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({accountId:e,options:t},dA)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},hA)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},fA)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},yA)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},gA)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},NA)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},wA)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},vA)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},bA)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},xA)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},_A)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},PA)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},CA)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},AA)}getChannels(e){return this.sendOperationRequest({options:e},SA)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},TA)}getContractCalls(e){return this.sendOperationRequest({options:e},zA)}getContractLogs(e){return this.sendOperationRequest({options:e},EA)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},IA)}getDexSwaps(e){return this.sendOperationRequest({options:e},MA)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},qA)}getEpochs(e){return this.sendOperationRequest({options:e},RA)}getEpochTop(e){return this.sendOperationRequest({options:e},OA)}getSchedules(e){return this.sendOperationRequest({options:e},kA)}getSchedule(e,t){return this.sendOperationRequest({height:e,options:t},BA)}getValidators(e){return this.sendOperationRequest({options:e},GA)}getValidator(e,t){return this.sendOperationRequest({validator:e,options:t},$A)}getValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},UA)}getTopValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},VA)}getKeyBlocks(e){return this.sendOperationRequest({options:e},DA)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},LA)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},jA)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},HA)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},FA)}getNames(e){return this.sendOperationRequest({options:e},JA)}getNamesAuctions(e){return this.sendOperationRequest({options:e},WA)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},KA)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},YA)}getNamesCount(e){return this.sendOperationRequest({options:e},QA)}getName(e,t){return this.sendOperationRequest({id:e,options:t},ZA)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},XA)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},eS)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},tS)}getOracles(e){return this.sendOperationRequest({options:e},nS)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},rS)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},aS)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},iS)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},sS)}getStats(e){return this.sendOperationRequest({options:e},oS)}getActiveAccountsStats(e){return this.sendOperationRequest({options:e},cS)}getAex9TransfersStats(e){return this.sendOperationRequest({options:e},uS)}getBlocksStats(e){return this.sendOperationRequest({options:e},lS)}getContractsStats(e){return this.sendOperationRequest({options:e},mS)}getDeltaStats(e){return this.sendOperationRequest({options:e},pS)}getDifficultyStats(e){return this.sendOperationRequest({options:e},dS)}getHashrateStats(e){return this.sendOperationRequest({options:e},hS)}getMinerStats(e){return this.sendOperationRequest({options:e},fS)}getNamesStats(e){return this.sendOperationRequest({options:e},yS)}getTotalStats(e){return this.sendOperationRequest({options:e},gS)}getTotalAccountsStats(e){return this.sendOperationRequest({options:e},NS)}getTransactionsStats(e){return this.sendOperationRequest({options:e},wS)}getStatus(e){return this.sendOperationRequest({options:e},vS)}getTransactions(e){return this.sendOperationRequest({options:e},bS)}getTransactionsCount(e){return this.sendOperationRequest({options:e},xS)}getPendingTransactions(e){return this.sendOperationRequest({options:e},_S)}getPendingTransactionsCount(e){return this.sendOperationRequest({options:e},PS)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},CS)}getTransfers(e){return this.sendOperationRequest({options:e},AS)}}const sA=jo(m,!1),oA={path:"/v3/accounts/{accountId}/activities",httpMethod:"GET",responses:{200:{bodyMapper:nC},400:{bodyMapper:tx,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["transactions","aexn","aex9","aex141","contract","transfers","claims","swaps"]}}},lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},cA={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:rC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},pb],urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},uA={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:aC},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},lA={path:"/v3/accounts/{accountId}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:iC},400:{bodyMapper:tx,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},mA={path:"/v3/accounts/{accountId}/names/claims",httpMethod:"GET",responses:{200:{bodyMapper:sC},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},pA={path:"/v3/accounts/{accountId}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:oC},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},dA={path:"/v3/accounts/{accountId}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:yx},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,ub],headerParameters:[ob],serializer:sA},hA={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:cC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}},db,hb],urlParameters:[cb],headerParameters:[ob],serializer:sA},fA={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:uC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,fb],headerParameters:[ob],serializer:sA},yA={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:lC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,fb,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[ob],serializer:sA},gA={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:mC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,fb],headerParameters:[ob],serializer:sA},NA={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:Yx},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,fb,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[ob],serializer:sA},wA={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:pC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},yb,gb],urlParameters:[cb,fb],headerParameters:[ob],serializer:sA},vA={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:jx},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,Nb],headerParameters:[ob],serializer:sA},bA={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:dC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},xA={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:t_}},urlParameters:[cb],headerParameters:[ob],serializer:sA},_A={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:hC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},wb,vb],urlParameters:[cb,fb],headerParameters:[ob],serializer:sA},PA={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:a_},400:{bodyMapper:tx,isError:!0}},queryParameters:[bb],urlParameters:[cb,ub,fb],headerParameters:[ob],serializer:sA},CA={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:fC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,ub,fb],headerParameters:[ob],serializer:sA},AA={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:e_},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,Nb],headerParameters:[ob],serializer:sA},SA={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:yC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"Enum",allowedValues:["active","inactive"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},TA={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:c_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,xb],headerParameters:[ob],serializer:sA},zA={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:gC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},EA={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:NC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,_b,{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},IA={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:d_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Nb],headerParameters:[ob],serializer:sA},MA={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:wC},400:{bodyMapper:tx,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},qA={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:vC},400:{bodyMapper:tx,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Pb],headerParameters:[ob],serializer:sA},RA={path:"/v3/hyperchain/epochs",httpMethod:"GET",responses:{200:{bodyMapper:bC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Cb],urlParameters:[cb],headerParameters:[ob],serializer:sA},OA={path:"/v3/hyperchain/epochs/top",httpMethod:"GET",responses:{200:{bodyMapper:N_},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb],headerParameters:[ob],serializer:sA},kA={path:"/v3/hyperchain/schedule",httpMethod:"GET",responses:{200:{bodyMapper:xC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,Cb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},BA={path:"/v3/hyperchain/schedule/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:b_},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,{parameterPath:"height",mapper:{serializedName:"height",required:!0,type:{name:"Number"}}}],headerParameters:[ob],serializer:sA},GA={path:"/v3/hyperchain/validators",httpMethod:"GET",responses:{200:{bodyMapper:_C},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,Cb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},$A={path:"/v3/hyperchain/validators/{validator}",httpMethod:"GET",responses:{200:{bodyMapper:__},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,Ab],headerParameters:[ob],serializer:sA},UA={path:"/v3/hyperchain/validators/{validator}/delegates",httpMethod:"GET",responses:{200:{bodyMapper:PC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,Cb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ab],headerParameters:[ob],serializer:sA},VA={path:"/v3/hyperchain/validators/{validator}/delegates/top",httpMethod:"GET",responses:{200:{bodyMapper:CC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,Cb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ab],headerParameters:[ob],serializer:sA},DA={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:AC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},LA={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:eA},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Sb],headerParameters:[ob],serializer:sA},jA={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:SC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Sb],headerParameters:[ob],serializer:sA},HA={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:tA},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Tb],headerParameters:[ob],serializer:sA},FA={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:TC},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb,Tb],headerParameters:[ob],serializer:sA},JA={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:zC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,db,wb,zb,Eb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},WA={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:EC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},KA={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:O_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},YA={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:L_},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},QA={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:tx,isError:!0}},queryParameters:[zb],urlParameters:[cb],headerParameters:[ob],serializer:sA},ZA={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:R_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},XA={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:IC},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},eS={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:MC},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},tS={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:qC},404:{bodyMapper:px,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb,Ib],headerParameters:[ob],serializer:sA},nS={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:RC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,Eb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},rS={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Q_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Mb],headerParameters:[ob],serializer:sA},aS={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:OC},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Mb],headerParameters:[ob],serializer:sA},iS={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:kC},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Mb],headerParameters:[ob],serializer:sA},sS={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:BC},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Mb],headerParameters:[ob],serializer:sA},oS={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:uP},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb],headerParameters:[ob],serializer:sA},cS={path:"/v3/stats/active-accounts",httpMethod:"GET",responses:{200:{bodyMapper:GC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},uS={path:"/v3/stats/aex9-transfers",httpMethod:"GET",responses:{200:{bodyMapper:$C},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},qb,Rb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},lS={path:"/v3/stats/blocks",httpMethod:"GET",responses:{200:{bodyMapper:UC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["key","micro"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},mS={path:"/v3/stats/contracts",httpMethod:"GET",responses:{200:{bodyMapper:VC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},pS={path:"/v3/stats/delta",httpMethod:"GET",responses:{200:{bodyMapper:DC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},dS={path:"/v3/stats/difficulty",httpMethod:"GET",responses:{200:{bodyMapper:LC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},hS={path:"/v3/stats/hashrate",httpMethod:"GET",responses:{200:{bodyMapper:jC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},fS={path:"/v3/stats/miners",httpMethod:"GET",responses:{200:{bodyMapper:HC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},yS={path:"/v3/stats/names",httpMethod:"GET",responses:{200:{bodyMapper:FC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},gS={path:"/v3/stats/total",httpMethod:"GET",responses:{200:{bodyMapper:JC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},NS={path:"/v3/stats/total-accounts",httpMethod:"GET",responses:{200:{bodyMapper:WC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},wS={path:"/v3/stats/transactions",httpMethod:"GET",responses:{200:{bodyMapper:KC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,qb,Rb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},Ob,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},vS={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:AP}},urlParameters:[cb],headerParameters:[ob],serializer:sA},bS={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:YC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,pb,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel_close_mutual","channel_close_solo","channel_create","channel_deposit","channel_force_progress","channel_offchain","channel_settle","channel_slash","channel_snapshot_solo","channel_withdraw","contract_call","contract_create","ga_attach","ga_meta","name_claim","name_preclaim","name_revoke","name_transfer","name_update","oracle_extend","oracle_query","oracle_register","oracle_response","paying_for","spend"]}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel","contract","ga","name","oracle","paying_for","spend"]}}}},collectionFormat:"Multi"},kb,Bb,Gb,$b,Ub,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},Vb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},xS={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[mb,Ob,Db],urlParameters:[cb],headerParameters:[ob],serializer:sA},_S={path:"/v3/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:QC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},PS={path:"/v3/transactions/pending/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:tx,isError:!0}},urlParameters:[cb],headerParameters:[ob],serializer:sA},CS={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:M_},400:{bodyMapper:tx,isError:!0},404:{bodyMapper:px,isError:!0}},urlParameters:[cb,Lb],headerParameters:[ob],serializer:sA},AS={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:ZC},400:{bodyMapper:tx,isError:!0}},queryParameters:[lb,mb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[cb],headerParameters:[ob],serializer:sA},SS=[oA,cA,uA,lA,mA,pA,dA,hA,fA,yA,gA,NA,wA,vA,bA,xA,_A,PA,AA,SA,TA,zA,EA,IA,MA,qA,RA,OA,kA,BA,GA,$A,UA,VA,DA,LA,jA,HA,FA,JA,WA,KA,YA,QA,ZA,XA,eS,tS,nS,rS,aS,iS,sS,oS,cS,uS,lS,mS,pS,dS,hS,fS,yS,gS,NS,wS,vS,bS,xS,_S,PS,CS,AS];function TS(e,t){return e.get(zS(e,t))}function zS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class ES extends q{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var IS=new WeakMap;class MS{constructor(e,t){var n,r;(function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)})(this,IS,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=IS).set(zS(n,this),r)}async next(){if(null==this.nextPath)throw new ES(!0);return TS(IS,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new ES(!1);return TS(IS,this).requestByPath(this.prevPath)}}class qS extends iA{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){let i;super(e,{allowInsecureConnection:!0,additionalPolicies:[Xo("middleware",(async e=>(null!=i||(i=(await this.getStatus(e)).mdwVersion),i)),"1.81.0","2.0.0",t),Ko(),Yo(),ec(n,r),Zo((e=>` ${e.error}`))],...a}),this.pipeline.addPolicy(Wo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:En}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),a=SS.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new ae(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==a)throw new H(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...a,path:n,urlParameters:a.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new MS(n,this):n}}var RS=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class OS{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ye("You already connected")}disconnect(){if(!this.isConnected())throw new Qe("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function kS(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function BS(e,t){return e.get($S(e,t))}function GS(e,t,n){return e.set($S(e,t),n),n}function $S(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var US=new WeakMap,VS=new WeakMap,DS=new WeakMap;class LS extends OS{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:a=my.to_aepp,...i}={}){super(i),kS(this,US,void 0),kS(this,VS,void 0),kS(this,DS,void 0),GS(VS,this,e),GS(DS,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=a}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=BS(VS,this)&&BS(VS,this)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},BS(DS,this).addEventListener("message",this.listener),GS(US,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==BS(US,this))throw new ae("Expected to not happen, required for TS");BS(DS,this).removeEventListener("message",this.listener),delete this.listener,BS(US,this).call(this),GS(US,this,void 0)}sendMessage(e){var t;if(null==BS(VS,this))throw new Ze("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),BS(VS,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var jS=(e,t)=>{if(null==window)throw new X("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},a,i)=>{if(e!==hy.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new LS({target:i,..."extension"===r.type?{sendDirection:my.to_waellet,receiveDirection:my.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function HS(e,t,n){return e.set(JS(e,t),n),n}function FS(e,t){return e.get(JS(e,t))}function JS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var WS=new WeakMap;class KS extends OS{constructor({port:e,...t}){var n,r,a;super(t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=WS),r.set(n,a),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==FS(WS,this))throw new ie;this.port.onMessage.removeListener(FS(WS,this)[0]),this.port.onDisconnect.removeListener(FS(WS,this)[1]),HS(WS,this,void 0)}connect(e,t){super.connect(e,t),HS(WS,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(FS(WS,this)[0]),this.port.onDisconnect.addListener(FS(WS,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=FS(WS,this)}}}(),r}()}));
|
|
3
3
|
//# sourceMappingURL=aepp-sdk.browser-script.cjs.map
|