1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1932e126-6796-46d8-a9cf-83ee449601c0",e._sentryDebugIdIdentifier="sentry-dbid-1932e126-6796-46d8-a9cf-83ee449601c0")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[569],{63993:(e,t,r)=>{r.d(t,{cn:()=>a});var s=r(29722),i=r(622);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.QP)((0,s.$)(t))}},80569:(e,t,r)=>{r.r(t),r.d(t,{default:()=>D});var s=r(95155),i=r(88808),a=r(39449),n=r(98500),o=r.n(n),l=r(73321),d=r(12115),c=r(15205),m=r(70460),u=r(68822),x=r(79372),p=r(97810),y=r(98401),f=r(89363),h=r(32967),b=r(25777),g=r(48368),v=r(13545),j=r(23714),N=r(72730),w=r(51900),A=r(36999),k=r(92972),P=r(21362),E=r(33210),z=r(41585),C=r(92018),M=r(41313),_=r(63993),L=r(87822);let S="__STORYBOOK_PREVIEW__"in window&&window.__STORYBOOK_PREVIEW__?e=>{let{children:t,mode:r="modal"}=e;return(0,s.jsx)(s.Fragment,{children:t})}:c.hZ,T={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:.05*e,duration:.3,ease:[.22,1,.36,1]}})};function D(e){let{isOpen:t,isSignedIn:r=!1,userName:n="User",isAdmin:c=!1}=e,D=(0,l.usePathname)(),I=(0,d.useRef)(null),O=(0,d.useRef)(null),{setTheme:R,resolvedTheme:F}=(0,m.D)(),[B,G]=(0,d.useState)(void 0),[H,U]=(0,d.useState)(!1),[q,J]=(0,d.useState)(0),[K,Q]=(0,d.useState)(t),V=(0,d.useCallback)(()=>{Q(!1)},[]),W=(0,d.useCallback)(()=>{V()},[V]);(0,d.useEffect)(()=>{Q(t)},[t]),(0,d.useEffect)(()=>{console.warn('The MenuPanel component from layout directory is deprecated. Please use the new MenuPanel component from organisms directory instead: import { MenuPanel } from "@/components/organisms/MenuPanel"')},[]),(0,d.useEffect)(()=>{let e=()=>{J(window.innerHeight)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,d.useEffect)(()=>{t&&G(F)},[t,F]),(0,d.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&V()},r=e=>{!t||I.current&&I.current.contains(e.target)||V()};return document.addEventListener("keydown",e),document.addEventListener("mousedown",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",r)}},[t,V]),(0,d.useEffect)(()=>{let e=e=>{O.current&&!O.current.contains(e.target)&&U(!1)};return H&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[H]),(0,d.useEffect)(()=>{V()},[D,V]),(0,d.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]);let X=(e,t)=>{t.onClick&&(e.preventDefault(),t.onClick()),V()},Y=q<600?"ultra-compact":q<750?"compact":q<900?"normal":"full",$="ultra-compact"===Y||"compact"===Y,Z=[{href:"/about",title:"About",description:"Learn more about Ella",icon:(0,s.jsx)(u.A,{className:"text-primary",size:18}),isActive:"/about"===D},{href:"/pricing",title:"Pricing",description:"Monthly plans starting at $9",icon:(0,s.jsx)(x.A,{className:"text-primary",size:18}),isActive:"/pricing"===D},{href:"/guides",title:"Ella Guides",description:"Browse wellness resources",icon:(0,s.jsx)(p.A,{className:"text-primary",size:18}),isActive:"/guides"===D,isNew:!0}],ee=r?[{href:"/dashboard",title:"Dashboard",description:"Track your wellness journey",icon:(0,s.jsx)(y.A,{className:"text-primary",size:18}),isActive:"/dashboard"===D,badge:"Updated"},{href:"/settings",title:"Settings",description:"Personalize your experience",icon:(0,s.jsx)(f.A,{className:"text-primary",size:18}),isActive:"/settings"===D},...c?[{href:"/admin",title:"Admin Panel",description:"Subscription troubleshooting",icon:(0,s.jsx)(h.A,{className:"text-primary",size:18}),isActive:"/admin"===D}]:[]]:[],et=[{href:"/privacy",title:"Privacy",icon:(0,s.jsx)(b.A,{className:"text-primary",size:16}),isActive:"/privacy"===D},{href:"/terms",title:"Terms",icon:(0,s.jsx)(g.A,{className:"text-primary",size:16}),isActive:"/terms"===D},{href:"/disclaimer",title:"Disclaimer",icon:(0,s.jsx)(v.A,{className:"text-primary",size:16}),isActive:"/disclaimer"===D}],er=[{href:"/faq",title:"FAQ",icon:(0,s.jsx)(j.A,{className:"text-primary",size:16}),isActive:"/faq"===D},{href:"/accessibility",title:"Accessibility",icon:(0,s.jsx)(N.A,{className:"text-primary",size:16}),isActive:"/accessibility"===D},{href:"#",title:"Theme",icon:"light"===B?(0,s.jsx)(w.A,{className:"text-primary",size:16}):"dark"===B?(0,s.jsx)(A.A,{className:"text-primary",size:16}):(0,s.jsx)(k.A,{className:"text-primary",size:16}),onClick:()=>U(!H)}],es=(e,t)=>(0,s.jsx)(i.P.div,{custom:t,variants:T,initial:"hidden",animate:"visible","data-sentry-element":"motion.div","data-sentry-component":"renderMenuItem","data-sentry-source-file":"MenuPanel.tsx",children:(0,s.jsxs)(o(),{href:e.href,onClick:t=>X(t,e),className:(0,_.cn)("group flex items-center gap-3 p-3.5 rounded-xl transition-all",e.isActive?"bg-primary/10 text-primary border border-primary/20 shadow-sm":"bg-card hover:bg-muted/50 border border-border/40 hover:border-border/70 hover:shadow-sm"),"data-sentry-element":"Link","data-sentry-source-file":"MenuPanel.tsx",children:[(0,s.jsx)("span",{className:"flex-none flex justify-center items-center w-8 h-8 rounded-lg bg-background/80 group-hover:bg-background border border-border/30 shadow-sm",children:e.icon}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("p",{className:"font-bold",children:e.title}),e.badge&&(0,s.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] rounded-full bg-primary/15 text-primary font-semibold",children:e.badge}),e.isNew&&(0,s.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] rounded-full bg-primary/15 text-primary font-semibold",children:"New"})]}),e.description&&(0,s.jsx)("p",{className:(0,_.cn)("text-muted-foreground",$?"text-xs font-normal":"text-sm font-normal","ultra-compact"===Y&&"line-clamp-1"),children:e.description})]}
1),(0,s.jsx)(P.A,{size:16,className:"text-muted-foreground/50 group-hover:text-primary transition-all opacity-0 group-hover:opacity-100","data-sentry-element":"ChevronRight","data-sentry-source-file":"MenuPanel.tsx"})]})},e.href),ei=(e,t)=>(0,s.jsxs)(i.P.div,{ref:"Theme"===e.title?O:void 0,custom:t,variants:T,initial:"hidden",animate:"visible",className:(0,_.cn)("relative text-center",e.isActive?"bg-primary/10 text-primary border border-primary/20 shadow-sm":"bg-card hover:bg-muted/50 border border-border/40 hover:border-border/70 hover:shadow-sm","rounded-xl p-2.5 flex flex-col items-center justify-center"),"data-sentry-element":"motion.div","data-sentry-component":"renderGridItem","data-sentry-source-file":"MenuPanel.tsx",children:[(0,s.jsxs)(o(),{href:e.href,onClick:t=>X(t,e),className:"w-full flex flex-col items-center","data-sentry-element":"Link","data-sentry-source-file":"MenuPanel.tsx",children:[(0,s.jsx)("div",{className:"flex justify-center items-center w-8 h-8 rounded-lg bg-background/80 border border-border/30 shadow-sm mb-1.5",children:e.icon}),(0,s.jsx)("p",{className:"text-xs font-bold",children:e.title})]}),"Theme"===e.title&&(H?(0,s.jsxs)(i.P.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.2},className:"absolute right-0 bottom-full mb-2 w-40 bg-background border border-border rounded-lg shadow-lg py-1.5 z-10 overflow-hidden","data-sentry-element":"motion.div","data-sentry-component":"renderThemeOptions","data-sentry-source-file":"MenuPanel.tsx",children:[(0,s.jsxs)("button",{onClick:()=>{R("light"),U(!1)},className:(0,_.cn)("flex items-center gap-2 w-full px-3 py-2.5 text-sm text-left transition-colors","light"===B?"bg-primary/10 text-primary font-bold":"hover:bg-muted/50 font-medium"),children:[(0,s.jsx)(w.A,{size:16,className:"text-primary","data-sentry-element":"Sun","data-sentry-source-file":"MenuPanel.tsx"}),(0,s.jsx)("span",{children:"Light Mode"})]}),(0,s.jsxs)("button",{onClick:()=>{R("dark"),U(!1)},className:(0,_.cn)("flex items-center gap-2 w-full px-3 py-2.5 text-sm text-left transition-colors","dark"===B?"bg-primary/10 text-primary font-bold":"hover:bg-muted/50 font-medium"),children:[(0,s.jsx)(A.A,{size:16,className:"text-primary","data-sentry-element":"Moon","data-sentry-source-file":"MenuPanel.tsx"}),(0,s.jsx)("span",{children:"Dark Mode"})]}),(0,s.jsxs)("button",{onClick:()=>{R("system"),U(!1)},className:(0,_.cn)("flex items-center gap-2 w-full px-3 py-2.5 text-sm text-left transition-colors","system"===B?"bg-primary/10 text-primary font-bold":"hover:bg-muted/50 font-medium"),children:[(0,s.jsx)(k.A,{size:16,className:"text-primary","data-sentry-element":"Monitor","data-sentry-source-file":"MenuPanel.tsx"}),(0,s.jsx)("span",{children:"System Default"})]})]}):null)]},"".concat(e.href,"-").concat(t));return K?(0,s.jsx)(a.N,{"data-sentry-element":"AnimatePresence","data-sentry-component":"MenuPanel","data-sentry-source-file":"MenuPanel.tsx",children:K&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeOut"},className:"fixed inset-0 bg-black/30 backdrop-blur-sm z-40",onClick:V}),(0,s.jsxs)(i.P.div,{ref:I,initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300,mass:1},style:{height:q},className:"fixed top-0 right-0 w-[min(420px,90vw)] bg-background border-l border-border shadow-xl z-50 flex flex-col",children:[(0,s.jsxs)(i.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.3},className:"px-5 py-4 flex justify-between items-center border-b border-border",children:[(0,s.jsx)("h2",{className:"text-lg font-bold text-foreground",children:"Menu"}),r&&n?(0,s.jsxs)("span",{className:"text-sm font-normal text-muted-foreground",children:["Hello, ",(0,s.jsx)("span",{className:"font-medium",children:n})]}):(0,s.jsx)(o(),{href:"/pricing",onClick:V,className:"mx-2 px-4 py-1.5 bg-primary text-primary-foreground rounded-lg text-center text-xs font-bold hover:bg-primary/90 transition-colors shadow-sm",children:"Unlock Full Access"}),(0,s.jsx)("button",{onClick:V,className:"p-2 hover:bg-muted/70 rounded-full transition-colors","aria-label":"Close menu",children:(0,s.jsx)(E.A,{className:"w-5 h-5 text-foreground"})})]}),(0,s.jsxs)("div",{className:"flex-1 px-5 py-4 flex flex-col gap-5 overflow-auto",children:["/"!==D&&(0,s.jsx)(i.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.15,duration:.3},children:(0,s.jsxs)(o(),{href:"/",className:"w-full flex items-center justify-center gap-2 rounded-xl bg-destructive px-4 py-3.5 text-center hover:bg-destructive/90 transition-colors shadow-md",onClick:V,children:[(0,s.jsx)(z.A,{className:"h-5 w-5 text-destructive-foreground"}),(0,s.jsx)("p",{className:"font-bold text-destructive-foreground",children:"Get Help Now"})]})}),(0,s.jsxs)(i.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2,duration:.3},className:"relative",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-primary/20 rounded-xl blur opacity-25"}),(0,s.jsxs)(o(),{href:L.J.newChat,className:"relative w-full flex items-center justify-center gap-2 rounded-xl bg-primary px-4 py-3.5 text-center hover:bg-primary/90 transition-all shadow-md",onClick:V,children:[(0,s.jsx)(C.A,{className:"h-5 w-5 text-primary-foreground"}),(0,s.jsx)("p",{className:"font-bold text-primary-foreground",children:"Connect with Ella"})]})]}),(0,s.jsxs)(i.P.div,{className:"space-y-2.5",initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.25},children:[(0,s.jsx)(a.N,{children:Z.map(es)}),(0,s.jsx)(a.N,{children:ee.map((e,t)=>es(e,t+Z.length))})]}),(0,s.jsx)(i.P.div,{className:"border-t border-border my-1",initial:{scaleX:0},animate:{scaleX:1},transition:{delay:.3,duration:.3}}),(0,s.jsxs)(i.P.div,{className:"space-y-2.5",initial:{opacity:0},animate:{opacity:1},transition:{delay:.35},children:[(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2.5",children:et.map((e,t)=>ei(e,t))}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2.5",children:er.map((e,t)=>ei(e,t+et.length))})]}),r&&(0,s.jsx)(i.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4,duration:.3},className:"mt-auto p-3.5 rounded-xl border border-border bg-card hover:bg-muted/50 text-left transition-colors group",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"flex-none flex justify-center items-center w-8 h-8 rounded-lg bg-background/80 border border-border/30 shadow-sm",children:(0,s.jsx)(M.A,{size:16,className:"text-primary"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("button",{onClick:W,className:"font-bold w-full text-left group-hover:text-primary transition-colors",children:"Sign Out"}),(0,s.jsx)("p",{className:(0,_.cn)("text-muted-foreground",$?"text-xs font-normal":"text-sm font-normal"),children:"Log out of your account"})]})]})})]}),!r&&(0,s.jsx)(i.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4,duration:.3},className:"mt-auto px-5 py-4 border-t border-border",children:(0,s.jsx)(S,{mode:"modal",children:(0,s.jsx)("button",{onClick:V,className:"w-full py-3 px-4 bg-primary text-primary-foreground rounded-xl hover:bg-primary/90 transition-colors shadow-md font-bold",children:"Sign In"})})})]})]})}):null}},87822:(e,t,r)=>{r.d(t,{J:()=>s});let s={home:"/chat",newChat:"/chat?new=1",dashboard:"/dashboard",settings:"/dashboard/settings"}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.