(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"0iUn":function(t,n,e){"use strict";function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}e.d(n,"a",(function(){return i}))},MI3g:function(t,n,e){"use strict";var i=e("XVgq"),s=e.n(i),r=e("Z7t5"),a=e.n(r);function c(t){return(c="function"===typeof a.a&&"symbol"===typeof s.a?function(t){return typeof t}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"===typeof a.a&&"symbol"===c(s.a)?function(t){return c(t)}:function(t){return t&&"function"===typeof a.a&&t.constructor===a.a&&t!==a.a.prototype?"symbol":c(t)})(t)}function u(t,n){return!n||"object"!==o(n)&&"function"!==typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}e.d(n,"a",(function(){return u}))},Mqbl:function(t,n,e){var i=e("JB68"),s=e("w6GO");e("zn7N")("keys",(function(){return function(t){return s(i(t))}}))},OaS3:function(t,n){t.exports="/_next/static/images/face.2-3b2832c841c40a5b377207514673aa51.png"},RNiq:function(t,n,e){"use strict";e.r(n);var i=e("q1tI"),s=e.n(i),r=e("Bl7J"),a=e("vrFN"),c=e("vOnD"),o=e("pLtp"),u=e.n(o),h=e("0iUn"),f=e("sLSF"),l=e("hfKm"),d=e.n(l);function v(t,n,e){return n in t?d()(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var y=e("MI3g"),b=e("a7VT"),_=e("Tit0"),p=e("OaS3"),w=e.n(p),m=e("wJVF"),x=e.n(m),g=function(){function t(n,e,i,s){var r=this;Object(h.a)(this,t),v(this,"faceImages",[w.a,x.a]),this._rotation=0,this.setBounds(n),this._x=i,this._y=s,this.scale=1,this.setSpeed(),this.ctx=e,this.img=new Image,this.img.addEventListener("load",(function(){return r.listenerHandler()})),this.img.src=this.getFace()}return Object(f.a)(t,[{key:"getFace",value:function(){return this.faceImages[Math.floor(Math.random()*this.faceImages.length)]}}]),Object(f.a)(t,[{key:"setBounds",value:function(t){this.bounds=t}},{key:"setSpeed",value:function(){this.vx=5*Math.random(),this.vy=5*Math.random()}},{key:"listenerHandler",value:function(){this.draw(this._x,this._y)}},{key:"draw",value:function(){console.log("implement me!")}}]),t}(),k=function(t){function n(){return Object(h.a)(this,n),Object(y.a)(this,Object(b.a)(n).apply(this,arguments))}return Object(_.a)(n,t),Object(f.a)(n,[{key:"setSpeed",value:function(){this.vx=5+10*Math.random(),this.vy=5+10*Math.random()}},{key:"listenerHandler",value:function(){this.draw(this._x,this._y)}},{key:"draw",value:function(){this._x+=this.vx,this._y+=this.vy,this.ctx.drawImage(this.img,this._x,this._y),this.checkBounds()}},{key:"checkBounds",value:function(){(this._y+this.img.height>=this.bounds.y||this._y<=0)&&(this.vy=-this.vy),(this._x+this.img.width>=this.bounds.x||this._x<=0)&&(this.vx=-this.vx)}}]),n}(g),O=function(t){function n(t,e,i,s){var r;return Object(h.a)(this,n),(r=Object(y.a)(this,Object(b.a)(n).call(this,t,e,i,s))).scaleIncrement=-.01,r}return Object(_.a)(n,t),Object(f.a)(n,[{key:"listenerHandler",value:function(){this._width=this.img.width,this._height=this.img.height,this.draw()}},{key:"draw",value:function(){this.scale+=this.scaleIncrement,this.scale<=0?this.scaleIncrement=.01:this.scale>=1&&(this.scaleIncrement=-.01),this._x+=this.vx,this._y+=this.vy,this.ctx.drawImage(this.img,this._x,this._y,this._width*this.scale,this._height*this.scale),this.checkBounds()}},{key:"checkBounds",value:function(){(this._y>=this.bounds.y||this._y<=0)&&(this.vy=-this.vy),(this._x>=this.bounds.x||this._x<=0)&&(this.vx=-this.vx)}}]),n}(g),j=function(t){function n(){return Object(h.a)(this,n),Object(y.a)(this,Object(b.a)(n).apply(this,arguments))}return Object(_.a)(n,t),Object(f.a)(n,[{key:"listenerHandler",value:function(){this._center={x:this._x-this.img.width/2,y:this._y-this.img.height/2},this.draw(this._x,this._y)}},{key:"draw",value:function(){this._center&&(this._x+=this.vx,this._y+=this.vy,this.ctx.save(),this.ctx.translate(this._x,this._y),this.ctx.rotate(this._rotation=this._rotation),this.ctx.drawImage(this.img,this._center.x,this._center.y),this.ctx.restore(),this._rotation+=.1,this.checkBounds())}},{key:"checkBounds",value:function(){(this._y>=this.bounds.y||this._y<=0)&&(this.vy=-this.vy),(this._x>=this.bounds.x||this._x<=0)&&(this.vx=-this.vx)}}]),n}(g),I=s.a.createElement,E=c.b.canvas.withConfig({displayName:"FacesRenderer__Canvas",componentId:"sc-1izntyv-0"})([""]),F=function(){function t(n,e){var i=this;Object(h.a)(this,t),v(this,"render",(function(){i.faces.forEach((function(t){return t.draw()})),requestAnimationFrame(i.render)})),this.faces=[],this.canvas=n.current;for(var s=0;s930?930:t,height:500}},s=Object(i.useState)({width:0,height:0}),r=s[0],a=s[1],c=Object(i.useState)(!1),o=c[0],u=c[1];return Object(i.useEffect)((function(){var t=function(){return function(){return a(e())}};a(e());return o||(window.addEventListener("resize",t()),u(!0)),function(){return window.removeEventListener("resize",t())}}),[]),S(B,{bounds:r,faceCount:n})},M=s.a.createElement,q=Object(c.b)(r.b).withConfig({displayName:"pages__ClickableSubTitle",componentId:"zfpar1-0"})(["cursor:pointer;"]),T=function(){var t=Object(i.useState)(1),n=t[0],e=t[1];return M(s.a.Fragment,null,M(a.a,{title:"Home"}),M(r.c,null,"Shane Johnson"),M(q,{onClick:function(){return e(100)}},"I write code \u1555( \u141b )\u1557"),M(C,{faceCount:n}))};e.d(n,"default",(function(){return T}))},Tit0:function(t,n,e){"use strict";var i=e("SqZg"),s=e.n(i),r=e("TRZx"),a=e.n(r);function c(t,n){return(c=a.a||function(t,n){return t.__proto__=n,t})(t,n)}function o(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=s()(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&c(t,n)}e.d(n,"a",(function(){return o}))},a7VT:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var i=e("Bhuq"),s=e.n(i),r=e("TRZx"),a=e.n(r);function c(t){return(c=a.a?s.a:function(t){return t.__proto__||s()(t)})(t)}},iq4v:function(t,n,e){e("Mqbl"),t.exports=e("WEpk").Object.keys},pLtp:function(t,n,e){t.exports=e("iq4v")},sLSF:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var i=e("hfKm"),s=e.n(i);function r(t,n){for(var e=0;e