1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[399],{15776:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/enter-me",function(){return n(81103)}])},76138:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r,s,i=n(85893),a=n(67294),o=n(93967),l=n.n(o);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}var u=function(e){return a.createElement("svg",c({className:"spinner_svg__animate-spin spinner_svg__-ml-1 spinner_svg__mr-3 spinner_svg__h-5 spinner_svg__w-5 spinner_svg__text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),r||(r=a.createElement("circle",{className:"spinner_svg__opacity-25",cx:12,cy:12,r:10,stroke:"currentColor",strokeWidth:4})),s||(s=a.createElement("path",{className:"spinner_svg__opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})))};function m(e){var t=e.className,n=e.color,r=void 0===n?"text-white":n;return(0,i.jsx)(u,{className:l()("spinner animate-spin h-5 w-5",r,t)})}var d=n(73935),f=function(){return(0,i.jsx)("div",{className:"top-0 left-0 w-screen h-screen flex items-center justify-center bg-black bg-opacity-60 absolute",style:{zIndex:9999},children:(0,i.jsx)(m,{})})};function x(e){var t=e.loading,n=void 0!==t&&t,r=(0,a.useState)(!1),s=r[0],o=r[1];return(0,a.useEffect)((function(){o(!0)}),[]),s&&n?d.createPortal((0,i.jsx)(f,{}),document.querySelector("body")):null}},21955:function(e,t,n){"use strict";var r=n(85893),s=(n(67294),n(9008)),i=n.n(s);t.Z=function(e){var t=e.description,n=void 0===t?"NO MORE boring coding videos, courses and articles. Learn code in more fun, fast and effective way by playing coding games!":t,s=e.title,a=void 0===s?"Learn CSS, HTML and JavaScript by Playing Coding Games":s,o=e.og,l=void 0===o?"/images/seo/main-og-big.jpg":o,c=e.children,u=void 0===c?null:c,m=e.noindex,d=void 0!==m&&m;return(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:a}),(0,r.jsx)("meta",{name:"theme-color",content:"#111111"}),(0,r.jsx)("meta",{charSet:"utf-8"}),(0,r.jsx)("meta",{name:"description",content:n}),(0,r.jsx)("meta",{name:"og:title",content:a}),(0,r.jsx)("meta",{name:"og:description",content:n}),(0,r.jsx)("meta",{name:"og:type",content:"website"}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:creator",content:"@codingfantasy"}),(0,r.jsx)("meta",{name:"twitter:title",content:a}),(0,r.jsx)("meta",{name:"twitter:description",content:n}),(0,r.jsx)("meta",{name:"twitter:image",content:"https://codingfantasy.com".concat(l,"?4362984378")}),(0,r.jsx)("meta",{name:"og:image",content:"https://codingfantasy.com".concat(l,"?4362984378")}),(0,r.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),(0,r.jsx)("link",{rel:"icon",href:"/icon.png",type:"image/png",sizes:"32x32"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico",type:"image/x-icon"}),d&&(0,r.jsx)("meta",{name:"robots",content:"noindex"}),u]})}},81103:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return g}});var r=n(47568),s=n(97582),i=n(85893),a=n(67294),o=n(11163),l=n(58624),c=n(21955),u=n(76138),m=n(62461),d=n(30872),f=n(99530),x=n(1641);function g(){var e,t,n=(0,o.useRouter)(),g=null===n||void 0===n||null===(e=n.query)||void 0===e?void 0:e.authMode,h=null===n||void 0===n||null===(t=n.query)||void 0===t?void 0:t.redirectAfterTo,p=(0,a.useState)(""),v=p[0],w=p[1],y=(0,a.useState)(!0),j=y[0],_=y[1],b=(0,a.useState)(!1),N=b[0],k=b[1],E=(0,a.useCallback)(function(){var e=(0,r.Z)((function(e){var t,r,i,a,o,c,u,x;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,11,12]),[4,l.G.auth().signInWithEmailLink(e,window.location.href)];case 1:return(null===(r=s.sent())||void 0===r||null===(t=r.additionalUserInfo)||void 0===t?void 0:t.isNewUser)?(o={uid:null===(i=r.user)||void 0===i?void 0:i.uid,games:[],userName:(0,m.rD)()}
1,[4,l.G.firestore().collection("users").doc(null===(a=r.user)||void 0===a?void 0:a.uid).set(o)]):[3,8];case 2:s.sent(),(c=r.user).profile=o,s.label=3;case 3:return s.trys.push([3,6,,7]),[4,d.B.transferUnauthUserDataToAuthUser(c)];case 4:return s.sent(),[4,f.r.transferUnauthUserDataToAuthUser(c)];case 5:return s.sent(),[3,7];case 6:return u=s.sent(),console.error(u),[3,7];case 7:return window.localStorage.removeItem("emailForSignIn"),h?n.push(h):n.push("/games"),[3,9];case 8:n.push("/games"),s.label=9;case 9:return[3,12];case 10:return x=s.sent(),console.error(x),w(x.message),[3,12];case 11:return _(!1),[7];case 12:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),[h,n]);(0,a.useLayoutEffect)((function(){if(l.G.auth().isSignInWithEmailLink(window.location.href)){var e=window.localStorage.getItem("emailForSignIn");e?E(e):(k(!0),_(!1))}else _(!1),n.push("/games")}),[]);var S=(0,a.useCallback)(function(){var e=(0,r.Z)((function(e){var t;return(0,s.__generator)(this,(function(n){return e.preventDefault(),t=e.currentTarget.email.value,E(t),[2]}))}));return function(t){return e.apply(this,arguments)}}(),[E]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.Z,{loading:j}),(0,i.jsx)(c.Z,{noindex:!0}),(0,i.jsx)(x.Z,{onlyLogo:!0,withoutFooter:!0,children:(0,i.jsxs)(i.Fragment,{children:[j&&(0,i.jsx)("div",{className:"flex justify-center items-center min-h-screen h-full bg-black w-screen px-4",children:(0,i.jsx)("p",{className:"text-white lg:text-2xl text-xl",children:"signup"===g?"Creating your profile...":"Loading..."})}),(0,i.jsxs)("div",{className:"flex items-center flex-col min-h-screen h-full bg-black w-screen px-4",children:[N&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"w-full max-w-xl flex flex-col justify-center items-center",children:(0,i.jsx)("h2",{className:"mt-6 mb-6 text-center lg:text-3xl text-xl font-medium text-white",children:"Please enter your email address that you used to register for confirmation"})}),(0,i.jsxs)("form",{className:"w-full max-w-xs flex flex-col justify-center items-center mx-auto",onSubmit:S,children:[(0,i.jsx)("label",{htmlFor:"email",className:"sr-only",children:"Email address"}),(0,i.jsx)("input",{name:"email",type:"email",autoComplete:"email",required:!0,className:"relative mb-4 block w-full px-4 py-3 border rounded-md border-gray-100 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-yellow-500 focus:z-10",placeholder:"Your email"}),(0,i.jsx)("button",{type:"submit",className:"w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-yellow-600 hover:bg-yellow-700",children:"Confirm Email"})]})]}),v&&(0,i.jsx)("p",{className:"text-red-400 mt-4",children:v})]})]})})]})}}},function(e){e.O(0,[260,662,292,57,774,888,179],(function(){return t=15776,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=enter-me-82e36441d2719651.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.