require=functiont(e,n,r){functioni(a,f){if(!n[a]){if(!e[a]){varu="function"==typeofrequire&&require;if(!f&&u)returnu(a,!0);if(o)returno(a,!0);vars=newError("Cannot find module '"+a+"'");throws.code="MODULE_NOT_FOUND",s}varc=n[a]={exports:{}};e[a][0].call(c.exports,function(t){varn=e[a][1][t];returni(n?n:t)},c,c.exports,t,e,n,r)}returnn[a].exports}for(varo="function"==typeofrequire&&require,a=0;a<r.length;a++)i(r[a]);returni}({1:[function(t,e){varn=t("./web3");BigNumber.config({ROUNDING_MODE:BigNumber.ROUND_DOWN});varr=32,i=4,o=function(t,e){for(varn=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);returnn?r-1:-1},a=function(t,e){returno(t,function(t){returnt.name===e})},f=function(t,e,n){returnnewArray(e-t.length+1).join(n?n:"0")+t},u=function(t){returnfunction(e){return0===e.indexOf(t)}},s=function(t){returnfunction(e){returnt===e}},c=function(t){return"[]"===t.slice(-2)},l=function(t){vare=2*r;returntinstanceofBigNumber||"number"==typeoft?("number"==typeoft&&(t=newBigNumber(t)),t=t.round(),t.lessThan(0)&&(t=newBigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeoft?l(newBigNumber(t)):(+t).toString(16),f(t,e)},p=function(t){returnn.fromAscii(t,r).substr(2)},h=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},d=function(t){returnl(newBigNumber(t).times(newBigNumber(2).pow(128)))},m=function(t,e){returnc(t)||u("string")(t)?l(e.length):""},g=function(){return[{type:u("uint"),format:l},{type:u("int"),format:l},{type:u("hash"),format:l},{type:u("string"),format:p},{type:u("real"),format:d},{type:u("ureal"),format:d},{type:s("address"),format:l},{type:s("bool"),format:h}]},v=g(),b=function(t,e,n){varr="",i=a(t,e);if(-1!==i){varo=t[i];returno.inputs.forEach(function(t,e){r+=m(t.type,n[e])}),o.inputs.forEach(function(t,e){for(vari=!1,a=0;a<v.length&&!i;a++)i=v[a].type(o.inputs[e].type,n[e]);i||console.error("input parser does not support type: "+o.inputs[e].type);varf=v[a-1].format,u="";u=c(o.inputs[e].type)?n[e].reduce(function(t,e){returnt+f(e)},""):f(n[e]),r+=u}),r}},y=function(t){return"1"===newBigNumber(t.substr(0,1),16).toString(2).substr(0,1)},_=function(t){returny(t)?newBigNumber(t,16).minus(newBigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):newBigNumber(t,16)},w=function(t){returnnewBigNumber(t,16)},N=function(t){return_(t).dividedBy(newBigNumber(2).pow(128))},x=function(t){returnw(t).dividedBy(newBigNumber(2).pow(128))},B=function(t){return"0x"+t},A=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},S=function(t){returnn.toAscii(t)},O=function(t){return"0x"+t.slice(t.length-40,t.length)},P=function(t){returnc(t)||u("string")(t)?2*r:0},E=function(){return[{type:u("uint"),format:w},{type:u("int"),format:_},{type:u("hash"),format:B},{type:u("string"),format:S},{type:u("real"),format:N},{type:u("ureal"),format:x},{type:s("address"),format:O},{type:s("bool"),format:A}]},F=E(),k=function(t,e,n){vari=a(t,e);if(-1!==i){n=n.slice(2);varo=[],f=t[i],s=2*r,l=f.outputs.reduce(function(t,e){returnt+P(e.type)},0),p=n.slice(0,l);returnn=n.slice(l),f.outputs.forEach(function(t,e){for(varr=!1,i=0;i<F.length&&!r;i++)r=F[i].type(f.outputs[e].type);r||console.error("output parser does not support type: "+f.outputs[e].type);vara=F[i-1].format;if(c(f.outputs[e].type)){varl=w(p.slice(0,s));p=p.slice(s);for(varh=[],d=0;l>d;d++)h.push(a(n.slice(0,s))),n=n.slice(s);o.push(h)}elseu("string")(f.outputs[e].type)?(p=p.slice(s),o.push(a(n.slice(0,s))),n=n.slice(s)):(o.push(a(n.slice(0,s))),n=n.slice(s))}),o}},D=function(t){vare=t.indexOf("(");return-1!==e?t.substr(0,e):t},I=function(t){vare=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},M=function(t){vare={};returnt.forEach(function(n){varr=D(n.name),i=I(n.name),o=function(){vare=Array.prototype.slice.call(arguments);returnb(t,n.name,e)};void0===e[r]&&(e[r]=o),e[r][i]=o}),e},