PageSourceSearch

https://www.learnbydo.ing/_next/static/chunks/app/blog/page-dfed1209560c858c.js

js learnbydo.ing collected 2026-09-25 21:06:02 UTC 10,092 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9404],{88840:function(e,t,r){Promise.resolve().then(r.bind(r,40582)),Promise.resolve().then(r.bind(r,36663)),Promise.resolve().then(r.t.bind(r,18283,23)),Promise.resolve().then(r.t.bind(r,26517,23))},81757:function(e,t,r){"use strict";r.d(t,{Io:function(){return a},Js:function(){return n},kn:function(){return l}});var s=r(36432);let a=s.z.string().email({message:"Email is not valid"}),n=s.z.string().min(6,{message:"Password must be at least 6 characters long"}).max(30,{message:"Password must not exceed 30 characters"}).regex(/[a-zA-Z]/,{message:"Password must contain at least one letter"}).regex(/[0-9]/,{message:"Password must contain at least one number"}),l=s.z.object({email:a,password:n})},43272:function(e,t,r){"use strict";r.d(t,{default:function(){return h}});var s=r(35166),a=r(81757),n=r(17550),l=r(18527),i=r(33830),o=r(12682),c=r(87686),d=r(46675),u=r(85436),m=r(45504),g=r(3109);function h(e){var t,r,h,x;let f=(0,u.useSearchParams)().get("email"),{enableTitle:p=!0,enableSubscribeNewsletter:y=!0,buttonLabel:b="Register New Account",apiURL:v="/api/auth/register"}=e,[j,k]=(0,m.useState)(f||""),[w,N]=(0,m.useState)(""),[S,C]=(0,m.useState)(!1),[P,F]=(0,m.useState)(null),[R,T]=(0,m.useState)(!1),[Z,z]=(0,m.useState)(!1),[E,L]=(0,m.useState)(!1),[D,_]=(0,m.useState)(!1),[O,A]=(0,m.useState)(!1),I=async t=>{t.preventDefault(),F(null),C(!0);try{let t=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:j.toLowerCase(),password:w,subscribeNewsletter:E,previousURl:(0,c.Jn)()})});if(!t.ok)return t.json().then(t=>{F(t.error||(null==t?void 0:t.message)||"server error"),C(!1),e.onRegistrationFailure&&e.onRegistrationFailure()});console.log("Registration Successful",t),T(!0),C(!1),e.onRegistrationSuccess&&e.onRegistrationSuccess(j)}catch(t){F(t.message),C(!1),e.onRegistrationFailure&&e.onRegistrationFailure()}},M=a.kn.safeParse({email:j,password:w}),$=!!(null===(t=M.error)||void 0===t?void 0:t.issues.filter(e=>e.path.includes("email")).length),B=!!(null===(r=M.error)||void 0===r?void 0:r.issues.filter(e=>e.path.includes("password")).length);return(j.length,w.length,e.onRegistrationSuccess&&R)?null:(0,s.jsx)(s.Fragment,{children:R?(0,s.jsxs)("div",{className:"p-3 flex flex-col gap-3 items-center ",children:[(0,s.jsxs)("div",{className:"text-center text-yellow-400",children:["We sent you an email to ",(0,s.jsxs)("span",{className:"font-bold",children:[" ",j," "]})]}),(0,s.jsx)("div",{className:"text-3xl ",children:"Confirm your registration!"}),(0,s.jsx)("div",{className:"text-sm text-center",children:"it usually arrives in a few seconds but it may take 4-5 minutes. Also check your SPAM folder too"}),(0,s.jsx)(o.default,{}),(0,s.jsx)("div",{className:"italic text-center",children:"...and if you haven't received it within 10 minutes:"}),(0,s.jsx)(n.Z,{email:j})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[P&&(0,s.jsx)("div",{className:"error-msg",children:P}),$&&D&&(0,s.jsx)("div",{className:"error-msg",children:null===(h=M.error)||void 0===h?void 0:h.issues.filter(e=>e.path.includes("email")).map((e,t)=>(0,s.jsx)("div",{children:e.message},t))}),B&&O&&(0,s.jsx)("div",{className:"error-msg",children:null===(x=M.error)||void 0===x?void 0:x.issues.filter(e=>e.path.includes("password")).map((e,t)=>(0,s.jsx)("div",{children:e.message},t))})]}),(0,s.jsxs)("div",{className:"p-6 space-y-4 md:space-y-6 sm:p-8",children:[p&&(0,s.jsx)("h1",{className:"font-bold text-2xl md:text-3xl leading-tight tracking-tight text-gray-900  dark:text-white",children:"Create a new account"}),(0,s.jsxs)("form",{className:"space-y-4 md:space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"username",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Your email"}),(0,s.jsx)("input",{type:"email",name:"username",id:"username",className:"bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 autofill:bg-gray-600",placeholder:"[email protected]",autoComplete:"new-password",value:j,onChange:e=>{F(null),_(!0),k(e.target.value)}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"password",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Password"}),(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{type:Z?"text":"password",name:"password",id:"password",placeholder:"••••••••",className:"bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",autoComplete:"new-password",value:w,onChange:e=>{F(null),A(!0),N(e.target.value)}}),(0,s.jsx)("button",{type:"button","aria-label":"Show / Hide Password",className:"absolute top-0 end-0 p-3.5 rounded-e-md",onClick:()=>{z(e=>!e)},children:Z?(0,s.jsx)(g.I$m,{}):(0,s.jsx)(g.rCC,{})})]})})]}),y&&(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)("div",{className:"flex items-center h-5",children:(0,s.jsx)("input",{id:"stayupdated","aria-describedby":"subscribe newsletter",type:"checkbox",className:"w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-primary-600 dark:ring-offset-gray-800",checked:E,onChange:e=>L(e.target.checked)})}),(0,s.jsx)("div",{className:"ml-3 text-sm",children:(0,s.jsx)("label",{htmlFor:"stayupdated",className:"text-gray-500 dark:text-gray-300",children:"I want to stay updated on new features, courses and content"})})]}),(0,s.jsxs)(i.Z,{type:"submit",className:"w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 flex gap-2 items-center justify-center",onClick:I,disabled:S||R||!M.success,size:"lg",variant:"highlight",children:[b,S&&(0,s.jsx)(l.$,{})]}),(0,s.jsx)(o.default,{}),(0,s.jsxs)("p",{className:"text-sm font-light text-gray-500 dark:text-gray-300 text-center",children:["Do you already have an account? ",(0,s.jsx)("br",{}),(0,s.jsx)(d.default,{href:"/login",onClick:()=>(0,c.c$)(),className:"font-bold text-yellow-600 hover:underline dark:text-yellow-400 ",children:" Sign in!"})]})]})]})]})})}},40582:function(e,t,r){"use strict";r.d(t,{default:function(){return d}});var s=r(35166),a=r(43272),n=r(7347),l=r(97798),i=r(12682),o=r(87686),c=r(45504);function d(){return(0,c.useEffect)(()=>{(0,o.c$)()},[]),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)(i.default,{}),(0,s.jsxs)("div",{className:" mt-6",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(n.Z,{})}),(0,s.jsx)("h1",{className:"text-3xl sm:text-5xl hand-text text-sky-400",children:"Start today for free!"}),(0,s.jsx)("div",{className:"mt-2 text-xl",children:(0,s.jsxs)("div",{className:" my-6 max-w-96 mx-auto",children:["Create a LearnByDo.ing account for free to see all the ",(0,s.jsx)("span",{className:"font-bold",children:"protected content, get exclusive material, join giveaways, and use all the platform’s features"})]})})]}),(0,s.jsx)("div",{className:"relative max-w-[600px] mx-auto",children:(0,s.jsx)(l.Z,{className:"!bg-white dark:!bg-black",children:(0,s.jsx)(a.default,{enableTitle:!1})})})]})}},7347:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var s=r(35166),a=r(10084);let n={xxxs:70,xxs:80,xs:100,sm:150,md:250,xl:350,"2xl":450};function l(e){let{size:t="md",layout:r="horizontal",loading:l="lazy"}=e,i=n[t];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.default,{src:"/images/logo/logo-dark-mode.png",alt:"Logo Learn By Doing Dark Mode",width:i,height:.4654178674351585*i,className:"hidden dark:block",loading:l}),(0,s.jsx)(a.default,{src:"/images/logo/logo-light-mode.png",alt:"Logo Learn By Doing Light Mode",width:i,height:.4654178674351585*i,className:"dark:hidden",loading:l})]})}},36663:function(e,t,r){"use strict";r.d(t,{default:function(){return l}});var s=r(35166);r(46323);var a=r(9460),n=r(45504);
1function l(e){let t=(0,n.useRef)(null),[r,l]=(0,n.useState)(!0),{position:i="top"}=e;return((0,n.useEffect)(()=>{!function(){if(!window.ScrollTimeline){l(!1);return}l(!0);let e=t.current;e&&(e.style.transformOrigin="0% 50%",e.animate({transform:["scaleX(0)","scaleX(1)"]},{fill:"forwards",timeline:new ScrollTimeline({source:document.documentElement})}))}()},[]),r)?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{id:"progress",ref:t,className:(0,a.Z)({"top-0":"top"===i,"top-12":"underNavbar"===i})})}):null}},97798:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var s=r(35166),a=r(9460);function n(e){let{children:t,variant:r="default",className:n,shadow:l=!1,...i}=e;return(0,s.jsx)("section",{className:(0,a.Z)("lbd-handwritten-box  w-full "),...i,children:(0,s.jsx)("div",{className:(0,a.Z)("lined thick overflow-hidden",{shadow:l,tip:"tip"===r,warning:"warning"===r,success:"success"===r,info:"info"===r,danger:"danger"===r},n),children:e.children})})}r(73822)},19532:function(e,t,r){"use strict";r.d(t,{F:function(){return s},g:function(){return a}});let s=(0,r(60454).Ue)((e,t)=>({colorTheme:"dark",updateTheme:t=>{e(e=>({colorTheme:t}))},toggleTheme:()=>{e(e=>({colorTheme:"dark"===e.colorTheme?"light":"dark"}))}}));function a(){return"dark"!==localStorage.getItem("color-theme")&&("color-theme"in localStorage||!window.matchMedia("(prefers-color-scheme: dark)").matches)?"light":"dark"}},46323:function(){},73822:function(){}},function(e){e.O(0,[7966,9311,1566,1701,6543,6517,8283,6432,2259,3458,1358,8978,1744],function(){return e(e.s=88840)}),_N_E=e.O()}]);

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.