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