1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{2268:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return s(5446)}])},510:function(e,t,s){"use strict";s.d(t,{Am:function(){return m},pm:function(){return u}});var r=s(7294);let a=0,n=new Map,i=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],d={toasts:[]};function c(e){d=o(d,e),l.forEach(e=>{e(d)})}function m(e){let{...t}=e,s=(a=(a+1)%Number.MAX_VALUE).toString(),r=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||r()}}}),{id:s,dismiss:r,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function u(){let[e,t]=r.useState(d);return r.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:m,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},5446:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return F}});var r=s(5893),a=s(4688),n=s(7294),i=s(68),o=s(4777),l=s(8778);let d=i.fC;i.xz;let c=i.h_,m=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(i.aV,{className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a,ref:t})});m.displayName=i.aV.displayName;let u=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(i.VY,{ref:t,className:(0,o.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a}
1)]})});u.displayName=i.VY.displayName;let h=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};h.displayName="AlertDialogHeader";let x=e=>{let{className:t,...s}=e;return(0,r.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};x.displayName="AlertDialogFooter";let g=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(i.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold",s),...a})});g.displayName=i.Dx.displayName;let p=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(i.dk,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",s),...a})});p.displayName=i.dk.displayName;let f=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(i.aU,{ref:t,className:(0,o.cn)((0,l.d)(),s),...a})});f.displayName=i.aU.displayName;let y=n.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)(i.$j,{ref:t,className:(0,o.cn)((0,l.d)({variant:"outline"}),"mt-2 sm:mt-0",s),...a})});y.displayName=i.$j.displayName;var b=s(9346),w=s(5305),j=s(510),v=s(1916),k=s(8550),N=s(1924),E=s(7188),T=s(1993),A=s(782);let C=(0,T.U)()((0,A.tJ)(e=>({hasSeenDashboardModal:!1,markDashboardModalAsSeen:()=>e({hasSeenDashboardModal:!0}),resetOnboardingState:()=>e({hasSeenDashboardModal:!1})}),{name:"ezreply-onboarding-storage"}));var _=s(5219),S=s(618),I=s(9603),M=s(3299),R=s(5675),P=s.n(R),z=s(1664),D=s.n(z),U=s(1163),O=s(9008),L=s.n(O);function F(){var e,t,s,i,o,c,m,T,A,R,z;let O=(0,U.useRouter)(),{data:F,status:Y}=(0,M.useSession)(),[q,B]=(0,n.useState)(!1),[V,Z]=(0,n.useState)(!1),H=(0,k.F_)(),[W,X]=(0,n.useState)(!1),{hasSeenDashboardModal:G,markDashboardModalAsSeen:$}=C(),[Q,K]=(0,n.useState)(!1),{data:J,featureAccess:ee,isLoading:et,refreshUserData:es,isRefetching:er}=(0,k.pg)(null==F?void 0:null===(e=F.user)||void 0===e?void 0:e.id);if((0,n.useEffect)(()=>{(null==F?void 0:F.user)&&!G&&!et&&J&&K(!0)},[F,G,et,J]),(0,n.useEffect)(()=>{let e=async()=>{try{var e;let t=null===(e=O.query)||void 0===e?void 0:e.purchase_success;if("true"===t){X(!0);try{E.E.clear();try{window.localStorage.removeItem("EZREPLY_QUERY_CACHE"),console.log("Cleared persisted query cache")}catch(e){console.error("Error clearing localStorage cache:",e)}}catch(e){console.error("Error clearing query cache:",e)}await new Promise(e=>setTimeout(e,4e3));try{await es(),console.log("Successfully refreshed user data after purchase")}catch(e){console.error("Error refreshing user data:",e)}try{let{pathname:e}=O;await O.replace(e,void 0,{shallow:!0})}catch(e){console.error("Error updating URL:",e)}setTimeout(()=>{X(!1)},500)}}catch(e){console.error("Error handling purchase success:",e),X(!1)}};O.isReady&&e()},[O.isReady,O.query,es,O]),(0,n.useEffect)(()=>{(async()=>{var e;if(null==F?void 0:null===(e=F.user)||void 0===e?void 0:e.accessToken)try{if(await _.O.isExtensionInstalled()){console.log("Extension detected, synchronizing token..."),await new Promise(e=>setTimeout(e,2e3));let e=0,t=!1;for(;!t&&e<5;)try{let s=await _.O.sendTokenToExtension(F.user.accessToken);s.success?(console.log("Token successfully synchronized with extension"),t=!0,0===e&&(0,j.Am)({title:"Extension Connected",description:"Your EzReply extension is now connected and ready to use.",variant:"default"})):(console.warn("Failed to synchronize token with extension (attempt ".concat(e+1,"):"),s.error),e++,await new Promise(t=>setTimeout(t,1500*(e+1))))}catch(t){console.error("Error synchronizing token with extension (attempt ".concat(e+1,"):"),t),e++,await new Promise(t=>setTimeout(t,1500*(e+1)))}t||(console.error("Failed to synchronize token with extension after multiple attempts"),(0,j.Am)({title:"Extension Connection Issue",description:"Unable to connect to the EzReply extension. Please refresh the page or reinstall the extension.",variant:"destructive"}))}}catch(e){console.error("Error checking extension installation:",e)}})()},[F]),(0,n.useEffect)(()=>{if("unauthenticated"===Y)console.log("Dashboard: User is unauthenticated, redirecting to login"),setTimeout(()=>{O.push("/auth/login")},100);else if(F&&"error"in F){console.log("Dashboard: Session has error:",F.error);let e=F.error||"Unknown error";"fetch failed"===e||"string"==typeof e&&(e.includes("network")||e.includes("connection"))?(0,j.Am)({title:"Network Error",description:"Unable to connect to the server. Please check your internet connection.",variant:"destructive"}
1):((0,j.Am)({title:"Authentication Error",description:"Error: ".concat(e,". Please try logging in again."),variant:"destructive"}),setTimeout(()=>{O.push("/auth/login")},100))}else(null==F?void 0:F.user)&&console.log("Dashboard: User is authenticated:",F.user.id)},[F,Y,O]),"loading"===Y||et)return(0,r.jsx)(a.Z,{title:"Account",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:[(0,r.jsx)("div",{className:"w-10 h-10 border-4 border-blue-200 border-t-blue-600 rounded-full animate-spin mb-4"}),(0,r.jsx)("p",{className:"text-gray-600 dark:text-gray-300",children:"Loading your account..."})]})});if(!(null==F?void 0:F.user)||!J)return(0,r.jsx)(a.Z,{title:"Account",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh]",children:[(0,r.jsx)("div",{className:"w-10 h-10 border-4 border-blue-200 border-t-blue-600 rounded-full animate-spin mb-4"}),(0,r.jsx)("p",{className:"text-gray-600 dark:text-gray-300",children:(null==F?void 0:F.user)?"Unable to load your account data. Please check your internet connection.":"Session not available. Please try refreshing the page."}),(0,r.jsx)(l.z,{variant:"outline",className:"mt-4",onClick:()=>window.location.reload(),children:"Refresh Page"})]})});let ea=null!==(A=null==ee?void 0:ee.canUseFullConfiguration)&&void 0!==A?A:N.n.canUseFullConfiguration(F),en=null!==(R=null==ee?void 0:ee.canUseModelTraining)&&void 0!==R?R:N.n.canUseModelTraining(F),ei=null!==(z=null==ee?void 0:ee.credits)&&void 0!==z?z:N.n.getMaxRepliesPerMonth(F),eo=(null==J?void 0:J.plan)||"free",el=(null==J?void 0:J.billingCycle)||"monthly",ed=(null==J?void 0:J.lemonSqueezySubscriptionStatus)==="active",ec=v.QC,em=v.QC;"free"!==eo&&(em=v.vz[eo]||ei,ec="yearly"===el?12*em:em);let eu=Math.max(0,ec-((null==J?void 0:J.credits)||0)),eh=Math.min(100,Math.round(eu/ec*100)),ex=eh>80,eg=async()=>{if(null==F?void 0:F.user.id){Z(!0);try{let e=F.user.id,t=async()=>{let t=new Promise((e,t)=>{setTimeout(()=>t(Error("Request timed out")),1e4)});return Promise.race([H.mutateAsync(e),t])};await t(),await (0,M.signOut)({redirect:!1}),O.push("/")}catch(t){console.error("Error deleting account:",t);let e="Failed to delete account. Please try again later.";if(t instanceof Error){if("Request timed out"===t.message)e="The request timed out. The server might be down or experiencing issues.";else if(t.message.includes("Failed to fetch")||t.message.includes("NetworkError")||t.message.includes("network")||t.message.includes("connection"))e="Connection to the server failed. Please check your internet connection and try again.";else if(t.message.includes("Unauthorized")||t.message.includes("401")||t.message.includes("authenticate")){e="Your account may have been deleted, but we encountered an error. Please try logging in again.",O.push("/auth/login");return}}(0,j.Am)({title:"Error",description:e,variant:"destructive"})}finally{Z(!1),B(!1)}}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(L(),{children:[(0,r.jsx)("title",{children:"Dashboard | EzReply"}),(0,r.jsx)("meta",{name:"description",content:"Access your EzReply dashboard to manage your AI replies and account settings."}),(0,r.jsx)("link",{rel:"canonical",href:"https://ezreply.co/dashboard"}),(0,r.jsx)("meta",{name:"robots",content:"noindex, follow"})]}),(0,r.jsx)(w.Vq,{open:Q,onOpenChange:K,children:(0,r.jsx)(w.cZ,{className:"sm:max-w-md",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,r.jsxs)("div",{className:"relative mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-medium mb-4",children:"EzReply works with:"}),(0,r.jsxs)("div",{className:"flex justify-center items-center gap-4",children:[(0,r.jsx)("div",{onClick:()=>{$(),K(!1),window.open("https://linkedin.com","_blank")},className:"cursor-pointer transition-transform hover:scale-110",title:"Go to LinkedIn",children:(0,r.jsx)(P(),{src:"/social-media-icons/linkedin.png",alt:"LinkedIn Logo",width:70,height:70,className:"rounded-lg shadow-md"})}),(0,r.jsx)("div",{onClick:()=>{$(),K(!1),window.open("https://reddit.com","_blank")},className:"cursor-pointer transition-transform hover:scale-110",title:"Go to Reddit",children:(0,r.jsx)(P(
1),{src:"/social-media-icons/reddit.png",alt:"Reddit Logo",width:70,height:70,className:"rounded-lg shadow-md"})}),(0,r.jsx)("div",{onClick:()=>{$(),K(!1),window.open("https://twitter.com","_blank")},className:"cursor-pointer transition-transform hover:scale-110",title:"Go to Twitter/X",children:(0,r.jsx)(P(),{src:"/social-media-icons/twitter.png",alt:"Twitter/X Logo",width:70,height:70,className:"rounded-lg shadow-md"})})]})]}),(0,r.jsx)(w.$N,{className:"text-2xl font-bold mb-3 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Welcome to EzReply!"}),(0,r.jsx)(w.Be,{className:"text-gray-700 dark:text-gray-200 mb-6 max-w-sm mx-auto",children:"Your account is now set up and ready to use. Try out EzReply on X/Twitter, Reddit, or LinkedIn to generate AI-powered replies and comments."}),(0,r.jsxs)("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/30 dark:to-indigo-900/30 p-5 rounded-lg border border-blue-200 dark:border-blue-800 mb-6 w-full shadow-sm",children:[(0,r.jsx)("h4",{className:"font-medium text-blue-700 dark:text-blue-300 mb-2",children:"Quick Tip"}),(0,r.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"Look for the EzReply button when replying on X/Twitter, Reddit, or LinkedIn. Click it to generate the perfect response!"})]}),(0,r.jsx)(l.z,{onClick:()=>{$(),K(!1)},className:"w-full sm:w-auto flex items-center gap-2 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 transition-all duration-300 shadow-md",children:"Continue to Dashboard"})]})})}),(0,r.jsx)(w.Vq,{open:V,onOpenChange:e=>!e&&Z(!1),children:(0,r.jsx)(w.cZ,{className:"sm:max-w-md text-center",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-6",children:[(0,r.jsx)("div",{className:"w-12 h-12 border-4 border-blue-200 border-t-blue-600 rounded-full animate-spin mb-4"}),(0,r.jsx)(w.$N,{className:"text-xl font-semibold mb-2",children:"Deleting Account"}),(0,r.jsxs)(w.Be,{className:"text-gray-600 dark:text-gray-300 mb-2",children:["Please wait while we delete your account and all associated data.",(0,r.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"This may take a few moments..."})]})]})})}),(0,r.jsx)(w.Vq,{open:W,onOpenChange:X,children:(0,r.jsx)(w.cZ,{className:"sm:max-w-md",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-6 text-center",children:[(0,r.jsx)(S.Z,{className:"h-12 w-12 animate-spin text-primary mb-4"}),(0,r.jsx)(w.$N,{className:"text-lg font-semibold",children:"Refreshing your account"}),(0,r.jsx)(w.Be,{className:"text-sm text-muted-foreground mt-2",children:"Thank you for your purchase! We're updating your account information. This will only take a few seconds."})]})})}),(0,r.jsxs)(a.Z,{title:"Account",children:[(0,r.jsxs)("div",{className:"mb-8 bg-white dark:bg-gray-800 p-6 rounded-lg border border-gray-200 dark:border-gray-700",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,r.jsx)("div",{className:"w-20 h-20 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 text-3xl font-semibold",children:(null==J?void 0:null===(t=J.firstName)||void 0===t?void 0:t.charAt(0))||(null==F?void 0:null===(i=F.user)||void 0===i?void 0:null===(s=i.name)||void 0===s?void 0:s.charAt(0))||(null==F?void 0:null===(c=F.user)||void 0===c?void 0:null===(o=c.email)||void 0===o?void 0:o.charAt(0))||"U"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:(null==J?void 0:J.firstName)||(null==F?void 0:null===(m=F.user)||void 0===m?void 0:m.name)||"User"}),(null==J?void 0:J.email)&&(0,r.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:J.email})]})]}),(0,r.jsxs)(l.z,{variant:"outline",size:"sm",onClick:()=>{es(),(0,j.Am)({title:"Refreshing data...",description:"Syncing your account data and reloading the page.",variant:"default"}),setTimeout(()=>{window.location.reload()},1500)},disabled:er,className:"flex items-center gap-2",children:[(0,r.jsx)(I.Z,{className:"h-4 w-4 ".concat(er?"animate-spin":"")}),"Refresh Data"]})]}),(0,r.jsxs)("div",{className:"grid gap-6 md:grid-cols-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Account Type"}),(0,r.jsx)("p",{className:"text-gray-900 dark:text-gray-100",children:eo?eo.charAt(0).toUpperCase()+eo.slice(1):"Free"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1",children:"Email"}),(0,r.jsx)("p",{className:"text-gray-900 dark:text-gray-100",children:(null==J?void 0:J.email)||(null==F?void 0:null===(T=F.user)||void 0===T?void 0:T.email)||"N/A"})]})]}),(0,r.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700",children:"free"===eo?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Available Credits"}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[(null==J?void 0:J.credits)||0," credits"]})]}),0===((null==J?void 0:J.credits)||0)?(0,r.jsxs)("div",{className:"mt-2 bg-amber-50 dark:bg-amber-900/30 p-3 rounded-md border border-amber-200 dark:border-amber-800",children:[(0,r.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300 mb-2",children:"You've used all your free credits for this month."}),(0,r.jsx)(l.z,{onClick:()=>O.push("/dashboard/upgrade"),className:"w-full bg-amber-600 hover:bg-amber-700 text-white",children:"Upgrade Now"})]}):(0,r.jsx)("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:"Your free plan includes a limited number of monthly credits for generating AI-powered replies. Upgrade for unlimited access."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,r.jsxs)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Credits Usage ","yearly"===el?"This Year":"This Month"]}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[eu," / ",ec," credits used"]})]}),(0,r.jsx)("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2.5",children:(0,r.jsx)("div",{className:"h-2.5 rounded-full ".concat(ex?"bg-red-500":"bg-blue-600"),style:{width:"".concat(eh,"%")}})}),ex&&!ed&&(0,r.jsxs)("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:["You're running low on credits!",(0,r.jsx)(l.z,{variant:"link",className:"p-0 h-auto text-red-600 dark:text-red-400 underline ml-1",onClick:()=>O.push("/dashboard/upgrade"),children:"Upgrade your plan"})]}),(0,r.jsxs)("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:["Your ",eo," ","yearly"===el?"yearly":"monthly"," plan includes"," ","yearly"===el?"".concat(ec," credits for the entire year (").concat(em," per month)."):"".concat(ec," credits per month.")]})]})})]}),(0,r.jsxs)(b.Zb,{className:"mb-8",children:[(0,r.jsx)(b.Ol,{className:"flex flex-row items-center justify-between",children:(0,r.jsx)(b.ll,{children:"Your Plan Features"})}),(0,r.jsx)(b.aY,{children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[(0,r.jsxs)("h3",{className:"font-medium mb-2 flex items-center",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2 text-blue-500",children:(0,r.jsx)("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),"free"===eo?"Available Credits":"AI Replies"]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"free"===eo?(0,r.jsxs)(r.Fragment,{children:["You have ",(0,r.jsx)("span",{className:"font-semibold",children:(null==J?void 0:J.credits)||0})," credits available for AI replies"]}):"yearly"===el?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"font-semibold",children:em})," AI replies per month (",(0,r.jsx)("span",{className:"font-semibold",children:ec})," per year)"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"font-semibold",children:ec})," AI replies per month"]})})]}),(0,r.jsxs)("div",{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[(0,r.jsxs)("h3",{className:"font-medium mb-2 flex items-center",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2 text-blue-500",children:[(0,r.jsx)("path",{d:"M12 20h9"}),(0,r.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"})]}),"Configuration Options"]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:ea?(0,r.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"Full configuration available"}
1):(0,r.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Basic configuration only"})})]}),(0,r.jsxs)("div",{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[(0,r.jsxs)("h3",{className:"font-medium mb-2 flex items-center",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2 text-blue-500",children:[(0,r.jsx)("path",{d:"M12 2v8"}),(0,r.jsx)("path",{d:"m4.93 10.93 1.41 1.41"}),(0,r.jsx)("path",{d:"M2 18h2"}),(0,r.jsx)("path",{d:"M20 18h2"}),(0,r.jsx)("path",{d:"m19.07 10.93-1.41 1.41"}),(0,r.jsx)("path",{d:"M22 22H2"}),(0,r.jsx)("path",{d:"M16 6 8 14"}),(0,r.jsx)("path",{d:"m16 14-8-8"})]}),"Model Training"]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:en?(0,r.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"Available"}):(0,r.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Requires Pro or Ultra plan"})})]}),(0,r.jsxs)("div",{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg",children:[(0,r.jsxs)("h3",{className:"font-medium mb-2 flex items-center",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mr-2 text-blue-500",children:[(0,r.jsx)("path",{d:"M20 7h-9"}),(0,r.jsx)("path",{d:"M14 17H5"}),(0,r.jsx)("circle",{cx:"17",cy:"17",r:"3"}),(0,r.jsx)("circle",{cx:"7",cy:"7",r:"3"})]}),"Advanced AI Model"]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:en?(0,r.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"Available"}):(0,r.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Requires Pro or Ultra plan"})})]})]}),!ea&&(0,r.jsx)("div",{className:"mt-4 p-4 bg-amber-50 dark:bg-amber-900/30 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-600 dark:text-amber-400 mr-3 flex-shrink-0",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,r.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:"Upgrade to Plus or higher to unlock advanced features like Topics to Emphasize, Topics to Avoid, and Extra Instructions."}),(0,r.jsx)(l.z,{onClick:()=>O.push("/dashboard/upgrade"),variant:"link",className:"p-0 h-auto text-amber-700 dark:text-amber-300 underline mt-1",children:"Upgrade now"})]})]})})]})})]}),(0,r.jsxs)("div",{className:"bg-white dark:bg-gray-800 p-6 rounded-lg border border-gray-200 dark:border-gray-700",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-gray-100",children:"Account Actions"}),(0,r.jsx)("div",{className:"space-y-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(l.z,{variant:"outline",className:"w-full sm:w-auto border-red-300 text-red-600 hover:bg-red-50 hover:text-red-700",onClick:()=>B(!0),disabled:ed,children:"Delete Account"}),(0,r.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:["This will permanently delete your account and all associated data.",ed&&(0,r.jsxs)("span",{className:"block mt-1 text-amber-600 font-medium",children:["You cannot delete your account while you have an active subscription. Please cancel your subscription first from the"," ",(0,r.jsx)(D(),{href:"/dashboard/billing",className:"underline",children:"billing page"}),"."]})]})]})})]}),(0,r.jsx)(d,{open:q,onOpenChange:B,children:(0,r.jsxs)(u,{children:[(0,r.jsxs)(h,{children:[(0,r.jsx)(g,{children:"Are you absolutely sure?"}),(0,r.jsx)(p,{children:"This action cannot be undone. This will permanently delete your account and remove all of your data from our servers."})]}),(0,r.jsxs)(x,{children:[(0,r.jsx)(y,{disabled:V,children:"Cancel"}),(0,r.jsx)(f,{onClick:eg,disabled:V,className:"bg-red-600 hover:bg-red-700",children:V?"Deleting...":"Yes, delete my account"})]})]})})]})]})}},5219:function(e,t,s){"use strict";s.d(t,{O:function(){return n}});let r="jbhbbflfimomkecbgneafpfnceeonamh",a="https://chrome.google.com/webstore/detail/".concat(r),n={EXTENSION_ID:r,isChromeDesktop(){let e=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);return e&&!t},_extensionInstalledCache:{status:null,timestamp:0},async isExtensionInstalled(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Date.now();if(!e&&null!==this._extensionInstalledCache.status&&t-this._extensionInstalledCache.timestamp<3e4)return this._extensionInstalledCache.status;if(!r)return console.warn("Extension ID not configured"),this._updateCache(!1),!1;if(!window.chrome||!this.isChromeDesktop())return this._updateCache(!1),!1;try{var s;if((null===(s=window.chrome)||void 0===s?void 0:s.runtime)&&"function"==typeof window.chrome.runtime.sendMessage)try{if((await Promise.race([new Promise(e=>{window.chrome.runtime.sendMessage(r,{type:"PING"},t=>{e({success:!!(null==t?void 0:t.success)})})}),new Promise(e=>setTimeout(()=>e({success:!1}),1e3))])).success)return this._updateCache(!0),!0}catch(e){}if(window.chrome.management&&window.chrome.management.getAll)try{if((await window.chrome.management.getAll()).some(e=>e.id===r))return this._updateCache(!0),!0}catch(e){}if(window.chrome.runtime&&window.chrome.runtime.connect)try{let e=window.chrome.runtime.connect(r);if(e)return e.disconnect(),this._updateCache(!0),!0}catch(e){}return this._updateCache(!1),!1}catch(e){return console.error("Failed to check extension status:",e),this._updateCache(!1),!1}},_updateCache(e){this._extensionInstalledCache.status=e,this._extensionInstalledCache.timestamp=Date.now()},async sendMessageToExtension(e){if(!r)return console.warn("Extension ID not configured"),{success:!1,error:"Extension ID not configured"};if(!window.chrome||!this.isChromeDesktop())return{success:!1,error:"Not in a Chrome desktop browser environment"};try{if(!await this.isExtensionInstalled(!0))return{success:!1,error:"Extension not installed"};return await Promise.race([new Promise(t=>{window.chrome.runtime.sendMessage(r,e,e=>{t(e?{...e,success:!!e.success}:{success:!1,error:"No response from extension"})})}),new Promise(e=>setTimeout(()=>e({success:!1,error:"Extension communication timeout"}),5e3))])}catch(e){return console.error("Failed to send message to extension:",e),{success:!1,error:String(e)}}},openChromeStore(){window.open(a,"_blank")},async sendTokenToExtension(e){return console.log("Sending token to extension"),this.sendMessageToExtension({type:"SET_AUTH_TOKEN",token:e})},async clearTokenFromExtension(){if(console.log("Clearing token from extension"),!await this.isExtensionInstalled())return{success:!1,error:"Extension not installed"};try{return this.sendMessageToExtension({type:"CLEAR_AUTH_TOKEN"})}catch(e){return console.error("Failed to clear token from extension:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error clearing token"}}}}}},function(e){e.O(0,[664,329,316,377,657,535,940,888,774,179],function(){return e(e.s=2268)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.