diff --git a/react/asset-manifest.json b/react/asset-manifest.json index 138762d..2d2e152 100644 --- a/react/asset-manifest.json +++ b/react/asset-manifest.json @@ -1,6 +1,6 @@ { - "main.css": "static/css/main.c225d4a2.css", - "main.css.map": "static/css/main.c225d4a2.css.map", - "main.js": "static/js/main.cfd9beef.js", - "main.js.map": "static/js/main.cfd9beef.js.map" + "main.css": "static/css/main.681d9f5a.css", + "main.css.map": "static/css/main.681d9f5a.css.map", + "main.js": "static/js/main.f8130d6b.js", + "main.js.map": "static/js/main.f8130d6b.js.map" } \ No newline at end of file diff --git a/react/index.html b/react/index.html index 7d495cf..1acb872 100644 --- a/react/index.html +++ b/react/index.html @@ -1 +1 @@ -
=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var f=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===r&&0===l)&&(a=this.mul(a,n[o]),s=0,o=0)):s=0}c=26}return a},v.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},v.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new g(e)},a(g,v),g.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},g.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},g.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},g.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},g.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"===typeof e||e,this)}).call(t,n(251)(e))},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=t;r.version=n(258).version,r.utils=n(259),r.rand=n(101),r.curve=n(39),r.curves=n(264),r.ec=n(272),r.eddsa=n(276)},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Toast=t.Tag=t.Tabs=t.Table=t.Tab=t.Slider=t.Slide=t.SideNavItem=t.SideNav=t.Section=t.SearchForm=t.Row=t.ProgressBar=t.Preloader=t.Parallax=t.PaginationButton=t.Pagination=t.OverlayTrigger=t.Overlay=t.Navbar=t.NavItem=t.Modal=t.MenuItem=t.MediaBox=t.Input=t.Icon=t.Footer=t.Dropdown=t.Divider=t.Container=t.CollectionItem=t.Collection=t.CollapsibleItem=t.Collapsible=t.Col=t.Chip=t.CardTitle=t.CardPanel=t.Card=t.Carousel=t.Button=t.Breadcrumb=t.Badge=t.Autocomplete=void 0;var a=n(136),i=r(a),o=n(140),s=r(o),c=n(141),u=r(c),l=n(42),f=r(l),d=n(142),h=r(d),p=n(143),b=r(p),m=n(144),y=r(m),v=n(145),g=r(v),w=n(65),_=r(w),E=n(22),S=r(E),x=n(146),k=r(x),O=n(147),C=r(O),M=n(148),P=r(M),T=n(149),I=r(T),A=n(150),j=r(A),N=n(151),R=r(N),B=n(152),D=r(B),L=n(153),U=r(L),F=n(14),z=r(F),q=n(154),H=r(q),V=n(155),K=r(V),W=n(156),Y=r(W),$=n(157),G=r($),X=n(158),J=r(X),Z=n(159),Q=r(Z),ee=n(67),te=r(ee),ne=n(66),re=r(ne),ae=n(160),ie=r(ae),oe=n(68),se=r(oe),ce=n(161),ue=r(ce),le=n(162),fe=r(le),de=n(164),he=r(de),pe=n(43),be=r(pe),me=n(165),ye=r(me),ve=n(166),ge=r(ve),we=n(167),_e=r(we),Ee=n(168),Se=r(Ee),xe=n(170),ke=r(xe),Oe=n(171),Ce=r(Oe),Me=n(172),Pe=r(Me),Te=n(173),Ie=r(Te),Ae=n(174),je=r(Ae),Ne=n(175),Re=r(Ne),Be=n(176),De=r(Be);t.Autocomplete=i.default,t.Badge=s.default,t.Breadcrumb=u.default,t.Button=f.default,t.Carousel=h.default,t.Card=b.default,t.CardPanel=y.default,t.CardTitle=g.default,t.Chip=_.default,t.Col=S.default,t.Collapsible=k.default,t.CollapsibleItem=C.default,t.Collection=P.default,t.CollectionItem=I.default,t.Container=j.default,t.Divider=R.default,t.Dropdown=D.default,t.Footer=U.default,t.Icon=z.default,t.Input=H.default,t.MediaBox=K.default,t.MenuItem=Y.default,t.Modal=G.default,t.NavItem=J.default,t.Navbar=Q.default,t.Overlay=te.default,t.OverlayTrigger=re.default,t.Pagination=ie.default,t.PaginationButton=se.default,t.Parallax=ue.default,t.Preloader=fe.default,t.ProgressBar=he.default,t.Row=be.default,t.SearchForm=ye.default,t.Section=ge.default,t.SideNav=_e.default,t.SideNavItem=Se.default,t.Slide=ke.default,t.Slider=Ce.default,t.Tab=Pe.default,t.Table=Ie.default,t.Tabs=je.default,t.Tag=Re.default,t.Toast=De.default},function(e,t,n){"use strict";var r=function(e,t,n,r,a,i,o,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,i,o,s],l=0;c=new Error(t.replace(/%s/g,function(){return u[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for(e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e),r=0;r >1,l=-7,f=n?a-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=r;l>0;o=256*o+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),i-=u}return(h?-1:1)*o*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var o,s,c,u=8*i-a-1,l=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),t+=o+f>=1?d/c:d*Math.pow(2,1-f),t*c>=2&&(o++,c/=2),o+f>=l?(s=0,o=l):o+f>=1?(s=(t*c-1)*Math.pow(2,a),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[n+h]=255&s,h+=p,s/=256,a-=8);for(o=o<0;e[n+h]=255&o,h+=p,o/=256,u-=8);e[n+h-p]|=128*b}},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(20),t.createHash=t.Hash=n(25),t.createHmac=t.Hmac=n(88);var r=n(229),a=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(a);t.getHashes=function(){return i};var o=n(90);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=n(231);t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var c=n(250);t.DiffieHellmanGroup=c.DiffieHellmanGroup,t.createDiffieHellmanGroup=c.createDiffieHellmanGroup,t.getDiffieHellman=c.getDiffieHellman,t.createDiffieHellman=c.createDiffieHellman,t.DiffieHellman=c.DiffieHellman;var u=n(256);t.createSign=u.createSign,t.Sign=u.Sign,t.createVerify=u.createVerify,t.Verify=u.Verify,t.createECDH=n(294);var l=n(295);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var f=n(298);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,n){"use strict";(function(t){function n(e){if(e.length%r!==0){var n=e.length+(r-e.length%r);e=t.concat([e,a],n)}for(var i=new Array(e.length>>>2),o=0,s=0;o>>0}function _(e,t,n,r,a,i,o,s){return t+r+i+s>>>0}function E(e,t,n,r,a,i,o,s,c,u){var l=0,f=t;return f=f+r>>>0,l+=f>>0,l+=f>>0}function S(e,t,n,r,a,i,o,s,c,u){return t+r+i+s+u>>>0}function x(e,t,n){return(t<<32-n|e>>>n)>>>0}function k(e,t,n){return(e<<32-n|t>>>n)>>>0}function O(e,t,n){return e>>>n}function C(e,t,n){return(e<<32-n|t>>>n)>>>0}var M=n(9),P=n(2);t.inherits=P,t.toArray=r,t.toHex=a,t.htonl=i,t.toHex32=o,t.zero2=s,t.zero8=c,t.join32=u,t.split32=l,t.rotr32=f,t.rotl32=d,t.sum32=h,t.sum32_3=p,t.sum32_4=b,t.sum32_5=m,t.sum64=y,t.sum64_hi=v,t.sum64_lo=g,t.sum64_4_hi=w,t.sum64_4_lo=_,t.sum64_5_hi=E,t.sum64_5_lo=S,t.rotr64_hi=x,t.rotr64_lo=k,t.shr64_hi=O,t.shr64_lo=C},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),i=r(a),o=n(1),s=r(o),c=n(18),u=r(c),l=n(3),f=r(l),d=function(e){var t={"material-icons":!0};return u.default.PLACEMENTS.forEach(function(n){t[n]=e[n]}),u.default.ICON_SIZES.forEach(function(n){t[n]=e[n]}),i.default.createElement("i",{className:(0,f.default)(t,e.className)},e.children)};d.propTypes={className:s.default.string,children:s.default.string,left:s.default.bool,center:s.default.bool,right:s.default.bool,tiny:s.default.bool,small:s.default.bool,medium:s.default.bool,large:s.default.bool},t.default=d},function(e,t,n){"use strict";function r(){i=0}function a(){var e=i;return i+=1,e}Object.defineProperty(t,"__esModule",{value:!0}),t.resetID=r,t.default=a;var i=0},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){b&&h&&(b=!1,h.length?p=h.concat(p):m=-1,p.length&&s())}function s(){if(!b){var e=a(o);b=!0;for(var t=p.length;t;){for(h=p,p=[];++m>8,o=255&a;i?n.push(i,o):n.push(o)}return n}function a(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n
=br),_r=String.fromCharCode(32),Er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Sr=!1,xr=!1,kr={eventTypes:Er,extractEvents:function(e,t,n,r){var a;if(pr)e:{switch(e){case"topCompositionStart":var i=Er.compositionStart;break e;case"topCompositionEnd":i=Er.compositionEnd;break e;case"topCompositionUpdate":i=Er.compositionUpdate;break e}i=void 0}else xr?K(e,n)&&(i=Er.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Er.compositionStart);return i?(wr&&(xr||i!==Er.compositionStart?i===Er.compositionEnd&&xr&&(a=D()):(lr._root=r,lr._startText=L(),xr=!0)),i=H.getPooled(i,t,n,r),a?i.data=a:null!==(a=W(n))&&(i.data=a),N(i),a=i):a=null,(e=gr?Y(e,n):$(e,n))?(t=V.getPooled(Er.beforeInput,t,n,r),t.data=e,N(t)):t=null,[a,t]}},Or=null,Cr=null,Mr=null,Pr={injectFiberControlledHostComponent:function(e){Or=e}},Tr=Object.freeze({injection:Pr,enqueueStateRestore:X,restoreStateIfNeeded:J}),Ir=!1,Ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};wn.canUseDOM&&(vr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var jr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Nr=null,Rr=null,Br=!1;wn.canUseDOM&&(Br=ne("input")&&(!document.documentMode||9 ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(p.a,{history:this.history,children:this.props.children})},t}(u.a.Component);b.propTypes={basename:f.a.string,getUserConfirmation:f.a.func,hashType:f.a.oneOf(["hashbang","noslash","slash"]),children:f.a.node},t.a=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return u.a.createElement(p.a,{history:this.history,children:this.props.children})},t}(u.a.Component);b.propTypes={initialEntries:f.a.array,initialIndex:f.a.number,getUserConfirmation:f.a.func,keyLength:f.a.number,children:f.a.node},t.a=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),a=r(e,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:w(t,_(n)),push:this.handlePush,replace:this.handleReplace,go:S("go"),goBack:S("goBack"),goForward:S("goForward"),listen:this.handleListen,block:this.handleBlock};return d.a.createElement(m.a,y({},a,{history:i}))},t}(d.a.Component);k.propTypes={basename:p.a.string,context:p.a.object.isRequired,location:p.a.oneOfType([p.a.string,p.a.object])},k.defaultProps={basename:"",location:"/"},k.childContextTypes={router:p.a.object.isRequired},t.a=k},function(e,t,n){"use strict";var r=n(199);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n.n(o),c=n(1),u=n.n(c),l=n(7),f=n.n(l),d=n(11),h=n.n(d),p=n(48),b=function(e){function t(){return r(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.componentWillMount=function(){h()(this.context.router,"You should not use
1 BCH = "+parseFloat(n.price).toFixed(2)+" "+e,3e3,"green")}),this.calculateTotals(this.state.items)}},{key:"handleItem",value:function(e,t){if(t.preventDefault(),console.log(e),"0"!==e&&""!==e){var n=parseFloat(e).toFixed(2),r=parseFloat(this.state.exchangeRate).toFixed(2),a=1/r*n;a=parseFloat(a).toFixed(8);var i={id:this.state.items[0]?this.state.items[0].id+1:1,name:"Item"+(this.state.items[0]?this.state.items[0].id+1:1),currency:this.state.currency,bch:a,exchangeRATE:this.state.exchangeRate,timestamp:parseFloat(Date.now()/1e3).toFixed(4),count:1},o=this.state.items;o.unshift(i),this.setState({items:o,amount:"0"}),this.calculateTotals(o)}else window.Materialize.toast("No amount specified to charge!",5e3,"red")}},{key:"handleTax",value:function(e){e.preventDefault(),this.setState({tax:e.target.value}),this.calculateTotals(this.state.items)}},{key:"handleDiscount",value:function(e){e.preventDefault(),this.setState({discount:e.target.value}),this.calculateTotals(this.state.items)}},{key:"handlePayment",value:function(e){var t=this;if(e.preventDefault(),0===this.state.items.length)window.Materialize.toast("No items to sell!",5e3,"red");else{var n=this.state.name+":"+d.a.v4().slice(-12,-1);this.saveOrder(n);var r=setTimeout(function(){return t.setState({submit:1,clear:1,label:n})},1e3);this.setState({timeoutId:r})}}},{key:"componentWillUnmount",value:function(){clearTimeout(this.state.timeoutId)}},{key:"saveOrder",value:function(e){fetch(this.state.server+"/api/order",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({label:e,items:this.state.items,discount:this.state.discount,tax:this.state.tax,totalBCH:this.state.totalBch,subtotalBCH:this.state.subtotalBch,discountBCH:this.state.discountBch,taxBCH:this.state.taxBch,exchangeRATE:this.state.exchangeRate,currency:this.state.currency})})}},{key:"cancelPayment",value:function(e){e.preventDefault(),this.setState({submit:0})}},{key:"getColor",value:function(e){var t=["blue lighten-1","orange","teal","red","purple"];return t[e%t.length]}},{key:"handlePlus",value:function(e,t){t.preventDefault();var n=this.state.items,r=n.findIndex(function(t){return t.id===e});console.log(r),n[r].count++,this.setState({items:n}),this.calculateTotals(n)}},{key:"handleMin",value:function(e,t){t.preventDefault();var n=this.state.items,r=n.findIndex(function(t){return t.id===e});console.log(r),n[r].count--,console.log(n[r].count),0===n[r].count?(n=this.state.items.filter(function(t,n){return t.id!==e}),this.setState({items:n}),this.calculateTotals(n)):(this.setState({items:n}),this.calculateTotals(n))}},{key:"render",value:function(){var e=this;return 0===this.state.exchangeRate?s.a.createElement("h1",null,"Fetching Exchange Rate..."):0===this.state.submit?s.a.createElement("div",null,s.a.createElement(c.Row,null,s.a.createElement(c.Col,{s:12,l:5,xl:5,className:"offset-l0 offset-xl0"},s.a.createElement(h.a,{title:"New Item",submitIcon:"add_shopping_cart",amount:this.state.amount,currency:this.state.currency,exchangeRate:this.state.exchangeRate,handler:this.handleItem,toggleCurrency:this.toggleCurrency}),s.a.createElement("p",null,s.a.createElement("b",null,"Currency Source: "),this.state.source)),s.a.createElement(c.Col,{s:12,l:6,xl:6,className:"offset-l0 offset-xl0"},s.a.createElement("div",{className:"order-totals"},s.a.createElement("form",null,s.a.createElement(c.Row,null,s.a.createElement(c.Col,{s:12,l:12,xl:12,className:"offset-l0 offset-xl0"},s.a.createElement(c.Input,{s:6,l:2,xl:2,type:"select",label:"Discount %",defaultValue:this.state.discount,onChange:this.handleDiscount.bind(this)},this.state.discountPresets.map(function(e){return s.a.createElement("option",{key:e.id,value:e.value},e.value+"%")})),s.a.createElement(c.Input,{s:6,l:2,xl:2,type:"select",label:"Sales Tax %",defaultValue:this.state.tax,onChange:this.handleTax.bind(this)},this.state.taxPresets.map(function(e){return s.a.createElement("option",{key:e.id,value:e.value},e.value+"%")})),s.a.createElement(c.Col,{s:6,l:4,xl:4},s.a.createElement("div",{className:"subtotal-right"},s.a.createElement("h4",null,"Total")),s.a.createElement("div",{className:"subtotal-right"},s.a.createElement("h5",null,parseFloat(this.state.totalBch*this.state.exchangeRate).toFixed(2)," ",this.state.currency)),s.a.createElement("div",{className:"subtotal-right"},parseFloat(this.state.totalBch).toFixed(8)," BCH")),s.a.createElement(c.Col,{s:6,l:4,xl:4},s.a.createElement("div",{className:"subtotal-right"},s.a.createElement("h4",null,"Discount & Tax")),s.a.createElement("div",{className:"subtotal-right"},"Discount: ",parseFloat(this.state.discount).toFixed(0)," % - ",parseFloat(this.state.discountBch*this.state.exchangeRate).toFixed(2)," ",this.state.currency),s.a.createElement("div",{className:"subtotal-right"},"Sales Tax: ",parseFloat(this.state.tax).toFixed(0)," % + ",parseFloat(this.state.taxBch*this.state.exchangeRate).toFixed(2)," ",this.state.currency)))),s.a.createElement(c.Row,null,s.a.createElement(c.Col,{s:4,l:4,xl:4,className:"offset-l0 offset-xl0"},s.a.createElement(c.Button,{large:!0,waves:"light",className:"green left bold-big",onClick:this.handlePayment.bind(this)},s.a.createElement(c.Icon,{left:!0},"payment"),"Pay")),s.a.createElement(c.Col,{s:4,l:4,xl:4,className:"offset-l0 offset-xl0"},0===this.state.clear?s.a.createElement(l.b,{to:"/"},s.a.createElement(c.Button,{large:!0,waves:"light",className:"red left bold-big"},s.a.createElement(c.Icon,{left:!0},"cancel"),"Cancel")):s.a.createElement(c.Button,{large:!0,waves:"light",className:"orange left bold-big",onClick:this.handleClear.bind(this)},s.a.createElement(c.Icon,{left:!0},"clear"),"Clear!")),s.a.createElement(c.Col,{s:4,l:4,xl:4,className:"offset-l0 offset-xl0"},s.a.createElement("div",{className:"subtotal-right"},s.a.createElement("h5",null,"Subtotal:")),s.a.createElement("div",{className:"subtotal-right"},parseFloat(this.state.subtotalBch*this.state.exchangeRate).toFixed(2)," ",this.state.currency),s.a.createElement("div",{className:"subtotal-right"},parseFloat(this.state.subtotalBch).toFixed(8)," BCH"))))),s.a.createElement("div",{className:"order-items"},this.state.items.map(function(t,n){return s.a.createElement(c.Row,{className:"order-item",key:n},s.a.createElement(c.Col,{s:1,l:1,xl:1,className:"offset-l0 offset-xl0"},s.a.createElement(c.Icon,{small:!0,className:"collection-item circle white-text "+e.getColor(t.id-1),children:"chevron_right"})),s.a.createElement(c.Col,{s:4,className:"offset-l0 offset-xl0"},s.a.createElement("span",{className:"left"},s.a.createElement("b",null,t.name)),s.a.createElement("br",null),s.a.createElement("span",{className:"left bold"},parseFloat(t.bch*e.state.exchangeRate).toFixed(2)," ",e.state.currency),s.a.createElement("br",null),s.a.createElement("span",{className:"left mono-tiny"},t.bch," BCH"),s.a.createElement("br",null)),s.a.createElement(c.Col,{s:1,className:"offset-l0 offset-xl0"},s.a.createElement("span",{className:"left"},s.a.createElement("b",null,"x",t.count)),s.a.createElement("br",null)),s.a.createElement(c.Col,{s:3,className:"offset-l0 offset-xl0"},s.a.createElement("div",{className:"item-total"},s.a.createElement("span",{className:"right"},s.a.createElement("b",null,parseFloat(t.count*t.bch*e.state.exchangeRate).toFixed(2)," ",e.state.currency)),s.a.createElement("br",null),s.a.createElement("span",{className:"right mono-tiny"},parseFloat(t.count*t.bch).toFixed(8)," BCH"))),s.a.createElement(c.Col,{s:3,className:"offset-l0 offset-xl0"},s.a.createElement("div",{className:"order-buttons right"},s.a.createElement(c.Button,{floating:!0,waves:"light",className:"green order-btn",onClick:e.handlePlus.bind(e,t.id)},s.a.createElement(c.Icon,null,"add")),t.count>1?s.a.createElement(c.Button,{floating:!0,waves:"light",className:"red order-btn",onClick:e.handleMin.bind(e,t.id)},s.a.createElement(c.Icon,null,"remove")):s.a.createElement(c.Button,{floating:!0,waves:"light",className:"red order-btn",onClick:e.handleMin.bind(e,t.id)},s.a.createElement(c.Icon,null,"clear")),s.a.createElement("br",null),s.a.createElement("span",{className:"right mono-tiny"},"(",parseFloat(t.timestamp).toFixed(0),")"))))})))),s.a.createElement(b.a,null)):s.a.createElement("div",null,s.a.createElement(c.Container,null,s.a.createElement(p.a,{amount:parseFloat(this.state.total).toFixed(2),bch:this.state.totalBch,label:this.state.label,currency:this.state.currency}),s.a.createElement("ul",null,s.a.createElement("li",null,s.a.createElement(c.Button,{node:"button",large:!0,waves:"light",className:"red",onClick:this.cancelPayment.bind(this)},s.a.createElement(c.Icon,{left:!0},"close"),"Close")))))}}]),t}(o.Component);t.a=y},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function a(e){return 3*e.length/4-r(e)}function i(e){var t,n,a,i,o,s=e.length;i=r(e),o=new f(3*s/4-i),n=i>0?s-4:s;var c=0;for(t=0;t>>r[c]&1;for(var c=s;c0||t.cmpn(-a)>0;){var i=e.andln(3)+r&3,o=t.andln(3)+a&3;3===i&&(i=-1),3===o&&(o=-1);var s;if(0===(1&i))s=0;else{var c=e.andln(7)+r&7;s=3!==c&&5!==c||2!==o?i:-i}n[0].push(s);var u;if(0===(1&o))u=0;else{var c=t.andln(7)+a&7;u=3!==c&&5!==c||2!==i?o:-o}n[1].push(u),2*r===s+1&&(r=1-r),2*a===u+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n}function i(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}}function o(e){return"string"===typeof e?c.toArray(e,"hex"):e}function s(e){return new u(e,"hex","le")}var c=t,u=n(6),l=n(9),f=n(102);c.assert=l,c.toArray=f.toArray,c.zero2=f.zero2,c.toHex=f.toHex,c.encode=f.encode,c.getNAF=r,c.getJSF=a,c.cachedProperty=i,c.parseBytes=o,c.intFromLE=s},function(e,t,n){"use strict";function r(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function a(e,t){this.curve=e,this.type=t,this.precomputed=null}var i=n(6),o=n(8),s=o.utils,c=s.getNAF,u=s.getJSF,l=s.assert;e.exports=r,r.prototype.point=function(){throw new Error("Not implemented")},r.prototype.validate=function(){throw new Error("Not implemented")},r.prototype._fixedNafMul=function(e,t){l(e.precomputed);var n=e._getDoubles(),r=c(t,1),a=(1<