(window.webpackJsonp=window.webpackJsonp||[]).push([[37,10,11,12,14],{1150:function(t,e,r){"use strict";r(577)},1151:function(t,e,r){var n=r(107)(!1);n.push([t.i,".modal[data-v-34cad25a]{z-index:10}.modal-bg[data-v-34cad25a]{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;z-index:9;animation:bg-34cad25a .2s linear forwards}@keyframes bg-34cad25a{0%{background:transparent}to{background:rgba(0,0,0,.7)}}.modal-inner[data-v-34cad25a]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-width:350px;padding:20px 20px 18px;border:1px solid #ccc;border-radius:10px;background:#fff;z-index:10;animation:fadeIn-34cad25a .2s linear forwards}@keyframes fadeIn-34cad25a{0%{opacity:0;transform:translate(-50%,-20%)}to{opacity:1;transform:translate(-50%,-50%)}}.modal-text[data-v-34cad25a]{font-size:16px;text-align:center}.modal-close[data-v-34cad25a]{position:absolute;top:-10px;right:-10px;width:25px;cursor:pointer}.modal-close[data-v-34cad25a]:hover{transform:scale(1.06)}",""]),t.exports=n},1152:function(t,e,r){"use strict";r(578)},1153:function(t,e,r){var n=r(107),o=r(200),d=r(1154),c=r(1155),l=n(!1),f=o(d),h=o(c);l.push([t.i,'@font-face{font-family:"pixelWeb";src:url(/perfect-circle/disposable-digi.woff)}@font-face{font-family:"comicWeb";src:url('+f+')}@font-face{font-family:"comicWeb";font-weight:700;src:url('+h+')}@-o-viewport{width:100vw;zoom:1;user-zoom:fixed}@viewport{width:100vw;zoom:1;user-zoom:fixed}.container[data-v-568d841e]{position:fixed;left:0;top:0;--font-size:9vh;-webkit-backface-visibility:hidden}.container[data-v-568d841e],main[data-v-568d841e]{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}main[data-v-568d841e]{position:relative;overflow:hidden;background:#101010 url(/perfect-circle/main.jpg) 50%;background-size:120% 100%;color:#f4f4f4;text-align:center;cursor:default;-webkit-touch-callout:none}header h1[data-v-568d841e]{font-weight:400;position:absolute;left:calc(50% - 3rem);width:6rem;bottom:calc(50% + 20px + .75rem);opacity:0;text-shadow:.05rem .05rem 0 #101010,-.03rem .05rem 0 #101010,-.03rem -.03rem 0 #101010,.05rem -.03rem 0 #101010,0 0 .2rem #101010,0 0 .4rem #101010;transition:transform .75s,opacity .75s;transform:translateY(-.75rem);z-index:3;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}header h1.on[data-v-568d841e]{transform:translateY(0);opacity:1}header h1 span[data-v-568d841e]:first-child{display:block;font-size:.45rem}header h1 span[data-v-568d841e]:nth-child(2){display:block;font-size:.5rem;text-transform:uppercase}header h1 strong[data-v-568d841e]{font-size:.925em;display:inline-block;vertical-align:top;margin:.01rem -.07rem 0 0}header h1 strong[data-v-568d841e]:nth-child(2){margin:.01rem 0 0 .12rem}header button[data-v-568d841e]{position:absolute;top:calc(50% - .5rem - 20px);left:calc(50% - .5rem);width:1rem;height:1rem;border-radius:50%;background:#f4f4f4;font-weight:700;font-size:.4rem;z-index:3;transform:scale(.2);transition:transform .5s,color .5s;color:#f4f4f4;pointer-events:none;text-transform:uppercase;text-decoration:none;border:none;outline:none;cursor:pointer;display:flex;align-items:center;justify-content:center}header button.on[data-v-568d841e]{pointer-events:auto;transform:scale(1);color:#101010}section[data-v-568d841e]{position:absolute;width:100vh;height:100vh;top:calc(50% - 20px);left:50%;margin:-50vh 0 0 -50vh;z-index:2}section h2[data-v-568d841e]{font-weight:400;font-size:.35rem;position:absolute;left:0;right:0;top:50%;margin:-.7rem 0 0;opacity:0;transition:opacity .5s;text-shadow:2px 2px 0 #101010;pointer-events:none}section h2.on[data-v-568d841e]{opacity:1}section h2 span[data-v-568d841e]{display:block;height:1rem}section div[data-v-568d841e],section svg[data-v-568d841e]{position:absolute;top:0;left:0;width:100%;height:100%;contain:layout}section svg[data-v-568d841e]{fill:none}section div[data-v-568d841e]{cursor:crosshair}section p[data-v-568d841e]{font-family:"pixelWeb",sans-serif;position:absolute;left:0;right:0;bottom:calc(50% - .36rem);font-size:1rem;color:#c00;text-shadow:2px 2px 0 #101010;contain:layout}section p span[data-v-568d841e]{display:inline-block}section p span[data-v-568d841e]:first-child{width:.4rem}section p span[data-v-568d841e]:nth-child(2),section p span[data-v-568d841e]:nth-child(3){width:.6rem}section p span[data-v-568d841e]:nth-child(4){width:.35rem}section p span[data-v-568d841e]:nth-child(5){width:.5rem;font-size:.85rem}section p span[data-v-568d841e]:nth-child(6){width:1.08rem;font-size:.85rem;text-align:left}footer[data-v-568d841e]{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}footer[data-v-568d841e]:before{content:"";position:absolute;top:calc(50% - .1rem - 20px);left:calc(50% - .1rem);width:.2rem;height:.2rem;border-radius:50%;background:#f4f4f4}footer ul[data-v-568d841e]{list-style:none}footer li[data-v-568d841e]{display:none;margin:.4rem 0 0}footer li[data-v-568d841e],footer p[data-v-568d841e]{position:absolute;left:.1rem;right:0;top:calc(50% - 20px);font-size:.4rem;text-shadow:2px 2px 0 #101010}footer p[data-v-568d841e]{margin:.35rem 0 0;z-index:5}footer p span[data-v-568d841e]{font-family:"pixelWeb",sans-serif;font-size:.45rem;margin:0 0 0 .08rem;color:#c00}#share[data-v-568d841e]{display:none;position:absolute;left:50%;transform:translateX(-50%);bottom:60px;white-space:nowrap}#share button[data-v-568d841e]{font-family:inherit;font-size:18px;font-weight:700;border-radius:6px;padding:14px 7px 16px;min-width:95px;border:2px solid #101010;color:#fff;text-shadow:-1px -1px 10px rgba(0,0,0,.25),1px 2px 0 #101010;cursor:pointer}#share button+button[data-v-568d841e]{margin-left:-2px}#share button[data-v-568d841e]:first-child{border-radius:16px 6px 6px 16px}#share button[data-v-568d841e]:last-child{border-radius:6px 16px 16px 6px}#share button#shareTwitter[data-v-568d841e]{background:#1da1f2}#share button#shareCopy[data-v-568d841e]{background:#7676ea}#share button#shareCopy.shareCopyDone[data-v-568d841e]{position:relative;color:transparent;background:#5b5b99;text-shadow:none}#share button#shareCopy.shareCopyDone[data-v-568d841e]:after{content:"Done!";position:absolute;top:11px;left:10px;font-size:22px;transform:rotate(-20deg);color:#fff;text-shadow:1px 2px 0 #101010}#share button#shareWhatsApp[data-v-568d841e]{background:#1ebea5;letter-spacing:-1px}#share button#shareMore[data-v-568d841e]{background:grey;min-width:0}#sound[data-v-568d841e]{position:absolute;top:0;right:0;font-size:16px;opacity:.5}#sound label[data-v-568d841e]{display:inline-block;cursor:pointer;padding:6px 8px 6px 6px}#sound input[data-v-568d841e]{accent-color:grey;cursor:pointer;margin:0 4px 0 0}#loading[data-v-568d841e]{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%);font-family:sans-serif;font-size:16px;text-transform:uppercase;letter-spacing:.4em;opacity:.5}#loading[data-v-568d841e]:before{content:"Loading"}.blink[data-v-568d841e]{animation:blink-animation-568d841e .6s steps(2,start) 3}.blink-grow[data-v-568d841e]{animation:blink-grow-568d841e 1s ease-in-out infinite}@keyframes blink-animation-568d841e{to{visibility:hidden}}@keyframes blink-grow-568d841e{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.site-title[data-v-568d841e]{position:fixed;top:13px;left:13px;max-width:140px;width:100%;filter:invert(100%);z-index:6;font-size:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.site-title[data-v-568d841e]:hover{transform:scale(1.04)}.controls-icon[data-v-568d841e]{height:27px;cursor:pointer}.controls-icon[data-v-568d841e]:hover{transform:scale(1.08)}.controls[data-v-568d841e]{position:fixed;top:10px;right:14px;z-index:2;line-height:0;opacity:.7;display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.controls[data-v-568d841e] :first-child{padding:3px;opacity:.55}.tweet[data-v-568d841e]{background:#1da1f2;width:90px}.copy[data-v-568d841e]{background:#b780ff;width:90px}.share[data-v-568d841e]{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);grid-gap:15px;opacity:0;animation:shareFade-568d841e .4s ease-in-out .3s forwards;z-index:4}.share[data-v-568d841e],.share-btn[data-v-568d841e]{display:flex;justify-content:center}.share-btn[data-v-568d841e]{font-size:18px;align-items:center;height:40px;border-radius:10px;color:#fff;text-decoration:none;line-height:0;z-index:5;border:none;font-family:comicWeb;cursor:pointer;transition:transform .2s ease-in-out,opacity .2s ease-in-out}.share-btn[data-v-568d841e]:disabled{opacity:.7;pointer-events:none}.share button[data-v-568d841e]:hover{transform:scale(1.08)}.shirt-desktop[data-v-568d841e],.shirt-mobile[data-v-568d841e]{background:#ff2525}.shirt-desktop[data-v-568d841e]{width:165px}.shirt-mobile[data-v-568d841e]{display:none;width:90px}@keyframes shareFade-568d841e{0%{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%)}}.pinwheel[data-v-568d841e]{position:fixed;top:calc(50% - .25rem);left:50%;width:max(100vh,100vw);animation:pinwheelFade-568d841e 1s ease-in-out forwards,spin-568d841e 20s linear infinite;pointer-events:none;opacity:.1;z-index:0}.pinwheel-fast[data-v-568d841e]{animation:pinwheelFade-568d841e 1s ease-in-out forwards,spin-568d841e 10s linear infinite}.vignette[data-v-568d841e]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;background:radial-gradient(circle,hsla(0,0%,100%,.2) 0,transparent 50%,transparent 100%);animation:vignetteFade-568d841e 1s ease-in-out forwards;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vignette-legendary[data-v-568d841e]{background:radial-gradient(circle,hsla(0,0%,100%,.5) 0,transparent 60%,transparent 100%)}.divine[data-v-568d841e]{background:#101010 url(/perfect-circle/space.jpg) 50%;background-size:900px auto;background-repeat:repeat;animation:divine-568d841e 20s linear infinite}.best-score[data-v-568d841e]{filter:drop-shadow(0 0 15px var(--score-color))}@keyframes flash-568d841e{0%{opacity:0}to{opacity:1}}@keyframes divine-568d841e{0%{background-position:0 0}to{background-position:900px 0}}@keyframes pinwheelFade-568d841e{0%{opacity:0;transform:translate(-50%,-50%) scale(0)}to{opacity:.1;transform:translate(-50%,-50%) scale(1)}}@keyframes vignetteFade-568d841e{0%{opacity:0}to{opacity:.5}}@keyframes spin-568d841e{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.svg-container-spin[data-v-568d841e]{animation:spinSvg-568d841e 10s linear infinite}@keyframes spinSvg-568d841e{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media screen and (max-width:900px){.site-title[data-v-568d841e]{max-width:120px}.controls[data-v-568d841e]{right:10px;grid-gap:18px}}@media screen and (max-width:500px){.shirt-desktop[data-v-568d841e]{display:none}.shirt-mobile[data-v-568d841e]{display:block}}',""]),t.exports=l},1154:function(t,e,r){t.exports=r.p+"fonts/sunday-comics.5447a95.woff2"},1155:function(t,e,r){t.exports=r.p+"fonts/sunday-comics-bold.1caf923.woff2"},1156:function(t,e,r){"use strict";r(579)},1157:function(t,e,r){var n=r(107)(!1);n.push([t.i,'.perfect-circle{position:fixed;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:rgba(0,0,0,0);overflow:hidden;font-family:"comicWeb","Verdana",sans-serif;line-height:1.2;background:#101010;font-size:9vh;word-spacing:0}@media (min-aspect-ratio:1/1){.perfect-circle{font-size:10.8vh}.perfect-circle main{background-size:100% 120%}.perfect-circle section{width:120vh;height:120vh;margin:-60vh 0 0 -60vh}}',""]),t.exports=n},1314:function(t,e,r){"use strict";r.r(e);var n,o,d,c,l,f,h,m,v,x=r(10),w=(r(60),r(63),r(337),r(15),r(46),r(110),r(336)),y={},k=(r(1150),r(28)),_=Object(k.a)(y,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal"},[e("div",{staticClass:"modal-bg",on:{click:function(e){return t.$emit("close")}}}),t._v(" "),e("div",{staticClass:"modal-inner"},[e("img",{staticClass:"modal-close",attrs:{src:"/perfect-circle/close.svg"},on:{click:function(e){return t.$emit("close")}}}),t._v(" "),e("div",{staticClass:"modal-text"},[t._v("Originally created by Matt Round")])])])}),[],!1,null,"34cad25a",null).exports,C={x:500,y:500},z={};function M(t){var e=480*(t-.75);return e=Math.min(e,120),"hsl("+(e=Math.max(e,0))+", 100%, "+(40+.2*e)+"%)"}var S,A,E={components:{Modal:_},data:function(){return{isDrawing:!1,start:!1,score:0,hasDrawn:!1,best:0,showBest:!1,newBestScore:!1,scoreColor:"",message:"",sound:!0,showInfo:!1,copied:!1,valid:!1,loadingShirt:!1}},head:function(){return{htmlAttrs:{class:"perfect-circle"},link:[{rel:"preload",href:"/perfect-circle/disposable-digi.woff",as:"font",type:"font/woff",crossorigin:!0}]}},mounted:function(){n={count:2e3,angle:-2.5,lastX:0,lastY:0,stroke:20,radiusCorrect:0,message:"",sound:!0},C={x:500,y:500},z={},m=new w.Howl({src:["/perfect-circle/fx.mp3"],volume:.3,sprite:{error:[473,303],best:[1243,809],drawing:[2539,10450]}}),v=new w.Howl({src:["/perfect-circle/ahh.mp3"],volume:.3}),this.demoAnim()},computed:{scoreString:function(){return 0===this.score?" XXX":(" "+this.score).slice(-4)},bestString:function(){return(100*this.best).toFixed(1)+"%"}},watch:{sound:function(t){Howler.mute(!t)}},methods:{setupDrawContainer:function(){var t=this;["mousedown","touchstart"].forEach((function(e){return t.$refs.drawContainer.addEventListener(e,t.onDrawStart,!1)})),["mousemove","touchmove"].forEach((function(e){return t.$refs.drawContainer.addEventListener(e,t.onDrawMove,!1)})),["mouseup","mouseout","touchend","touchcancel"].forEach((function(e){return t.$refs.drawContainer.addEventListener(e,t.onDrawEnd,!1)}))},onDrawStart:function(t){var e=this;if(this.isDrawing)return!1;this.hasDrawn=!0,this.showBest=!1,this.newBestScore=!1,this.isDrawing=!0,this.copied=!1,this.valid=!1;var r=this.coords(t);return z.x=r.x,z.y=r.y,z.time=Date.now(),z.speed=0,z.accuracy=1,z.dx=0,z.dy=0,z.angle=180+180*Math.atan2(r.y-C.y,r.x-C.x)/Math.PI,z.radius=Math.sqrt(Math.pow(r.x-C.x,2)+Math.pow(r.y-C.y,2)),z.distance=0,z.stroke=20,o=z.radius,l=0,d=0,c=0,this.$refs.svgContainer.replaceChildren(),this.isDrawing=!0,f=setTimeout((function(){e.$refs.drawContainer.dispatchEvent(new Event("mouseup")),e.message="Too slow"}),7e3),h=m.play("drawing"),m.volume(0,h),o<100&&(this.$refs.drawContainer.dispatchEvent(new Event("mouseup")),this.message="Too close to dot"),!1},onDrawMove:function(t){if(!this.isDrawing)return!1;var time=Date.now(),e=this.coords(t),r=e.x-z.x,n=e.y-z.y,f=Math.sqrt(Math.pow(r,2)+Math.pow(n,2));if(f<6)return m.volume(0,h),!1;var v=f/(.001+time-z.time);0==z.distance&&(z.distance=f),0==z.speed&&(z.speed=v);var x=1.5+2/(.05+v);x=(3*z.stroke+x)/4,x=Math.min(x,20);var w=180+180*Math.atan2(e.y-C.y,e.x-C.x)/Math.PI,y=w-z.angle;y<-180?y+=360:y>180&&(y-=360);var k=y<0?-1:1;if(0==l){if(Math.abs(y)<.1)return!1;l=k}var _=Math.sqrt(Math.pow(e.x-C.x,2)+Math.pow(e.y-C.y,2)),S=1-Math.abs((_+z.radius)/2-o)/o;S=Math.max(S,0);var A=z.dx*f/z.distance,E=z.dy*f/z.distance,I=r+(r-A),D=n+(n-E);return this.draw("path",{d:"M"+z.x+" "+z.y+" C"+(z.x+A/3.5)+" "+(z.y+E/3.5)+","+(e.x-I/3.5)+" "+(e.y-D/3.5)+","+e.x+" "+e.y,style:"stroke: "+M(S)+"; stroke-width:"+x+"px;"}),m.volume(Math.min(S*v/75,.15),h),k!=l?(this.$refs.drawContainer.dispatchEvent(new Event("mouseup")),this.message="Wrong way",!1):_<30?(this.$refs.drawContainer.dispatchEvent(new Event("mouseup")),this.message="Too close to dot",!1):(z.x=e.x,z.y=e.y,z.time=time,z.speed=v,z.accuracy=S,z.dx=r,z.dy=n,z.angle=w,z.radius=_,z.distance=f,z.stroke=x,y=Math.abs(y),(c+=y)>360&&(y-=c-360,c=360),d+=y*S,this.score=Math.min(Math.round(1e3*d/c),999),this.scoreColor=M(d/c),360==c&&this.onComplete(),!1)},onComplete:function(){if(m.stop(h),this.isDrawing=!1,this.valid=!0,0==this.best?this.message="Have another go!":this.showBest=!0,clearTimeout(f),this.score>Math.round(1e3*this.best)){if(this.best=d/c,this.bestColor=M(this.best),this.score>=950&&v.play(),m.play("best"),0==this.best)return!1;this.newBestScore=!0,this.showBest=!1,999===this.score?this.message="Perfect circle":this.score>=990?this.message="Divine circle":this.score>=980?this.message="Legendary circle":this.message="New best score"}},onDrawEnd:function(t){return!!this.isDrawing&&(c>335?this.onComplete():(this.isDrawing=!1,m.stop(h),m.play("error"),this.score=0,this.scoreColor=M(0),this.message="Draw a full circle",clearTimeout(f)),!1)},onGoClick:function(){this.start=!0,this.setupDrawContainer(),setTimeout((function(){n.count=0}),500)},coords:function(t){this.$refs.svgContainer.classList.remove("svg-container-spin");var e=this.$refs.svgContainer.getBoundingClientRect(),r=1e3/e.width,n={};return 0===t.type.indexOf("touch")?(n.x=r*(t.touches[0].pageX-e.left),n.y=r*(t.touches[0].pageY-e.top)):(n.x=r*(t.pageX-e.left),n.y=r*(t.pageY-e.top)),n},draw:function(t,e){var r=document.createElementNS("http://www.w3.org/2000/svg",t);for(var a in e)r.setAttribute(a,e[a]);this.$refs.svgContainer.appendChild(r)},demoAnim:function(){if(!(this.hasDrawn||(n.count--,n.count<491))){var t=.04+.01*Math.cos(2+n.count/47);n.angle+=t;var e=280+85*Math.sin(4+n.count/66),r=C.x+e*Math.cos(n.angle)+50*Math.sin(1+n.count/29),o=C.y+e*Math.sin(n.angle)+50*Math.cos(5+n.count/17);e=Math.sqrt(Math.pow(r-C.x,2)+Math.pow(o-C.y,2)),0==n.radiusCorrect&&(n.radiusCorrect=e);var d=1-Math.abs(e-n.radiusCorrect)/n.radiusCorrect;0==n.lastX&&(n.lastX=r,n.lastY=o,requestAnimationFrame(this.demoAnim)),this.draw("path",{d:"M"+n.lastX+" "+n.lastY+" L"+r+" "+o,style:"stroke: "+M(d)+"; stroke-width:"+n.stroke+"px;"}),n.lastX=r,n.lastY=o;var c=16-300*t;n.stroke=(9*n.stroke+c)/10,requestAnimationFrame(this.demoAnim)}},copy:(A=Object(x.a)(regeneratorRuntime.mark((function t(){var text;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return text="My circle is ".concat((this.score/10).toFixed(1),"% perfect, can you beat that? https://neal.fun/perfect-circle/"),this.copied=!0,t.prev=2,t.next=5,navigator.clipboard.writeText(text);case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(2),console.error("Failed to copy: ",t.t0);case 10:case"end":return t.stop()}}),t,this,[[2,7]])}))),function(){return A.apply(this,arguments)}),getTshirtLink:(S=Object(x.a)(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this.loadingShirt=!0,t.next=4,fetch("https://perfect-circle.neal.fun/?accuracy=".concat((this.score/10).toFixed(1)),{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"text/plain"},body:this.$refs.svgContainer.outerHTML});case 4:return e=t.sent,t.next=7,e.json();case 7:r=t.sent,this.loadingShirt=!1,r.storeLink&&(window.location.href=r.storeLink),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),this.loadingShirt=!1;case 15:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return S.apply(this,arguments)}),tweet:function(){var t="⭕️ My circle is ".concat((this.score/10).toFixed(1),"% perfect, can you beat that?"),e="https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(t),"&url=").concat(encodeURIComponent("https://neal.fun/perfect-circle/"));window.open(e,"_blank")}},beforeDestroy:function(){Howler.unload(),this.hasDrawn=!0}},I=E,D=(r(1152),r(1156),Object(k.a)(I,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"container"},[e("NuxtLink",{staticClass:"site-title",attrs:{to:"/"}},[e("img",{attrs:{src:"/general/logo.svg"}})]),t._v(" "),t.showInfo?e("Modal",{on:{close:function(e){t.showInfo=!1}}}):t._e(),t._v(" "),e("main",{class:{divine:t.score>=990&&t.valid}},[e("header",[e("h1",{class:{on:!t.start}},[e("span",[t._v("Can you draw a")]),t._v(" "),t._m(0)]),t._v(" "),e("button",{class:{on:!t.start},on:{click:t.onGoClick}},[t._v("Go")])]),t._v(" "),e("section",{class:{"best-score":t.newBestScore},style:{"--score-color":t.scoreColor}},[e("h2",{class:{on:!t.hasDrawn&&t.start}},[e("span",[t._v("Draw a circle")]),t._v(" "),e("span",[t._v("around this")])]),t._v(" "),e("svg",{ref:"svgContainer",class:{"svg-container-spin":t.score>=970&&t.valid},attrs:{"stroke-linecap":"round",fill:"none",viewBox:"0 0 1000 1000",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}}),t._v(" "),e("p",{directives:[{name:"show",rawName:"v-show",value:t.hasDrawn,expression:"hasDrawn"}],ref:"score",style:{color:t.scoreColor}},[e("span",[t._v(t._s(t.scoreString.charAt(0)))]),e("span",[t._v(t._s(t.scoreString.charAt(1)))]),e("span",[t._v(t._s(t.scoreString.charAt(2)))]),e("span"),e("span",[t._v(t._s(t.scoreString.charAt(3)))]),e("span",[t._v("%")])]),t._v(" "),e("div",{ref:"drawContainer"})]),t._v(" "),e("footer",{directives:[{name:"show",rawName:"v-show",value:!t.isDrawing,expression:"!isDrawing"}]},[t.showBest?e("p",[t._v("\n Best:"),e("span",{style:{color:t.bestColor}},[t._v(t._s(t.bestString))])]):e("p",{class:{blink:t.newBestScore,"blink-grow":t.newBestScore&&t.score>=960}},[t._v("\n "+t._s(t.message)+"\n ")])]),t._v(" "),e("div",{staticClass:"controls"},[e("img",{staticClass:"controls-icon",attrs:{src:"/perfect-circle/info.svg"},on:{click:function(e){t.showInfo=!0}}}),t._v(" "),e("img",{staticClass:"controls-icon",attrs:{src:"/perfect-circle/".concat(t.sound?"un":"","muted.svg")},on:{click:function(e){t.sound=!t.sound}}})])]),t._v(" "),t.valid?e("div",{staticClass:"share"},[e("button",{staticClass:"share-btn tweet",on:{click:t.tweet}},[t._v("Tweet")]),t._v(" "),e("button",{staticClass:"share-btn copy",on:{click:t.copy}},[t._v("\n "+t._s(t.copied?"Copied":"Copy")+"\n ")])]):t._e(),t._v(" "),e("img",{directives:[{name:"show",rawName:"v-show",value:t.score>=950&&t.valid,expression:"score >= 950 && valid"}],staticClass:"pinwheel",class:{"pinwheel-fast":t.score>=970},attrs:{src:"/perfect-circle/pinwheel.svg"}}),t._v(" "),t.score>=960&&t.valid?e("div",{staticClass:"vignette",class:{"vignette-legendary":t.score>=960&&t.valid}}):t._e()],1)}),[function(){var t=this,e=t._self._c;return e("span",[e("strong",[t._v("perfect")]),t._v(" circle"),e("strong",[t._v("?")])])}],!1,null,"568d841e",null));e.default=D.exports;installComponents(D,{Header:r(301).default,Footer:r(295).default})},276:function(t,e,r){"use strict";var n=r(2),o=r(19),d=r(9),c=r(6),path=r(204),l=r(4),f=r(109),h=r(12),m=r(201),v=r(39),x=r(81),w=r(202),y=r(3),k=r(80).f,_=r(29).f,C=r(21).f,z=r(281),M=r(282).trim,S="Number",A=c[S],E=path[S],I=A.prototype,D=c.TypeError,N=l("".slice),L=l("".charCodeAt),F=function(t){var e=w(t,"number");return"bigint"==typeof e?e:R(e)},R=function(t){var e,r,n,o,d,c,l,code,f=w(t,"number");if(x(f))throw D("Cannot convert a Symbol value to a number");if("string"==typeof f&&f.length>2)if(f=M(f),43===(e=L(f,0))||45===e){if(88===(r=L(f,2))||120===r)return NaN}else if(48===e){switch(L(f,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+f}for(c=(d=N(f,2)).length,l=0;lo)return NaN;return parseInt(d,n)}return+f},j=f(S,!A(" 0o1")||!A("0b1")||A("+0x1")),T=function(t){return v(I,t)&&y((function(){z(t)}))},$=function(t){var e=arguments.length<1?0:A(F(t));return T(this)?m(Object(e),this,$):e};$.prototype=I,j&&!o&&(I.constructor=$),n({global:!0,constructor:!0,wrap:!0,forced:j},{Number:$});var W=function(t,source){for(var e,r=d?k(source):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0;r.length>n;n++)h(source,e=r[n])&&!h(t,e)&&C(t,e,_(source,e))};o&&E&&W(path[S],E),(j||o)&&W(path[S],A)},277:function(t,e,r){var content=r(286);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("f68e4eaa",content,!0,{sourceMap:!1})},278:function(t,e,r){var content=r(291);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("db35a8f0",content,!0,{sourceMap:!1})},279:function(t,e,r){var content=r(294);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("c9434642",content,!0,{sourceMap:!1})},280:function(t,e,r){"use strict";r.r(e);r(276);var n={props:{slotId:{type:String,required:!0},adFormat:{type:String,required:!0},isResponsive:{type:Boolean,required:!1,default:!1},adStyle:{type:String,required:!0},minWidth:{type:Number,required:!1,default:-1},maxWidth:{type:Number,required:!1,default:-1}},data:function(){return{hideAd:!1,shouldShow:this.shouldShowAd()}},mounted:function(){var t=this;this.createAds(),this.$addEventListener("resize",(function(){t.hideAd=!t.shouldShowAd()}))},watch:{$route:function(){this.firstLoad=!1,this.createAds()}},methods:{createAds:function(){var t=this;this.$nextTick((function(){t.shouldShowAd()&&(window.adsbygoogle=window.adsbygoogle||[],adsbygoogle.push({}))}))},shouldShowAd:function(){return(-1===this.minWidth||window.innerWidth>=this.minWidth)&&(-1===this.maxWidth||window.innerWidth254)return!1;if(!n.test(t))return!1;var e=t.split("@");return!(e[0].length>64)&&!e[1].split(".").some((function(t){return t.length>63}))}},290:function(t,e,r){"use strict";r(278)},291:function(t,e,r){var n=r(107)(!1);n.push([t.i,".link{border-radius:19px;aspect-ratio:391/145;display:block;position:relative;z-index:2}.link-img{max-width:100%;cursor:pointer;transition:transform .07s linear,filter .1s ease-out,opacity .15s linear;opacity:0}.link-img:hover{transform:scale(1.02);filter:drop-shadow(3px 3px 5px rgba(0,0,0,.17))}",""]),t.exports=n},292:function(t,e,r){"use strict";r.r(e);var n={props:{title:{required:!0,type:String},path:{required:!0,type:String},preload:{required:!1,type:Boolean,default:!1}},data:function(){return{imageLoaded:!1}}},o=(r(290),r(28)),component=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("nuxt-link",{staticClass:"link",style:{background:t.imageLoaded?"none":"#f1f2f6"},attrs:{prefetch:t.preload,to:"/".concat(t.path,"/")}},[e("img",{staticClass:"link-img",style:{opacity:t.imageLoaded?1:0},attrs:{onload:t.imageLoaded=!0,alt:t.title,src:"/link-images/".concat(t.path,".svg"),loading:"lazy"}})])}),[],!1,null,null,null);e.default=component.exports},293:function(t,e,r){"use strict";r(279)},294:function(t,e,r){var n=r(107),o=r(200),d=r(288),c=n(!1),l=o(d);c.push([t.i,"@font-face{font-family:RobotoCondensedLight;src:url("+l+")}.footer-wrapper[data-v-2b1aca38]{margin-top:15px;padding:30px 20px 45px;text-align:center;font-size:22px;font-family:RobotoCondensedLight,sans-serif}.related-text[data-v-2b1aca38]{font-size:22px}.site-title[data-v-2b1aca38]{margin-top:18px;max-width:140px}.related-posts[data-v-2b1aca38],.site-title[data-v-2b1aca38]{margin-left:auto;margin-right:auto}.related-posts[data-v-2b1aca38]{display:grid;max-width:870px;grid-template-columns:repeat(2,1fr);grid-gap:16px 18px;margin-top:15px;font-size:0}.made-by[data-v-2b1aca38]{font-size:16px;margin-top:15px;opacity:.6;display:none}.made-by a[data-v-2b1aca38]{color:#000}.heart[data-v-2b1aca38]{width:17px;height:17px;position:relative;top:4px}.site-title-logo[data-v-2b1aca38]{height:25px}.newsletter-text[data-v-2b1aca38]{font-size:19px;margin-bottom:8px}.newsletter-img[data-v-2b1aca38]{height:16px;position:relative;top:3px;margin-right:7px}.newsletter-input[data-v-2b1aca38]{font-size:17px;padding:7px 5px 7px 40px;border-radius:5px;border:1px solid #000;max-width:220px;width:100%;background-color:#fff;background-image:url(/general/mail.svg);background-repeat:no-repeat;background-size:auto 15px;background-position:10px;font-family:RobotoCondensedLight;outline:none;color:#000}.newsletter-input[data-v-2b1aca38]::-moz-placeholder{color:rgba(0,0,0,.8)}.newsletter-input[data-v-2b1aca38]::placeholder{color:rgba(0,0,0,.8)}.newsletter-subscribe[data-v-2b1aca38]{background:#fff5d9;font-size:17px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;border:1px solid #000;border-radius:5px;padding:7px 12px;margin-left:5px;height:100%;cursor:pointer;color:#000;font-family:RobotoCondensedLight}.newsletter-subscribe[data-v-2b1aca38]:hover{transform:scale(1.03)}.newsletter-box[data-v-2b1aca38]{padding:20px 10px;border-radius:5px;margin-left:auto;margin-right:auto;margin-top:10px}.newsletter-inner[data-v-2b1aca38]{display:flex;justify-content:center;height:42px}@media only screen and (max-width:700px){.footer-wrapper[data-v-2b1aca38]{padding-left:12px;padding-right:12px}.related-posts[data-v-2b1aca38]{grid-template-columns:repeat(1,1fr)}.site-title[data-v-2b1aca38]{max-width:145px;margin-top:25px}}",""]),t.exports=c},295:function(t,e,r){"use strict";r.r(e);var n,o=r(284),d=r(10),c=(r(45),r(15),r(203),r(60),r(297)),l=r.n(c),f=r(289),h={props:{color:{type:String,required:!1,default:"black"},bg:{type:String,required:!1,default:"white"}},data:function(){return{related:[],submittedEmail:!1,email:""}},mounted:function(){this.getRelated()},computed:{isValidEmail:function(){return f.validate(this.email)}},methods:{onEmailSubmit:(n=Object(d.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isValidEmail){t.next=4;break}return this.submittedEmail=!0,t.next=4,l()({url:"https://neal.fun/api/newsletter/subscribe",method:"POST",data:{email:this.email}});case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)}),getRelated:function(){var t=window.innerWidth>500?4:3,e=Object(o.a)(this.$store.state.posts),r=this.$route.path;e=e.filter((function(t){return"/".concat(t.path,"/")!==r&&!t.hidden&&!t.hideInRecommended}));for(var n=[],d=0;d=900?e("Ad",{attrs:{slotId:"8007340466",adStyle:"display: block; width: 728px; height: 90px; margin-left: auto;",adFormat:"none",isResponsive:!1,minWidth:960}}):t._e()],1)])}),[],!1,null,"d53c391a",null);e.default=component.exports;installComponents(component,{Logo:r(287).default,Ad:r(280).default})},337:function(t,e,r){"use strict";var n=r(2),o=r(4),d=r(49),c=r(281),l=r(207),f=r(3),h=RangeError,m=String,v=Math.floor,x=o(l),w=o("".slice),y=o(1..toFixed),k=function(t,e,r){return 0===e?r:e%2==1?k(t,e-1,r*t):k(t*t,e/2,r)},_=function(data,t,e){for(var r=-1,n=e;++r<6;)n+=t*data[r],data[r]=n%1e7,n=v(n/1e7)},C=function(data,t){for(var e=6,r=0;--e>=0;)r+=data[e],data[e]=v(r/t),r=r%t*1e7},z=function(data){for(var t=6,s="";--t>=0;)if(""!==s||0===t||0!==data[t]){var e=m(data[t]);s=""===s?e:s+x("0",7-e.length)+e}return s};n({target:"Number",proto:!0,forced:f((function(){return"0.000"!==y(8e-5,3)||"1"!==y(.9,0)||"1.25"!==y(1.255,2)||"1000000000000000128"!==y(0xde0b6b3a7640080,0)}))||!f((function(){y({})}))},{toFixed:function(t){var e,r,n,o,l=c(this),f=d(t),data=[0,0,0,0,0,0],v="",y="0";if(f<0||f>20)throw h("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return m(l);if(l<0&&(v="-",l=-l),l>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(l*k(2,69,1))-69)<0?l*k(2,-e,1):l/k(2,e,1),r*=4503599627370496,(e=52-e)>0){for(_(data,0,r),n=f;n>=7;)_(data,1e7,0),n-=7;for(_(data,k(10,n,1),0),n=e-1;n>=23;)C(data,1<<23),n-=23;C(data,1<0?v+((o=y.length)<=f?"0."+x("0",f-o)+y:w(y,0,o-f)+"."+w(y,o-f)):v+y}})},577:function(t,e,r){var content=r(1151);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("526956df",content,!0,{sourceMap:!1})},578:function(t,e,r){var content=r(1153);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("81f5e0fa",content,!0,{sourceMap:!1})},579:function(t,e,r){var content=r(1157);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(108).default)("c453da0e",content,!0,{sourceMap:!1})}}]);