1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5860],{95425:function(e,n){n.Z={src:"/_next/static/media/DumbitLoading.11af3bdc.gif",height:600,width:600,blurWidth:0,blurHeight:0}},95860:function(e,n,t){t.r(n),t.d(n,{accountSubpages:function(){return O},default:function(){return R}});var i=t(85893),r=t(3314),a=t(96788),o=t(29160),s=t(9008),l=t.n(s),c=t(93319),d=t(65806),u=t(12166),h=t(4336),p=t(67294),m=t(33299),g=t(78197),x=t(61769),f=t(18745),y=t(61730),j=t(33453),b=t(92365),Z=t(40110),v=t(95858),w=t(96727),S=t(68573),C=t(25026),D=t(93454),_=t(76592),k=t(19827),I=t(46577),A=t(8863),T=t(2914),P=t(45697),F=t.n(P),E=t(67836);let M=e=>{let n=(0,f.Z)(),t=(0,y.Z)(n.breakpoints.down("md")),{open:r,handleClose:a,subscriptionId:o}=e,s=(0,p.useCallback)(()=>{fetch("/api/billing/cancel-subscription",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({subscriptionId:o})}).then(()=>{window.location.reload()})},[o]);return(0,i.jsxs)(j.Z,{fullScreen:t,open:r,onClose:a,"aria-labelledby":"cancellation-dialog-title",children:[(0,i.jsx)(b.Z,{id:"cancellation-dialog-title",children:"Are you sure you want to cancel?"}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(v.Z,{children:"You will still be able to use all of Dumb It Downâs features, we just wonât renew at the end of this billing cycle."})}),(0,i.jsxs)(w.Z,{children:[(0,i.jsx)(h.Z,{autoFocus:!0,onClick:a,children:"Go back"}),(0,i.jsx)(h.Z,{onClick:s,children:"Yes, cancel my plan"})]})]})};M.propTypes={open:F().bool.isRequired,handleClose:F().func.isRequired,subscriptionId:F().string.isRequired};let U=e=>{let{subscription:n,startDate:t,renewalDate:o,invoiceUrl:s}=e,[l,c]=p.useState(!1),d=t?new Date(1e3*t).toLocaleDateString(window.navigator.language):"Not found",u=o?new Date(1e3*o).toLocaleDateString(window.navigator.language):"Not found",m=n.cancel_at&&new Date(1e3*n.cancel_at),g=(0,p.useCallback)(()=>{fetch("/api/billing/reenable-subscription",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({subscriptionId:n.id})}).then(()=>{window.location.reload()})},[n.id]);return(0,i.jsxs)(S.ZP,{container:!0,justifyContent:"center",children:[(0,i.jsxs)(S.ZP,{item:!0,xs:12,children:[(0,i.jsxs)(r.Z,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,i.jsx)(T.FJM,{size:60}),(0,i.jsx)(a.Z,{variant:"h6",children:"Your subscription is active"})]}),(0,i.jsx)(r.Z,{my:2,children:(0,i.jsx)(a.Z,{variant:"h6",color:"highlight.green",children:n.plan.nickname})}),(0,i.jsxs)(r.Z,{children:[!!m&&(0,i.jsx)(r.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",my:2,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a.Z,{variant:"body1",children:[(0,i.jsx)("strong",{children:"Your subscription is due to be cancelled"})," ","on"," ",m.toLocaleDateString(window.navigator.language)," "]}),(0,i.jsx)(a.Z,{variant:"body1",children:(0,i.jsx)("strong",{children:(0,i.jsx)(x.Z,{href:"#",onClick:()=>g(),children:"Click here to re-enable"})})})]})}),!m&&(0,i.jsx)(a.Z,{variant:"body1",children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("strong",{children:(0,E.ZP)(n.plan.amount_decimal)})," ","next payment taken on ",u]})})]}),(0,i.jsx)(C.Z,{component:D.Z,sx:{mt:3},children:(0,i.jsx)(_.Z,{children:(0,i.jsxs)(k.Z,{children:[(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(A.Z,{children:"Subscription ID"}),(0,i.jsx)(A.Z,{align:"right",children:n.id})]}),(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(A.Z,{children:"Start date"}),(0,i.jsx)(A.Z,{align:"right",children:d})]}),(0,i.jsxs)(I.Z,{children:[(0,i.jsxs)(A.Z,{children:[m?"End":"Renewal"," date"]}),(0,i.jsx)(A.Z,{align:"right",children:u})]}),(0,i.jsxs)(I.Z,{children:[(0,i.jsx)(A.Z,{children:"Invoice"}),(0,i.jsx)(A.Z,{align:"right",children:s?(0,i.jsx)(x.Z,{href:s,target:"_blank",rel:"noopener noreferrer",children:"View invoice"}):"Not found"})]})]})})}),(0,i.jsxs)(r.Z,{mt:3,children:[(0,i.jsx)(h.Z,{component:"a",href:"/account/portal",variant:"contained",children:"Manage billing"}),(0,i.jsx)(a.Z,{color:"text.secondary",mt:1,variant:"body2",children:"Update your payment method, view invoices, or manage your subscription in Stripe."})]})]}),!m&&(0,i.jsx)(S.ZP,{item:!0,xs:12,mt:4,children:(0,i.jsxs)(r.Z,{display:"flex",justifyContent:"spaceBetween",children:[(0,i.jsx)(x.Z,{href:"#",onClick:()=>c(!0),children:"Cancel subscription"}),(0,i.jsx)(M,{open:l,handleClose:()=>c(!1),subscriptionId:n.id})]})})]})};var Y=t(8422),q=t(87511),N=t(11163);let O=[{Component:()=>{let{data:e,update:n}=(0,m.useSession)(),[t,a]=(0,p.useState)(""),[o,s]=(0,p.useState)(""),[l,g]=(0,p.useState)(!1);(0,p.useEffect)(()=>
1{if(e){var n,t,i;a(null===(n=e.user)||void 0===n?void 0:n.name),s(null===(t=e.user)||void 0===t?void 0:t.email),g(null===(i=e.user)||void 0===i?void 0:i.marketingConsent)}},[e]);let x=async i=>{i.preventDefault();let{user:r}=e;try{let e=await fetch("/api/auth/updateProfile",{body:JSON.stringify({email:r.email,marketingConsent:l,name:t}),headers:{"Content-Type":"application/json"},method:"PUT"}),i=await e.json();if(200!==e.status)throw i.error||Error("Request failed with status ".concat(e.status));n()}catch(e){console.error(e)}};return(0,i.jsxs)(r.Z,{component:"form",onSubmit:x,noValidate:!0,autoComplete:"off",sx:{display:"flex",flexDirection:"column",gap:"1rem",margin:"auto"},children:[(0,i.jsx)(c.Z,{label:"Full Name",value:null!=t?t:"",onChange:e=>a(e.target.value)}),(0,i.jsx)(c.Z,{label:"Email",value:o,disabled:!0}),(0,i.jsx)(d.Z,{control:(0,i.jsx)(u.Z,{checked:null!=l&&l,onChange:e=>g(e.target.checked)}),label:"I would like to occasionally be contacted by Dumb It Down with promotional offers, handy new features and helpful tips."}),(0,i.jsx)(h.Z,{type:"submit",variant:"contained",sx:{alignSelf:"flex-start"},children:"Submit"})]})},id:"personal-info",name:"Personal Info"},{Component:()=>{let{data:e}=(0,m.useSession)(),[n,t]=p.useState(!1),[o,s]=p.useState(null),[l,c]=p.useState(null),[d,u]=p.useState(!1),[g,f]=p.useState(!0),[y,j]=p.useState(null),[b,Z]=p.useState(null),v=(0,N.useRouter)(),w=(0,p.useMemo)(()=>{let{period:e}=v.query;return"annual"===e?"annual":"monthly"},[v.query.period]),S=(0,p.useMemo)(()=>{let{plan:e,period:n}=v.query,t=n&&!Array.isArray(n)?n:"monthly",i=new Date("2025-10-15");return i.setUTCDate(16),i.setUTCHours(4),i.setUTCMinutes(30),i.setUTCSeconds(0),i.setUTCMilliseconds(0),new Date().getTime()<=i.getTime()&&"monthly"!==n?Y.Z.subscription_price_ids.pro.studySeason:e&&!Array.isArray(e)?Y.Z.subscription_price_ids[e][t]:Y.Z.subscription_price_ids.pro[t]},[v.query.period,v.query.plan]),C=(0,p.useMemo)(()=>{let e=v.query.coupon_code;if(!(!e||Array.isArray(e)))return e.trim()||void 0},[v.query.coupon_code]);(0,p.useEffect)(()=>{var i;(null==e?void 0:null===(i=e.user)||void 0===i?void 0:i.email)&&(async()=>{let i=await fetch("/api/billing/list-customers",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({email:e.user.email})});if(200===i.status||n)s((await i.json()).customer);else{var r;t(!0),fetch("/api/billing/create-customer",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:null===(r=e.user)||void 0===r?void 0:r.name,email:e.user.email})}).then(e=>e.json()).then(e=>{t(!1),s(e.customer)})}})()},[e.user]),(0,p.useEffect)(()=>{o&&(async()=>{let e=await fetch("/api/billing/list-subscriptions",{method:"POST",headers:{"Content-type":"application/json"},body:JSON.stringify({customerId:o,priceId:S})});if(404===e.status)c(null),j(null),f(!1);else if(200===e.status){let n=await e.json();c(n.subscription||null),j(n.invoiceUrl||null),f(!1)}else Z((await e.json()).message||"Unable to load subscriptions. Please check billing API."),c(null),f(!1)})()},[o,S]),(0,p.useEffect)(()=>{var e,n,t,i,r;let a=v.query.checkout,o=v.query.session_id;if("success"!==a||!o||!l||"active"!==l.status)return;let s=null===(t=l.items)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:null===(e=n[0])||void 0===e?void 0:e.price,c=null!==(i=null==s?void 0:s.unit_amount)&&void 0!==i?i:0,d=null!==(r=null==s?void 0:s.currency)&&void 0!==r?r:"usd",u=Array.isArray(o)?o[0]:o;(0,E.Xj)({amountInCents:c,currency:d,transactionId:u})},[l,v.query]);let D=(0,p.useCallback)(async()=>{if(o&&!d){Z(null),u(!0);try{let e=await fetch("/api/billing/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:S,customerId:o,period:w,couponCode:C})}),n=await e.json();if(200!==e.status||!n.url){Z(n.message||"Unable to start checkout. Please try again.");return}window.location.href=n.url}catch(e){Z(e instanceof Error?e.message:"Unable to start checkout. Please try again.")}finally{u(!1)}}},[C,d,o,w,S]);return g?(0,i.jsx)(r.Z,{display:"flex",justifyContent:"center",children:(0,i.jsx)(q.T,{})}):l&&"active"===l.status?(0,i.jsx)(U,{subscription:l,startDate:l.start_date,renew
1alDate:l.current_period_end,invoiceUrl:y}):(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)(r.Z,{mb:2,color:"highlight.red",children:b}),(0,i.jsxs)(r.Z,{mb:2,children:[(0,i.jsx)(a.Z,{variant:"h6",mb:1,children:"Pro Plan"}),(0,i.jsxs)(a.Z,{mb:2,children:["annual"===w?"Billed annually":"Billed monthly",". You can enter a coupon code on the payment page."]}),"monthly"===w?(0,i.jsx)(x.Z,{href:"/account/billing/?plan=pro&period=annual",underline:"always",children:"Switch to annual for 15% off"}):(0,i.jsx)(x.Z,{href:"/account/billing/?plan=pro&period=monthly",underline:"always",children:"Switch to monthly"})]}),(0,i.jsx)(h.Z,{disabled:!o||d,onClick:D,variant:"gradient",children:d?"Redirecting to checkout...":"Subscribe"})]})},id:"billing",name:"Subscription"},{Component:null,id:"my-files",name:"My Files",route:"/account/my-files"}];function R(){let{status:e}=(0,m.useSession)();return"loading"===e?(0,i.jsx)("span",{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l(),{children:[(0,i.jsx)("title",{children:"Dumb It Down | My Account"}),(0,i.jsx)("meta",{name:"description",content:"Don't be confused by wordy language. Dumb down text so that anyone can understand it. Use this 100% free AI powered tool today."})]}),(0,i.jsxs)(r.Z,{mx:{xs:2,md:6},sx:{minHeight:"50vh"},children:[(0,i.jsx)(a.Z,{variant:"h1",mb:5,children:"Your Account"}),(0,i.jsx)(g.Z,{pages:O})]}),(0,i.jsx)(o.$,{})]})}},29160:function(e,n,t){t.d(n,{$:function(){return p}});var i=t(85893),r=t(68573),a=t(61769),o=t(56912),s=t(89609),l=t(25675),c=t.n(l),d=t(45697),u=t.n(d);t(67294);var h={src:"/_next/static/media/footer.98b6ec9c.svg",height:172,width:226,blurWidth:0,blurHeight:0};let p=e=>{let n=new Date().getFullYear();return(0,i.jsxs)(s.Z,{sx:{pt:"12rem",pb:{xs:"10rem",md:"2rem"},backgroundColor:e.bgColor,background:!e.noGradient&&{xs:"linear-gradient(180deg, #d1d0e0 0%, #F8DCD5 30%)",md:"linear-gradient(180deg, #FFFFFF 0%, #F8DCD5 30%)"}},children:[(0,i.jsx)(r.ZP,{container:!0,justifyContent:"center",marginBottom:"2rem",children:(0,i.jsx)(r.ZP,{container:!0,justifyContent:"center",children:(0,i.jsx)(c(),{src:h,alt:"Dumb it down logo",width:250,height:175,style:{maxWidth:"40%"}})})}),(0,i.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center","& svg":{m:1.5},"& hr":{mx:"0.8rem"},fontWeight:700,"& .MuiTypography-root":{textDecoration:"none"}},children:[(0,i.jsx)(a.Z,{href:"/contact",children:"Contact"}),(0,i.jsx)(o.Z,{orientation:"vertical",variant:"middle",flexItem:!0}),(0,i.jsx)(a.Z,{href:"/privacy",children:"Privacy"}),(0,i.jsx)(o.Z,{orientation:"vertical",variant:"middle",flexItem:!0}),(0,i.jsx)(a.Z,{href:"/terms-of-service",children:"Terms"}),(0,i.jsx)(o.Z,{orientation:"vertical",variant:"middle",flexItem:!0}),(0,i.jsx)(a.Z,{href:"/auth/login",children:"Login"})]}),(0,i.jsx)(s.Z,{display:"flex",justifyContent:"center",marginTop:"2rem",children:(0,i.jsxs)("small",{children:["\xa9 ",n," DumbItDown. All rights reserved"]})})]})};p.propTypes={noGradient:u().bool,bgColor:u().string}},87511:function(e,n,t){t.d(n,{T:function(){return s}});var i=t(85893),r=t(25675),a=t.n(r);t(67294);var o=t(95425);let s=()=>(0,i.jsx)(a(),{src:o.Z,alt:"Loading animation",width:150,height:150,style:{borderRadius:"50%",margin:"1rem"}})},78197:function(e,n,t){var i=t(85893),r=t(68573),a=t(3314),o=t(38368),s=t(28907),l=t(47407),c=t(52311),d=t(96788);t(67294),n.Z=e=>{let{pages:n,selectedPage:t,children:u}=e;return(0,i.jsxs)(r.ZP,{container:!0,spacing:2,justifyContent:"space-between",children:[(0,i.jsxs)(r.ZP,{item:!0,xs:12,md:4,children:[(0,i.jsx)(a.Z,{sx:{display:{xs:"block",md:"none"},borderBottom:1,borderColor:"divider",mb:4},children:(0,i.jsx)(o.Z,{children:n.map(e=>(0,i.jsx)(s.Z,{component:"a",className:t&&t.id===e.id?"Mui-selected":"",href:e.route||"/account/".concat(e.id),label:e.name},e.id))})}),(0,i.jsx)(l.Z,{component:"nav",sx:{pt:0,display:{xs:"none",md:"block"}},children:n.map(e=>(0,i.jsx)(c.Z,{selected:t&&t.id===e.id,children:(0,i.jsx)(d.Z,{variant:"h5",component:"a",href:e.route||"/account/".concat(e.id),children:e.name})},e.id))})]}),(0,i.jsx)(r.ZP,{item:!0,xs:12,md:7,mb:12,children:u})]})}},8422:function(e,n,t){var i=t(83454);let r={default_word_limit:{guest:200,pro:2e3},default_credit_limit:{guest:0,free:0,pro:1e3},subscription_price_ids:{pro:{monthly:"price_1TYrojAD0yxS7pMAgYtDU9J9",annual:"price_1TYrowAD0yxS7pMAElWRI1At",blackFriday:"price_1TYYtrAD0yxS7pMADnZfHFgh",studySeason:"price_1TYYtqAD0yxS7pMA4mctIzko"}},s3:{endpoint:"https://nyc3.digitaloceanspaces.com",accessKeyId:i.env.AWS_ACCESS_KEY_ID,secretAccessKey:i.env.AWS_SECRET_ACCESS_KEY},gptZero:{apiKey:i.env.GPT_ZERO_API_KEY,apiUrl:"https://api.gptzero.me/v2"}};n.Z=r}
1,67836:function(e,n,t){t.d(n,{VF:function(){return r},Xj:function(){return s},ZP:function(){return i},fb:function(){return a},i$:function(){return o}});let i=e=>{let n="string"==typeof e?parseInt(e,10):e;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n/100)},r=Math.round(63901.5),a=()=>{let e=new Date,n=e.getFullYear();return[n,e.getMonth()+1<10?"0".concat(e.getMonth()+1):e.getMonth()+1,10>e.getDate()?"0".concat(e.getDate()):e.getDate(),10>e.getHours()?"0".concat(e.getHours()):e.getHours()]},o=e=>"".concat(Math.floor(e/60),":").concat(Math.floor(e%60).toString().padStart(2,"0")),s=e=>{let{amountInCents:n,currency:t,transactionId:i}=e,r=window.gtag;if("function"!=typeof r)return;let a="purchase_conversion_".concat(i);!(i&&window.sessionStorage.getItem(a))&&(r("event","conversion",{send_to:"AW-18412171041/9vVDCIC1r-gcEKHezctE",value:n/100,currency:(t||"USD").toUpperCase(),transaction_id:i}),i&&window.sessionStorage.setItem(a,"1"))}}}]);
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.