Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@burstjs/contracts

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/contracts - npm Package Compare versions

Comparing version 0.5.0-beta.1 to 0.5.0-beta.2

2

dist/burstjs.contracts.min.js

@@ -1,2 +0,2 @@

var b$contracts=function(e){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,r){return e(r={exports:{}},r.exports),r.exports}var i=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNumberToNQTString=(e=>{if(null==e)throw new Error("Invalid argument");return parseFloat(e.toString()).toFixed(8).replace(".","")})});t(i);i.convertNumberToNQTString;var o=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNQTStringToNumber=(e=>{if(null==e||""===e)throw new Error("Invalid argument");return parseFloat(e)/1e8})});t(o);o.convertNQTStringToNumber;var u=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.GenesisBlockTime=Date.UTC(2014,7,11,2,0,0,0)/1e3,r.initialCodeword=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r.gexp=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],r.glog=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],r.cwmap=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11],r.alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".split(""),r.base32Length=13,r.ginv=(e=>r.gexp[31-r.glog[e]]),r.gmult=((e,t)=>{if(0===e||0===t)return 0;const n=(r.glog[e]+r.glog[t])%31;return r.gexp[n]})});t(u);u.GenesisBlockTime,u.initialCodeword,u.gexp,u.glog,u.cwmap,u.alphabet,u.base32Length,u.ginv,u.gmult;var l=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const r=[],t=u.initialCodeword.slice();let n=0,i=e.length;for(let t=0;t<i;t++)r[t]=e.charCodeAt(t)-"0".charCodeAt(0);let o=0,l=0;do{o=0,l=0;for(let e=0;e<i;e++)(o=10*o+r[e])>=32?(r[l]=o>>5,o&=31,l++):l>0&&(r[l]=0,l++);i=l,t[n]=o,n++}while(i>0);const c=[0,0,0,0];for(let e=u.base32Length-1;e>=0;e--){const r=t[e]^c[3];c[3]=c[2]^u.gmult(30,r),c[2]=c[1]^u.gmult(6,r),c[1]=c[0]^u.gmult(9,r),c[0]=u.gmult(17,r)}t[13]=c[0],t[14]=c[1],t[15]=c[2],t[16]=c[3];let a="BURST-";for(let e=0;e<17;e++)a+=u.alphabet[t[u.cwmap[e]]],3==(3&e)&&e<13&&(a+="-");return a})});t(l);l.convertNumericIdToAddress;var c=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToEpochTime=(e=>1e3*(u.GenesisBlockTime+e))});t(c);c.convertBurstTimeToEpochTime;var a=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToDate=(e=>new Date(c.convertBurstTimeToEpochTime(e)))});t(a);a.convertBurstTimeToDate;var s=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-u.GenesisBlockTime)});t(s);s.convertDateToBurstTime;var f=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValid=(e=>{0===e.indexOf("BURST-")&&(e=e.substr(6));const r=u.initialCodeword.slice();let t=0;for(let n=0;n<e.length;n++){const i=u.alphabet.indexOf(e.charAt(n));if(!(i<=-1||i>u.alphabet.length)){if(t>16)return!1;r[u.cwmap[t]]=i,t++}}if(17!==t)return!1;let n=0;for(let e=1;e<5;e++){let t=0;for(let n=0;n<31;n++){if(n>12&&n<27)continue;let i=n;n>26&&(i-=14),t^=u.gmult(r[i],u.gexp[e*n%31])}n|=t}return 0===n}),r.isBurstAddress=(e=>/^BURST\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{5}/i.test(e)&&r.isValid(e))});t(f);f.isValid,f.isBurstAddress;var h=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf("BURST-"))return;e=e.substr(6);const r=u.initialCodeword.slice();let t=0;for(let n=0;n<e.length;n++){const i=u.alphabet.indexOf(e.charAt(n));if(!(i<=-1||i>u.alphabet.length)){if(t>16)return;r[u.cwmap[t]]=i,t++}}if(!f.isValid(e))return;let n=u.base32Length;const i=[];for(let e=0;e<n;e++)i[e]=r[n-e-1];let o,l="",c=0;do{o=0,c=0;for(let e=0;e<n;e++)(c=32*c+i[e])>=10?(i[o]=Math.floor(c/10),c%=10,o+=1):o>0&&(i[o]=0,o+=1);n=o,l+=c}while(n>0);return l.split("").reverse().join("")})});t(h);h.convertAddressToNumericId;var g=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sumNQTStringToNumber=function(...e){return e.reduce((e,r)=>e+o.convertNQTStringToNumber(r),0)}});t(g);g.sumNQTStringToNumber;var p=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToString=((e,r=0,t=null)=>{if(0===t)return"";let n=e;if(0!==r){const i=null===t?e.length-r:t;!function(e,r,t=0){if(t<0)throw new Error("Start index should not be negative");if(e.length<t+r)throw new Error("Need at least "+r+" bytes to convert to an integer")}(n,i,r),n=e.slice(r,r+i)}return decodeURIComponent(escape(String.fromCharCode.apply(null,Array.from(n))))})});t(p);p.convertByteArrayToString;var d=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToHexString=((e,r=!1)=>{const t=[];for(let r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return r?t.join("").toUpperCase():t.join("")})});t(d);d.convertByteArrayToHexString;var v=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToByteArray=(e=>{if(e.length%2)throw new Error(`Invalid Hex String: ${e}`);const r=new Uint8Array(e.length/2);for(let t=0;t<e.length;t+=2){const n=parseInt(e.substr(t,2),16);if(Number.isNaN(n))throw new Error(`Invalid Hex String: ${e}`);r[t/2]=n}return r})});t(v);v.convertHexStringToByteArray;var m=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToDecString=(e=>{const r=[0];let t,n,i;for(t=0;t<e.length;t+=1){for(i=parseInt(e.charAt(t),16),n=0;n<r.length;n+=1)r[n]=16*r[n]+i,i=r[n]/10|0,r[n]%=10;for(;i>0;)r.push(i%10),i=i/10|0}return r.reverse().join("")})});t(m);m.convertHexStringToDecString;var w=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToString=(e=>p.convertByteArrayToString(v.convertHexStringToByteArray(e)))});t(w);w.convertHexStringToString;var y=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToByteArray=(e=>{const r=unescape(encodeURIComponent(e)),t=new Uint8Array(r.length);for(let e=0;e<r.length;++e)t[e]=r.charCodeAt(e);return t})});t(y);y.convertStringToByteArray;var b=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToHexString=(e=>d.convertByteArrayToHexString(y.convertStringToByteArray(e)))});t(b);b.convertStringToHexString;var T=n(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexEndianess=(e=>{let r="";const t=e;for(let e=t.length-1;e>=0;e-=2)r+=t[e-1]+t[e];return r})});t(T);T.convertHexEndianess;var S=n(function(e,r){function t(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}Object.defineProperty(r,"__esModule",{value:!0}),t(i),t(o),t(l),t(c),t(a),t(s),t(h),t(f),t(g),t(p),t(d),t(v),t(m),t(w),t(y),t(b),t(T)});t(S);var A=S.convertNumberToNQTString,N=(S.convertNQTStringToNumber,S.convertHexStringToDecString),O=S.convertHexStringToString,_=S.convertHexEndianess;S.convertHexStringToByteArray,S.convertByteArrayToHexString;function E(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=16*r,i=n+t;if(i>e.machineData.length)throw new Error("Insufficient length for variable at position: ".concat(n," (and given length: ").concat(t,")"));if(i%2!=0)throw new Error("Invalid position: ".concat(n," (or given length: ").concat(t,") - must be at least multiple of 2"));return _(e.machineData.substr(n,t))}function x(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function B(e){return function(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var P=256;function D(e){return Math.ceil(e.length/2/P)}var C=function(){function e(r){!function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this,e),this._contract=r}var r,t,n;return r=e,(t=[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return D(this._contract.machineCode)}},{key:"getVariableAsString",value:function(r){var t=this.getHexDataAt(r,e.VariableLength);return O(t.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(r,t){var n=this.getHexDataAt(r,t*e.VariableLength);return O(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return N(this.getVariable(e))}},{key:"getVariable",value:function(r){return this.getHexDataAt(r,e.VariableLength)}},{key:"getHexDataAt",value:function(r,t){var n=t||this._contract.machineData.length-e.VariableLength*r;return E(this._contract,r,n)}}])&&x(r.prototype,t),n&&x(r,n),e}();C.VariableLength=16,String.prototype.padStart||(String.prototype.padStart=function(e,r){return e>>=0,r=String(void 0!==r?r:" "),this.length>=e?String(this):((e-=this.length)>r.length&&(r+=r.repeat(e/r.length)),r.slice(0,e)+String(this))});var M=n(function(e){!function(r){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",c=1e14,a=14,s=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,g=1e9;function p(e){var r=0|e;return e>0||e===r?r:r-1}function d(e){for(var r,t,n=1,i=e.length,o=e[0]+"";n<i;){for(r=e[n++]+"",t=a-r.length;t--;r="0"+r);o+=r}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function v(e,r){var t,n,i=e.c,o=r.c,u=e.s,l=r.s,c=e.e,a=r.e;if(!u||!l)return null;if(t=i&&!i[0],n=o&&!o[0],t||n)return t?n?0:-l:u;if(u!=l)return u;if(t=u<0,n=c==a,!i||!o)return n?0:!i^t?1:-1;if(!n)return c>a^t?1:-1;for(l=(c=i.length)<(a=o.length)?c:a,u=0;u<l;u++)if(i[u]!=o[u])return i[u]>o[u]^t?1:-1;return c==a?0:c>a^t?1:-1}function m(e,r,t,n){if(e<r||e>t||e!==o(e))throw Error(u+(n||"Argument")+("number"==typeof e?e<r||e>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var r=e.c.length-1;return p(e.e/a)==r&&e.c[r]%2!=0}function y(e,r){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(r<0?"e":"e+")+r}function b(e,r,t){var n,i;if(r<0){for(i=t+".";++r;i+=t);e=i+e}else if(++r>(n=e.length)){for(i=t,r-=n;--r;i+=t);e+=i}else r<n&&(e=e.slice(0,r)+"."+e.slice(r));return e}(t=function e(r){var t,T,S,A,N,O,_,E,x,B=G.prototype={constructor:G,toString:null,valueOf:null},P=new G(1),D=20,C=4,M=-7,j=21,I=-1e7,H=1e7,L=!1,U=1,R=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},V="0123456789abcdefghijklmnopqrstuvwxyz";function G(e,r){var t,i,u,c,f,h,g,p,d=this;if(!(d instanceof G))return new G(e,r);if(null==r){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>H?d.c=d.e=null:e.e<I?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>H?d.c=d.e=null:(d.e=c,d.c=[e]))}p=String(e)}else{if(!n.test(p=String(e)))return S(d,p,h);d.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(c=p.indexOf("."))>-1&&(p=p.replace(".","")),(f=p.search(/e/i))>0?(c<0&&(c=f),c+=+p.slice(f+1),p=p.substring(0,f)):c<0&&(c=p.length)}else{if(m(r,2,V.length,"Base"),10==r)return Q(d=new G(e),D+d.e+1,C);if(p=String(e),h="number"==typeof e){if(0*e!=0)return S(d,p,h,r);if(d.s=1/e<0?(p=p.slice(1),-1):1,G.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else d.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(t=V.slice(0,r),c=f=0,g=p.length;f<g;f++)if(t.indexOf(i=p.charAt(f))<0){if("."==i){if(f>c){c=g;continue}}else if(!u&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){u=!0,f=-1,c=0;continue}return S(d,String(e),h,r)}h=!1,(c=(p=T(p,r,10,d.s)).indexOf("."))>-1?p=p.replace(".",""):c=p.length}for(f=0;48===p.charCodeAt(f);f++);for(g=p.length;48===p.charCodeAt(--g););if(p=p.slice(f,++g)){if(g-=f,h&&G.DEBUG&&g>15&&(e>s||e!==o(e)))throw Error(l+d.s*e);if((c=c-f-1)>H)d.c=d.e=null;else if(c<I)d.c=[d.e=0];else{if(d.e=c,d.c=[],f=(c+1)%a,c<0&&(f+=a),f<g){for(f&&d.c.push(+p.slice(0,f)),g-=a;f<g;)d.c.push(+p.slice(f,f+=a));f=a-(p=p.slice(f)).length}else f-=g;for(;f--;p+="0");d.c.push(+p)}}else d.c=[d.e=0]}function F(e,r,t,n){var i,o,u,l,c;if(null==t?t=C:m(t,0,8),!e.c)return e.toString();if(i=e.c[0],u=e.e,null==r)c=d(e.c),c=1==n||2==n&&(u<=M||u>=j)?y(c,u):b(c,u,"0");else if(o=(e=Q(new G(e),r,t)).e,l=(c=d(e.c)).length,1==n||2==n&&(r<=o||o<=M)){for(;l<r;c+="0",l++);c=y(c,o)}else if(r-=u,c=b(c,o,"0"),o+1>l){if(--r>0)for(c+=".";r--;c+="0");}else if((r+=o-l)>0)for(o+1==l&&(c+=".");r--;c+="0");return e.s<0&&i?"-"+c:c}function $(e,r){for(var t,n=1,i=new G(e[0]);n<e.length;n++){if(!(t=new G(e[n])).s){i=t;break}r.call(i,t)&&(i=t)}return i}function q(e,r,t){for(var n=1,i=r.length;!r[--i];r.pop());for(i=r[0];i>=10;i/=10,n++);return(t=n+t*a-1)>H?e.c=e.e=null:t<I?e.c=[e.e=0]:(e.e=t,e.c=r),e}function Q(e,r,t,n){var u,l,s,h,g,p,d,v=e.c,m=f;if(v){e:{for(u=1,h=v[0];h>=10;h/=10,u++);if((l=r-u)<0)l+=a,s=r,d=(g=v[p=0])/m[u-s-1]%10|0;else if((p=i((l+1)/a))>=v.length){if(!n)break e;for(;v.length<=p;v.push(0));g=d=0,u=1,s=(l%=a)-a+1}else{for(g=h=v[p],u=1;h>=10;h/=10,u++);d=(s=(l%=a)-a+u)<0?0:g/m[u-s-1]%10|0}if(n=n||r<0||null!=v[p+1]||(s<0?g:g%m[u-s-1]),n=t<4?(d||n)&&(0==t||t==(e.s<0?3:2)):d>5||5==d&&(4==t||n||6==t&&(l>0?s>0?g/m[u-s]:0:v[p-1])%10&1||t==(e.s<0?8:7)),r<1||!v[0])return v.length=0,n?(r-=e.e+1,v[0]=m[(a-r%a)%a],e.e=-r||0):v[0]=e.e=0,e;if(0==l?(v.length=p,h=1,p--):(v.length=p+1,h=m[a-l],v[p]=s>0?o(g/m[u-s]%m[s])*h:0),n)for(;;){if(0==p){for(l=1,s=v[0];s>=10;s/=10,l++);for(s=v[0]+=h,h=1;s>=10;s/=10,h++);l!=h&&(e.e++,v[0]==c&&(v[0]=1));break}if(v[p]+=h,v[p]!=c)break;v[p--]=0,h=1}for(l=v.length;0===v[--l];v.pop());}e.e>H?e.c=e.e=null:e.e<I&&(e.c=[e.e=0])}return e}function z(e){var r,t=e.e;return null===t?e.toString():(r=d(e.c),r=t<=M||t>=j?y(r,t):b(r,t,"0"),e.s<0?"-"+r:r)}return G.clone=e,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(e){var r,t;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(m(t=e[r],0,g,r),D=t),e.hasOwnProperty(r="ROUNDING_MODE")&&(m(t=e[r],0,8,r),C=t),e.hasOwnProperty(r="EXPONENTIAL_AT")&&((t=e[r])&&t.pop?(m(t[0],-g,0,r),m(t[1],0,g,r),M=t[0],j=t[1]):(m(t,-g,g,r),M=-(j=t<0?-t:t))),e.hasOwnProperty(r="RANGE"))if((t=e[r])&&t.pop)m(t[0],-g,-1,r),m(t[1],1,g,r),I=t[0],H=t[1];else{if(m(t,-g,g,r),!t)throw Error(u+r+" cannot be zero: "+t);I=-(H=t<0?-t:t)}if(e.hasOwnProperty(r="CRYPTO")){if((t=e[r])!==!!t)throw Error(u+r+" not true or false: "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw L=!t,Error(u+"crypto unavailable");L=t}else L=t}if(e.hasOwnProperty(r="MODULO_MODE")&&(m(t=e[r],0,9,r),U=t),e.hasOwnProperty(r="POW_PRECISION")&&(m(t=e[r],0,g,r),R=t),e.hasOwnProperty(r="FORMAT")){if("object"!=typeof(t=e[r]))throw Error(u+r+" not an object: "+t);k=t}if(e.hasOwnProperty(r="ALPHABET")){if("string"!=typeof(t=e[r])||/^.$|[+-.\s]|(.).*\1/.test(t))throw Error(u+r+" invalid: "+t);V=t}}return{DECIMAL_PLACES:D,ROUNDING_MODE:C,EXPONENTIAL_AT:[M,j],RANGE:[I,H],CRYPTO:L,MODULO_MODE:U,POW_PRECISION:R,FORMAT:k,ALPHABET:V}},G.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!G.DEBUG)return!0;var r,t,n=e.c,i=e.e,l=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===l||-1===l)&&i>=-g&&i<=g&&i===o(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((r=(i+1)%a)<1&&(r+=a),String(n[0]).length==r){for(r=0;r<n.length;r++)if((t=n[r])<0||t>=c||t!==o(t))break e;if(0!==t)return!0}}}else if(null===n&&null===i&&(null===l||1===l||-1===l))return!0;throw Error(u+"Invalid BigNumber: "+e)},G.maximum=G.max=function(){return $(arguments,B.lt)},G.minimum=G.min=function(){return $(arguments,B.gt)},G.random=(A=9007199254740992*Math.random()&2097151?function(){return o(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var r,t,n,l,c,s=0,h=[],p=new G(P);if(null==e?e=D:m(e,0,g),l=i(e/a),L)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(l*=2));s<l;)(c=131072*r[s]+(r[s+1]>>>11))>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),r[s]=t[0],r[s+1]=t[1]):(h.push(c%1e14),s+=2);s=l/2}else{if(!crypto.randomBytes)throw L=!1,Error(u+"crypto unavailable");for(r=crypto.randomBytes(l*=7);s<l;)(c=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6])>=9e15?crypto.randomBytes(7).copy(r,s):(h.push(c%1e14),s+=7);s=l/7}if(!L)for(;s<l;)(c=A())<9e15&&(h[s++]=c%1e14);for(l=h[--s],e%=a,l&&e&&(c=f[a-e],h[s]=o(l/c)*c);0===h[s];h.pop(),s--);if(s<0)h=[n=0];else{for(n=-1;0===h[0];h.splice(0,1),n-=a);for(s=1,c=h[0];c>=10;c/=10,s++);s<a&&(n-=a-s)}return p.e=n,p.c=h,p}),G.sum=function(){for(var e=1,r=arguments,t=new G(r[0]);e<r.length;)t=t.plus(r[e++]);return t},T=function(){function e(e,r,t,n){for(var i,o,u=[0],l=0,c=e.length;l<c;){for(o=u.length;o--;u[o]*=r);for(u[0]+=n.indexOf(e.charAt(l++)),i=0;i<u.length;i++)u[i]>t-1&&(null==u[i+1]&&(u[i+1]=0),u[i+1]+=u[i]/t|0,u[i]%=t)}return u.reverse()}return function(r,n,i,o,u){var l,c,a,s,f,h,g,p,v=r.indexOf("."),m=D,w=C;for(v>=0&&(s=R,R=0,r=r.replace(".",""),h=(p=new G(n)).pow(r.length-v),R=s,p.c=e(b(d(h.c),h.e,"0"),10,i,"0123456789"),p.e=p.c.length),a=s=(g=e(r,n,i,u?(l=V,"0123456789"):(l="0123456789",V))).length;0==g[--s];g.pop());if(!g[0])return l.charAt(0);if(v<0?--a:(h.c=g,h.e=a,h.s=o,g=(h=t(h,p,m,w,i)).c,f=h.r,a=h.e),v=g[c=a+m+1],s=i/2,f=f||c<0||null!=g[c+1],f=w<4?(null!=v||f)&&(0==w||w==(h.s<0?3:2)):v>s||v==s&&(4==w||f||6==w&&1&g[c-1]||w==(h.s<0?8:7)),c<1||!g[0])r=f?b(l.charAt(1),-m,l.charAt(0)):l.charAt(0);else{if(g.length=c,f)for(--i;++g[--c]>i;)g[c]=0,c||(++a,g=[1].concat(g));for(s=g.length;!g[--s];);for(v=0,r="";v<=s;r+=l.charAt(g[v++]));r=b(r,a,l.charAt(0))}return r}}(),t=function(){function e(e,r,t){var n,i,o,u,l=0,c=e.length,a=r%h,s=r/h|0;for(e=e.slice();c--;)l=((i=a*(o=e[c]%h)+(n=s*o+(u=e[c]/h|0)*a)%h*h+l)/t|0)+(n/h|0)+s*u,e[c]=i%t;return l&&(e=[l].concat(e)),e}function r(e,r,t,n){var i,o;if(t!=n)o=t>n?1:-1;else for(i=o=0;i<t;i++)if(e[i]!=r[i]){o=e[i]>r[i]?1:-1;break}return o}function t(e,r,t,n){for(var i=0;t--;)e[t]-=i,i=e[t]<r[t]?1:0,e[t]=i*n+e[t]-r[t];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,u,l,s){var f,h,g,d,v,m,w,y,b,T,S,A,N,O,_,E,x,B=n.s==i.s?1:-1,P=n.c,D=i.c;if(!(P&&P[0]&&D&&D[0]))return new G(n.s&&i.s&&(P?!D||P[0]!=D[0]:D)?P&&0==P[0]||!D?0*B:B/0:NaN);for(b=(y=new G(B)).c=[],B=u+(h=n.e-i.e)+1,s||(s=c,h=p(n.e/a)-p(i.e/a),B=B/a|0),g=0;D[g]==(P[g]||0);g++);if(D[g]>(P[g]||0)&&h--,B<0)b.push(1),d=!0;else{for(O=P.length,E=D.length,g=0,B+=2,(v=o(s/(D[0]+1)))>1&&(D=e(D,v,s),P=e(P,v,s),E=D.length,O=P.length),N=E,S=(T=P.slice(0,E)).length;S<E;T[S++]=0);x=D.slice(),x=[0].concat(x),_=D[0],D[1]>=s/2&&_++;do{if(v=0,(f=r(D,T,E,S))<0){if(A=T[0],E!=S&&(A=A*s+(T[1]||0)),(v=o(A/_))>1)for(v>=s&&(v=s-1),w=(m=e(D,v,s)).length,S=T.length;1==r(m,T,w,S);)v--,t(m,E<w?x:D,w,s),w=m.length,f=1;else 0==v&&(f=v=1),w=(m=D.slice()).length;if(w<S&&(m=[0].concat(m)),t(T,m,S,s),S=T.length,-1==f)for(;r(D,T,E,S)<1;)v++,t(T,E<S?x:D,S,s),S=T.length}else 0===f&&(v++,T=[0]);b[g++]=v,T[0]?T[S++]=P[N]||0:(T=[P[N]],S=1)}while((N++<O||null!=T[0])&&B--);d=null!=T[0],b[0]||b.splice(0,1)}if(s==c){for(g=1,B=b[0];B>=10;B/=10,g++);Q(y,u+(y.e=g+h*a-1)+1,l,d)}else y.e=h,y.r=+d;return y}}(),N=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,_=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,r,t,n){var i,o=t?r:r.replace(x,"");if(E.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!t&&(o=o.replace(N,function(e,r,t){return i="x"==(t=t.toLowerCase())?16:"b"==t?2:8,n&&n!=i?e:r}),n&&(i=n,o=o.replace(O,"$1").replace(_,"0.$1")),r!=o))return new G(o,i);if(G.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+r);e.s=null}e.c=e.e=null},B.absoluteValue=B.abs=function(){var e=new G(this);return e.s<0&&(e.s=1),e},B.comparedTo=function(e,r){return v(this,new G(e,r))},B.decimalPlaces=B.dp=function(e,r){var t,n,i,o=this;if(null!=e)return m(e,0,g),null==r?r=C:m(r,0,8),Q(new G(o),e+o.e+1,r);if(!(t=o.c))return null;if(n=((i=t.length-1)-p(this.e/a))*a,i=t[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},B.dividedBy=B.div=function(e,r){return t(this,new G(e,r),D,C)},B.dividedToIntegerBy=B.idiv=function(e,r){return t(this,new G(e,r),0,1)},B.exponentiatedBy=B.pow=function(e,r){var t,n,l,c,s,f,h,g,p=this;if((e=new G(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+z(e));if(null!=r&&(r=new G(r)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return g=new G(Math.pow(+z(p),s?2-w(e):+z(e))),r?g.mod(r):g;if(f=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new G(NaN);(n=!f&&p.isInteger()&&r.isInteger())&&(p=p.mod(r))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return c=p.s<0&&w(e)?-0:0,p.e>-1&&(c=1/c),new G(f?1/c:c);R&&(c=i(R/a+2))}for(s?(t=new G(.5),f&&(e.s=1),h=w(e)):h=(l=Math.abs(+z(e)))%2,g=new G(P);;){if(h){if(!(g=g.times(p)).c)break;c?g.c.length>c&&(g.c.length=c):n&&(g=g.mod(r))}if(l){if(0===(l=o(l/2)))break;h=l%2}else if(Q(e=e.times(t),e.e+1,1),e.e>14)h=w(e);else{if(0==(l=+z(e)))break;h=l%2}p=p.times(p),c?p.c&&p.c.length>c&&(p.c.length=c):n&&(p=p.mod(r))}return n?g:(f&&(g=P.div(g)),r?g.mod(r):c?Q(g,R,C,void 0):g)},B.integerValue=function(e){var r=new G(this);return null==e?e=C:m(e,0,8),Q(r,r.e+1,e)},B.isEqualTo=B.eq=function(e,r){return 0===v(this,new G(e,r))},B.isFinite=function(){return!!this.c},B.isGreaterThan=B.gt=function(e,r){return v(this,new G(e,r))>0},B.isGreaterThanOrEqualTo=B.gte=function(e,r){return 1===(r=v(this,new G(e,r)))||0===r},B.isInteger=function(){return!!this.c&&p(this.e/a)>this.c.length-2},B.isLessThan=B.lt=function(e,r){return v(this,new G(e,r))<0},B.isLessThanOrEqualTo=B.lte=function(e,r){return-1===(r=v(this,new G(e,r)))||0===r},B.isNaN=function(){return!this.s},B.isNegative=function(){return this.s<0},B.isPositive=function(){return this.s>0},B.isZero=function(){return!!this.c&&0==this.c[0]},B.minus=function(e,r){var t,n,i,o,u=this,l=u.s;if(r=(e=new G(e,r)).s,!l||!r)return new G(NaN);if(l!=r)return e.s=-r,u.plus(e);var s=u.e/a,f=e.e/a,h=u.c,g=e.c;if(!s||!f){if(!h||!g)return h?(e.s=-r,e):new G(g?u:NaN);if(!h[0]||!g[0])return g[0]?(e.s=-r,e):new G(h[0]?u:3==C?-0:0)}if(s=p(s),f=p(f),h=h.slice(),l=s-f){for((o=l<0)?(l=-l,i=h):(f=s,i=g),i.reverse(),r=l;r--;i.push(0));i.reverse()}else for(n=(o=(l=h.length)<(r=g.length))?l:r,l=r=0;r<n;r++)if(h[r]!=g[r]){o=h[r]<g[r];break}if(o&&(i=h,h=g,g=i,e.s=-e.s),(r=(n=g.length)-(t=h.length))>0)for(;r--;h[t++]=0);for(r=c-1;n>l;){if(h[--n]<g[n]){for(t=n;t&&!h[--t];h[t]=r);--h[t],h[n]+=c}h[n]-=g[n]}for(;0==h[0];h.splice(0,1),--f);return h[0]?q(e,h,f):(e.s=3==C?-1:1,e.c=[e.e=0],e)},B.modulo=B.mod=function(e,r){var n,i,o=this;return e=new G(e,r),!o.c||!e.s||e.c&&!e.c[0]?new G(NaN):!e.c||o.c&&!o.c[0]?new G(o):(9==U?(i=e.s,e.s=1,n=t(o,e,0,3),e.s=i,n.s*=i):n=t(o,e,0,U),(e=o.minus(n.times(e))).c[0]||1!=U||(e.s=o.s),e)},B.multipliedBy=B.times=function(e,r){var t,n,i,o,u,l,s,f,g,d,v,m,w,y,b,T=this,S=T.c,A=(e=new G(e,r)).c;if(!(S&&A&&S[0]&&A[0]))return!T.s||!e.s||S&&!S[0]&&!A||A&&!A[0]&&!S?e.c=e.e=e.s=null:(e.s*=T.s,S&&A?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=p(T.e/a)+p(e.e/a),e.s*=T.s,(s=S.length)<(d=A.length)&&(w=S,S=A,A=w,i=s,s=d,d=i),i=s+d,w=[];i--;w.push(0));for(y=c,b=h,i=d;--i>=0;){for(t=0,v=A[i]%b,m=A[i]/b|0,o=i+(u=s);o>i;)t=((f=v*(f=S[--u]%b)+(l=m*f+(g=S[u]/b|0)*v)%b*b+w[o]+t)/y|0)+(l/b|0)+m*g,w[o--]=f%y;w[o]=t}return t?++n:w.splice(0,1),q(e,w,n)},B.negated=function(){var e=new G(this);return e.s=-e.s||null,e},B.plus=function(e,r){var t,n=this,i=n.s;if(r=(e=new G(e,r)).s,!i||!r)return new G(NaN);if(i!=r)return e.s=-r,n.minus(e);var o=n.e/a,u=e.e/a,l=n.c,s=e.c;if(!o||!u){if(!l||!s)return new G(i/0);if(!l[0]||!s[0])return s[0]?e:new G(l[0]?n:0*i)}if(o=p(o),u=p(u),l=l.slice(),i=o-u){for(i>0?(u=o,t=s):(i=-i,t=l),t.reverse();i--;t.push(0));t.reverse()}for((i=l.length)-(r=s.length)<0&&(t=s,s=l,l=t,r=i),i=0;r;)i=(l[--r]=l[r]+s[r]+i)/c|0,l[r]=c===l[r]?0:l[r]%c;return i&&(l=[i].concat(l),++u),q(e,l,u)},B.precision=B.sd=function(e,r){var t,n,i,o=this;if(null!=e&&e!==!!e)return m(e,1,g),null==r?r=C:m(r,0,8),Q(new G(o),e,r);if(!(t=o.c))return null;if(n=(i=t.length-1)*a+1,i=t[i]){for(;i%10==0;i/=10,n--);for(i=t[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},B.shiftedBy=function(e){return m(e,-s,s),this.times("1e"+e)},B.squareRoot=B.sqrt=function(){var e,r,n,i,o,u=this,l=u.c,c=u.s,a=u.e,s=D+4,f=new G("0.5");if(1!==c||!l||!l[0])return new G(!c||c<0&&(!l||l[0])?NaN:l?u:1/0);if(0==(c=Math.sqrt(+z(u)))||c==1/0?(((r=d(l)).length+a)%2==0&&(r+="0"),c=Math.sqrt(+r),a=p((a+1)/2)-(a<0||a%2),n=new G(r=c==1/0?"1e"+a:(r=c.toExponential()).slice(0,r.indexOf("e")+1)+a)):n=new G(c+""),n.c[0])for((c=(a=n.e)+s)<3&&(c=0);;)if(o=n,n=f.times(o.plus(t(u,o,s,1))),d(o.c).slice(0,c)===(r=d(n.c)).slice(0,c)){if(n.e<a&&--c,"9999"!=(r=r.slice(c-3,c+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(Q(n,n.e+D+2,1),e=!n.times(n).eq(u));break}if(!i&&(Q(o,o.e+D+2,0),o.times(o).eq(u))){n=o;break}s+=4,c+=4,i=1}return Q(n,n.e+D+1,C,e)},B.toExponential=function(e,r){return null!=e&&(m(e,0,g),e++),F(this,e,r,1)},B.toFixed=function(e,r){return null!=e&&(m(e,0,g),e=e+this.e+1),F(this,e,r)},B.toFormat=function(e,r,t){var n,i=this;if(null==t)null!=e&&r&&"object"==typeof r?(t=r,r=null):e&&"object"==typeof e?(t=e,e=r=null):t=k;else if("object"!=typeof t)throw Error(u+"Argument not an object: "+t);if(n=i.toFixed(e,r),i.c){var o,l=n.split("."),c=+t.groupSize,a=+t.secondaryGroupSize,s=t.groupSeparator||"",f=l[0],h=l[1],g=i.s<0,p=g?f.slice(1):f,d=p.length;if(a&&(o=c,c=a,a=o,d-=o),c>0&&d>0){for(o=d%c||c,f=p.substr(0,o);o<d;o+=c)f+=s+p.substr(o,c);a>0&&(f+=s+p.slice(o)),g&&(f="-"+f)}n=h?f+(t.decimalSeparator||"")+((a=+t.fractionGroupSize)?h.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):h):f}return(t.prefix||"")+n+(t.suffix||"")},B.toFraction=function(e){var r,n,i,o,l,c,s,h,g,p,v,m,w=this,y=w.c;if(null!=e&&(!(s=new G(e)).isInteger()&&(s.c||1!==s.s)||s.lt(P)))throw Error(u+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+z(s));if(!y)return new G(w);for(r=new G(P),g=n=new G(P),i=h=new G(P),m=d(y),l=r.e=m.length-w.e-1,r.c[0]=f[(c=l%a)<0?a+c:c],e=!e||s.comparedTo(r)>0?l>0?r:g:s,c=H,H=1/0,s=new G(m),h.c[0]=0;p=t(s,r,0,1),1!=(o=n.plus(p.times(i))).comparedTo(e);)n=i,i=o,g=h.plus(p.times(o=g)),h=o,r=s.minus(p.times(o=r)),s=o;return o=t(e.minus(n),i,0,1),h=h.plus(o.times(g)),n=n.plus(o.times(i)),h.s=g.s=w.s,v=t(g,i,l*=2,C).minus(w).abs().comparedTo(t(h,n,l,C).minus(w).abs())<1?[g,i]:[h,n],H=c,v},B.toNumber=function(){return+z(this)},B.toPrecision=function(e,r){return null!=e&&m(e,1,g),F(this,e,r,2)},B.toString=function(e){var r,t=this,n=t.s,i=t.e;return null===i?n?(r="Infinity",n<0&&(r="-"+r)):r="NaN":(null==e?r=i<=M||i>=j?y(d(t.c),i):b(d(t.c),i,"0"):10===e?r=b(d((t=Q(new G(t),D+i+1,C)).c),t.e,"0"):(m(e,2,V.length,"Base"),r=T(b(d(t.c),i,"0"),10,e,n,!0)),n<0&&t.c[0]&&(r="-"+r)),r},B.valueOf=B.toJSON=function(){return z(this)},B._isBigNumber=!0,null!=r&&G.set(r),G}()).default=t.BigNumber=t,e.exports?e.exports=t:(r||(r="undefined"!=typeof self&&self?self:window),r.BigNumber=t)}(r)}),j=function(e){for(var r=e.multipliedBy(-1).toString(2);r.length%8;)r="0"+r;var t="1"===r[0]&&-1!==r.slice(1).indexOf("1")?"11111111":"";return r=r.split("").map(function(e){return"0"===e?"1":"0"}).join(""),new M(t+r,2).plus(1)},I=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e};return e.CodePageSize=P,e.ContractDataView=C,e.calculateMinimumCreationFee=function(e){return A(2+D(e)+1)},e.countCodePages=D,e.generateMethodCall=function(e){var r=e.methodArgs?[e.methodHash].concat(B(e.methodArgs)):[e.methodHash];if(r.length>4)throw new Error("At maximum ".concat(3," are supported"));return r.map(I).map(function(e){return function(e){var r=new M(e);r.lt(0)&&(r=j(r));var t=r.toString(16);return t.length%2?"0"+t:t}(e).padStart(16,"0")}).map(_).join("")},e.getContractDatablock=E,e}({});
var b$contracts=function(exports){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,r){return e(r={exports:{}},r.exports),r.exports}var internal=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.GenesisBlockTime=Date.UTC(2014,7,11,2,0,0,0)/1e3,r.initialCodeword=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r.gexp=[1,2,4,8,16,5,10,20,13,26,17,7,14,28,29,31,27,19,3,6,12,24,21,15,30,25,23,11,22,9,18,1],r.glog=[0,0,1,18,2,5,19,11,3,29,6,27,20,8,12,23,4,10,30,17,7,22,28,26,21,25,9,16,13,14,24,15],r.cwmap=[3,2,1,0,7,6,5,4,13,14,15,16,12,8,9,10,11],r.alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".split(""),r.base32Length=13,r.ginv=(e=>r.gexp[31-r.glog[e]]),r.gmult=((e,t)=>{if(0===e||0===t)return 0;const n=(r.glog[e]+r.glog[t])%31;return r.gexp[n]})});unwrapExports(internal);var internal_1=internal.GenesisBlockTime,internal_2=internal.initialCodeword,internal_3=internal.gexp,internal_4=internal.glog,internal_5=internal.cwmap,internal_6=internal.alphabet,internal_7=internal.base32Length,internal_8=internal.ginv,internal_9=internal.gmult,isBurstAddress=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValid=(e=>{0===e.indexOf("BURST-")&&(e=e.substr(6));const r=internal.initialCodeword.slice();let t=0;for(let n=0;n<e.length;n++){const o=internal.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>internal.alphabet.length)){if(t>16)return!1;r[internal.cwmap[t]]=o,t++}}if(17!==t)return!1;let n=0;for(let e=1;e<5;e++){let t=0;for(let n=0;n<31;n++){if(n>12&&n<27)continue;let o=n;n>26&&(o-=14),t^=internal.gmult(r[o],internal.gexp[e*n%31])}n|=t}return 0===n}),r.isBurstAddress=(e=>/^BURST\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{4}\-[A-Z0-9]{5}/i.test(e)&&r.isValid(e))});unwrapExports(isBurstAddress);var isBurstAddress_1=isBurstAddress.isValid,isBurstAddress_2=isBurstAddress.isBurstAddress,convertAddressToNumericId=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertAddressToNumericId=(e=>{if(null==e||0===e.trim().length)return;if(0!==e.indexOf("BURST-"))return;e=e.substr(6);const r=internal.initialCodeword.slice();let t=0;for(let n=0;n<e.length;n++){const o=internal.alphabet.indexOf(e.charAt(n));if(!(o<=-1||o>internal.alphabet.length)){if(t>16)return;r[internal.cwmap[t]]=o,t++}}if(!isBurstAddress.isValid(e))return;let n=internal.base32Length;const o=[];for(let e=0;e<n;e++)o[e]=r[n-e-1];let i,a="",c=0;do{i=0,c=0;for(let e=0;e<n;e++)(c=32*c+o[e])>=10?(o[i]=Math.floor(c/10),c%=10,i+=1):i>0&&(o[i]=0,i+=1);n=i,a+=c}while(n>0);return a.split("").reverse().join("")})});unwrapExports(convertAddressToNumericId);var convertAddressToNumericId_1=convertAddressToNumericId.convertAddressToNumericId,convertBurstTimeToEpochTime=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToEpochTime=(e=>1e3*(internal.GenesisBlockTime+e))});unwrapExports(convertBurstTimeToEpochTime);var convertBurstTimeToEpochTime_1=convertBurstTimeToEpochTime.convertBurstTimeToEpochTime,convertBurstTimeToDate=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertBurstTimeToDate=(e=>new Date(convertBurstTimeToEpochTime.convertBurstTimeToEpochTime(e)))});unwrapExports(convertBurstTimeToDate);var convertBurstTimeToDate_1=convertBurstTimeToDate.convertBurstTimeToDate,convertByteArrayToHexString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToHexString=((e,r=!1)=>{const t=[];for(let r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return r?t.join("").toUpperCase():t.join("")})});unwrapExports(convertByteArrayToHexString);var convertByteArrayToHexString_1=convertByteArrayToHexString.convertByteArrayToHexString,convertByteArrayToString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertByteArrayToString=((e,r=0,t=null)=>{if(0===t)return"";let n=e;if(0!==r){const o=null===t?e.length-r:t;!function(e,r,t=0){if(t<0)throw new Error("Start index should not be negative");if(e.length<t+r)throw new Error("Need at least "+r+" bytes to convert to an integer")}(n,o,r),n=e.slice(r,r+o)}return decodeURIComponent(escape(String.fromCharCode.apply(null,Array.from(n))))})});unwrapExports(convertByteArrayToString);var convertByteArrayToString_1=convertByteArrayToString.convertByteArrayToString,convertDateToBurstTime=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertDateToBurstTime=(e=>Math.round(e.getTime()/1e3)-internal.GenesisBlockTime)});unwrapExports(convertDateToBurstTime);var convertDateToBurstTime_1=convertDateToBurstTime.convertDateToBurstTime,convertHexEndianess=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexEndianess=(e=>{let r="";const t=e;for(let e=t.length-1;e>=0;e-=2)r+=t[e-1]+t[e];return r})});unwrapExports(convertHexEndianess);var convertHexEndianess_1=convertHexEndianess.convertHexEndianess,convertHexStringToByteArray=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToByteArray=(e=>{if(e.length%2)throw new Error(`Invalid Hex String: ${e}`);const r=new Uint8Array(e.length/2);for(let t=0;t<e.length;t+=2){const n=parseInt(e.substr(t,2),16);if(Number.isNaN(n))throw new Error(`Invalid Hex String: ${e}`);r[t/2]=n}return r})});unwrapExports(convertHexStringToByteArray);var convertHexStringToByteArray_1=convertHexStringToByteArray.convertHexStringToByteArray,convertHexStringToDecString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToDecString=(e=>{const r=[0];let t,n,o;for(t=0;t<e.length;t+=1){for(o=parseInt(e.charAt(t),16),n=0;n<r.length;n+=1)r[n]=16*r[n]+o,o=r[n]/10|0,r[n]%=10;for(;o>0;)r.push(o%10),o=o/10|0}return r.reverse().join("")})});unwrapExports(convertHexStringToDecString);var convertHexStringToDecString_1=convertHexStringToDecString.convertHexStringToDecString,convertHexStringToString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertHexStringToString=(e=>convertByteArrayToString.convertByteArrayToString(convertHexStringToByteArray.convertHexStringToByteArray(e)))});unwrapExports(convertHexStringToString);var convertHexStringToString_1=convertHexStringToString.convertHexStringToString,convertNQTStringToNumber=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNQTStringToNumber=(e=>{if(null==e||""===e)throw new Error("Invalid argument");return parseFloat(e)/1e8})});unwrapExports(convertNQTStringToNumber);var convertNQTStringToNumber_1=convertNQTStringToNumber.convertNQTStringToNumber,convertNumberToNQTString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNumberToNQTString=(e=>{if(null==e)throw new Error("Invalid argument");return parseFloat(e.toString()).toFixed(8).replace(".","")})});unwrapExports(convertNumberToNQTString);var convertNumberToNQTString_1=convertNumberToNQTString.convertNumberToNQTString,convertNumericIdToAddress=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertNumericIdToAddress=(e=>{if(null==e||0===e.trim().length)return;const r=[],t=internal.initialCodeword.slice();let n=0,o=e.length;for(let t=0;t<o;t++)r[t]=e.charCodeAt(t)-"0".charCodeAt(0);let i=0,a=0;do{i=0,a=0;for(let e=0;e<o;e++)(i=10*i+r[e])>=32?(r[a]=i>>5,i&=31,a++):a>0&&(r[a]=0,a++);o=a,t[n]=i,n++}while(o>0);const c=[0,0,0,0];for(let e=internal.base32Length-1;e>=0;e--){const r=t[e]^c[3];c[3]=c[2]^internal.gmult(30,r),c[2]=c[1]^internal.gmult(6,r),c[1]=c[0]^internal.gmult(9,r),c[0]=internal.gmult(17,r)}t[13]=c[0],t[14]=c[1],t[15]=c[2],t[16]=c[3];let u="BURST-";for(let e=0;e<17;e++)u+=internal.alphabet[t[internal.cwmap[e]]],3==(3&e)&&e<13&&(u+="-");return u})});unwrapExports(convertNumericIdToAddress);var convertNumericIdToAddress_1=convertNumericIdToAddress.convertNumericIdToAddress,convertStringToByteArray=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToByteArray=(e=>{const r=unescape(encodeURIComponent(e)),t=new Uint8Array(r.length);for(let e=0;e<r.length;++e)t[e]=r.charCodeAt(e);return t})});unwrapExports(convertStringToByteArray);var convertStringToByteArray_1=convertStringToByteArray.convertStringToByteArray,convertStringToHexString=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.convertStringToHexString=(e=>convertByteArrayToHexString.convertByteArrayToHexString(convertStringToByteArray.convertStringToByteArray(e)))});unwrapExports(convertStringToHexString);var convertStringToHexString_1=convertStringToHexString.convertStringToHexString,createDeeplinkArgs=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e){e[e.Text=0]="Text",e[e.Hexadecimal=1]="Hexadecimal",e[e.Base64=2]="Base64"}(r.EncoderFormat||(r.EncoderFormat={}))});unwrapExports(createDeeplinkArgs);var createDeeplinkArgs_1=createDeeplinkArgs.EncoderFormat,base64=createCommonjsModule(function(module,exports){var global,factory;global="undefined"!=typeof self?self:"undefined"!=typeof window?window:commonjsGlobal,factory=function(global){global=global||{};var _Base64=global.Base64,version="2.5.1",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var r={},t=0,n=e.length;t<n;t++)r[e.charAt(t)]=t;return r}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(e){if(e.length<2)return(r=e.charCodeAt(0))<128?e:r<2048?fromCharCode(192|r>>>6)+fromCharCode(128|63&r):fromCharCode(224|r>>>12&15)+fromCharCode(128|r>>>6&63)+fromCharCode(128|63&r);var r=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|r>>>18&7)+fromCharCode(128|r>>>12&63)+fromCharCode(128|r>>>6&63)+fromCharCode(128|63&r)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(re_utob,cb_utob)},cb_encode=function(e){var r=[0,2,1][e.length%3],t=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(t>>>18),b64chars.charAt(t>>>12&63),r>=2?"=":b64chars.charAt(t>>>6&63),r>=1?"=":b64chars.charAt(63&t)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,r){return r?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(e){switch(e.length){case 4:var r=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return fromCharCode(55296+(r>>>10))+fromCharCode(56320+(1023&r));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var r=e.length,t=r%4,n=(r>0?b64tab[e.charAt(0)]<<18:0)|(r>1?b64tab[e.charAt(1)]<<12:0)|(r>2?b64tab[e.charAt(2)]<<6:0)|(r>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return o.length-=[0,0,2,1][t],o.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),module.exports&&(module.exports.Base64=global.Base64),{Base64:global.Base64}},module.exports=factory(global)}),base64_1=base64.Base64,createDeeplink=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createDeeplink=(e=>{const{encoderFormat:r=createDeeplinkArgs.EncoderFormat.Base64,domain:t,action:n,payload:o}=e;let i=`burst.${t}://v1`;return n&&(i+=`?action=${n}`),o&&(i+=`&payload=${function(e,r){let t=e;switch("string"!=typeof e&&(t=JSON.stringify(e)),r){case createDeeplinkArgs.EncoderFormat.Hexadecimal:return convertStringToHexString.convertStringToHexString(t);case createDeeplinkArgs.EncoderFormat.Base64:return base64.Base64.encodeURI(t);case createDeeplinkArgs.EncoderFormat.Text:default:return t}}(o,r)}`),i})});unwrapExports(createDeeplink);var createDeeplink_1=createDeeplink.createDeeplink,parseDeeplink=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.parseDeeplink=(e=>{const r=()=>{throw new Error("Invalid deeplink: "+e)},t=(e,t)=>(e.startsWith(t+"=")||r(),e.split("=")[1]),n=e.match(/^burst.(.+):\/\/(v.+?)\??/i);n&&3===n.length||r();const o={domain:n[1],version:n[2],action:void 0,payload:void 0,decodedPayload:void 0};try{const n=e.indexOf("?");if(-1!==n){const i=e.substring(n+1).split("&");i.length>=1&&(i.length>2&&r(),o.action=t(i[0],"action"),2===i.length&&(o.payload=t(i[1],"payload")))}}catch(e){r()}return o})});unwrapExports(parseDeeplink);var parseDeeplink_1=parseDeeplink.parseDeeplink,sumNQTStringToNumber_1=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sumNQTStringToNumber=function(...e){return e.reduce((e,r)=>e+convertNQTStringToNumber.convertNQTStringToNumber(r),0)}});unwrapExports(sumNQTStringToNumber_1);var sumNQTStringToNumber_2=sumNQTStringToNumber_1.sumNQTStringToNumber,typings=createCommonjsModule(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}(createDeeplinkArgs)});unwrapExports(typings);var out=createCommonjsModule(function(e,r){function t(e){for(var t in e)r.hasOwnProperty(t)||(r[t]=e[t])}Object.defineProperty(r,"__esModule",{value:!0}),t(convertAddressToNumericId),t(convertBurstTimeToDate),t(convertBurstTimeToEpochTime),t(convertByteArrayToHexString),t(convertByteArrayToString),t(convertDateToBurstTime),t(convertHexEndianess),t(convertHexStringToByteArray),t(convertHexStringToDecString),t(convertHexStringToString),t(convertNQTStringToNumber),t(convertNumberToNQTString),t(convertNumericIdToAddress),t(convertStringToByteArray),t(convertStringToHexString),t(createDeeplink),t(isBurstAddress),t(parseDeeplink),t(sumNQTStringToNumber_1),t(typings)});unwrapExports(out);var out_1=out.convertNumberToNQTString,out_2=out.convertNQTStringToNumber,out_3=out.convertHexStringToDecString,out_4=out.convertHexStringToString,out_5=out.convertHexEndianess,out_6=out.convertHexStringToByteArray,out_7=out.convertByteArrayToHexString;function getContractDatablock(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=16*r,o=n+t;if(o>e.machineData.length)throw new Error("Insufficient length for variable at position: ".concat(n," (and given length: ").concat(t,")"));if(o%2!=0)throw new Error("Invalid position: ".concat(n," (or given length: ").concat(t,") - must be at least multiple of 2"));return out_5(e.machineData.substr(n,t))}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var r=0,t=new Array(e.length);r<e.length;r++)t[r]=e[r];return t}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var CodePageSize=256;function countCodePages(e){return Math.ceil(e.length/2/CodePageSize)}var ContractDataView=function(){function e(r){_classCallCheck(this,e),this._contract=r}return _createClass(e,[{key:"getContract",value:function(){return this._contract}},{key:"countCodePages",value:function(){return countCodePages(this._contract.machineCode)}},{key:"getVariableAsString",value:function(r){var t=this.getHexDataAt(r,e.VariableLength);return out_4(t.replace(/00/g,""))}},{key:"getDataBlocksAsString",value:function(r,t){var n=this.getHexDataAt(r,t*e.VariableLength);return out_4(n.replace(/00/g,""))}},{key:"getVariableAsDecimal",value:function(e){return out_3(this.getVariable(e))}},{key:"getVariable",value:function(r){return this.getHexDataAt(r,e.VariableLength)}},{key:"getHexDataAt",value:function(r,t){var n=t||this._contract.machineData.length-e.VariableLength*r;return getContractDatablock(this._contract,r,n)}}]),e}();function calculateMinimumCreationFee(e){return out_1(2+countCodePages(e)+1)}ContractDataView.VariableLength=16,String.prototype.padStart||(String.prototype.padStart=function(e,r){return e>>=0,r=String(void 0!==r?r:" "),this.length>=e?String(this):((e-=this.length)>r.length&&(r+=r.repeat(e/r.length)),r.slice(0,e)+String(this))});var bignumber=createCommonjsModule(function(e){!function(r){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",c=a+"Number primitive has more than 15 significant digits: ",u=1e14,s=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,d=1e9;function h(e){var r=0|e;return e>0||e===r?r:r-1}function p(e){for(var r,t,n=1,o=e.length,i=e[0]+"";n<o;){for(r=e[n++]+"",t=s-r.length;t--;r="0"+r);i+=r}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(e,r){var t,n,o=e.c,i=r.c,a=e.s,c=r.s,u=e.e,s=r.e;if(!a||!c)return null;if(t=o&&!o[0],n=i&&!i[0],t||n)return t?n?0:-c:a;if(a!=c)return a;if(t=a<0,n=u==s,!o||!i)return n?0:!o^t?1:-1;if(!n)return u>s^t?1:-1;for(c=(u=o.length)<(s=i.length)?u:s,a=0;a<c;a++)if(o[a]!=i[a])return o[a]>i[a]^t?1:-1;return u==s?0:u>s^t?1:-1}function v(e,r,t,n){if(e<r||e>t||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<r||e>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var r=e.c.length-1;return h(e.e/s)==r&&e.c[r]%2!=0}function T(e,r){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(r<0?"e":"e+")+r}function y(e,r,t){var n,o;if(r<0){for(o=t+".";++r;o+=t);e=o+e}else if(++r>(n=e.length)){for(o=t,r-=n;--r;o+=t);e+=o}else r<n&&(e=e.slice(0,r)+"."+e.slice(r));return e}(t=function e(r){var t,S,w,A,_,C,x,B,N,E=Q.prototype={constructor:Q,toString:null,valueOf:null},O=new Q(1),D=20,M=4,j=-7,H=21,P=-1e7,k=1e7,I=!1,U=1,R=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},L="0123456789abcdefghijklmnopqrstuvwxyz";function Q(e,r){var t,o,a,u,f,g,d,h,p=this;if(!(p instanceof Q))return new Q(e,r);if(null==r){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>k?p.c=p.e=null:e.e<P?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((g="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,f=e;f>=10;f/=10,u++);return void(u>k?p.c=p.e=null:(p.e=u,p.c=[e]))}h=String(e)}else{if(!n.test(h=String(e)))return w(p,h,g);p.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(u=h.indexOf("."))>-1&&(h=h.replace(".","")),(f=h.search(/e/i))>0?(u<0&&(u=f),u+=+h.slice(f+1),h=h.substring(0,f)):u<0&&(u=h.length)}else{if(v(r,2,L.length,"Base"),10==r)return z(p=new Q(e),D+p.e+1,M);if(h=String(e),g="number"==typeof e){if(0*e!=0)return w(p,h,g,r);if(p.s=1/e<0?(h=h.slice(1),-1):1,Q.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(c+e)}else p.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(t=L.slice(0,r),u=f=0,d=h.length;f<d;f++)if(t.indexOf(o=h.charAt(f))<0){if("."==o){if(f>u){u=d;continue}}else if(!a&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){a=!0,f=-1,u=0;continue}return w(p,String(e),g,r)}g=!1,(u=(h=S(h,r,10,p.s)).indexOf("."))>-1?h=h.replace(".",""):u=h.length}for(f=0;48===h.charCodeAt(f);f++);for(d=h.length;48===h.charCodeAt(--d););if(h=h.slice(f,++d)){if(d-=f,g&&Q.DEBUG&&d>15&&(e>l||e!==i(e)))throw Error(c+p.s*e);if((u=u-f-1)>k)p.c=p.e=null;else if(u<P)p.c=[p.e=0];else{if(p.e=u,p.c=[],f=(u+1)%s,u<0&&(f+=s),f<d){for(f&&p.c.push(+h.slice(0,f)),d-=s;f<d;)p.c.push(+h.slice(f,f+=s));f=s-(h=h.slice(f)).length}else f-=d;for(;f--;h+="0");p.c.push(+h)}}else p.c=[p.e=0]}function V(e,r,t,n){var o,i,a,c,u;if(null==t?t=M:v(t,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==r)u=p(e.c),u=1==n||2==n&&(a<=j||a>=H)?T(u,a):y(u,a,"0");else if(i=(e=z(new Q(e),r,t)).e,c=(u=p(e.c)).length,1==n||2==n&&(r<=i||i<=j)){for(;c<r;u+="0",c++);u=T(u,i)}else if(r-=a,u=y(u,i,"0"),i+1>c){if(--r>0)for(u+=".";r--;u+="0");}else if((r+=i-c)>0)for(i+1==c&&(u+=".");r--;u+="0");return e.s<0&&o?"-"+u:u}function G(e,r){for(var t,n=1,o=new Q(e[0]);n<e.length;n++){if(!(t=new Q(e[n])).s){o=t;break}r.call(o,t)&&(o=t)}return o}function $(e,r,t){for(var n=1,o=r.length;!r[--o];r.pop());for(o=r[0];o>=10;o/=10,n++);return(t=n+t*s-1)>k?e.c=e.e=null:t<P?e.c=[e.e=0]:(e.e=t,e.c=r),e}function z(e,r,t,n){var a,c,l,g,d,h,p,m=e.c,v=f;if(m){e:{for(a=1,g=m[0];g>=10;g/=10,a++);if((c=r-a)<0)c+=s,l=r,p=(d=m[h=0])/v[a-l-1]%10|0;else if((h=o((c+1)/s))>=m.length){if(!n)break e;for(;m.length<=h;m.push(0));d=p=0,a=1,l=(c%=s)-s+1}else{for(d=g=m[h],a=1;g>=10;g/=10,a++);p=(l=(c%=s)-s+a)<0?0:d/v[a-l-1]%10|0}if(n=n||r<0||null!=m[h+1]||(l<0?d:d%v[a-l-1]),n=t<4?(p||n)&&(0==t||t==(e.s<0?3:2)):p>5||5==p&&(4==t||n||6==t&&(c>0?l>0?d/v[a-l]:0:m[h-1])%10&1||t==(e.s<0?8:7)),r<1||!m[0])return m.length=0,n?(r-=e.e+1,m[0]=v[(s-r%s)%s],e.e=-r||0):m[0]=e.e=0,e;if(0==c?(m.length=h,g=1,h--):(m.length=h+1,g=v[s-c],m[h]=l>0?i(d/v[a-l]%v[l])*g:0),n)for(;;){if(0==h){for(c=1,l=m[0];l>=10;l/=10,c++);for(l=m[0]+=g,g=1;l>=10;l/=10,g++);c!=g&&(e.e++,m[0]==u&&(m[0]=1));break}if(m[h]+=g,m[h]!=u)break;m[h--]=0,g=1}for(c=m.length;0===m[--c];m.pop());}e.e>k?e.c=e.e=null:e.e<P&&(e.c=[e.e=0])}return e}function q(e){var r,t=e.e;return null===t?e.toString():(r=p(e.c),r=t<=j||t>=H?T(r,t):y(r,t,"0"),e.s<0?"-"+r:r)}return Q.clone=e,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.EUCLID=9,Q.config=Q.set=function(e){var r,t;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(v(t=e[r],0,d,r),D=t),e.hasOwnProperty(r="ROUNDING_MODE")&&(v(t=e[r],0,8,r),M=t),e.hasOwnProperty(r="EXPONENTIAL_AT")&&((t=e[r])&&t.pop?(v(t[0],-d,0,r),v(t[1],0,d,r),j=t[0],H=t[1]):(v(t,-d,d,r),j=-(H=t<0?-t:t))),e.hasOwnProperty(r="RANGE"))if((t=e[r])&&t.pop)v(t[0],-d,-1,r),v(t[1],1,d,r),P=t[0],k=t[1];else{if(v(t,-d,d,r),!t)throw Error(a+r+" cannot be zero: "+t);P=-(k=t<0?-t:t)}if(e.hasOwnProperty(r="CRYPTO")){if((t=e[r])!==!!t)throw Error(a+r+" not true or false: "+t);if(t){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw I=!t,Error(a+"crypto unavailable");I=t}else I=t}if(e.hasOwnProperty(r="MODULO_MODE")&&(v(t=e[r],0,9,r),U=t),e.hasOwnProperty(r="POW_PRECISION")&&(v(t=e[r],0,d,r),R=t),e.hasOwnProperty(r="FORMAT")){if("object"!=typeof(t=e[r]))throw Error(a+r+" not an object: "+t);F=t}if(e.hasOwnProperty(r="ALPHABET")){if("string"!=typeof(t=e[r])||/^.$|[+-.\s]|(.).*\1/.test(t))throw Error(a+r+" invalid: "+t);L=t}}return{DECIMAL_PLACES:D,ROUNDING_MODE:M,EXPONENTIAL_AT:[j,H],RANGE:[P,k],CRYPTO:I,MODULO_MODE:U,POW_PRECISION:R,FORMAT:F,ALPHABET:L}},Q.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!Q.DEBUG)return!0;var r,t,n=e.c,o=e.e,c=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===c||-1===c)&&o>=-d&&o<=d&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((r=(o+1)%s)<1&&(r+=s),String(n[0]).length==r){for(r=0;r<n.length;r++)if((t=n[r])<0||t>=u||t!==i(t))break e;if(0!==t)return!0}}}else if(null===n&&null===o&&(null===c||1===c||-1===c))return!0;throw Error(a+"Invalid BigNumber: "+e)},Q.maximum=Q.max=function(){return G(arguments,E.lt)},Q.minimum=Q.min=function(){return G(arguments,E.gt)},Q.random=(A=9007199254740992*Math.random()&2097151?function(){return i(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var r,t,n,c,u,l=0,g=[],h=new Q(O);if(null==e?e=D:v(e,0,d),c=o(e/s),I)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(c*=2));l<c;)(u=131072*r[l]+(r[l+1]>>>11))>=9e15?(t=crypto.getRandomValues(new Uint32Array(2)),r[l]=t[0],r[l+1]=t[1]):(g.push(u%1e14),l+=2);l=c/2}else{if(!crypto.randomBytes)throw I=!1,Error(a+"crypto unavailable");for(r=crypto.randomBytes(c*=7);l<c;)(u=281474976710656*(31&r[l])+1099511627776*r[l+1]+4294967296*r[l+2]+16777216*r[l+3]+(r[l+4]<<16)+(r[l+5]<<8)+r[l+6])>=9e15?crypto.randomBytes(7).copy(r,l):(g.push(u%1e14),l+=7);l=c/7}if(!I)for(;l<c;)(u=A())<9e15&&(g[l++]=u%1e14);for(c=g[--l],e%=s,c&&e&&(u=f[s-e],g[l]=i(c/u)*u);0===g[l];g.pop(),l--);if(l<0)g=[n=0];else{for(n=-1;0===g[0];g.splice(0,1),n-=s);for(l=1,u=g[0];u>=10;u/=10,l++);l<s&&(n-=s-l)}return h.e=n,h.c=g,h}),Q.sum=function(){for(var e=1,r=arguments,t=new Q(r[0]);e<r.length;)t=t.plus(r[e++]);return t},S=function(){function e(e,r,t,n){for(var o,i,a=[0],c=0,u=e.length;c<u;){for(i=a.length;i--;a[i]*=r);for(a[0]+=n.indexOf(e.charAt(c++)),o=0;o<a.length;o++)a[o]>t-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/t|0,a[o]%=t)}return a.reverse()}return function(r,n,o,i,a){var c,u,s,l,f,g,d,h,m=r.indexOf("."),v=D,b=M;for(m>=0&&(l=R,R=0,r=r.replace(".",""),g=(h=new Q(n)).pow(r.length-m),R=l,h.c=e(y(p(g.c),g.e,"0"),10,o,"0123456789"),h.e=h.c.length),s=l=(d=e(r,n,o,a?(c=L,"0123456789"):(c="0123456789",L))).length;0==d[--l];d.pop());if(!d[0])return c.charAt(0);if(m<0?--s:(g.c=d,g.e=s,g.s=i,d=(g=t(g,h,v,b,o)).c,f=g.r,s=g.e),m=d[u=s+v+1],l=o/2,f=f||u<0||null!=d[u+1],f=b<4?(null!=m||f)&&(0==b||b==(g.s<0?3:2)):m>l||m==l&&(4==b||f||6==b&&1&d[u-1]||b==(g.s<0?8:7)),u<1||!d[0])r=f?y(c.charAt(1),-v,c.charAt(0)):c.charAt(0);else{if(d.length=u,f)for(--o;++d[--u]>o;)d[u]=0,u||(++s,d=[1].concat(d));for(l=d.length;!d[--l];);for(m=0,r="";m<=l;r+=c.charAt(d[m++]));r=y(r,s,c.charAt(0))}return r}}(),t=function(){function e(e,r,t){var n,o,i,a,c=0,u=e.length,s=r%g,l=r/g|0;for(e=e.slice();u--;)c=((o=s*(i=e[u]%g)+(n=l*i+(a=e[u]/g|0)*s)%g*g+c)/t|0)+(n/g|0)+l*a,e[u]=o%t;return c&&(e=[c].concat(e)),e}function r(e,r,t,n){var o,i;if(t!=n)i=t>n?1:-1;else for(o=i=0;o<t;o++)if(e[o]!=r[o]){i=e[o]>r[o]?1:-1;break}return i}function t(e,r,t,n){for(var o=0;t--;)e[t]-=o,o=e[t]<r[t]?1:0,e[t]=o*n+e[t]-r[t];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,a,c,l){var f,g,d,p,m,v,b,T,y,S,w,A,_,C,x,B,N,E=n.s==o.s?1:-1,O=n.c,D=o.c;if(!(O&&O[0]&&D&&D[0]))return new Q(n.s&&o.s&&(O?!D||O[0]!=D[0]:D)?O&&0==O[0]||!D?0*E:E/0:NaN);for(y=(T=new Q(E)).c=[],E=a+(g=n.e-o.e)+1,l||(l=u,g=h(n.e/s)-h(o.e/s),E=E/s|0),d=0;D[d]==(O[d]||0);d++);if(D[d]>(O[d]||0)&&g--,E<0)y.push(1),p=!0;else{for(C=O.length,B=D.length,d=0,E+=2,(m=i(l/(D[0]+1)))>1&&(D=e(D,m,l),O=e(O,m,l),B=D.length,C=O.length),_=B,w=(S=O.slice(0,B)).length;w<B;S[w++]=0);N=D.slice(),N=[0].concat(N),x=D[0],D[1]>=l/2&&x++;do{if(m=0,(f=r(D,S,B,w))<0){if(A=S[0],B!=w&&(A=A*l+(S[1]||0)),(m=i(A/x))>1)for(m>=l&&(m=l-1),b=(v=e(D,m,l)).length,w=S.length;1==r(v,S,b,w);)m--,t(v,B<b?N:D,b,l),b=v.length,f=1;else 0==m&&(f=m=1),b=(v=D.slice()).length;if(b<w&&(v=[0].concat(v)),t(S,v,w,l),w=S.length,-1==f)for(;r(D,S,B,w)<1;)m++,t(S,B<w?N:D,w,l),w=S.length}else 0===f&&(m++,S=[0]);y[d++]=m,S[0]?S[w++]=O[_]||0:(S=[O[_]],w=1)}while((_++<C||null!=S[0])&&E--);p=null!=S[0],y[0]||y.splice(0,1)}if(l==u){for(d=1,E=y[0];E>=10;E/=10,d++);z(T,a+(T.e=d+g*s-1)+1,c,p)}else T.e=g,T.r=+p;return T}}(),_=/^(-?)0([xbo])(?=\w[\w.]*$)/i,C=/^([^.]+)\.$/,x=/^\.([^.]+)$/,B=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,r,t,n){var o,i=t?r:r.replace(N,"");if(B.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!t&&(i=i.replace(_,function(e,r,t){return o="x"==(t=t.toLowerCase())?16:"b"==t?2:8,n&&n!=o?e:r}),n&&(o=n,i=i.replace(C,"$1").replace(x,"0.$1")),r!=i))return new Q(i,o);if(Q.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+r);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new Q(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,r){return m(this,new Q(e,r))},E.decimalPlaces=E.dp=function(e,r){var t,n,o,i=this;if(null!=e)return v(e,0,d),null==r?r=M:v(r,0,8),z(new Q(i),e+i.e+1,r);if(!(t=i.c))return null;if(n=((o=t.length-1)-h(this.e/s))*s,o=t[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},E.dividedBy=E.div=function(e,r){return t(this,new Q(e,r),D,M)},E.dividedToIntegerBy=E.idiv=function(e,r){return t(this,new Q(e,r),0,1)},E.exponentiatedBy=E.pow=function(e,r){var t,n,c,u,l,f,g,d,h=this;if((e=new Q(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+q(e));if(null!=r&&(r=new Q(r)),l=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 Q(Math.pow(+q(h),l?2-b(e):+q(e))),r?d.mod(r):d;if(f=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new Q(NaN);(n=!f&&h.isInteger()&&r.isInteger())&&(h=h.mod(r))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||l&&h.c[1]>=24e7:h.c[0]<8e13||l&&h.c[0]<=9999975e7)))return u=h.s<0&&b(e)?-0:0,h.e>-1&&(u=1/u),new Q(f?1/u:u);R&&(u=o(R/s+2))}for(l?(t=new Q(.5),f&&(e.s=1),g=b(e)):g=(c=Math.abs(+q(e)))%2,d=new Q(O);;){if(g){if(!(d=d.times(h)).c)break;u?d.c.length>u&&(d.c.length=u):n&&(d=d.mod(r))}if(c){if(0===(c=i(c/2)))break;g=c%2}else if(z(e=e.times(t),e.e+1,1),e.e>14)g=b(e);else{if(0==(c=+q(e)))break;g=c%2}h=h.times(h),u?h.c&&h.c.length>u&&(h.c.length=u):n&&(h=h.mod(r))}return n?d:(f&&(d=O.div(d)),r?d.mod(r):u?z(d,R,M,void 0):d)},E.integerValue=function(e){var r=new Q(this);return null==e?e=M:v(e,0,8),z(r,r.e+1,e)},E.isEqualTo=E.eq=function(e,r){return 0===m(this,new Q(e,r))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,r){return m(this,new Q(e,r))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,r){return 1===(r=m(this,new Q(e,r)))||0===r},E.isInteger=function(){return!!this.c&&h(this.e/s)>this.c.length-2},E.isLessThan=E.lt=function(e,r){return m(this,new Q(e,r))<0},E.isLessThanOrEqualTo=E.lte=function(e,r){return-1===(r=m(this,new Q(e,r)))||0===r},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,r){var t,n,o,i,a=this,c=a.s;if(r=(e=new Q(e,r)).s,!c||!r)return new Q(NaN);if(c!=r)return e.s=-r,a.plus(e);var l=a.e/s,f=e.e/s,g=a.c,d=e.c;if(!l||!f){if(!g||!d)return g?(e.s=-r,e):new Q(d?a:NaN);if(!g[0]||!d[0])return d[0]?(e.s=-r,e):new Q(g[0]?a:3==M?-0:0)}if(l=h(l),f=h(f),g=g.slice(),c=l-f){for((i=c<0)?(c=-c,o=g):(f=l,o=d),o.reverse(),r=c;r--;o.push(0));o.reverse()}else for(n=(i=(c=g.length)<(r=d.length))?c:r,c=r=0;r<n;r++)if(g[r]!=d[r]){i=g[r]<d[r];break}if(i&&(o=g,g=d,d=o,e.s=-e.s),(r=(n=d.length)-(t=g.length))>0)for(;r--;g[t++]=0);for(r=u-1;n>c;){if(g[--n]<d[n]){for(t=n;t&&!g[--t];g[t]=r);--g[t],g[n]+=u}g[n]-=d[n]}for(;0==g[0];g.splice(0,1),--f);return g[0]?$(e,g,f):(e.s=3==M?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,r){var n,o,i=this;return e=new Q(e,r),!i.c||!e.s||e.c&&!e.c[0]?new Q(NaN):!e.c||i.c&&!i.c[0]?new Q(i):(9==U?(o=e.s,e.s=1,n=t(i,e,0,3),e.s=o,n.s*=o):n=t(i,e,0,U),(e=i.minus(n.times(e))).c[0]||1!=U||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,r){var t,n,o,i,a,c,l,f,d,p,m,v,b,T,y,S=this,w=S.c,A=(e=new Q(e,r)).c;if(!(w&&A&&w[0]&&A[0]))return!S.s||!e.s||w&&!w[0]&&!A||A&&!A[0]&&!w?e.c=e.e=e.s=null:(e.s*=S.s,w&&A?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=h(S.e/s)+h(e.e/s),e.s*=S.s,(l=w.length)<(p=A.length)&&(b=w,w=A,A=b,o=l,l=p,p=o),o=l+p,b=[];o--;b.push(0));for(T=u,y=g,o=p;--o>=0;){for(t=0,m=A[o]%y,v=A[o]/y|0,i=o+(a=l);i>o;)t=((f=m*(f=w[--a]%y)+(c=v*f+(d=w[a]/y|0)*m)%y*y+b[i]+t)/T|0)+(c/y|0)+v*d,b[i--]=f%T;b[i]=t}return t?++n:b.splice(0,1),$(e,b,n)},E.negated=function(){var e=new Q(this);return e.s=-e.s||null,e},E.plus=function(e,r){var t,n=this,o=n.s;if(r=(e=new Q(e,r)).s,!o||!r)return new Q(NaN);if(o!=r)return e.s=-r,n.minus(e);var i=n.e/s,a=e.e/s,c=n.c,l=e.c;if(!i||!a){if(!c||!l)return new Q(o/0);if(!c[0]||!l[0])return l[0]?e:new Q(c[0]?n:0*o)}if(i=h(i),a=h(a),c=c.slice(),o=i-a){for(o>0?(a=i,t=l):(o=-o,t=c),t.reverse();o--;t.push(0));t.reverse()}for((o=c.length)-(r=l.length)<0&&(t=l,l=c,c=t,r=o),o=0;r;)o=(c[--r]=c[r]+l[r]+o)/u|0,c[r]=u===c[r]?0:c[r]%u;return o&&(c=[o].concat(c),++a),$(e,c,a)},E.precision=E.sd=function(e,r){var t,n,o,i=this;if(null!=e&&e!==!!e)return v(e,1,d),null==r?r=M:v(r,0,8),z(new Q(i),e,r);if(!(t=i.c))return null;if(n=(o=t.length-1)*s+1,o=t[o]){for(;o%10==0;o/=10,n--);for(o=t[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},E.shiftedBy=function(e){return v(e,-l,l),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,r,n,o,i,a=this,c=a.c,u=a.s,s=a.e,l=D+4,f=new Q("0.5");if(1!==u||!c||!c[0])return new Q(!u||u<0&&(!c||c[0])?NaN:c?a:1/0);if(0==(u=Math.sqrt(+q(a)))||u==1/0?(((r=p(c)).length+s)%2==0&&(r+="0"),u=Math.sqrt(+r),s=h((s+1)/2)-(s<0||s%2),n=new Q(r=u==1/0?"1e"+s:(r=u.toExponential()).slice(0,r.indexOf("e")+1)+s)):n=new Q(u+""),n.c[0])for((u=(s=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(t(a,i,l,1))),p(i.c).slice(0,u)===(r=p(n.c)).slice(0,u)){if(n.e<s&&--u,"9999"!=(r=r.slice(u-3,u+1))&&(o||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(z(n,n.e+D+2,1),e=!n.times(n).eq(a));break}if(!o&&(z(i,i.e+D+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return z(n,n.e+D+1,M,e)},E.toExponential=function(e,r){return null!=e&&(v(e,0,d),e++),V(this,e,r,1)},E.toFixed=function(e,r){return null!=e&&(v(e,0,d),e=e+this.e+1),V(this,e,r)},E.toFormat=function(e,r,t){var n,o=this;if(null==t)null!=e&&r&&"object"==typeof r?(t=r,r=null):e&&"object"==typeof e?(t=e,e=r=null):t=F;else if("object"!=typeof t)throw Error(a+"Argument not an object: "+t);if(n=o.toFixed(e,r),o.c){var i,c=n.split("."),u=+t.groupSize,s=+t.secondaryGroupSize,l=t.groupSeparator||"",f=c[0],g=c[1],d=o.s<0,h=d?f.slice(1):f,p=h.length;if(s&&(i=u,u=s,s=i,p-=i),u>0&&p>0){for(i=p%u||u,f=h.substr(0,i);i<p;i+=u)f+=l+h.substr(i,u);s>0&&(f+=l+h.slice(i)),d&&(f="-"+f)}n=g?f+(t.decimalSeparator||"")+((s=+t.fractionGroupSize)?g.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):g):f}return(t.prefix||"")+n+(t.suffix||"")},E.toFraction=function(e){var r,n,o,i,c,u,l,g,d,h,m,v,b=this,T=b.c;if(null!=e&&(!(l=new Q(e)).isInteger()&&(l.c||1!==l.s)||l.lt(O)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+q(l));if(!T)return new Q(b);for(r=new Q(O),d=n=new Q(O),o=g=new Q(O),v=p(T),c=r.e=v.length-b.e-1,r.c[0]=f[(u=c%s)<0?s+u:u],e=!e||l.comparedTo(r)>0?c>0?r:d:l,u=k,k=1/0,l=new Q(v),g.c[0]=0;h=t(l,r,0,1),1!=(i=n.plus(h.times(o))).comparedTo(e);)n=o,o=i,d=g.plus(h.times(i=d)),g=i,r=l.minus(h.times(i=r)),l=i;return i=t(e.minus(n),o,0,1),g=g.plus(i.times(d)),n=n.plus(i.times(o)),g.s=d.s=b.s,m=t(d,o,c*=2,M).minus(b).abs().comparedTo(t(g,n,c,M).minus(b).abs())<1?[d,o]:[g,n],k=u,m},E.toNumber=function(){return+q(this)},E.toPrecision=function(e,r){return null!=e&&v(e,1,d),V(this,e,r,2)},E.toString=function(e){var r,t=this,n=t.s,o=t.e;return null===o?n?(r="Infinity",n<0&&(r="-"+r)):r="NaN":(null==e?r=o<=j||o>=H?T(p(t.c),o):y(p(t.c),o,"0"):10===e?r=y(p((t=z(new Q(t),D+o+1,M)).c),t.e,"0"):(v(e,2,L.length,"Base"),r=S(y(p(t.c),o,"0"),10,e,n,!0)),n<0&&t.c[0]&&(r="-"+r)),r},E.valueOf=E.toJSON=function(){return q(this)},E._isBigNumber=!0,null!=r&&Q.set(r),Q}()).default=t.BigNumber=t,e.exports?e.exports=t:(r||(r="undefined"!=typeof self&&self?self:window),r.BigNumber=t)}(commonjsGlobal)}),numericToHex=function(e){var r=new bignumber(e);r.lt(0)&&(r=twosComplementBinary(r));var t=r.toString(16);return t.length%2?"0"+t:t},twosComplementBinary=function(e){for(var r=e.multipliedBy(-1).toString(2);r.length%8;)r="0"+r;var t="1"===r[0]&&-1!==r.slice(1).indexOf("1")?"11111111":"";return r=r.split("").map(function(e){return"0"===e?"1":"0"}).join(""),new bignumber(t+r,2).plus(1)},convertArgument=function(e){return"boolean"==typeof e?e?"1":"0":"number"==typeof e?"".concat(e):e},generateMethodCall=function(e){var r=e.methodArgs?[e.methodHash].concat(_toConsumableArray(e.methodArgs)):[e.methodHash];if(r.length>4)throw new Error("At maximum ".concat(3," are supported"));return r.map(convertArgument).map(function(e){return numericToHex(e).padStart(16,"0")}).map(out_5).join("")};return exports.CodePageSize=CodePageSize,exports.ContractDataView=ContractDataView,exports.calculateMinimumCreationFee=calculateMinimumCreationFee,exports.countCodePages=countCodePages,exports.generateMethodCall=generateMethodCall,exports.getContractDatablock=getContractDatablock,exports}({});
//# sourceMappingURL=burstjs.contracts.min.js.map
{
"name": "@burstjs/contracts",
"version": "0.5.0-beta.1",
"version": "0.5.0-beta.2",
"description": "Smart Contracts package for BURST",

@@ -48,3 +48,3 @@ "contributors": [

"dependencies": {
"@burstjs/util": "^0.5.0-beta.1",
"@burstjs/util": "^0.5.0-beta.2",
"bignumber.js": "^9.0.0"

@@ -57,3 +57,3 @@ },

},
"gitHead": "33d6f8370f2bdac3c4730fdd29331625933aadf9",
"gitHead": "14518d309c04a121601e25a790366eb939c62be3",
"publishConfig": {

@@ -60,0 +60,0 @@ "access": "public"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc