@epic-web/workshop-app 6.76.4 → 6.76.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import{w as Be,b as le,O as ze,L as i,i as pe,u as ge,p as v}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{c as m,I as g,a as x,n as H,o as I}from"./misc-W4055b-0.js";import{r as C}from"./index-CqIc3cxq.js";import{a as Re}from"./pe-CIZUOJMr.js";import{u as ie,O as K}from"./onboarding-indicator-B-XR90_G.js";import{L as ee}from"./product-CvyMpYD_.js";import{u as Ve}from"./revalidation-ws-BJWJviUX.js";import{S as Y}from"./status-indicator-C6DiLYL5.js";import{D as Ue,f as Fe,a as We,b as Ye,d as qe}from"./dialog-CzO65Z5w.js";import{R as Qe,T as Ke,P as Oe,C as Je}from"./index-CmflCPTU.js";import{S as E,m as Ge,T as te,j as se,k as ne}from"./tooltip-Tlsyx2YO.js";import{c as G,b as Xe}from"./user-BsPobzjB.js";import{u as je}from"./workshop-config-Zfc8zU0x.js";import{u as be}from"./online-DiNLkgTC.js";import{u as ce,g as ve,p as Ze}from"./presence-VCvV2mg7.js";import{b as we,a as Ne}from"./root-loader-BOzEMapJ.js";import{b as Me,s as ye,c as et,d as tt,e as ke,f as Ee,m as f,u as st,g as nt}from"./progress-Bby-ybMA.js";import{T as O}from"./index-CdzVFL-Z.js";import"./schemas-Uj5SZtvt.js";import"./index-ynYvVAOK.js";import"./index-vDCSPjrM.js";import"./coerce-CkHW0SMv.js";function rt(t){t.values.forEach(n=>n.stop())}function ae(t,n){[...n].reverse().forEach(o=>{const r=t.getVariant(o);r&&ye(t,r),t.variantChildren&&t.variantChildren.forEach(l=>{ae(l,n)})})}function at(t,n){if(Array.isArray(n))return ae(t,n);if(typeof n=="string")return ae(t,[n]);ye(t,n)}function ot(){const t=new Set,n={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,o){const r=[];return t.forEach(l=>{r.push(Me(l,s,{transitionOverride:o}))}),Promise.all(r)},set(s){return t.forEach(o=>{at(o,s)})},stop(){t.forEach(s=>{rt(s)})},mount(){return()=>{n.stop()}}};return n}function oe(){const t=et(ot);return tt(t.mount,[]),t}function lt(t,n){function s(){return window.matchMedia(t).matches}function o(r){const l=window.matchMedia(t);return l.addEventListener("change",r),()=>{l.removeEventListener("change",r)}}return function(){return C.useSyncExternalStore(o,s,()=>n)}}function Ce({...t}){return e.jsx(Qe,{...t})}function J({...t}){return e.jsx(Ke,{...t})}function Pe({className:t,align:n="center",sideOffset:s=4,...o}){return e.jsx(Oe,{children:e.jsx(Je,{align:n,sideOffset:s,className:m("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-2 shadow-md outline-none",t),...o})})}const me=["opacity-70","opacity-80","opacity-90","opacity-100"],he=["shadow-[0_0_2px_0_rgba(0,0,0,0.3)]","shadow-[0_0_4px_0_rgba(0,0,0,0.3)]","shadow-[0_0_7px_0_rgba(0,0,0,0.3)]","shadow-[0_0_10px_0_rgba(0,0,0,0.3)]"];function xe(t){const n=Math.round(t*me.length-1),s=Math.round(t*he.length-1);return m("shadow-highlight hover:opacity-100 focus:opacity-100",me[n]??"opacity-60",he[s]??"shadow-none",t===1?"animate-pulse hover:animate-none focus:animate-none":null)}function Se({isMenuOpened:t}){const n=G(),{users:s}=ce(),{product:{displayNameShort:o}}=je(),r=t?17:0,l=s.length-r,h=l>(t?1:0);if(!s.length)return null;const d=t&&s.length===1?e.jsx(i,{target:"_blank",rel:"noopener noreferrer",to:"https://www.youtube.com/watch?v=w6Q3mHyzn78",children:e.jsx("img",{alt:"Tiffany Tunes",className:m("h-8 w-8 rounded-full border object-cover",xe(1)),src:"/img/tiffany.png"})}):null,p=`${l}${t?" more ":" "}${o} Dev${l===1?"":"s"} working now`;return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.jsxs(Ge,{children:[(h?s.slice(0,r):s).map(({user:u,score:D})=>{const P=xe(D),w=ct(u),A=u.imageUrlSmall||u.avatarUrl,S=u.hasAccess,_=w.some(y=>y.origin?.includes("localhost")),T=dt(w),j=it(u.loggedInProductHosts);if(u.optOut)return e.jsxs(te,{children:[e.jsx(se,{asChild:!0,tabIndex:0,children:e.jsx("div",{className:"relative","aria-label":"Anonymous user (opted out)",children:e.jsx("div",{className:m("bg-muted flex h-8 w-8 items-center justify-center rounded-full border opacity-50"),children:e.jsx(g,{name:"User"})})})}),e.jsx(ne,{children:e.jsx("span",{className:"flex flex-col items-center justify-center gap-1",children:e.jsxs("span",{className:"flex items-center gap-1.5",children:[j?e.jsx("span",{className:"text-xs",children:j}):null,"Anonymous (opted out of sharing)"]})})})]},u.id);let L;return S?L=_?"working":"referencing":L=_?"previewing":"reviewing",e.jsxs(te,{children:[e.jsx(se,{asChild:!0,tabIndex:0,children:e.jsxs("div",{className:"relative","aria-label":u.name||`${o} Dev`,children:[A?e.jsx("img",{alt:u.name||o,className:m("h-8 w-8 rounded-full border object-cover",P),src:A}):e.jsx("div",{className:m("flex h-8 w-8 items-center justify-center rounded-full border",P),children:e.jsx(g,{name:"User"})}),T?e.jsx("span",{className:"absolute -top-1 -left-1 text-xs leading-none","aria-label":"Workshop products",children:T}):null]})}),e.jsx(ne,{children:e.jsxs("span",{className:"flex flex-col items-center justify-center gap-1",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[j?e.jsx("span",{className:"text-xs",children:j}):null,u.name||`${o} Dev`,w.length>0?` is ${L} ${D===1&&n?.id!==u.id?"with you":""} on`:null]}),w.map((y,V)=>{const b=ut(y);return b?e.jsxs("span",{className:m("flex flex-col items-center",w.length>1?"border-border mt-1 border-t pt-1 first:mt-0 first:border-t-0 first:pt-0":""),children:[b.line1?e.jsxs("span",{children:[ve(y.productHost)," ",b.line1]}):null,b.line2?e.jsx("span",{className:"text-muted-foreground text-xs",children:b.line2}):null]},`${y.workshopTitle}-${V}`):null})]})})]},u.id)}),d,h?e.jsxs(te,{children:[e.jsx(se,{asChild:!0,tabIndex:0,children:e.jsx("div",{"aria-label":p,className:m("bg-accent text-accent-foreground flex items-center justify-center rounded-full border text-xs",t?"h-8 w-8":"h-6 w-6"),children:e.jsx("span",{className:m("pointer-events-none truncate text-center",t?"w-8":"w-6"),children:t?`+${l}`:l})})}),e.jsx(ne,{children:p})]}):null]})})}function it(t){return!t||t.length===0?null:t.map(n=>Ze[n]).filter(Boolean).join(" ")}function ct(t){return t.locations&&t.locations.length>0?t.locations.filter(Boolean):t.location?[t.location]:[]}function dt(t){const n=new Set;for(const s of t)s.productHost&&n.add(s.productHost);return n.size===0?null:Array.from(n).map(s=>ve(s)).filter(Boolean).join("")}function Le(t){return t.some(n=>{const s=n.relativePath.split(/[\\/]/)[0];return s==="extra"||s==="example"||s==="examples"})}const Ie=lt("(min-width: 640px)",!0),Rt=Be(function(){const n=le(),s=G(),o=Ie(),r=Re(),[l,h]=C.useState(n.isMenuOpened);Ve({watchPaths:["./exercises/README.mdx","./extra","./example","./examples"]});function d(p){h(p),document.cookie=`es_menu_open=${p.toString()}; path=/; SameSite=Lax;`}return e.jsxs("div",{className:"flex flex-col",children:[s?null:e.jsx(ft,{}),r&&o?null:e.jsx(ht,{isMenuOpened:l,onMenuOpenChange:d}),e.jsxs("div",{className:m("flex grow flex-col sm:flex-row",{"h-[calc(100vh-128px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":!s,"h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))]":s,"h-[unset]":!o&&l}),children:[o?e.jsx(xt,{isMenuOpened:l,onMenuOpenChange:d}):null,e.jsx("div",{className:m("h-full w-full max-w-full sm:max-w-[calc(100%-56px)]",l?"hidden md:block":""),children:e.jsx(ze,{})})]})]})});function ut(t){if(!t)return null;const{exercise:n}=t,s=[n?[n.exerciseNumber,n.stepNumber].filter(Boolean).map(o=>o.toString().padStart(2,"0")).join("/"):null,n?.type].filter(Boolean).join(" - ");return{line1:t.workshopTitle,line2:s}}function ft(){const t=Ie(),{product:{host:n,displayName:s}}=je(),o=Xe(),[r,l]=ie("login-button"),h=e.jsx("div",{children:ENV.EPICSHOP_DEPLOYED?e.jsxs("div",{children:["This is the deployed version. ",e.jsxs(e.Fragment,{children:[e.jsx(i,{className:"underline",target:"_blank",rel:"noopener noreferrer",to:ENV.EPICSHOP_GITHUB_REPO,children:"Run locally"})," for full experience."]})," "]}):o?e.jsxs("div",{children:[e.jsx(i,{to:"/login",className:"underline",children:"Login"})," ","or"," ",e.jsx("a",{href:`https://${n}/login`,className:"underline",children:"join for free"})," ","for the full experience."]}):null});return e.jsx("div",{className:"from-highlight to-info text-info-foreground z-10 flex h-16 items-center justify-between border-b bg-linear-to-tr pl-4",children:t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden flex-1 flex-wrap items-center gap-4 sm:flex",children:[e.jsx(ee,{size:"lg",style:"monochrome"}),e.jsxs("div",{className:"flex flex-1 flex-wrap items-center",children:[e.jsxs("p",{className:"mr-2",children:["Welcome to the"," ",e.jsx(i,{to:`https://${n}`,className:"underline",target:"_blank",children:s})," ","Workshop app!"]}),h]})]}),o?null:e.jsxs("div",{className:"hidden h-full flex-col items-center sm:flex md:flex-row",children:[e.jsxs(i,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsxs("span",{className:"drop-shadow-sm",children:["Join ",s]}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(i,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"bg-info-foreground/20 hover:bg-info-foreground/30 relative flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold shadow-md transition",onClick:l,children:[e.jsx(g,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"}),r?e.jsx(K,{tooltip:"Login for the full experience!",size:"sm"}):null]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-4 sm:hidden",children:[e.jsx("a",{href:`https://${n}`,children:e.jsx(ee,{size:"lg",style:"monochrome"})}),e.jsxs(Ue,{children:[e.jsx(Fe,{children:e.jsx(g,{name:"Question",size:"lg",className:"animate-pulse"})}),e.jsxs(We,{children:[e.jsxs(Ye,{children:[e.jsx(ee,{size:"lg",style:"monochrome"}),e.jsx("span",{className:"text-lg font-semibold",children:s})]}),e.jsxs(qe,{children:["Welcome to the"," ",e.jsx(i,{to:`https://${n}`,className:"underline",children:s})," ","Workshop app!"]}),h]})]})]}),o?null:e.jsxs("div",{className:"flex h-full items-center",children:[e.jsxs(i,{to:`https://${n}`,target:"_blank",className:"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold",children:[e.jsx("span",{className:"drop-shadow-sm",children:"Join"}),e.jsx("span",{children:"↗︎"})]}),e.jsxs(i,{to:ENV.EPICSHOP_DEPLOYED?`https://${n}/login`:"/login",className:"bg-info-foreground/20 hover:bg-info-foreground/30 relative flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold shadow-md transition",onClick:l,children:[e.jsx(g,{name:"User",size:"lg"}),e.jsx("span",{className:"drop-shadow-sm",children:"Login"}),r?e.jsx(K,{tooltip:"Login for the full experience!",size:"sm"}):null]})]})]})})}const de={hidden:{opacity:0,x:-20},visible:{opacity:1,x:0}};function De({exerciseNumber:t,children:n}){const s=st(t);return e.jsx(f.li,{variants:de,className:m("py-[6px] first:pt-3 last:pb-3",s?`${s} before:border-t`:null),children:e.jsx("span",{className:"inline-block pl-2",children:n})})}function z({children:t,...n}){const s=nt(n);return e.jsx(f.li,{variants:de,className:m("py-[6px] first:pt-3 last:pb-3",s?`${s} before:border-t`:null),children:e.jsx("span",{className:"inline-block pl-2",children:t})})}function _e({children:t}){return e.jsx(f.li,{variants:de,className:"py-[6px] first:pt-3 last:pb-3",children:e.jsx("span",{className:"inline-block pl-2",children:t})})}const mt='relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""]';function R(t,n){return x(mt,n,{"bg-foreground text-background":t})}function ht({isMenuOpened:t,onMenuOpenChange:n}){const s=le(),o=we(),r=G(),l=ke(),h=Ee(),d=pe(),p=ge(),u=be(),{users:D}=ce(),[P,w]=ie("account-link"),A=Le(o),S=s.extras.find(c=>c.name===s.playground.appName),_=p.pathname==="/extra"||p.pathname.startsWith("/extra/"),T=!!S&&!_,j={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}},y=Ne().session.theme??"system",V={light:"Light",dark:"Dark",system:"System"}[y],[b,U]=C.useState(!1),q=!!s.sidecarStatus;return C.useEffect(()=>{q||U(!1)},[q]),e.jsx("nav",{className:"flex w-full border-b sm:hidden",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:m("flex items-center",{"flex-col":t,"h-14":!t}),children:[e.jsx(Te,{title:s.workshopTitle,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(f.div,{className:"scrollbar-thin scrollbar-thumb-scrollbar flex w-full grow flex-col justify-between overflow-x-auto p-6",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(f.ul,{variants:j,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(v,{prefetch:"intent",to:"/",className:({isActive:c})=>x("relative px-2 py-0.5 pr-3 text-2xl font-bold whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":c}),children:"Home"})}),s.exercises.map(({exerciseNumber:c,title:F,steps:$})=>{const X=c.toString().padStart(2,"0"),a=Number(d.exerciseNumber)===c,W=!a&&s.playground.exerciseNumber===c;return e.jsxs(De,{exerciseNumber:c,children:[e.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[e.jsxs(i,{prefetch:"intent",to:H(c),className:x("relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":a}),children:[e.jsxs("span",{className:"text-muted-foreground mr-1 align-super text-xs tabular-nums",children:[X,"."]}),e.jsx("span",{children:F})]}),W?e.jsx(i,{to:I(s.playground.exerciseNumber,s.playground.stepNumber,s.playground.type),prefetch:"intent",children:"🛝"}):null]}),a?e.jsxs(f.ul,{variants:j,initial:"hidden",animate:"visible",className:"mt-2 ml-4 flex flex-col",children:[e.jsx(z,{type:"instructions",exerciseNumber:c,children:e.jsx(i,{to:H(c),prefetch:"intent",className:x('after:bg-background relative px-2 py-0.5 pr-3 text-xl font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!d.stepNumber}),children:"Intro"})},c),$.filter(Boolean).map(({stepNumber:k,title:Z,problem:B,solution:Q})=>e.jsx(z,{type:"step",stepNumber:k,exerciseNumber:c,children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(i,{to:I(c,k),prefetch:"intent",className:"leading-tight font-semibold",children:[k.toString().padStart(2,"0"),"."," ",Z]}),e.jsxs("div",{className:"mt-0.5 ml-3 flex gap-1",children:[B&&e.jsxs(v,{to:I(c,k,"problem"),prefetch:"intent",className:({isActive:N})=>R(N),children:["Problem",B.name===s.playground.appName?" 🛝":""]}),Q&&e.jsxs(v,{to:I(c,k,"solution"),prefetch:"intent",className:({isActive:N})=>R(N),children:["Solution",Q.name===s.playground.appName?" 🛝":""]})]})]})},k)),e.jsx(z,{type:"finished",exerciseNumber:c,children:e.jsx(v,{to:H(c,"finished"),prefetch:"intent",className:({isActive:k})=>x('after:bg-background relative px-2 py-0.5 pr-3 text-base font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":k}),children:"📝 Elaboration"})})]}):null]},c)}),A?e.jsxs("span",{children:[e.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[e.jsx(v,{to:"/extra",prefetch:"intent",className:({isActive:c})=>x("relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":c}),children:"📚 Extras"}),T&&S?e.jsx(i,{to:`/extra/${S.dirName}`,prefetch:"intent",children:"🛝"}):null]}),_&&s.extras.length?e.jsx(f.ul,{variants:j,initial:"hidden",animate:"visible",className:"mt-2 ml-4 flex flex-col",children:s.extras.map(c=>e.jsx(_e,{children:e.jsxs(v,{to:`/extra/${c.dirName}`,prefetch:"intent",className:({isActive:F})=>R(F,"leading-tight font-semibold"),children:[c.title,c.name===s.playground.appName?" 🛝":""]})},c.dirName))}):null]}):null]}),e.jsx("div",{className:"mt-6",children:e.jsx(v,{to:"/finished",className:({isActive:c})=>x("relative text-lg font-bold whitespace-nowrap outline-none hover:underline focus:underline",{'after:bg-background bg-foreground text-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""]':c}),children:"📝 Workshop Feedback"})})]}),e.jsx("div",{className:"grow"}),u?null:e.jsx(E,{content:t?null:"You are offline",children:e.jsx("div",{className:m("flex h-14 animate-pulse items-center justify-start p-4",t?"w-full border-t":"border-l"),children:e.jsx(g,{name:"WifiNoConnection",className:"text-foreground-destructive",children:t?"You are offline":null})})}),e.jsx("div",{className:m("flex items-center justify-start p-4",t&&D.length>4?"min-h-14":"h-14",t?"w-full border-t":"border-l"),children:e.jsx(Se,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:r?e.jsx(E,{content:t?null:"Your account",children:e.jsxs(i,{className:m("relative flex h-14 shrink-0 items-center justify-start space-x-3 px-4 py-4 text-center no-underline hover:underline",{"border-l":!t,"w-full border-t":t}),to:"/account",onClick:w,children:[r.imageUrlSmall?e.jsx("img",{alt:r.name??r.email,src:r.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(g,{name:"User",className:"shrink-0",size:"lg"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"}),P?e.jsx(K,{tooltip:"View your account and preferences",size:"sm"}):null]})}):null,ENV.EPICSHOP_DEPLOYED?null:r&&l?e.jsx(E,{content:t?null:"Continue to next lesson",children:e.jsxs(i,{to:l,prefetch:"intent",className:x("flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(g,{name:"FastForward",className:"shrink-0",size:"md"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:r&&h?e.jsx(E,{content:t?null:"Practice a past lesson",children:e.jsxs(i,{to:h,prefetch:"intent",className:x("flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline"),children:[e.jsx(g,{name:"Refresh",className:"shrink-0",size:"md"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Practice a past lesson"}):e.jsx("span",{className:"sr-only",children:"Practice a past lesson"})]})}):null,e.jsx("div",{className:m("flex h-14 items-center justify-center gap-2 self-start p-4 sm:mb-4",{"w-full border-t":t,"w-14 border-l":!t}),children:t?e.jsxs(e.Fragment,{children:[e.jsx(O,{}),e.jsx(Ae,{status:s.sidecarStatus})]}):q?e.jsxs(Ce,{open:b,onOpenChange:U,children:[s.sidecarStatus?.hasFailure?e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Process error - click to see details",title:b?void 0:"Process error - click to see details",className:"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors",children:e.jsx(Y,{status:"failed"})})}):e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"More options",title:b?void 0:"More options",className:"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors",children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"5",cy:"10",r:"1.5",fill:"currentColor"}),e.jsx("circle",{cx:"10",cy:"10",r:"1.5",fill:"currentColor"}),e.jsx("circle",{cx:"15",cy:"10",r:"1.5",fill:"currentColor"})]})})}),e.jsxs(Pe,{side:"top",align:"start",className:"flex flex-col gap-1 p-2",children:[e.jsx(He,{themeLabel:V,disableTooltip:b}),s.sidecarStatus?e.jsxs(i,{to:"/admin",className:"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors",children:[e.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:e.jsx(Y,{status:s.sidecarStatus.hasFailure?"failed":"running"})}),e.jsxs("span",{className:"flex-1 text-left",children:["Sidecar process"," ",s.sidecarStatus.hasFailure?"error":"running"]})]}):null]})]}):e.jsx(O,{})})]})})})}const re=400;function Ae({status:t}){return t?e.jsx(E,{content:t.hasFailure?`${t.failureCount} sidecar${t.failureCount===1?"":"s"} failed`:"All sidecars running",children:e.jsx(i,{to:"/admin",className:"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors",children:e.jsx(Y,{status:t.hasFailure?"failed":"running"})})}):null}function xt({isMenuOpened:t,onMenuOpenChange:n}){const s=le(),o=we(),r=G(),l=ke(),h=Ee(),d=pe(),p=ge(),u=be(),{users:D}=ce(),[P,w]=ie("account-link"),A=Le(o),S=s.extras.find(a=>a.name===s.playground.appName),_=p.pathname==="/extra"||p.pathname.startsWith("/extra/"),T=!!S&&!_,j=s.exercises.find(a=>a.exerciseNumber===Number(d.exerciseNumber)),L=d.type==="solution"?j?.solutions.find(a=>a.stepNumber===Number(d.stepNumber)):d.type==="problem"?j?.problems.find(a=>a.stepNumber===Number(d.stepNumber)):null,y=oe(),V={close:{width:56},open:{width:re}},b={visible:{opacity:1,transition:{duration:.05,when:"beforeChildren",staggerChildren:.03}},hidden:{opacity:0}},U=C.useCallback(()=>{typeof window>"u"||window.dispatchEvent(new CustomEvent("toggle-keyboard-shortcuts"))},[]),c=Ne().session.theme??"system",F={light:"Light",dark:"Dark",system:"System"}[c],[$,X]=C.useState(!1);return e.jsx("nav",{className:"hidden border-r sm:flex",children:e.jsx(f.div,{initial:t?"open":"close",variants:V,animate:y,children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[e.jsx(Te,{title:s.workshopTitle,menuControls:y,isMenuOpened:t,setMenuOpened:n}),t&&e.jsxs(f.div,{style:{width:re},className:"scrollbar-thin scrollbar-thumb-scrollbar flex grow flex-col justify-between overflow-y-auto p-6",initial:{opacity:0},animate:{opacity:1},children:[e.jsxs(f.ul,{variants:b,initial:"hidden",animate:"visible",className:"flex flex-col",children:[e.jsx("span",{children:e.jsx(v,{prefetch:"intent",to:"/",className:({isActive:a})=>x("relative px-2 py-0.5 pr-3 text-2xl font-bold whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":a}),children:"Home"})}),s.exercises.map(({exerciseNumber:a,title:W,steps:k})=>{const Z=a.toString().padStart(2,"0"),B=Number(d.exerciseNumber)===a,Q=!B&&s.playground.exerciseNumber===a;return e.jsxs(De,{exerciseNumber:a,children:[e.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[e.jsxs(i,{prefetch:"intent",to:H(a),className:x("relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":B}),children:[e.jsxs("span",{className:"text-muted-foreground mr-1 align-super text-xs tabular-nums",children:[Z,"."]}),e.jsx("span",{children:W})]}),Q?e.jsx(i,{to:I(s.playground.exerciseNumber,s.playground.stepNumber,s.playground.type),prefetch:"intent",children:"🛝"}):null]}),B?e.jsxs(f.ul,{variants:b,initial:"hidden",animate:"visible",className:"mt-2 ml-4 flex flex-col",children:[e.jsx(z,{type:"instructions",exerciseNumber:a,children:e.jsx(i,{to:H(a),prefetch:"intent",className:x('after:bg-background relative px-2 py-0.5 pr-3 text-xl font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":!d.stepNumber}),children:"Intro"})},a),k.filter(Boolean).map(({stepNumber:N,title:$e,problem:ue,solution:fe})=>e.jsx(z,{type:"step",stepNumber:N,exerciseNumber:a,children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(i,{to:I(a,N),prefetch:"intent",className:"leading-tight font-semibold",children:[N.toString().padStart(2,"0"),"."," ",$e]}),e.jsxs("div",{className:"mt-0.5 ml-3 flex gap-1",children:[ue&&e.jsxs(v,{to:I(a,N,"problem"),prefetch:"intent",className:({isActive:M})=>R(M),children:["Problem",ue.name===s.playground.appName?" 🛝":""]}),fe&&e.jsxs(v,{to:I(a,N,"solution"),prefetch:"intent",className:({isActive:M})=>R(M),children:["Solution",fe.name===s.playground.appName?" 🛝":""]})]})]})},N)),e.jsx(z,{type:"finished",exerciseNumber:a,children:e.jsx(v,{to:H(a,"finished"),prefetch:"intent",className:({isActive:N})=>x('after:bg-background relative px-2 py-0.5 pr-3 text-base font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":N}),children:"📝 Elaboration"})})]}):null]},a)}),A?e.jsxs("span",{children:[e.jsxs("span",{className:"flex items-center gap-1 text-2xl font-bold",children:[e.jsx(v,{to:"/extra",prefetch:"intent",className:({isActive:a})=>x("relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline",'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""] hover:underline focus:underline',{"bg-foreground text-background":a}),children:"📚 Extras"}),T&&S?e.jsx(i,{to:`/extra/${S.dirName}`,prefetch:"intent",children:"🛝"}):null]}),_&&s.extras.length?e.jsx(f.ul,{variants:b,initial:"hidden",animate:"visible",className:"mt-2 ml-4 flex flex-col",children:s.extras.map(a=>e.jsx(_e,{children:e.jsxs(v,{to:`/extra/${a.dirName}`,prefetch:"intent",className:({isActive:W})=>R(W,"leading-tight font-semibold"),children:[a.title,a.name===s.playground.appName?" 🛝":""]})},a.dirName))}):null]}):null]}),e.jsx("div",{className:"mt-6",children:e.jsx(v,{to:"/finished",className:({isActive:a})=>x("relative text-lg font-bold whitespace-nowrap outline-none hover:underline focus:underline",{'after:bg-background bg-foreground text-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[""]':a}),children:"📝 Workshop Feedback"})})]}),!t&&e.jsx("div",{className:"flex grow flex-col justify-center",children:e.jsxs("div",{className:"orientation-sideways w-full font-mono text-sm leading-none font-medium uppercase",children:[j?.title?e.jsx(i,{to:H(Number(d.exerciseNumber)),children:j.title}):null,j?.title&&L?.title?" — ":null,L?.title?e.jsx(i,{to:I(Number(d.exerciseNumber),L.stepNumber),children:L.title}):null]})}),u?null:e.jsx(E,{content:t?null:"You are offline",children:e.jsx("div",{className:m("flex w-full animate-pulse items-center border-t p-4",t?"justify-start":"justify-center"),children:e.jsx(g,{name:"WifiNoConnection",className:"text-foreground-destructive",children:t?e.jsx("span",{className:"whitespace-nowrap",children:"You are offline"}):null})})}),e.jsx("div",{className:m("flex w-full items-center justify-start border-t p-4 transition-[height]",t&&D.length>4?"h-28":"h-14"),style:t?{width:re}:{},children:e.jsx(Se,{isMenuOpened:t})}),ENV.EPICSHOP_DEPLOYED?null:r?e.jsx(E,{content:t?null:"Your account",children:e.jsxs(i,{className:"relative flex h-14 w-full shrink-0 items-center justify-start space-x-3 border-t px-4 py-4 text-center no-underline hover:underline",to:"/account",onClick:w,children:[r.imageUrlSmall?e.jsx("img",{alt:r.name??r.email,src:r.imageUrlSmall,className:"h-full rounded-full"}):e.jsx(g,{name:"User",className:"shrink-0",size:"lg"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Your Account"}):e.jsx("span",{className:"sr-only",children:"Your account"}),P?e.jsx(K,{tooltip:"View your account and preferences",size:"sm"}):null]})}):null,ENV.EPICSHOP_DEPLOYED?null:r&&l?e.jsx(E,{content:t?null:"Continue to next lesson",children:e.jsxs(i,{to:l,prefetch:"intent",className:x("flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline"),state:{from:"continue next lesson button"},children:[e.jsx(g,{name:"FastForward",className:"shrink-0",size:"md"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Continue to next lesson"}):e.jsx("span",{className:"sr-only",children:"Continue to next lesson"})]})}):null,ENV.EPICSHOP_DEPLOYED?null:r&&h?e.jsx(E,{content:t?null:"Practice a past lesson",children:e.jsxs(i,{to:h,prefetch:"intent",className:x("flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline"),children:[e.jsx(g,{name:"Refresh",className:"shrink-0",size:"md"}),t?e.jsx(f.div,{className:"flex items-center whitespace-nowrap",initial:{opacity:0},animate:{opacity:1},children:"Practice a past lesson"}):e.jsx("span",{className:"sr-only",children:"Practice a past lesson"})]})}):null,e.jsx("div",{className:"mb-4 w-full self-start border-t pt-[15px] pl-3",children:t?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(O,{}),e.jsx(E,{content:"Keyboard shortcuts (press ?)",children:e.jsx("button",{type:"button","aria-label":"Keyboard shortcuts",onClick:U,className:"text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring flex h-8 w-8 items-center justify-center rounded-md transition-colors focus-visible:ring-2 focus-visible:ring-offset-2",children:e.jsx(g,{name:"Question",size:"md"})})}),e.jsx(Ae,{status:s.sidecarStatus})]}):e.jsxs(Ce,{open:$,onOpenChange:X,children:[s.sidecarStatus?.hasFailure?e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Process error - click to see details",title:$?void 0:"Process error - click to see details",className:"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors",children:e.jsx(Y,{status:"failed"})})}):e.jsx(J,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"More options",title:$?void 0:"More options",className:"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors",children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("circle",{cx:"5",cy:"10",r:"1.5",fill:"currentColor"}),e.jsx("circle",{cx:"10",cy:"10",r:"1.5",fill:"currentColor"}),e.jsx("circle",{cx:"15",cy:"10",r:"1.5",fill:"currentColor"})]})})}),e.jsxs(Pe,{side:"top",align:"start",className:"flex flex-col gap-1 p-2",children:[e.jsx(He,{themeLabel:F,disableTooltip:$}),e.jsxs("button",{type:"button","aria-label":"Keyboard shortcuts",onClick:U,className:"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors",children:[e.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:e.jsx(g,{name:"Question",size:"md"})}),e.jsx("span",{className:"flex-1 text-left",children:"Keyboard shortcuts"})]}),s.sidecarStatus?e.jsxs(i,{to:"/admin",className:"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors",children:[e.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:e.jsx(Y,{status:s.sidecarStatus.hasFailure?"failed":"running"})}),e.jsxs("span",{className:"flex-1 text-left",children:["Sidecar process"," ",s.sidecarStatus.hasFailure?"error":"running"]})]}):null]})]})})]})})})}function He({themeLabel:t,disableTooltip:n}){const s=C.useRef(null),o=r=>{const l=s.current?.querySelector("form");if(!l)return;const h=l.querySelector('button[type="submit"]');h?.contains(r.target)||h?.click()};return e.jsxs("div",{ref:s,onClick:o,className:"hover:bg-muted flex cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors",children:[e.jsx("div",{className:"flex h-5 w-5 items-center justify-center",children:e.jsx(O,{disableTooltip:n})}),e.jsxs("span",{className:"flex-1 text-left",children:[t," theme"]})]})}function Te({title:t,isMenuOpened:n,setMenuOpened:s,menuControls:o}){const r=C.useRef(n),l=C.useRef(null),h={open:{d:"M3.06061 2.99999L21.0606 21"},closed:{d:"M0 9.5L24 9.5"}},d={open:{d:"M3.00006 21.0607L21 3.06064"},moving:{d:"M0 14.5L24 14.5"},closed:{d:"M0 14.5L15 14.5"}},p=oe(),u=oe();async function D(){o?.start(n?"close":"open"),s(!n),n?(p.start(h.closed),await u.start(d.moving),u.start(d.closed)):(await u.start(d.moving),p.start(h.open),u.start(d.open))}return C.useEffect(()=>{if(!n)return;function P(w){if(w.key!=="Escape"||w.defaultPrevented)return;!!document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||l.current?.click()}return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[n]),e.jsxs("div",{className:m("relative inline-flex h-14 shrink-0 items-center justify-between overflow-hidden border-r sm:w-full sm:border-r-0 sm:border-b",{"w-full":n}),children:[e.jsx("button",{ref:l,className:"flex h-14 w-14 items-center justify-center","aria-label":"Open Navigation menu",onClick:D,children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",children:[e.jsx(f.path,{...h[r.current?"open":"closed"],animate:p,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5}),e.jsx(f.path,{...d[r.current?"open":"closed"],animate:u,transition:{duration:.2},stroke:"currentColor",strokeWidth:1.5})]})}),n&&e.jsx(f.p,{transition:{delay:.2},initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:"absolute right-5 font-mono text-sm whitespace-nowrap uppercase",children:e.jsx(i,{to:"/",children:t})})]})}export{Rt as default};
2
+ //# sourceMappingURL=_layout-DWtIbdIZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_layout-DWtIbdIZ.js","sources":["../../../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs","../../../../../node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs","../../../app/components/media-query.ts","../../../app/components/ui/popover.tsx","../../../app/routes/_app+/_layout.tsx"],"sourcesContent":["import { animateVisualElement, setTarget } from 'motion-dom';\nimport { invariant } from 'motion-utils';\n\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n },\n set(definition) {\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls, setValues };\n//# sourceMappingURL=animation-controls.mjs.map\n","\"use client\";\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { animationControls } from './animation-controls.mjs';\n\n/**\n * Creates `LegacyAnimationControls`, which can be used to manually start, stop\n * and sequence animations on one or more components.\n *\n * The returned `LegacyAnimationControls` should be passed to the `animate` property\n * of the components you want to animate.\n *\n * These components can then be animated with the `start` method.\n *\n * ```jsx\n * import * as React from 'react'\n * import { motion, useAnimation } from 'framer-motion'\n *\n * export function MyComponent(props) {\n * const controls = useAnimation()\n *\n * controls.start({\n * x: 100,\n * transition: { duration: 0.5 },\n * })\n *\n * return <motion.div animate={controls} />\n * }\n * ```\n *\n * @returns Animation controller with `start` and `stop` methods\n *\n * @public\n */\nfunction useAnimationControls() {\n const controls = useConstant(animationControls);\n useIsomorphicLayoutEffect(controls.mount, []);\n return controls;\n}\nconst useAnimation = useAnimationControls;\n\nexport { useAnimation, useAnimationControls };\n//# sourceMappingURL=use-animation.mjs.map\n","import { useSyncExternalStore } from 'react'\n\nexport function makeMediaQueryStore(\n\tmediaQuery: string,\n\tserverSnapshot: boolean,\n) {\n\tfunction getSnapshot() {\n\t\treturn window.matchMedia(mediaQuery).matches\n\t}\n\n\tfunction subscribe(callback: () => void) {\n\t\tconst mediaQueryList = window.matchMedia(mediaQuery)\n\t\tmediaQueryList.addEventListener('change', callback)\n\t\treturn () => {\n\t\t\tmediaQueryList.removeEventListener('change', callback)\n\t\t}\n\t}\n\n\treturn function useMediaQuery() {\n\t\treturn useSyncExternalStore(subscribe, getSnapshot, () => serverSnapshot)\n\t}\n}\n","import * as PopoverPrimitive from '@radix-ui/react-popover'\nimport * as React from 'react'\nimport { cn } from '#app/utils/misc.tsx'\n\nfunction Popover({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root {...props} />\n}\n\nfunction PopoverTrigger({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger {...props} />\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = 'center',\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 rounded-md border p-2 shadow-md outline-none',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t)\n}\n\nexport { Popover, PopoverContent, PopoverTrigger }\n","import {\n\textractNumbersAndTypeFromAppNameOrPath,\n\tgetApps,\n\tgetExercises,\n\tgetPlaygroundAppName,\n\tisExtraApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport { getProcesses } from '@epic-web/workshop-utils/process-manager.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport { clsx } from 'clsx'\nimport { motion, useAnimationControls } from 'framer-motion'\nimport * as React from 'react'\nimport {\n\tLink,\n\tNavLink,\n\tOutlet,\n\tuseLoaderData,\n\tuseLocation,\n\tuseParams,\n\tdata,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n} from 'react-router'\nimport { useHydrated } from 'remix-utils/use-hydrated'\nimport { Icon } from '#app/components/icons.tsx'\nimport { makeMediaQueryStore } from '#app/components/media-query.ts'\nimport {\n\tOnboardingBadge,\n\tuseOnboardingIndicator,\n} from '#app/components/onboarding-indicator.tsx'\nimport { Logo } from '#app/components/product.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.tsx'\nimport { StatusIndicator } from '#app/components/status-indicator.tsx'\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogHeader,\n\tDialogTrigger,\n} from '#app/components/ui/dialog.tsx'\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from '#app/components/ui/popover.tsx'\nimport {\n\tSimpleTooltip,\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from '#app/components/ui/tooltip.tsx'\nimport { useOptionalUser, useUserHasAccess } from '#app/components/user.tsx'\nimport { useWorkshopConfig } from '#app/components/workshop-config.tsx'\nimport { cn, getExercisePath, getExerciseStepPath } from '#app/utils/misc.tsx'\nimport { useIsOnline } from '#app/utils/online.ts'\nimport {\n\tgetProductHostEmoji,\n\tproductHostEmojis,\n\tusePresence,\n\ttype Location,\n\ttype User,\n} from '#app/utils/presence.tsx'\nimport { useRequestInfo, useApps } from '#app/utils/root-loader.ts'\nimport {\n\tuseExerciseProgressClassName,\n\tuseNextExerciseRoute,\n\tuseProgressItemClassName,\n\tuseRandomCompletedExerciseRoute,\n\ttype ProgressItemSearch,\n} from '../progress.tsx'\nimport { ThemeSwitch } from '../theme/index.tsx'\n\nfunction getSidecarStatus() {\n\tconst { sidecarProcesses } = getProcesses()\n\tif (sidecarProcesses.size === 0) return null\n\n\tconst processes = Array.from(sidecarProcesses.entries()).map(\n\t\t([name, { process }]) => ({\n\t\t\tname,\n\t\t\trunning: process.exitCode === null,\n\t\t}),\n\t)\n\n\tconst hasFailure = processes.some((p) => !p.running)\n\tconst failureCount = processes.filter((p) => !p.running).length\n\treturn { processes, hasFailure, count: processes.length, failureCount }\n}\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('appLayoutLoader')\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst [exercises, playgroundAppName, apps] = await Promise.all([\n\t\tgetExercises({ request, timings }),\n\t\tgetPlaygroundAppName(),\n\t\tgetApps({ request, timings }),\n\t])\n\n\tconst playgroundNumbersAndType = extractNumbersAndTypeFromAppNameOrPath(\n\t\tplaygroundAppName ?? '',\n\t)\n\tconst playground = {\n\t\tappName: playgroundAppName,\n\t\texerciseNumber: Number(playgroundNumbersAndType?.exerciseNumber),\n\t\tstepNumber: Number(playgroundNumbersAndType?.stepNumber),\n\t\ttype: playgroundNumbersAndType?.type,\n\t}\n\n\tconst sidecarStatus = getSidecarStatus()\n\n\tconst result = data(\n\t\t{\n\t\t\tworkshopTitle,\n\t\t\texercises: exercises.map((e) => ({\n\t\t\t\texerciseNumber: e.exerciseNumber,\n\t\t\t\ttitle: e.title,\n\t\t\t\tsolutions: e.solutions.map(({ stepNumber, title, name }) => ({\n\t\t\t\t\tstepNumber,\n\t\t\t\t\ttitle,\n\t\t\t\t\tname,\n\t\t\t\t})),\n\t\t\t\tproblems: e.problems.map(({ stepNumber, title, name }) => ({\n\t\t\t\t\tstepNumber,\n\t\t\t\t\ttitle,\n\t\t\t\t\tname,\n\t\t\t\t})),\n\t\t\t\tsteps: e.steps.map(({ stepNumber, problem, solution }) => ({\n\t\t\t\t\tstepNumber,\n\t\t\t\t\ttitle: problem?.title ?? solution?.title ?? 'Unknown',\n\t\t\t\t\tname: problem?.name ?? solution?.name ?? 'Unknown',\n\t\t\t\t\tproblem: problem\n\t\t\t\t\t\t? { name: problem.name, title: problem.title }\n\t\t\t\t\t\t: null,\n\t\t\t\t\tsolution: solution\n\t\t\t\t\t\t? { name: solution.name, title: solution.title }\n\t\t\t\t\t\t: null,\n\t\t\t\t})),\n\t\t\t})),\n\t\t\textras: apps\n\t\t\t\t.filter(isExtraApp)\n\t\t\t\t.sort((a, b) =>\n\t\t\t\t\ta.title.localeCompare(b.title, undefined, {\n\t\t\t\t\t\tnumeric: true,\n\t\t\t\t\t\tsensitivity: 'base',\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.map((extra) => ({\n\t\t\t\t\tdirName: extra.dirName,\n\t\t\t\t\ttitle: extra.title,\n\t\t\t\t\tname: extra.name,\n\t\t\t\t})),\n\t\t\tplayground,\n\t\t\tisMenuOpened:\n\t\t\t\trequest.headers.get('cookie')?.includes('es_menu_open=true') ?? false,\n\t\t\tsidecarStatus,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\tVary: 'Cookie',\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n\treturn result\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\tVary: 'Cookie',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst opacities = ['opacity-70', 'opacity-80', 'opacity-90', 'opacity-100']\nconst shadows = [\n\t'shadow-[0_0_2px_0_rgba(0,0,0,0.3)]',\n\t'shadow-[0_0_4px_0_rgba(0,0,0,0.3)]',\n\t'shadow-[0_0_7px_0_rgba(0,0,0,0.3)]',\n\t'shadow-[0_0_10px_0_rgba(0,0,0,0.3)]',\n]\nfunction getScoreClassNames(score: number) {\n\tconst opacityNumber = Math.round(score * opacities.length - 1)\n\tconst shadowNumber = Math.round(score * shadows.length - 1)\n\treturn cn(\n\t\t'shadow-highlight hover:opacity-100 focus:opacity-100',\n\t\topacities[opacityNumber] ?? 'opacity-60',\n\t\tshadows[shadowNumber] ?? 'shadow-none',\n\t\tscore === 1 ? 'animate-pulse hover:animate-none focus:animate-none' : null,\n\t)\n}\n\nfunction FacePile({ isMenuOpened }: { isMenuOpened: boolean }) {\n\tconst loggedInUser = useOptionalUser()\n\tconst { users } = usePresence()\n\tconst {\n\t\tproduct: { displayNameShort },\n\t} = useWorkshopConfig()\n\tconst limit = isMenuOpened ? 17 : 0\n\tconst numberOverLimit = users.length - limit\n\tconst shouldShowNumberOverLimit = numberOverLimit > (isMenuOpened ? 1 : 0)\n\n\tif (!users.length) return null\n\n\tconst tiffany =\n\t\tisMenuOpened && users.length === 1 ? (\n\t\t\t<Link\n\t\t\t\ttarget=\"_blank\"\n\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\tto=\"https://www.youtube.com/watch?v=w6Q3mHyzn78\"\n\t\t\t>\n\t\t\t\t<img\n\t\t\t\t\talt=\"Tiffany Tunes\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'h-8 w-8 rounded-full border object-cover',\n\t\t\t\t\t\tgetScoreClassNames(1),\n\t\t\t\t\t)}\n\t\t\t\t\tsrc=\"/img/tiffany.png\"\n\t\t\t\t/>\n\t\t\t</Link>\n\t\t) : null\n\tconst overLimitLabel = `${numberOverLimit}${\n\t\tisMenuOpened ? ' more ' : ' '\n\t}${displayNameShort} Dev${numberOverLimit === 1 ? '' : 's'} working now`\n\treturn (\n\t\t<div className=\"flex flex-wrap items-center gap-2\">\n\t\t\t<TooltipProvider>\n\t\t\t\t{(shouldShowNumberOverLimit ? users.slice(0, limit) : users).map(\n\t\t\t\t\t({ user, score }) => {\n\t\t\t\t\t\tconst scoreClassNames = getScoreClassNames(score)\n\t\t\t\t\t\tconst locations = getUserLocations(user)\n\t\t\t\t\t\tconst imageUrl = user.imageUrlSmall || user.avatarUrl\n\t\t\t\t\t\tconst hasAccess = user.hasAccess\n\t\t\t\t\t\tconst local = locations.some((loc) =>\n\t\t\t\t\t\t\tloc.origin?.includes('localhost'),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst productHostEmojis = getUniqueProductHostEmojis(locations)\n\t\t\t\t\t\tconst loggedInEmojis = getLoggedInProductEmojis(\n\t\t\t\t\t\t\tuser.loggedInProductHosts,\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t// Handle opted-out users\n\t\t\t\t\t\tif (user.optOut) {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Tooltip key={user.id}>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild tabIndex={0}>\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"relative\"\n\t\t\t\t\t\t\t\t\t\t\taria-label=\"Anonymous user (opted out)\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'bg-muted flex h-8 w-8 items-center justify-center rounded-full border opacity-50',\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"User\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex flex-col items-center justify-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t{loggedInEmojis ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs\">{loggedInEmojis}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\tAnonymous (opted out of sharing)\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet doingLabel: string\n\t\t\t\t\t\tif (hasAccess) {\n\t\t\t\t\t\t\tdoingLabel = local ? 'working' : 'referencing'\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdoingLabel = local ? 'previewing' : 'reviewing'\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Tooltip key={user.id}>\n\t\t\t\t\t\t\t\t<TooltipTrigger asChild tabIndex={0}>\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName=\"relative\"\n\t\t\t\t\t\t\t\t\t\taria-label={user.name || `${displayNameShort} Dev`}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{imageUrl ? (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={user.name || displayNameShort}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'h-8 w-8 rounded-full border object-cover',\n\t\t\t\t\t\t\t\t\t\t\t\t\tscoreClassNames,\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={imageUrl}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'flex h-8 w-8 items-center justify-center rounded-full border',\n\t\t\t\t\t\t\t\t\t\t\t\t\tscoreClassNames,\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"User\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t{productHostEmojis ? (\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute -top-1 -left-1 text-xs leading-none\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-label=\"Workshop products\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{productHostEmojis}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t<span className=\"flex flex-col items-center justify-center gap-1\">\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t{loggedInEmojis ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs\">{loggedInEmojis}</span>\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t{user.name || `${displayNameShort} Dev`}\n\t\t\t\t\t\t\t\t\t\t\t{locations.length > 0\n\t\t\t\t\t\t\t\t\t\t\t\t? ` is ${doingLabel} ${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tscore === 1 && loggedInUser?.id !== user.id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'with you'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t\t} on`\n\t\t\t\t\t\t\t\t\t\t\t\t: null}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{locations.map((loc, index) => {\n\t\t\t\t\t\t\t\t\t\t\tconst locationLabel = getLocationLabel(loc)\n\t\t\t\t\t\t\t\t\t\t\tif (!locationLabel) return null\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={`${loc.workshopTitle}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'flex flex-col items-center',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocations.length > 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'border-border mt-1 border-t pt-1 first:mt-0 first:border-t-0 first:pt-0'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{locationLabel.line1 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{getProductHostEmoji(loc.productHost)}{' '}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{locationLabel.line1}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{locationLabel.line2 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{locationLabel.line2}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t)}\n\t\t\t\t{tiffany}\n\t\t\t\t{shouldShowNumberOverLimit ? (\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild tabIndex={0}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\taria-label={overLimitLabel}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'bg-accent text-accent-foreground flex items-center justify-center rounded-full border text-xs',\n\t\t\t\t\t\t\t\t\tisMenuOpened ? 'h-8 w-8' : 'h-6 w-6',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t'pointer-events-none truncate text-center',\n\t\t\t\t\t\t\t\t\t\tisMenuOpened ? 'w-8' : 'w-6',\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isMenuOpened ? `+${numberOverLimit}` : numberOverLimit}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>{overLimitLabel}</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : null}\n\t\t\t</TooltipProvider>\n\t\t</div>\n\t)\n}\n\nfunction getLoggedInProductEmojis(\n\thosts: string[] | null | undefined,\n): string | null {\n\tif (!hosts || hosts.length === 0) return null\n\treturn hosts\n\t\t.map((host) => productHostEmojis[host])\n\t\t.filter(Boolean)\n\t\t.join(' ')\n}\n\nfunction getUserLocations(user: User): Location[] {\n\tif (user.locations && user.locations.length > 0) {\n\t\treturn user.locations.filter(Boolean) as Location[]\n\t}\n\tif (user.location) {\n\t\treturn [user.location]\n\t}\n\treturn []\n}\n\nfunction getUniqueProductHostEmojis(locations: Location[]): string | null {\n\tconst uniqueHosts = new Set<string>()\n\tfor (const loc of locations) {\n\t\tif (loc.productHost) {\n\t\t\tuniqueHosts.add(loc.productHost)\n\t\t}\n\t}\n\tif (uniqueHosts.size === 0) return null\n\treturn Array.from(uniqueHosts)\n\t\t.map((host) => getProductHostEmoji(host))\n\t\t.filter(Boolean)\n\t\t.join('')\n}\n\nfunction hasExtras(apps: Array<{ relativePath: string }>) {\n\treturn apps.some((app) => {\n\t\tconst rootDir = app.relativePath.split(/[\\\\/]/)[0]\n\t\treturn (\n\t\t\trootDir === 'extra' || rootDir === 'example' || rootDir === 'examples'\n\t\t)\n\t})\n}\n\nconst useIsWide = makeMediaQueryStore('(min-width: 640px)', true)\n\nexport default function App() {\n\tconst data = useLoaderData<typeof loader>()\n\tconst user = useOptionalUser()\n\tconst isWide = useIsWide()\n\tconst isHydrated = useHydrated()\n\n\tconst [isMenuOpened, setMenuOpenedState] = React.useState(data.isMenuOpened)\n\tuseRevalidationWS({\n\t\twatchPaths: [\n\t\t\t'./exercises/README.mdx',\n\t\t\t'./extra',\n\t\t\t'./example',\n\t\t\t'./examples',\n\t\t],\n\t})\n\n\tfunction setMenuOpened(value: boolean) {\n\t\tsetMenuOpenedState(value)\n\t\tdocument.cookie = `es_menu_open=${value.toString()}; path=/; SameSite=Lax;`\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col\">\n\t\t\t{user ? null : <NoUserBanner />}\n\t\t\t{/*\n\t\t\t\tthis isn't placed in a conditional with isWide because the server render\n\t\t\t\tdoesn't know whether it should be around or not so we just use CSS to hide it\n\t\t\t\tif it's not supposed to show up.\n\n\t\t\t\tWe don't just use media queries for the wider screen nav because we want\n\t\t\t\tto avoid running all the logic in there unnecessarily.\n\t\t\t*/}\n\t\t\t{isHydrated && isWide ? null : (\n\t\t\t\t<MobileNavigation\n\t\t\t\t\tisMenuOpened={isMenuOpened}\n\t\t\t\t\tonMenuOpenChange={setMenuOpened}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\t// this nonsense is here because we want the panels to be scrollable rather\n\t\t\t\t// than having the entire page be scrollable (at least on wider screens)\n\t\t\t\tclassName={cn('flex grow flex-col sm:flex-row', {\n\t\t\t\t\t'h-[calc(100vh-128px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))]':\n\t\t\t\t\t\t!user,\n\t\t\t\t\t'h-[calc(100vh-64px-env(safe-area-inset-top)-env(safe-area-inset-bottom))] sm:h-[calc(100vh-env(safe-area-inset-top)-env(safe-area-inset-bottom))]':\n\t\t\t\t\t\tuser,\n\t\t\t\t\t'h-[unset]': !isWide && isMenuOpened,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{isWide ? (\n\t\t\t\t\t<Navigation\n\t\t\t\t\t\tisMenuOpened={isMenuOpened}\n\t\t\t\t\t\tonMenuOpenChange={setMenuOpened}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'h-full w-full max-w-full sm:max-w-[calc(100%-56px)]',\n\t\t\t\t\t\tisMenuOpened ? 'hidden md:block' : '',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Outlet />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction getLocationLabel(location: User['location']) {\n\tif (!location) return null\n\n\tconst { exercise } = location\n\n\tconst exercisePortion = [\n\t\texercise\n\t\t\t? [exercise.exerciseNumber, exercise.stepNumber]\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.map((s) => s.toString().padStart(2, '0'))\n\t\t\t\t\t.join('/')\n\t\t\t: null,\n\t\texercise?.type,\n\t]\n\t\t.filter(Boolean)\n\t\t.join(' - ')\n\treturn { line1: location.workshopTitle, line2: exercisePortion }\n}\n\nfunction NoUserBanner() {\n\tconst isWide = useIsWide()\n\tconst {\n\t\tproduct: { host, displayName },\n\t} = useWorkshopConfig()\n\tconst userHasAccess = useUserHasAccess()\n\tconst [showLoginBadge, dismissLoginBadge] =\n\t\tuseOnboardingIndicator('login-button')\n\tconst details = (\n\t\t<div>\n\t\t\t{ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t<div>\n\t\t\t\t\t{`This is the deployed version. `}\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\tto={ENV.EPICSHOP_GITHUB_REPO}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tRun locally\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t{` for full experience.`}\n\t\t\t\t\t</>{' '}\n\t\t\t\t</div>\n\t\t\t) : userHasAccess ? (\n\t\t\t\t<div>\n\t\t\t\t\t<Link to=\"/login\" className=\"underline\">\n\t\t\t\t\t\tLogin\n\t\t\t\t\t</Link>{' '}\n\t\t\t\t\tor{' '}\n\t\t\t\t\t<a href={`https://${host}/login`} className=\"underline\">\n\t\t\t\t\t\tjoin for free\n\t\t\t\t\t</a>{' '}\n\t\t\t\t\tfor the full experience.\n\t\t\t\t</div>\n\t\t\t) : null}\n\t\t</div>\n\t)\n\treturn (\n\t\t<div className=\"from-highlight to-info text-info-foreground z-10 flex h-16 items-center justify-between border-b bg-linear-to-tr pl-4\">\n\t\t\t{isWide ? (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"hidden flex-1 flex-wrap items-center gap-4 sm:flex\">\n\t\t\t\t\t\t<Logo size=\"lg\" style=\"monochrome\" />\n\t\t\t\t\t\t<div className=\"flex flex-1 flex-wrap items-center\">\n\t\t\t\t\t\t\t<p className=\"mr-2\">\n\t\t\t\t\t\t\t\tWelcome to the{' '}\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={`https://${host}`}\n\t\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{displayName}\n\t\t\t\t\t\t\t\t</Link>{' '}\n\t\t\t\t\t\t\t\tWorkshop app!\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t{details}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{userHasAccess ? null : (\n\t\t\t\t\t\t<div className=\"hidden h-full flex-col items-center sm:flex md:flex-row\">\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={`https://${host}`}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tclassName=\"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"drop-shadow-sm\">Join {displayName}</span>\n\t\t\t\t\t\t\t\t<span>↗︎</span>\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={ENV.EPICSHOP_DEPLOYED ? `https://${host}/login` : '/login'}\n\t\t\t\t\t\t\t\tclassName=\"bg-info-foreground/20 hover:bg-info-foreground/30 relative flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold shadow-md transition\"\n\t\t\t\t\t\t\t\tonClick={dismissLoginBadge}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"User\" size=\"lg\" />\n\t\t\t\t\t\t\t\t<span className=\"drop-shadow-sm\">Login</span>\n\t\t\t\t\t\t\t\t{showLoginBadge ? (\n\t\t\t\t\t\t\t\t\t<OnboardingBadge\n\t\t\t\t\t\t\t\t\t\ttooltip=\"Login for the full experience!\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex flex-1 flex-wrap items-center gap-4 sm:hidden\">\n\t\t\t\t\t\t<a href={`https://${host}`}>\n\t\t\t\t\t\t\t<Logo size=\"lg\" style=\"monochrome\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<Dialog>\n\t\t\t\t\t\t\t<DialogTrigger>\n\t\t\t\t\t\t\t\t<Icon name=\"Question\" size=\"lg\" className=\"animate-pulse\" />\n\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t<DialogContent>\n\t\t\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t\t\t<Logo size=\"lg\" style=\"monochrome\" />\n\t\t\t\t\t\t\t\t\t<span className=\"text-lg font-semibold\">{displayName}</span>\n\t\t\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\t\tWelcome to the{' '}\n\t\t\t\t\t\t\t\t\t<Link to={`https://${host}`} className=\"underline\">\n\t\t\t\t\t\t\t\t\t\t{displayName}\n\t\t\t\t\t\t\t\t\t</Link>{' '}\n\t\t\t\t\t\t\t\t\tWorkshop app!\n\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t\t{details}\n\t\t\t\t\t\t\t</DialogContent>\n\t\t\t\t\t\t</Dialog>\n\t\t\t\t\t</div>\n\t\t\t\t\t{userHasAccess ? null : (\n\t\t\t\t\t\t<div className=\"flex h-full items-center\">\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={`https://${host}`}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tclassName=\"flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"drop-shadow-sm\">Join</span>\n\t\t\t\t\t\t\t\t<span>↗︎</span>\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={ENV.EPICSHOP_DEPLOYED ? `https://${host}/login` : '/login'}\n\t\t\t\t\t\t\t\tclassName=\"bg-info-foreground/20 hover:bg-info-foreground/30 relative flex h-full items-center justify-center space-x-1.5 px-5 text-sm font-semibold shadow-md transition\"\n\t\t\t\t\t\t\t\tonClick={dismissLoginBadge}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"User\" size=\"lg\" />\n\t\t\t\t\t\t\t\t<span className=\"drop-shadow-sm\">Login</span>\n\t\t\t\t\t\t\t\t{showLoginBadge ? (\n\t\t\t\t\t\t\t\t\t<OnboardingBadge\n\t\t\t\t\t\t\t\t\t\ttooltip=\"Login for the full experience!\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nconst itemVariants = {\n\thidden: { opacity: 0, x: -20 },\n\tvisible: { opacity: 1, x: 0 },\n}\nfunction NavigationExerciseListItem({\n\texerciseNumber,\n\tchildren,\n}: {\n\texerciseNumber: number\n\tchildren: React.ReactNode\n}) {\n\tconst progressClassName = useExerciseProgressClassName(exerciseNumber)\n\treturn (\n\t\t<motion.li\n\t\t\tvariants={itemVariants}\n\t\t\tclassName={cn(\n\t\t\t\t// add gap of 3 to children, but using padding so the progress extends through the whole height\n\t\t\t\t'py-[6px] first:pt-3 last:pb-3',\n\t\t\t\tprogressClassName ? `${progressClassName} before:border-t` : null,\n\t\t\t)}\n\t\t>\n\t\t\t<span className=\"inline-block pl-2\">{children}</span>\n\t\t</motion.li>\n\t)\n}\n\nfunction NavigationExerciseStepListItem({\n\tchildren,\n\t...progressItemSearch\n}: {\n\tchildren: React.ReactNode\n} & ProgressItemSearch) {\n\tconst progressClassName = useProgressItemClassName(progressItemSearch)\n\treturn (\n\t\t<motion.li\n\t\t\tvariants={itemVariants}\n\t\t\tclassName={cn(\n\t\t\t\t// add gap of 3 to children, but using padding so the progress extends through the whole height\n\t\t\t\t'py-[6px] first:pt-3 last:pb-3',\n\t\t\t\tprogressClassName ? `${progressClassName} before:border-t` : null,\n\t\t\t)}\n\t\t>\n\t\t\t<span className=\"inline-block pl-2\">{children}</span>\n\t\t</motion.li>\n\t)\n}\n\nfunction NavigationExtrasListItem({ children }: { children: React.ReactNode }) {\n\treturn (\n\t\t<motion.li\n\t\t\tvariants={itemVariants}\n\t\t\tclassName=\"py-[6px] first:pt-3 last:pb-3\"\n\t\t>\n\t\t\t<span className=\"inline-block pl-2\">{children}</span>\n\t\t</motion.li>\n\t)\n}\n\nconst navHighlightBaseClassName =\n\t'relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"]'\n\nfunction getNavHighlightClassName(\n\tisActive: boolean,\n\tclassName?: string | null,\n) {\n\treturn clsx(navHighlightBaseClassName, className, {\n\t\t'bg-foreground text-background': isActive,\n\t})\n}\n\nfunction MobileNavigation({\n\tisMenuOpened,\n\tonMenuOpenChange: setMenuOpened,\n}: {\n\tisMenuOpened: boolean\n\tonMenuOpenChange: (change: boolean) => void\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst apps = useApps()\n\tconst user = useOptionalUser()\n\tconst nextExerciseRoute = useNextExerciseRoute()\n\tconst randomExerciseRoute = useRandomCompletedExerciseRoute()\n\tconst params = useParams()\n\tconst location = useLocation()\n\tconst isOnline = useIsOnline()\n\tconst { users } = usePresence()\n\n\t// Onboarding indicators\n\tconst [showAccountBadge, dismissAccountBadge] =\n\t\tuseOnboardingIndicator('account-link')\n\tconst showExtrasLink = hasExtras(apps)\n\tconst playgroundExtra = data.extras.find(\n\t\t(extra) => extra.name === data.playground.appName,\n\t)\n\tconst isExtrasActive =\n\t\tlocation.pathname === '/extra' || location.pathname.startsWith('/extra/')\n\tconst showExtrasPlaygroundLink = Boolean(playgroundExtra) && !isExtrasActive\n\n\t// items\n\tconst listVariants = {\n\t\tvisible: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.05,\n\t\t\t\twhen: 'beforeChildren',\n\t\t\t\tstaggerChildren: 0.03,\n\t\t\t},\n\t\t},\n\t\thidden: {\n\t\t\topacity: 0,\n\t\t},\n\t}\n\n\tconst requestInfo = useRequestInfo()\n\tconst currentTheme = requestInfo.session.theme ?? 'system'\n\tconst themeLabel = {\n\t\tlight: 'Light',\n\t\tdark: 'Dark',\n\t\tsystem: 'System',\n\t}[currentTheme]\n\tconst [isMobilePopoverOpen, setIsMobilePopoverOpen] = React.useState(false)\n\tconst showMobilePopover = Boolean(data.sidecarStatus)\n\n\t// Reset popover state when it should not be shown to prevent stale state\n\tReact.useEffect(() => {\n\t\tif (!showMobilePopover) {\n\t\t\tsetIsMobilePopoverOpen(false)\n\t\t}\n\t}, [showMobilePopover])\n\n\treturn (\n\t\t<nav className=\"flex w-full border-b sm:hidden\">\n\t\t\t<div className=\"w-full\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn('flex items-center', {\n\t\t\t\t\t\t'flex-col': isMenuOpened,\n\t\t\t\t\t\t'h-14': !isMenuOpened,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<NavToggle\n\t\t\t\t\t\ttitle={data.workshopTitle}\n\t\t\t\t\t\tisMenuOpened={isMenuOpened}\n\t\t\t\t\t\tsetMenuOpened={setMenuOpened}\n\t\t\t\t\t/>\n\t\t\t\t\t{isMenuOpened && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tclassName=\"scrollbar-thin scrollbar-thumb-scrollbar flex w-full grow flex-col justify-between overflow-x-auto p-6\"\n\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\tto=\"/\"\n\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 text-2xl font-bold whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{data.exercises.map(({ exerciseNumber, title, steps }) => {\n\t\t\t\t\t\t\t\t\tconst exerciseNumberLabel = exerciseNumber\n\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t.padStart(2, '0')\n\t\t\t\t\t\t\t\t\tconst isActive =\n\t\t\t\t\t\t\t\t\t\tNumber(params.exerciseNumber) === exerciseNumber\n\t\t\t\t\t\t\t\t\tconst showPlayground =\n\t\t\t\t\t\t\t\t\t\t!isActive &&\n\t\t\t\t\t\t\t\t\t\tdata.playground.exerciseNumber === exerciseNumber\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<NavigationExerciseListItem\n\t\t\t\t\t\t\t\t\t\t\tkey={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1 text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground mr-1 align-super text-xs tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{exerciseNumberLabel}.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t{showPlayground ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.exerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.stepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t🛝\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{isActive ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 ml-4 flex flex-col\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"instructions\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background relative px-2 py-0.5 pr-3 text-xl font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bg-foreground text-background':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!params.stepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIntro\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{steps\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map(({ stepNumber, title, problem, solution }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={stepNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber={stepNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"leading-tight font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{stepNumber.toString().padStart(2, '0')}.{' '}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-0.5 ml-3 flex gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{problem && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'problem',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(isActive)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tProblem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{problem.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{solution && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'solution',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(isActive)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSolution\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{solution.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"finished\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber, 'finished')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background relative px-2 py-0.5 pr-3 text-base font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bg-foreground text-background': isActive,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t📝 Elaboration\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t</NavigationExerciseListItem>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t{showExtrasLink ? (\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1 text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\tto=\"/extra\"\n\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t📚 Extras\n\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t{showExtrasPlaygroundLink && playgroundExtra ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\tto={`/extra/${playgroundExtra.dirName}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t🛝\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{isExtrasActive && data.extras.length ? (\n\t\t\t\t\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 ml-4 flex flex-col\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{data.extras.map((extra) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExtrasListItem key={extra.dirName}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={`/extra/${extra.dirName}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'leading-tight font-semibold',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{extra.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{extra.name === data.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExtrasListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\tto=\"/finished\"\n\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t'relative text-lg font-bold whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background bg-foreground text-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"]':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisActive,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t📝 Workshop Feedback\n\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className=\"grow\" />\n\t\t\t\t\t{isOnline ? null : (\n\t\t\t\t\t\t<SimpleTooltip content={isMenuOpened ? null : 'You are offline'}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'flex h-14 animate-pulse items-center justify-start p-4',\n\t\t\t\t\t\t\t\t\tisMenuOpened ? 'w-full border-t' : 'border-l',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tname=\"WifiNoConnection\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-foreground-destructive\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isMenuOpened ? 'You are offline' : null}\n\t\t\t\t\t\t\t\t</Icon>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t)}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'flex items-center justify-start p-4',\n\t\t\t\t\t\t\tisMenuOpened && users.length > 4 ? 'min-h-14' : 'h-14',\n\t\t\t\t\t\t\tisMenuOpened ? 'w-full border-t' : 'border-l',\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FacePile isMenuOpened={isMenuOpened} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user ? (\n\t\t\t\t\t\t<SimpleTooltip content={isMenuOpened ? null : 'Your account'}>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'relative flex h-14 shrink-0 items-center justify-start space-x-3 px-4 py-4 text-center no-underline hover:underline',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'border-l': !isMenuOpened,\n\t\t\t\t\t\t\t\t\t\t'w-full border-t': isMenuOpened,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tto=\"/account\"\n\t\t\t\t\t\t\t\tonClick={dismissAccountBadge}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{user.imageUrlSmall ? (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\talt={user.name ?? user.email}\n\t\t\t\t\t\t\t\t\t\tsrc={user.imageUrlSmall}\n\t\t\t\t\t\t\t\t\t\tclassName=\"h-full rounded-full\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Icon name=\"User\" className=\"shrink-0\" size=\"lg\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tYour Account\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Your account</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{showAccountBadge ? (\n\t\t\t\t\t\t\t\t\t<OnboardingBadge\n\t\t\t\t\t\t\t\t\t\ttooltip=\"View your account and preferences\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user && nextExerciseRoute ? (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tcontent={isMenuOpened ? null : 'Continue to next lesson'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={nextExerciseRoute}\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstate={{ from: 'continue next lesson button' }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"FastForward\" className=\"shrink-0\" size=\"md\" />\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tContinue to next lesson\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Continue to next lesson</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user && randomExerciseRoute ? (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tcontent={isMenuOpened ? null : 'Practice a past lesson'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={randomExerciseRoute}\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex h-14 w-full items-center space-x-3 border-l px-4 py-4 pl-[18px] no-underline hover:underline',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"shrink-0\" size=\"md\" />\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tPractice a past lesson\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Practice a past lesson</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'flex h-14 items-center justify-center gap-2 self-start p-4 sm:mb-4',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'w-full border-t': isMenuOpened,\n\t\t\t\t\t\t\t\t'w-14 border-l': !isMenuOpened,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ThemeSwitch />\n\t\t\t\t\t\t\t\t<SidecarStatusIndicator status={data.sidecarStatus} />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : showMobilePopover ? (\n\t\t\t\t\t\t\t<Popover\n\t\t\t\t\t\t\t\topen={isMobilePopoverOpen}\n\t\t\t\t\t\t\t\tonOpenChange={setIsMobilePopoverOpen}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{data.sidecarStatus?.hasFailure ? (\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\taria-label=\"Process error - click to see details\"\n\t\t\t\t\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t\t\t\t\tisMobilePopoverOpen\n\t\t\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Process error - click to see details'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<StatusIndicator status=\"failed\" />\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\taria-label=\"More options\"\n\t\t\t\t\t\t\t\t\t\t\ttitle={isMobilePopoverOpen ? undefined : 'More options'}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 20 20\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"5\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"10\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"15\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\t\tside=\"top\"\n\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-1 p-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ThemeSwitchRow\n\t\t\t\t\t\t\t\t\t\tthemeLabel={themeLabel}\n\t\t\t\t\t\t\t\t\t\tdisableTooltip={isMobilePopoverOpen}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{data.sidecarStatus ? (\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\tto=\"/admin\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex h-5 w-5 items-center justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<StatusIndicator\n\t\t\t\t\t\t\t\t\t\t\t\t\tstatus={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.sidecarStatus.hasFailure ? 'failed' : 'running'\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex-1 text-left\">\n\t\t\t\t\t\t\t\t\t\t\t\tSidecar process{' '}\n\t\t\t\t\t\t\t\t\t\t\t\t{data.sidecarStatus.hasFailure ? 'error' : 'running'}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ThemeSwitch />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</nav>\n\t)\n}\n\nconst OPENED_MENU_WIDTH = 400\n\nfunction SidecarStatusIndicator({\n\tstatus,\n}: {\n\tstatus: { hasFailure: boolean; count: number; failureCount: number } | null\n}) {\n\tif (!status) return null\n\n\treturn (\n\t\t<SimpleTooltip\n\t\t\tcontent={\n\t\t\t\tstatus.hasFailure\n\t\t\t\t\t? `${status.failureCount} sidecar${status.failureCount === 1 ? '' : 's'} failed`\n\t\t\t\t\t: 'All sidecars running'\n\t\t\t}\n\t\t>\n\t\t\t<Link\n\t\t\t\tto=\"/admin\"\n\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors\"\n\t\t\t>\n\t\t\t\t<StatusIndicator status={status.hasFailure ? 'failed' : 'running'} />\n\t\t\t</Link>\n\t\t</SimpleTooltip>\n\t)\n}\n\nfunction Navigation({\n\tisMenuOpened,\n\tonMenuOpenChange: setMenuOpened,\n}: {\n\tisMenuOpened: boolean\n\tonMenuOpenChange: (change: boolean) => void\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst apps = useApps()\n\tconst user = useOptionalUser()\n\tconst nextExerciseRoute = useNextExerciseRoute()\n\tconst randomExerciseRoute = useRandomCompletedExerciseRoute()\n\tconst params = useParams()\n\tconst location = useLocation()\n\tconst isOnline = useIsOnline()\n\tconst { users } = usePresence()\n\n\t// Onboarding indicators\n\tconst [showAccountBadge, dismissAccountBadge] =\n\t\tuseOnboardingIndicator('account-link')\n\tconst showExtrasLink = hasExtras(apps)\n\tconst playgroundExtra = data.extras.find(\n\t\t(extra) => extra.name === data.playground.appName,\n\t)\n\tconst isExtrasActive =\n\t\tlocation.pathname === '/extra' || location.pathname.startsWith('/extra/')\n\tconst showExtrasPlaygroundLink = Boolean(playgroundExtra) && !isExtrasActive\n\n\tconst exercise = data.exercises.find(\n\t\t(e) => e.exerciseNumber === Number(params.exerciseNumber),\n\t)\n\tconst app =\n\t\tparams.type === 'solution'\n\t\t\t? exercise?.solutions.find(\n\t\t\t\t\t(s) => s.stepNumber === Number(params.stepNumber),\n\t\t\t\t)\n\t\t\t: params.type === 'problem'\n\t\t\t\t? exercise?.problems.find(\n\t\t\t\t\t\t(p) => p.stepNumber === Number(params.stepNumber),\n\t\t\t\t\t)\n\t\t\t\t: null\n\n\t// container\n\tconst menuControls = useAnimationControls()\n\tconst menuVariants = {\n\t\tclose: { width: 56 },\n\t\topen: { width: OPENED_MENU_WIDTH },\n\t}\n\n\t// items\n\tconst listVariants = {\n\t\tvisible: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.05,\n\t\t\t\twhen: 'beforeChildren',\n\t\t\t\tstaggerChildren: 0.03,\n\t\t\t},\n\t\t},\n\t\thidden: {\n\t\t\topacity: 0,\n\t\t},\n\t}\n\n\tconst handleOpenShortcuts = React.useCallback(() => {\n\t\tif (typeof window === 'undefined') return\n\t\twindow.dispatchEvent(new CustomEvent('toggle-keyboard-shortcuts'))\n\t}, [])\n\n\tconst requestInfo = useRequestInfo()\n\tconst currentTheme = requestInfo.session.theme ?? 'system'\n\tconst themeLabel = {\n\t\tlight: 'Light',\n\t\tdark: 'Dark',\n\t\tsystem: 'System',\n\t}[currentTheme]\n\tconst [isPopoverOpen, setIsPopoverOpen] = React.useState(false)\n\n\treturn (\n\t\t<nav className=\"hidden border-r sm:flex\">\n\t\t\t<motion.div\n\t\t\t\tinitial={isMenuOpened ? 'open' : 'close'}\n\t\t\t\tvariants={menuVariants}\n\t\t\t\tanimate={menuControls}\n\t\t\t>\n\t\t\t\t<div className=\"flex h-full flex-col items-center justify-between\">\n\t\t\t\t\t<NavToggle\n\t\t\t\t\t\ttitle={data.workshopTitle}\n\t\t\t\t\t\tmenuControls={menuControls}\n\t\t\t\t\t\tisMenuOpened={isMenuOpened}\n\t\t\t\t\t\tsetMenuOpened={setMenuOpened}\n\t\t\t\t\t/>\n\t\t\t\t\t{isMenuOpened && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tstyle={{ width: OPENED_MENU_WIDTH }}\n\t\t\t\t\t\t\tclassName=\"scrollbar-thin scrollbar-thumb-scrollbar flex grow flex-col justify-between overflow-y-auto p-6\"\n\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\tto=\"/\"\n\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 text-2xl font-bold whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{data.exercises.map(({ exerciseNumber, title, steps }) => {\n\t\t\t\t\t\t\t\t\tconst exerciseNumberLabel = exerciseNumber\n\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t.padStart(2, '0')\n\t\t\t\t\t\t\t\t\tconst isActive =\n\t\t\t\t\t\t\t\t\t\tNumber(params.exerciseNumber) === exerciseNumber\n\t\t\t\t\t\t\t\t\tconst showPlayground =\n\t\t\t\t\t\t\t\t\t\t!isActive &&\n\t\t\t\t\t\t\t\t\t\tdata.playground.exerciseNumber === exerciseNumber\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<NavigationExerciseListItem\n\t\t\t\t\t\t\t\t\t\t\tkey={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1 text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground mr-1 align-super text-xs tabular-nums\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{exerciseNumberLabel}.\n\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span>{title}</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t{showPlayground ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.exerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.stepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t🛝\n\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t{isActive ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 ml-4 flex flex-col\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"instructions\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background relative px-2 py-0.5 pr-3 text-xl font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bg-foreground text-background':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t!params.stepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIntro\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{steps\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map(({ stepNumber, title, problem, solution }) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={stepNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber={stepNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"leading-tight font-semibold\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{stepNumber.toString().padStart(2, '0')}.{' '}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mt-0.5 ml-3 flex gap-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{problem && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'problem',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(isActive)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tProblem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{problem.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{solution && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstepNumber,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'solution',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(isActive)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSolution\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{solution.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExerciseStepListItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"finished\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texerciseNumber={exerciseNumber}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={getExercisePath(exerciseNumber, 'finished')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background relative px-2 py-0.5 pr-3 text-base font-medium whitespace-nowrap outline-none after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bg-foreground text-background': isActive,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t📝 Elaboration\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExerciseStepListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t</NavigationExerciseListItem>\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t{showExtrasLink ? (\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex items-center gap-1 text-2xl font-bold\">\n\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\tto=\"/extra\"\n\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'relative px-2 py-0.5 pr-3 whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"] hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ 'bg-foreground text-background': isActive },\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t📚 Extras\n\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t{showExtrasPlaygroundLink && playgroundExtra ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\t\t\tto={`/extra/${playgroundExtra.dirName}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t🛝\n\t\t\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{isExtrasActive && data.extras.length ? (\n\t\t\t\t\t\t\t\t\t\t\t<motion.ul\n\t\t\t\t\t\t\t\t\t\t\t\tvariants={listVariants}\n\t\t\t\t\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 ml-4 flex flex-col\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{data.extras.map((extra) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<NavigationExtrasListItem key={extra.dirName}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tto={`/extra/${extra.dirName}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetNavHighlightClassName(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisActive,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'leading-tight font-semibold',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{extra.title}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{extra.name === data.playground.appName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? ' 🛝'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</NavigationExtrasListItem>\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</motion.ul>\n\t\t\t\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t\t\t\t<NavLink\n\t\t\t\t\t\t\t\t\tto=\"/finished\"\n\t\t\t\t\t\t\t\t\tclassName={({ isActive }) =>\n\t\t\t\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\t\t\t\t'relative text-lg font-bold whitespace-nowrap outline-none hover:underline focus:underline',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'after:bg-background bg-foreground text-background after:absolute after:-right-2.5 after:-bottom-2.5 after:h-5 after:w-5 after:scale-75 after:rotate-45 after:content-[\"\"]':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisActive,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t📝 Workshop Feedback\n\t\t\t\t\t\t\t\t</NavLink>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t\t{!isMenuOpened && (\n\t\t\t\t\t\t<div className=\"flex grow flex-col justify-center\">\n\t\t\t\t\t\t\t<div className=\"orientation-sideways w-full font-mono text-sm leading-none font-medium uppercase\">\n\t\t\t\t\t\t\t\t{exercise?.title ? (\n\t\t\t\t\t\t\t\t\t<Link to={getExercisePath(Number(params.exerciseNumber))}>\n\t\t\t\t\t\t\t\t\t\t{exercise.title}\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t{exercise?.title && app?.title ? ' — ' : null}\n\t\t\t\t\t\t\t\t{app?.title ? (\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\tto={getExerciseStepPath(\n\t\t\t\t\t\t\t\t\t\t\tNumber(params.exerciseNumber),\n\t\t\t\t\t\t\t\t\t\t\tapp.stepNumber,\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{app.title}\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{isOnline ? null : (\n\t\t\t\t\t\t<SimpleTooltip content={isMenuOpened ? null : 'You are offline'}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'flex w-full animate-pulse items-center border-t p-4',\n\t\t\t\t\t\t\t\t\tisMenuOpened ? 'justify-start' : 'justify-center',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tname=\"WifiNoConnection\"\n\t\t\t\t\t\t\t\t\tclassName=\"text-foreground-destructive\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"whitespace-nowrap\">You are offline</span>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t</Icon>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t)}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'flex w-full items-center justify-start border-t p-4 transition-[height]',\n\t\t\t\t\t\t\tisMenuOpened && users.length > 4 ? 'h-28' : 'h-14',\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tstyle={isMenuOpened ? { width: OPENED_MENU_WIDTH } : {}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FacePile isMenuOpened={isMenuOpened} />\n\t\t\t\t\t</div>\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user ? (\n\t\t\t\t\t\t<SimpleTooltip content={isMenuOpened ? null : 'Your account'}>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tclassName=\"relative flex h-14 w-full shrink-0 items-center justify-start space-x-3 border-t px-4 py-4 text-center no-underline hover:underline\"\n\t\t\t\t\t\t\t\tto=\"/account\"\n\t\t\t\t\t\t\t\tonClick={dismissAccountBadge}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{user.imageUrlSmall ? (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\talt={user.name ?? user.email}\n\t\t\t\t\t\t\t\t\t\tsrc={user.imageUrlSmall}\n\t\t\t\t\t\t\t\t\t\tclassName=\"h-full rounded-full\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Icon name=\"User\" className=\"shrink-0\" size=\"lg\" />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tYour Account\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Your account</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{showAccountBadge ? (\n\t\t\t\t\t\t\t\t\t<OnboardingBadge\n\t\t\t\t\t\t\t\t\t\ttooltip=\"View your account and preferences\"\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user && nextExerciseRoute ? (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tcontent={isMenuOpened ? null : 'Continue to next lesson'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={nextExerciseRoute}\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstate={{ from: 'continue next lesson button' }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"FastForward\" className=\"shrink-0\" size=\"md\" />\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tContinue to next lesson\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Continue to next lesson</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{ENV.EPICSHOP_DEPLOYED ? null : user && randomExerciseRoute ? (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tcontent={isMenuOpened ? null : 'Practice a past lesson'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto={randomExerciseRoute}\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex h-14 w-full items-center space-x-3 border-t px-4 py-4 pl-[18px] no-underline hover:underline',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"shrink-0\" size=\"md\" />\n\t\t\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center whitespace-nowrap\"\n\t\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tPractice a past lesson\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Practice a past lesson</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"mb-4 w-full self-start border-t pt-[15px] pl-3\">\n\t\t\t\t\t\t{isMenuOpened ? (\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<ThemeSwitch />\n\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Keyboard shortcuts (press ?)\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\taria-label=\"Keyboard shortcuts\"\n\t\t\t\t\t\t\t\t\t\tonClick={handleOpenShortcuts}\n\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring flex h-8 w-8 items-center justify-center rounded-md transition-colors focus-visible:ring-2 focus-visible:ring-offset-2\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Icon name=\"Question\" size=\"md\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t<SidecarStatusIndicator status={data.sidecarStatus} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>\n\t\t\t\t\t\t\t\t{data.sidecarStatus?.hasFailure ? (\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\taria-label=\"Process error - click to see details\"\n\t\t\t\t\t\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\t\t\t\t\t\tisPopoverOpen\n\t\t\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Process error - click to see details'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<StatusIndicator status=\"failed\" />\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\taria-label=\"More options\"\n\t\t\t\t\t\t\t\t\t\t\ttitle={isPopoverOpen ? undefined : 'More options'}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"text-muted-foreground hover:text-foreground hover:bg-muted flex h-8 w-8 items-center justify-center rounded-md transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 20 20\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"5\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"10\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t\t<circle cx=\"15\" cy=\"10\" r=\"1.5\" fill=\"currentColor\" />\n\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t</PopoverTrigger>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t<PopoverContent\n\t\t\t\t\t\t\t\t\tside=\"top\"\n\t\t\t\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-1 p-2\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ThemeSwitchRow\n\t\t\t\t\t\t\t\t\t\tthemeLabel={themeLabel}\n\t\t\t\t\t\t\t\t\t\tdisableTooltip={isPopoverOpen}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\taria-label=\"Keyboard shortcuts\"\n\t\t\t\t\t\t\t\t\t\tonClick={handleOpenShortcuts}\n\t\t\t\t\t\t\t\t\t\tclassName=\"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex h-5 w-5 items-center justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Question\" size=\"md\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<span className=\"flex-1 text-left\">Keyboard shortcuts</span>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t{data.sidecarStatus ? (\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\tto=\"/admin\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"hover:bg-muted flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex h-5 w-5 items-center justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<StatusIndicator\n\t\t\t\t\t\t\t\t\t\t\t\t\tstatus={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.sidecarStatus.hasFailure ? 'failed' : 'running'\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"flex-1 text-left\">\n\t\t\t\t\t\t\t\t\t\t\t\tSidecar process{' '}\n\t\t\t\t\t\t\t\t\t\t\t\t{data.sidecarStatus.hasFailure ? 'error' : 'running'}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t</PopoverContent>\n\t\t\t\t\t\t\t</Popover>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</motion.div>\n\t\t</nav>\n\t)\n}\n\nfunction ThemeSwitchRow({\n\tthemeLabel,\n\tdisableTooltip,\n}: {\n\tthemeLabel: string\n\tdisableTooltip?: boolean\n}) {\n\tconst wrapperRef = React.useRef<HTMLDivElement>(null)\n\n\tconst handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n\t\tconst form = wrapperRef.current?.querySelector<HTMLFormElement>('form')\n\t\tif (!form) return\n\t\tconst submitButton = form.querySelector<HTMLButtonElement>(\n\t\t\t'button[type=\"submit\"]',\n\t\t)\n\t\t// Don't trigger click if the event originated from the submit button itself\n\t\tif (submitButton?.contains(event.target as Node)) {\n\t\t\treturn\n\t\t}\n\t\tsubmitButton?.click()\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={wrapperRef}\n\t\t\tonClick={handleClick}\n\t\t\tclassName=\"hover:bg-muted flex cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors\"\n\t\t>\n\t\t\t<div className=\"flex h-5 w-5 items-center justify-center\">\n\t\t\t\t<ThemeSwitch disableTooltip={disableTooltip} />\n\t\t\t</div>\n\t\t\t<span className=\"flex-1 text-left\">{themeLabel} theme</span>\n\t\t</div>\n\t)\n}\n\nfunction NavToggle({\n\ttitle,\n\tisMenuOpened,\n\tsetMenuOpened,\n\tmenuControls,\n}: {\n\ttitle: string\n\tisMenuOpened: boolean\n\tsetMenuOpened: (value: boolean) => void\n\tmenuControls?: ReturnType<typeof useAnimationControls>\n}) {\n\tconst initialOpenRef = React.useRef(isMenuOpened)\n\tconst menuButtonRef = React.useRef<HTMLButtonElement>(null)\n\tconst path01Variants = {\n\t\topen: { d: 'M3.06061 2.99999L21.0606 21' },\n\t\tclosed: { d: 'M0 9.5L24 9.5' },\n\t}\n\tconst path02Variants = {\n\t\topen: { d: 'M3.00006 21.0607L21 3.06064' },\n\t\tmoving: { d: 'M0 14.5L24 14.5' },\n\t\tclosed: { d: 'M0 14.5L15 14.5' },\n\t}\n\tconst path01Controls = useAnimationControls()\n\tconst path02Controls = useAnimationControls()\n\n\tasync function toggleMenu() {\n\t\tvoid menuControls?.start(isMenuOpened ? 'close' : 'open')\n\t\tsetMenuOpened(!isMenuOpened)\n\t\tif (isMenuOpened) {\n\t\t\tvoid path01Controls.start(path01Variants.closed)\n\t\t\tawait path02Controls.start(path02Variants.moving)\n\t\t\tvoid path02Controls.start(path02Variants.closed)\n\t\t} else {\n\t\t\tawait path02Controls.start(path02Variants.moving)\n\t\t\tvoid path01Controls.start(path01Variants.open)\n\t\t\tvoid path02Controls.start(path02Variants.open)\n\t\t}\n\t}\n\n\tReact.useEffect(() => {\n\t\tif (!isMenuOpened) return\n\n\t\tfunction handleKeyDown(event: KeyboardEvent) {\n\t\t\tif (event.key !== 'Escape' || event.defaultPrevented) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst hasOpenDialog = Boolean(\n\t\t\t\tdocument.querySelector(\n\t\t\t\t\t'[role=\"dialog\"][data-state=\"open\"], [role=\"alertdialog\"][data-state=\"open\"]',\n\t\t\t\t),\n\t\t\t)\n\n\t\t\tif (!hasOpenDialog) {\n\t\t\t\tmenuButtonRef.current?.click()\n\t\t\t}\n\t\t}\n\t\tdocument.addEventListener('keydown', handleKeyDown)\n\t\treturn () => document.removeEventListener('keydown', handleKeyDown)\n\t}, [isMenuOpened])\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t'relative inline-flex h-14 shrink-0 items-center justify-between overflow-hidden border-r sm:w-full sm:border-r-0 sm:border-b',\n\t\t\t\t{\n\t\t\t\t\t'w-full': isMenuOpened,\n\t\t\t\t},\n\t\t\t)}\n\t\t>\n\t\t\t<button\n\t\t\t\tref={menuButtonRef}\n\t\t\t\tclassName=\"flex h-14 w-14 items-center justify-center\"\n\t\t\t\taria-label=\"Open Navigation menu\"\n\t\t\t\tonClick={toggleMenu}\n\t\t\t>\n\t\t\t\t<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\">\n\t\t\t\t\t<motion.path\n\t\t\t\t\t\t{...path01Variants[initialOpenRef.current ? 'open' : 'closed']}\n\t\t\t\t\t\tanimate={path01Controls}\n\t\t\t\t\t\ttransition={{ duration: 0.2 }}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t/>\n\t\t\t\t\t<motion.path\n\t\t\t\t\t\t{...path02Variants[initialOpenRef.current ? 'open' : 'closed']}\n\t\t\t\t\t\tanimate={path02Controls}\n\t\t\t\t\t\ttransition={{ duration: 0.2 }}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeWidth={1.5}\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t\t{isMenuOpened && (\n\t\t\t\t<motion.p\n\t\t\t\t\ttransition={{ delay: 0.2 }}\n\t\t\t\t\tinitial={{ opacity: 0, y: 5 }}\n\t\t\t\t\tanimate={{ opacity: 1, y: 0 }}\n\t\t\t\t\tclassName=\"absolute right-5 font-mono text-sm whitespace-nowrap uppercase\"\n\t\t\t\t>\n\t\t\t\t\t<Link to=\"/\">{title}</Link>\n\t\t\t\t</motion.p>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n"],"names":["stopAnimation","visualElement","value","setVariants","variantLabels","key","variant","setTarget","child","setValues","definition","animationControls","subscribers","controls","transitionOverride","animations","animateVisualElement","useAnimationControls","useConstant","useIsomorphicLayoutEffect","makeMediaQueryStore","mediaQuery","serverSnapshot","getSnapshot","subscribe","callback","mediaQueryList","useSyncExternalStore","Popover","props","jsx","PopoverPrimitive.Root","PopoverTrigger","PopoverPrimitive.Trigger","PopoverContent","className","align","sideOffset","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn","opacities","shadows","getScoreClassNames","score","opacityNumber","Math","round","length","shadowNumber","FacePile","isMenuOpened","loggedInUser","useOptionalUser","users","usePresence","product","displayNameShort","useWorkshopConfig","limit","numberOverLimit","shouldShowNumberOverLimit","tiffany","Link","target","rel","to","children","alt","src","overLimitLabel","TooltipProvider","slice","map","user","scoreClassNames","locations","getUserLocations","imageUrl","imageUrlSmall","avatarUrl","hasAccess","local","some","loc","origin","includes","productHostEmojis","getUniqueProductHostEmojis","loggedInEmojis","getLoggedInProductEmojis","loggedInProductHosts","optOut","Tooltip","TooltipTrigger","asChild","tabIndex","Icon","name","TooltipContent","jsxs","id","doingLabel","index","locationLabel","getLocationLabel","line1","getProductHostEmoji","productHost","line2","workshopTitle","hosts","host","filter","Boolean","join","location","uniqueHosts","Set","add","size","Array","from","hasExtras","apps","app","rootDir","relativePath","split","useIsWide","_layout","_UNSAFE_withComponentProps","data","useLoaderData","isWide","isHydrated","useHydrated","setMenuOpenedState","React","useRevalidationWS","watchPaths","setMenuOpened","document","cookie","toString","NoUserBanner","MobileNavigation","onMenuOpenChange","Navigation","Outlet","exercise","exercisePortion","exerciseNumber","stepNumber","s","padStart","type","displayName","userHasAccess","useUserHasAccess","showLoginBadge","dismissLoginBadge","useOnboardingIndicator","details","ENV","EPICSHOP_DEPLOYED","Fragment","EPICSHOP_GITHUB_REPO","href","Logo","style","onClick","OnboardingBadge","tooltip","Dialog","DialogTrigger","DialogContent","DialogHeader","DialogDescription","itemVariants","hidden","opacity","x","visible","NavigationExerciseListItem","progressClassName","useExerciseProgressClassName","motion","li","variants","NavigationExerciseStepListItem","progressItemSearch","useProgressItemClassName","NavigationExtrasListItem","navHighlightBaseClassName","getNavHighlightClassName","isActive","clsx","useApps","nextExerciseRoute","useNextExerciseRoute","randomExerciseRoute","useRandomCompletedExerciseRoute","params","useParams","useLocation","isOnline","useIsOnline","showAccountBadge","dismissAccountBadge","showExtrasLink","playgroundExtra","extras","find","extra","playground","appName","isExtrasActive","pathname","startsWith","showExtrasPlaygroundLink","listVariants","transition","duration","when","staggerChildren","currentTheme","useRequestInfo","session","theme","themeLabel","light","dark","system","isMobilePopoverOpen","setIsMobilePopoverOpen","showMobilePopover","sidecarStatus","NavToggle","title","div","initial","animate","ul","NavLink","prefetch","exercises","steps","exerciseNumberLabel","Number","showPlayground","getExercisePath","getExerciseStepPath","problem","solution","dirName","SimpleTooltip","content","email","state","ThemeSwitch","SidecarStatusIndicator","status","open","onOpenChange","hasFailure","StatusIndicator","width","height","viewBox","fill","xmlns","cx","cy","r","side","ThemeSwitchRow","disableTooltip","OPENED_MENU_WIDTH","failureCount","e","solutions","problems","p","menuControls","menuVariants","close","handleOpenShortcuts","window","dispatchEvent","CustomEvent","isPopoverOpen","setIsPopoverOpen","wrapperRef","handleClick","event","form","current","querySelector","submitButton","contains","click","ref","initialOpenRef","menuButtonRef","path01Variants","d","closed","path02Variants","moving","path01Controls","path02Controls","toggleMenu","start","handleKeyDown","defaultPrevented","addEventListener","removeEventListener","path","stroke","strokeWidth","delay","y"],"mappings":"ysCAGA,SAASA,GAAcC,EAAe,CAClCA,EAAc,OAAO,QAASC,GAAUA,EAAM,MAAM,CACxD,CACA,SAASC,GAAYF,EAAeG,EAAe,CACxB,CAAC,GAAGA,CAAa,EAAE,QAAO,EAClC,QAASC,GAAQ,CAC5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