1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1286],{47421:function(e,t,r){var l=r(85893),o=r(67294),n=r(15313),a=r(11163),d=r.n(a),i=r(21932);t.Z=e=>{let{children:t}=e,{userReducer:{loggedInUserData:{userId:r,userName:a},isUserLoggedIn:s}}=(0,n.v9)(e=>e),[c,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{(async()=>{s?u(!1):u(!0)})()},[s,r]),(0,l.jsxs)("div",{className:"w-full bg-white m-0 p-0",children:[(0,l.jsx)(i.Z,{open:c,setOpen:()=>{u(!0),d().back()},title:"Please login to continue"}),t]})}},58223:function(e,t,r){r.d(t,{Z:function(){return b}});var l=r(85893),o=r(67294),n=r(11163),a=r(72132),d=r(52790),i=r(18289),s=e=>{let{markdown:t,label:r="Copy markdown"}=e,o=(0,n.useRouter)(),s="https://ihatereading.in".concat(o.asPath.split("?")[0]),c=async(e,t)=>{try{await navigator.clipboard.writeText(e),a.Am.success(t)}catch(e){a.Am.error("Could not copy to clipboard")}};return(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-white px-3 py-1.5 text-sm font-medium text-foreground shadow-sm transition-colors hover:bg-muted",onClick:()=>c(s,"Page URL copied"),children:[(0,l.jsx)(d.Z,{size:14}),"Share URL"]}),(0,l.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md bg-black px-3 py-1.5 text-sm font-medium text-white shadow-sm transition-opacity hover:opacity-90",onClick:()=>c(t||"","Markdown copied for AI agents"),children:[(0,l.jsx)(i.Z,{size:14}),r]})]})},c=e=>{let{title:t,markdown:r,category:o,breadcrumb:n,description:a,meta:d}=e;return(0,l.jsxs)("header",{className:"mb-10 border-b border-border/60 pb-8",children:[n,o&&!n?(0,l.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:o}):null,(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-x-4 gap-y-4",children:[(0,l.jsx)("h1",{className:"min-w-0 flex-1 text-3xl font-semibold tracking-tight text-foreground sm:text-4xl",children:t}),(0,l.jsx)("div",{className:"ml-auto shrink-0",children:(0,l.jsx)(s,{markdown:r})})]}),a&&(0,l.jsx)("p",{className:"mt-4 max-w-2xl text-base leading-relaxed text-muted-foreground",children:a}),d]})},u=e=>{let{editorThreads:t=[],renderBlock:r}=e;return(null==t?void 0:t.length)?(0,l.jsx)("div",{className:"roadmap-content space-y-6 text-[15px] leading-7 text-foreground/90 [&_[id]]:scroll-mt-24 [&_h1]:text-2xl [&_h1]:font-semibold [&_h1]:tracking-tight [&_h1]:text-foreground [&_h1]:mt-10 [&_h1]:mb-4 [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:tracking-tight [&_h2]:text-foreground [&_h2]:mt-10 [&_h2]:mb-3 [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mt-8 [&_h3]:mb-2 [&_p]:my-4 [&_p]:text-foreground/85 [&_ul]:my-4 [&_ul]:list-disc [&_ul]:space-y-2 [&_ul]:pl-5 [&_ol]:my-4 [&_ol]:list-decimal [&_ol]:space-y-2 [&_ol]:pl-5 [&_li]:text-foreground/85 [&_a]:font-medium [&_a]:text-foreground [&_a]:underline [&_a]:underline-offset-4 [&_a]:decoration-foreground/30 hover:[&_a]:decoration-foreground [&_pre]:my-6 [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-border [&_pre]:bg-muted/50 [&_img]:my-6 [&_img]:rounded-lg [&_table]:my-6 [&_table]:w-full [&_table]:text-sm [&_blockquote]:my-6 [&_blockquote]:border-l-2 [&_blockquote]:border-foreground
1/20 [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground",children:t.map((e,t)=>(0,l.jsx)("div",{className:"roadmap-block",children:e&&r(e,t)},(null==e?void 0:e.id)||t))}):null},m=r(61258),p=r(4307),h=r(94967);let x=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Overview",l=[{href:"/roadmap/".concat(e),title:r}];return t.forEach(t=>{l.push({href:(0,h.roadmapChapterPath)(e,t),title:t.name||t.title||"Chapter"}),(t.childrens||[]).forEach(r=>{l.push({href:(0,h.roadmapChapterPath)(e,r,t),title:r.name||r.title||"Lesson"})})}),l};var g=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Overview",l=(0,n.useRouter)(),a=(0,o.useMemo)(()=>x(e,t,r),[e,t,r]),d=l.asPath.split("?")[0],i=a.findIndex(e=>e.href===d),s=i>0?a[i-1]:null,c=i>=0&&i<a.length-1?a[i+1]:null;return{prev:s,next:c,go:e=>{let t=e<0?s:c;t&&l.push(t.href)},flat:a}},f=e=>{let{parentSlug:t,orderedChapters:r=[],parentTitle:o}=e,a=(0,n.useRouter)(),{prev:d,next:i}=g(t,r,o);return d||i?(0,l.jsxs)("nav",{className:"mt-14 grid grid-cols-1 gap-4 border-t border-border pt-8 sm:grid-cols-2","aria-label":"Chapter navigation",children:[d?(0,l.jsxs)("button",{type:"button",onClick:()=>a.push(d.href),className:"group rounded-xl border border-border bg-white p-5 text-left transition-colors hover:border-foreground
1/25 hover:bg-muted/40",children:[(0,l.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground line-clamp-2",children:d.title}),(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground group-hover:text-foreground",children:[(0,l.jsx)(m.Z,{size:14}),"Previous"]})]}):(0,l.jsx)("div",{}),i?(0,l.jsxs)("button",{type:"button",onClick:()=>a.push(i.href),className:"group rounded-xl border border-border bg-white p-5 text-right transition-colors hover:border-foreground/25 hover:bg-muted/40 sm:col-start-2",children:[(0,l.jsx)("p",{className:"mb-2 text-sm font-medium text-foreground line-clamp-2",children:i.title}),(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground group-hover:text-foreground",children:["Next",(0,l.jsx)(p.Z,{size:14})]})]}):null]}):null},b=e=>{let{title:t,markdown:r,parentSlug:o,parentTitle:n,orderedChapters:a=[],editorThreads:d=[],category:i,breadcrumb:s,description:m,meta:p,beforeContent:h,renderBlock:x}=e;return(0,l.jsxs)("article",{children:[(0,l.jsx)(c,{title:t,markdown:r,category:i,breadcrumb:s,description:m,meta:p}),h,(0,l.jsx)(u,{editorThreads:d,renderBlock:x}),(0,l.jsx)(f,{parentSlug:o,orderedChapters:a,parentTitle:n})]})}},37475:function(e,t,r){var l=r(85893);r(67294),t.Z=e=>{let{sidebar:t,children:r,toc:o}=e;return(0,l.jsx)("div",{className:"mx-auto w-full max-w-[1440px] px-4 lg:px-8",children:(0,l.jsxs)("div",{className:"flex items-start gap-0",children:[t,(0,l.jsx)("div",{className:"min-w-0 flex-1 px-0 pb-16 pt-6 sm:px-4 lg:px-10 lg:pt-8",children:(0,l.jsx)("div",{className:"mx-auto w-full max-w-3xl",children:r})}),o]})})}},29468:function(e,t,r){var l=r(85893),o=r(67294),n=r(33243);t.Z=e=>{var t;let{headings:r=[]}=e,[a,d]=(0,o.useState)((null===(t=r[0])||void 0===t?void 0:t.id)||"");return((0,o.useEffect)(()=>{if(!r.length)return;let e=r.map(e=>document.getElementById(e.id)).filter(Boolean);if(!e.length)return;let t=new IntersectionObserver(e=>{var t,r;let l=e.filter(e=>e.isIntersecting).sort((e,t)=>t.intersectionRatio-e.intersectionRatio);(null===(r=l[0])||void 0===r?void 0:null===(t=r.target)||void 0===t?void 0:t.id)&&d(l[0].target.id)},{rootMargin:"-80px 0px -70% 0px",threshold:[0,.25,.5,1]});return e.forEach(e=>t.observe(e)),()=>t.disconnect()},[r]),r.length)?(0,l.jsxs)("aside",{className:"hidden xl:block w-52 shrink-0 sticky top-14 h-[calc(100vh-3.5rem)] overflow-y-auto px-4 py-8","aria-label":"Table of contents",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm font-medium text-foreground",children:[(0,l.jsx)(n.Z,{size:15,className:"text-muted-foreground"}),"On this page"]}),(0,l.jsx)("ul",{className:"space-y-1 border-l border-border",children:r.map(e=>{let t=a===e.id,r=e.level>2?"pl-6":"pl-4";return(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"#".concat(e.id),onClick:()=>d(e.id),className:"block py-1 text-sm leading-snug transition-colors ".concat(r," ").concat(t?"font-medium text-foreground border-l-2 border-foreground -ml-px":"text-muted-foreground hover:text-foreground"),children:e.text})},e.id)})})]}):null}},70842:function(e,t,r){var l=r(85893),o=r(67294),n=r(89856),a=r(49834),d=r(7001),i=r(78497),s=r(11163),c=r.n(s);t.Z=e=>{let{activeRoadmapTemplate:t,parentSlug:r,firestoreId:s,allRoadmaps:u=[]}=e,[m,p]=(0,o.useState)(!1),h=(null==t?void 0:t.name)||(null==t?void 0:t.title),x=u.filter(e=>e.id!==s),g=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.Z,{chapters:null==t?void 0:t.orderedChapters,parentSlug:r,parentTitle:h,editorThreads:null==t?void 0:t.editorThreads,nestedChildrens:null==t?void 0:t.nestedChildrens}),x.length>0&&(0,l.jsxs)("div",{className:"mt-10 border-t border-border/60 pt-6",children:[(0,l.jsx)("p",{className:"mb-3 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Other roadmaps"}),(0,l.jsx)("ul",{className:"flex flex-col gap-0.5",children:x.map(e=>(0,l.jsx)("li",{children:(0,l.jsx)("button",{type:"button",className:"w-full rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",onClick:()=>c().push("/roadmap/".concat(e.publicSlug||e.id)),children:e.name||e.title})},e.id))})]})]}),f=(0,l.jsxs)("aside",{className:"hidden lg:flex w-60 shrink-0 sticky top-14 h-[calc(100vh-3.5rem)] flex-col overflow-y-auto border-l border-r border-border bg-white px-4 py-6 hidescrollbar","aria-label":"Roadmap navigation",children:[(0,l.jsx)("p",{className:"mb-5 px-2 text-sm font-semibold text-foreground",children:h}),g]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"fixed bottom-5 right-5 z-50 lg:hidden",children:(0,l.jsx)(a.A,{size:"lg",variant:"filled",color:"dark",className:"rounded-full shadow-lg",onClick:()=>p(!0),"aria-label":"Open chapters",children:(0,l.jsx)(i.Z,{size:16})})}),f,(0,l.jsx)(d.d,{opened:m,onClose:()=>p(!1),position:"left",size:"xs",title:(0,l.jsx)("span",{className:"text-sm font-semibold",children:h}),classNames:{content:"bg-white",body:"px-4"},children:g})]})}}
1,89856:function(e,t,r){var l=r(85893),o=r(67294),n=r(11163),a=r(42171),d=r(4307),i=r(94967);let s=(e,t)=>!!t&&((null==e?void 0:e.id)===t||(null==e?void 0:e.chapterSlug)===t),c=e=>{let{node:t,parentSlug:r,parentChapter:o,depth:a,childParam:d,lastChildParam:c}=e,u=(0,n.useRouter)(),m=2===a,p=m?s(t,c):1===a&&s(t,d)&&!c,h=(0,i.roadmapChapterPath)(r,t,m?o:null);return(0,l.jsx)("button",{type:"button",onClick:()=>u.push(h),className:"block w-full rounded-md py-1.5 text-left text-sm leading-snug transition-colors ".concat(p?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),style:{paddingLeft:"".concat(8+(a-1)*12,"px"),paddingRight:"8px"},children:(null==t?void 0:t.title)||(null==t?void 0:t.name)})},u=e=>{var t;let{node:r,parentSlug:o,depth:n,childParam:d,lastChildParam:i}=e,u=(null==r?void 0:null===(t=r.childrens)||void 0===t?void 0:t.length)>0,m=s(r,d)||(r.childrens||[]).some(e=>s(e,i)),p=s(r,d);return u?(0,l.jsxs)("details",{className:"group",open:m,children:[(0,l.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-2 rounded-md py-1.5 pr-2 text-sm transition-colors [&::-webkit-details-marker]:hidden ".concat(p?"font-medium text-foreground":"text-muted-foreground hover:text-foreground"),style:{paddingLeft:"8px"},children:[(0,l.jsx)("span",{className:"truncate",children:(null==r?void 0:r.title)||(null==r?void 0:r.name)}),(0,l.jsx)(a.Z,{size:14,className:"shrink-0 text-muted-foreground transition-transform group-open:rotate-180"})]}),(0,l.jsxs)("div",{className:"mt-0.5 space-y-0.5 border-l border-border/70 ml-3 pl-1",children:[(0,l.jsx)(c,{node:r,parentSlug:o,depth:n,childParam:d,lastChildParam:i}),(r.childrens||[]).map(e=>(0,l.jsx)(c,{node:e,parentSlug:o,parentChapter:r,depth:n+1,childParam:d,lastChildParam:i},e.id))]})]}):(0,l.jsx)(c,{node:r,parentSlug:o,depth:n,childParam:d,lastChildParam:i})};t.Z=e=>{let{chapters:t=[],parentSlug:r,parentTitle:a,editorThreads:i,nestedChildrens:s}=e,c=(0,n.useRouter)(),{childId:m,lastChildId:p,id:h}=c.query,x=!m&&!p,g=(0,o.useMemo)(()=>{if(null==t?void 0:t.length)return t;let e=[];(i||[]).forEach((t,r)=>{var l;"page"===t.type&&(null===(l=t.data)||void 0===l?void 0:l.childId)&&e.push({orderNumber:r,id:t.data.childId})});let r=(s||[]).map(t=>{let r=e.find(e=>e.id===t.id);return r?{...t,orderNumber:r.orderNumber}:null}).filter(Boolean).sort((e,t)=>e.orderNumber-t.orderNumber);return r.length>0?r:(s||[]).map((e,t)=>({...e,orderNumber:t}))},[t,i,s]);return(0,l.jsxs)("nav",{className:"flex flex-col gap-1","aria-label":"Roadmap chapters",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>c.push("/roadmap/".concat(r||h)),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors ".concat(x?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,l.jsx)(d.Z,{size:14,className:"shrink-0 opacity-50"}),(0,l.jsx)("span",{className:"truncate",children:a||"Overview"})]}),g.map(e=>(0,l.jsx)(u,{node:e,parentSlug:r,depth:1,childParam:m,lastChildParam:p},e.id))]})}},78090:function(e,t,r){r.d(t,{a:function(){return o}});let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(e).replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").trim()},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],r=e=>{(e||[]).forEach(e=>{var o,n,a;(null==e?void 0:e.type)==="header"&&(null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.text)&&t.push({id:e.id,text:l(e.data.text),level:Number(e.data.level)||2}),(null==e?void 0:null===(a=e.data)||void 0===a?void 0:null===(n=a.blocks)||void 0===n?void 0:n.length)&&r(e.data.blocks)})};return r(e),t.filter(e=>e.id&&e.text)}},81198:function(e,t,r){var l=r(67294),o=r(15313),n=r(21912);t.Z=e=>{let t=(0,o.I0)();(0,l.useEffect)(()=>{var r;e&&((null===(r=e.allRoadmaps)||void 0===r?void 0:r.length)&&t({type:n.td,payload:e.allRoadmaps}),e.parent&&t({type:n.fb,payload:e.parent}))},[e,t])}},25146:function(e,t,r){let{toIso:l}=r(19059),o="https://ihatereading.in";e.exports={buildCourseJsonLd:e=>{let{parent:t,publicSlug:r,pageData:n,childSlug:a,lastChildSlug:d}=e,i="".concat(o,"/roadmap/").concat(r),s=((null==t?void 0:t.orderedChapters)||(null==t?void 0:t.nestedChildrens)||[]).map((e,t)=>({"@type":"Chapter",position:t+1,name:e.name||e.title,url:"".concat(i,"/").concat(e.chapterSlug||e.id)})),c=d?"".concat(i,"/").concat(a,"/").concat(d):a?"".concat(i,"/").concat(a):i,u=(null==n?void 0:n.name)||(null==n?void 0:n.title)||(null==t?void 0:t.name)||(null==t?void 0:t.t
1itle)||"Roadmap";return{"@context":"https://schema.org","@type":"Course",name:(null==t?void 0:t.name)||(null==t?void 0:t.title)||"Roadmap",description:(null==t?void 0:t.description)||"",url:i,provider:{"@type":"Organization",name:"iHateReading",url:o},hasCourseInstance:{"@type":"CourseInstance",courseMode:"online",instructor:{"@type":"Organization",name:"iHateReading"}},...s.length>0&&{hasPart:s},...n&&{mainEntityOfPage:{"@type":"WebPage","@id":c,name:u,description:n.description||(null==t?void 0:t.description)||"",dateModified:l(n.lastEditedAt||(null==t?void 0:t.lastEditedAt))||void 0}}}},SITE: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.