(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[678],{20340:(e,t,r)=>{"use strict";r.d(t,{ON:()=>v,a7:()=>b,lo:()=>C});var n=r(10488),o=r(85556),a=r(61982),i=r(38711),l=r(58624),s=r(28693),d=r(1367),c=(r(58987),r(47857)),u=r.n(c);let h=(0,o.createContext)({rootOrigin:{x:0,y:0},rootBounds:{width:0,height:0},portalRef:null,activeId:null,setActiveId:()=>void 0,hoveredId:null,setHoveredId:()=>void 0,updateActiveContextCard:()=>void 0,skipTransition:!1,rootVisible:!1,distanceFromLast:0,lastOrigin:null});function m(e){let t=(0,o.useRef)(null);return(0,o.useEffect)(()=>{t.current=e}),t.current}function f({children:e}){let[t,r]=(0,o.useState)(!1);(0,o.useEffect)(()=>r(!0),[]);let[a,i]=(0,d.A)(),l=(0,o.useRef)(null),[c,f]=(0,o.useState)(null),[x,_]=(0,o.useState)(!1),[g,p]=(0,o.useState)(null),w=(0,o.useRef)(null);function v(e){w.current=e,_(null!==e)}let y=e=>{(e?.id===w.current||null===e)&&f(e)},C=(0,o.useMemo)(()=>c?{width:c.contentSize.width+2,height:c.contentSize.height+2,x:c.origin.x,y:c.origin.y,offsetX:c.offset.x,offsetY:c.offset.y,side:c.side}:{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0,side:"top"},[c]),b=m(C),S=m(w.current),M=(0,o.useMemo)(()=>{if(!b)return 0;let e=Math.max(C.x,b.x),t=Math.min(C.x+C.width,b.x+b.width),r=Math.max(C.y,b.y),n=Math.min(C.y+C.height,b.y+b.height);if(eMath.sqrt(((b?.x??0)-C.x)**2+((b?.y??0)-C.y)**2),[C.x,C.y,b?.x,b?.y]),k=(0,o.useMemo)(()=>b?{x:b.x-C.x,y:b.y-C.y}:null,[C,b]),[A,N]=(0,o.useState)(!1),E=(0,o.useMemo)(()=>j>150||M>100||null===S||A,[j,A,S,M]);(0,o.useEffect)(()=>{let e=null,t=()=>{e&&window.clearTimeout(e),e=setTimeout(()=>{N(!1)},66),A||N(!0)};return document.addEventListener("scroll",t,!0),()=>{document.removeEventListener("scroll",t,!0)}},[A]);let O=(0,o.useMemo)(()=>({updateActiveContextCard:y,rootOrigin:{...C},rootBounds:i,portalRef:l,setActiveId:v,activeId:w,setHoveredId:p,hoveredId:g,skipTransition:E,rootVisible:x,distanceFromLast:j,lastOrigin:k}),[C,i,g,E,x,j,k]),R=(0,o.useMemo)(()=>"top"===C.side?0:"bottom"===C.side?180:"left"===C.side?270:90,[C]);return(0,n.jsxs)(h.Provider,{value:O,children:[e,t?(0,s.createPortal)((0,n.jsx)("div",{className:u().portal,ref:a,children:(0,n.jsxs)("div",{className:u().contextCardRootVisibility,style:{opacity:+!!x},children:[(0,n.jsx)("div",{className:u().contextCardTip,"data-skip-transition":E,style:{transform:`translate(${C.x-C.offsetX}px, ${C.y-C.offsetY}px) rotate(${R}deg)`},children:(0,n.jsxs)("svg",{height:"10",viewBox:"0 0 14 10",width:"14",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M7.00009 8.11236L1.46893 0H12.5312L7.00009 8.11236Z",fill:"var(--ds-background-100)"}),(0,n.jsx)("path",{d:"M0.94043 1L7.00009 9.8875L13.0597 1H11.8494L7.00009 8.11236L2.15075 1H0.94043Z",fill:"var(--ds-gray-400)"})]})}),(0,n.jsx)("div",{className:u().contextCardRoot,"data-skip-transition":E,style:{transform:`translate(${C.x}px,${C.y}px)`,width:C.width,height:C.height},children:(0,n.jsx)("div",{ref:l})})]})}),document.body):null]})}var x=r(98171),_=r.n(x),g=r(13509),p=r.n(g);let w={light:"light-theme",dark:"dark-theme"};function v({children:e,storageKey:t="geist-theme",setBackgroundColor:r=!0,...i}){return _(),p(),(0,n.jsxs)(a.N,{attribute:"class",disableTransitionOnChange:!0,storageKey:t,value:w,...i,children:[(0,n.jsx)(o.Suspense,{children:(0,n.jsx)(S,{setBackgroundColor:r})}),(0,n.jsx)(l.B,{children:(0,n.jsx)(f,{children:e})})]})}let y={dashboard:{light:"#FFFFFF",dark:"#0A0A0A"},marketing:{light:"#FAFAFA",dark:"#000000"}},C=e=>{let{resolvedTheme:t}=(0,a.D)(),r=(0,i.useSelectedLayoutSegments)(),n=y[e||M(r)];return{metaThemeColor:"dark"===t?n.dark:n.light}},b=({color:e,setBackgroundColor:t})=>{let r=Array.from(document.querySelectorAll('meta[name="theme-color"]'));if(0===r.length){let e=document.createElement("meta");e.setAttribute("name","theme-color"),document.head.appendChild(e),r.push(e)}r.forEach(t=>{t.setAttribute("content",e)}),t&&(document.documentElement.style.backgroundColor=e)};function S({setBackgroundColor:e=!0}){let{metaThemeColor:t}=C();return(0,o.useEffect)(()=>{b({color:t,setBackgroundColor:e})},[t,e]),null}let M=e=>{if(null===e||0===e.length)return"marketing";for(let t of e){if(t.includes("dashboard"))return"dashboard";if(t.includes("auth")){if("signup"===e[1])return"marketing";return"dashboard"}if(t.includes("(team)"))return"dashboard"}return"marketing"}},47857:e=>{e.exports={portal:"context-card_portal__7uIMS",contextCardTip:"context-card_contextCardTip__JXUxK",contextCardRoot:"context-card_contextCardRoot__jBE_M",contextCardRootContent:"context-card_contextCardRootContent__MNlHW",contextCardContent:"context-card_contextCardContent__0vsq8",contextCardContentVisibility:"context-card_contextCardContentVisibility__OmjsA",contextCardTrigger:"context-card_contextCardTrigger__Pejgm",contextCardRootVisibility:"context-card_contextCardRootVisibility__WD8Ja"}},48412:(e,t,r)=>{"use strict";r.d(t,{BB:()=>a,QD:()=>i,X8:()=>o,cN:()=>n});let n="/learn",o=e=>`completed-${e}-chapters`,a="completed-dashboard-app-chapters",i="completed-react-foundations-chapters"},54955:(e,t,r)=>{"use strict";r.d(t,{_:()=>w});var n=r(10488),o=r(85556),a=r(60914),i=r(91042),l=r(20340),s=r(61982),d=r(89321),c=r(64704),u=r.n(c);r(57744),r(73365);let h=!1;try{let e=Object.defineProperty({},"passive",{get(){}}),t=()=>{};window.addEventListener("scroll",t,e),window.removeEventListener("scroll",t,e)}catch(e){}let m=(0,o.createContext)(void 0),f={dark:"#000",light:"#999999"};function x(e){let{active:t,children:r,className:c,onAnimationDone:h,onClickOutside:x,height:g="auto",allowOverflow:w,drawer:v=!0,drawerClassname:y="",verticalScroll:C=!0,style:b,enableSkip:S,onScroll:M,container:j,fixed:k,resetScroll:A,"data-testid":N,nested:E}=e,O=E?i._s.NestedRoot:i._s.Root,R=(0,o.useRef)(null);(0,o.useEffect)(()=>{t&&R.current&&(R.current.scrollTop=0)},[t,A]);let F=(0,o.useMemo)(()=>({isInDialog:!0}),[]),I=(0,o.useRef)(null),{metaThemeColor:L}=(0,l.lo)("dashboard"),{resolvedTheme:T}=(0,s.D)(),$=function(e){let t=(0,o.useRef)();return(0,o.useEffect)(()=>{t.current=e}),t.current||!1}(t),V=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(!(0,d.nr)()||$===t)return;let e=f[T??"dark"],r=t?L:e,n=t?e:L,o=performance.now(),a=e=>{let i=Math.min((e-o)/400,1),s=p(i);if(V.current){let e=s;t||(e=1-e),V.current.style.opacity=`${100*e}%`}let d=_(r,n,s);(0,l.a7)({color:d,setBackgroundColor:!0}),i<1&&(I.current=requestAnimationFrame(a))};return I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(a),()=>{I.current&&cancelAnimationFrame(I.current)}},[t,L,T]),(0,n.jsx)(O,{dismissible:!S,fixed:k,modal:!0,onOpenChange:e=>{e||(x(),window.requestAnimationFrame(()=>document.body.style.pointerEvents="auto"),setTimeout(()=>{h?.()},500))},open:t,children:(0,n.jsxs)(i._s.Portal,{container:j,children:[(0,n.jsx)("div",{className:(0,a.$)(u().overlay,t&&u().open,!(0,d.nr)()&&u().notSafari),onClick:()=>{x()},ref:V,style:{"--animation-duration":"400ms","--curve":"cubic-bezier(0.32, 0.72, 0, 1)"}}),(0,n.jsx)(i._s.Content,{className:(0,a.$)({[String(u().drawer)]:v},y,"geist-dialog",c),"data-testid":N,style:b,children:(0,n.jsx)("div",{className:(0,a.$)({[String(u().allowOverflow)]:v&&w,[String(u().inner)]:v,[String(u().max)]:"max"===g,[String(u().noVerticalScroll)]:!C},"tailwind"),onScroll:()=>{R.current&&M?.(R.current)},ref:R,children:(0,n.jsx)(m.Provider,{value:F,children:r})})}),(0,n.jsx)(i._s.Overlay,{})]})})}let _=(e,t,r)=>{let n=Number.parseInt(e.slice(1,3),16),o=Number.parseInt(e.slice(3,5),16),a=Number.parseInt(e.slice(5,7),16),i=Number.parseInt(t.slice(1,3),16),l=Number.parseInt(t.slice(3,5),16),s=Number.parseInt(t.slice(5,7),16),d=Math.round(n+r*(i-n)),c=Math.round(o+r*(l-o)),u=Math.round(a+r*(s-a));return`#${d.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}${u.toString(16).padStart(2,"0")}`},g=[0,.021468159999999997,.04267328,.06361631999999999,.08429824,.10472000000000002,.12488255999999998,.14478687999999998,.16443392000000004,.18382464,.20296000000000003,.22184096000000003,.24046847999999998,.25884352,.27696704,.29483999999999994,.3124633599999999,.32983808,.34696512000000007,.3638454400000001,.3804800000000001,.39686976,.41301568,.42891872000000003,.44457983999999995,.45999999999999996,.47518016,.49012127999999994,.50482432,.5192902399999999,.5335199999999999,.5475145599999999,.5612748799999999,.57480192,.58809664,.6011599999999999,.61399296,.6265964799999999,.6389715200000001,.65111904,.6630400000000001,.6747353600000001,.68620608,.6974531200000001,.7084774400000001,.7192800000000001,.72986176,.7402236799999999,.7503667200000002,.7602918399999999,.77,.7794921599999999,.7887692800000001,.79783232,.80668224,.81532,.82374656,.83196288,.8399699199999999,.84776864,.85536,.8627449599999999,.86992448,.87689952,.8836710400000001,.8902400000000001,.89660736,.9027740800000001,.90874112,.91450944,.92008,.92545376,.9306316800000001,.9356147199999999,.9404038399999999,.945,.94940416,.95361728,.9576403200000001,.96147424,.9651200000000001,.9685785600000001,.97185088,.97493792,.9778406399999999,.9805599999999999,.9830969599999999,.9854524800000001,.98762752,.9896230400000001,.9914400000000001,.9930793600000001,.99454208,.99582912,.9969414400000001,.99788,.99864576,.9992396800000001,.99966272,.9999158399999999,1],p=e=>{let t=100*Math.min(Math.max(e,0),1),r=Math.min(Math.floor(t),99),n=g[r];return n+t%1*(g[r+1]-n)},w=({height:e,show:t=!1,onDismiss:r,onAnimationDone:a,children:i,container:l,className:s,verticalScroll:d,fixed:c,resetScroll:u,onScroll:h,nested:m})=>{let f=(0,o.useMemo)(()=>({height:e}),[e]);return(0,n.jsx)(x,{active:t,className:s,container:l,drawer:!0,fixed:c,height:e,nested:m,onAnimationDone:a,onClickOutside:r,onScroll:h,resetScroll:u,style:f,verticalScroll:d,children:i})}},64704:e=>{e.exports={drawer:"new-dialog_drawer__ykt7Q",noVerticalScroll:"new-dialog_noVerticalScroll__0Be1P",allowOverflow:"new-dialog_allowOverflow__XLQcK",inner:"new-dialog_inner__FYIY1",max:"new-dialog_max__P89aL",overlay:"new-dialog_overlay___0a9q",notSafari:"new-dialog_notSafari__UQu2r",fadeOut:"new-dialog_fadeOut__EAwu1",open:"new-dialog_open__DTLMi",fadeIn:"new-dialog_fadeIn__JDemh"}},73365:e=>{e.exports={drawer:"dialog_drawer__zoHbY",noVerticalScroll:"dialog_noVerticalScroll__i73ML",allowOverflow:"dialog_allowOverflow__fDqDx",modalOpen:"dialog_modalOpen__pzqRA",inner:"dialog_inner__XIlj_",max:"dialog_max__C0YX9"}},89321:(e,t,r)=>{"use strict";function n(){return a(/^Mac/)}function o(){return navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function a(e){return null!=window.navigator?e.test(window.navigator.platform):void 0}r.d(t,{cX:()=>n,nr:()=>o})}}]);