require=function t(e,n,r){function i(a,f){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;ad;d++)h.push(a(n.slice(0,s))),n=n.slice(s);o.push(h)}else u("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}},T=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},D=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},M=function(t){var e={};return t.forEach(function(n){var r=T(n.name),i=D(n.name),o=function(){var e=Array.prototype.slice.call(arguments);return b(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},q=function(t){var e={};return t.forEach(function(n){var r=T(n.name),i=D(n.name),o=function(e){return F(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},C=function(t){return n.sha3(n.fromAscii(t)).slice(0,2+2*i)};e.exports={inputParser:M,outputParser:q,methodSignature:C,methodDisplayName:T,methodTypeName:D}},{"./web3":7}],2:[function(t,e){var n=t("./web3"),r=t("./abi"),i=function(t,e){e.forEach(function(t){if(-1===t.name.indexOf("(")){var e=t.name,n=t.inputs.map(function(t){return t.type}).join();t.name=e+"("+n+")"}});var i=r.inputParser(e),o=r.outputParser(e),a={};return a.call=function(t){return a._isTransact=!1,a._options=t,a},a.transact=function(t){return a._isTransact=!0,a._options=t,a},a._options={},["gas","gasPrice","value","from"].forEach(function(t){a[t]=function(e){return a._options[t]=e,a}}),e.forEach(function(f){var u=r.methodDisplayName(f.name),s=r.methodTypeName(f.name),c=function(){var c=Array.prototype.slice.call(arguments),l=r.methodSignature(f.name),p=i[u][s].apply(null,c),h=a._options||{};h.to=t,h.data=l+p;var d=a._isTransact===!0||a._isTransact!==!1&&!f.constant,g=h.collapse!==!1;if(a._options={},a._isTransact=null,d)return n._currentContractAbi=e,n._currentContractAddress=t,void n.eth.transact(h);var m=n.eth.call(h),v=o[u][s](m);return g&&(1==v.length?v=v[0]:0==v.length&&(v=null)),v};void 0===a[u]&&(a[u]=c),a[u][s]=c}),a};e.exports=i},{"./abi":1,"./web3":7}],3:[function(t,e){var n=t("./web3"),r=function(t,e){this.impl=e,this.callbacks=[],this.id=e.newFilter(t),n.provider.startPolling({call:e.changed,args:[this.id]},this.id,this.trigger.bind(this))};r.prototype.arrived=function(t){this.changed(t)},r.prototype.changed=function(t){this.callbacks.push(t)},r.prototype.trigger=function(t){for(var e=0;en;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},fromAscii:function(t,e){e=void 0===e?0:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return new BigNumber(t.substring(2),16).toString(10)},fromDecimal:function(t){return"0x"+new BigNumber(t).toString(16)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,r=0,i=n;e>3e3&&r