PageSourceSearch

https://thecutline.ai/_next/static/chunks/pages/settings/profile/email-41cf8989c66bd3e8.js

js thecutline.ai collected 2026-10-05 12:49:15 UTC 11,726 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[764],{268:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/profile/email",function(){return t(6976)}])},954:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(37876);let r=({children:e})=>(0,s.jsx)("div",{className:"w-full lg:max-w-4xl",children:e})},6976:(e,a,t)=>{"use strict";t.r(a),t.d(a,{__N_SSP:()=>E,default:()=>T});var s=t(37876),r=t(62002),i=t(77328),l=t.n(i),n=t(50705),d=t(26991),o=t(14232),c=t(59688),p=t(88992),m=t(33715),u=t(50642),f=t(98455),x=t(14394),h=t(9528),j=t(48863),y=t(17400),b=t(77702);let w=({user:e})=>{let[a,t]=(0,o.useState)(),{t:i}=(0,r.Bd)(),{trigger:l}=(0,b.A)(),n=(0,y.k)(),[w,g]=(0,o.useState)(),N=(0,o.useCallback)((e,a,s)=>{let r=(0,d.Ww)(e.user,a).then(()=>l(e.user)).then(()=>{t(void 0)}).catch(e=>(t(i("profile:updateEmailError")),e)).finally(()=>{s&&s()});c.oR.promise(r,{success:i("profile:updateEmailSuccess"),loading:i("profile:updateEmailLoading"),error:i("profile:updateEmailError")})},[l,t,i]),v=e?.email,{register:A,handleSubmit:k,getValues:E,reset:T}=(0,p.mN)({defaultValues:{email:"",repeatEmail:"",password:""}}),_=(0,o.useCallback)(async a=>{let{email:s,repeatEmail:r,password:l}=a;if(s!==r)return void t(i("profile:emailsNotMatching"));if(s===v)return void t(i("profile:updatingSameEmail"));n.setLoading(!0);let o=d.IX.credential(v,l),c=(0,d.kZ)(e,o),p=await c.catch(e=>{(0,j.R)(e)?g(e):t(i("profile:updateEmailError")),n.setError(e)});if(p)return N(p,s,()=>{n.setData()})},[v,i,n,N,e]),S=A("email",{value:"",required:!0}),L=A("repeatEmail",{value:"",required:!0}),R=A("password",{value:"",required:!0});return(0,o.useEffect)(()=>{n.state.success&&(T(),n.resetState())},[T,n]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("form",{"data-cy":"update-email-form",onSubmit:k(_),children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsx)(x.A,{condition:a,children:(0,s.jsx)("div",{"data-cy":"update-email-error-alert",children:(0,s.jsx)(f.Ay,{type:"error",children:a})})}),(0,s.jsx)(u.Ay,{children:(0,s.jsxs)(u.Ay.Label,{children:[(0,s.jsx)(r.x6,{i18nKey:"profile:newEmail"}),(0,s.jsx)(u.Ay.Input,{...S,"data-cy":"profile-new-email-input",required:!0,type:"email",placeholder:""})]})}),(0,s.jsx)(u.Ay,{children:(0,s.jsxs)(u.Ay.Label,{children:[(0,s.jsx)(r.x6,{i18nKey:"profile:repeatEmail"}),(0,s.jsx)(u.Ay.Input,{...L,"data-cy":"profile-repeat-email-input",name:L.name,required:!0,type:"email"})]})}),(0,s.jsx)(u.Ay,{children:(0,s.jsxs)(u.Ay.Label,{children:[(0,s.jsx)(r.x6,{i18nKey:"profile:yourPassword"}),(0,s.jsx)(u.Ay.Input,{...R,"data-cy":"profile-password-input",required:!0,type:"password",placeholder:""})]})}),(0,s.jsx)("div",{children:(0,s.jsx)(m.A,{className:"w-full md:w-auto",loading:n.state.loading,children:(0,s.jsx)(r.x6,{i18nKey:"profile:updateEmailSubmitLabel"})})})]})}),(0,s.jsx)(x.A,{condition:w,children:e=>(0,s.jsx)(h.A,{error:e,isOpen:!0,setIsOpen:()=>g(void 0),onSuccess:async e=>{await N(e,E("email")),g(void 0),n.setData()}})})]})};var g=t(35297),N=t(79552),v=t(954),A=t(50406);function k(){return(0,s.jsx)(f.Ay,{type:"warn",children:(0,s.jsx)(r.x6,{i18nKey:"profile:cannotUpdateEmail"})})}var E=!0;let T=()=>{let e=(0,n.j)(),a=e?.auth,{t}=(0,r.Bd)();if(!a)return null;let i=a.providerData.find(e=>e.providerId===d.IX.PROVIDER_ID);return(0,s.jsxs)(N.A,{title:t("common:settingsTabLabel"),children:[(0,s.jsx)(l(),{children:(0,s.jsxs)("title",{children:[t("profile:emailTab")," - ",t("common:settingsTabLabel")]},"title")}),(0,s.jsx)(g.A,{}),(0,s.jsx)(v.A,{children:(0,s.jsx)(A.A,{heading:(0,s.jsx)(r.x6,{i18nKey:"profile:emailTab"}),subHeading:(0,s.jsx)(r.x6,{i18nKey:"profile:emailTabTabSubheading"}),children:(0,s.jsx)(x.A,{condition:i,fallback:(0,s.jsx)(k,{}),children:(0,s.jsx)(w,{user:a})})})})]})}},11308:(e,a,t)=>{"use strict";t.d(a,{M5:()=>f,SQ:()=>x,_2:()=>h,lp:()=>j,lv:()=>m,mB:()=>y,nV:()=>u,rI:()=>c,ty:()=>p});var s=t(37876),r=t(14232),i=t(49598),l=t(50129),n=t(21677),d=t(17204),o=t(96668);let c=i.bL,p=i.l9;i.YJ,i.ZL;let m=i.Pb;i.z6;let u=r.forwardRef(({className:e,inset:a,children:t,...r},d)=>(0,s.jsxs)(i.ZP,{ref:d,className:(0,l.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",e),...r,children:[t,(0,s.jsx)(n.A,{className:"ml-auto h-4 w-4"})]}));u.displayName=i.ZP.displayName;let f=r.forwardRef(({className:e,...a},t)=>(0,s.jsx)(i.G5,{ref:t,className:(0,l.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-sm 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]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a}));f.displayName=i.G5.displayName;let x=r.forwardRef(({className:e,sideOffset:a=4,alignOffset:t=4,...r},n)=>(0,s.jsx)(i.ZL,{children:(0,s.jsx)(i.UC,{ref:n,sideOffset:a,alignOffset:t,className:(0,l.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-sm 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 dark:shadow-primary/40 dark:shadow-2xl",e),...r})}));x.displayName=i.UC.displayName;let h=r.forwardRef(({className:e,inset:a,...t},r)=>(0,s.jsx)(i.q7,{ref:r,className:(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",e),...t}));h.displayName=i.q7.displayName,r.forwardRef(({className:e,children:a,checked:t,...r},n)=>(0,s.jsxs)(i.H_,{ref:n,className:(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...r,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(i.VF,{children:(0,s.jsx)(d.A,{className:"h-4 w-4"})})}),a]})).displayName=i.H_.displayName,r.forwardRef(({className:e,children:a,...t},r)=>(0,s.jsxs)(i.hN,{ref:r,className:(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(i.VF,{children:(0,s.jsx)(o.A,{className:"h-2 w-2 fill-current"})})}),a]})).displayName=i.hN.displayName;let j=r.forwardRef(({className:e,inset:a,...t},r)=>(0,s.jsx)(i.JU,{ref:r,className:(0,l.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",e),...t}));j.displayName=i.JU.displayName;let y=r.forwardRef(({className:e,...a},t)=>(0,s.jsx)(i.wv,{ref:t,className:(0,l.cn)("-mx-1 my-1 h-px bg-muted",e),...a}));y.displayName=i.wv.displayName},29672:(e,a,t)=>{"use strict";t.d(a,{X3:()=>d,iq:()=>o,wn:()=>n});var s=t(37876),r=t(50129),i=t(44479),l=t(14394);function n({children:e,className:a}){return(0,s.jsx)("div",{className:(0,r.cn)("rounded-md dark:border-dark-800 w-full border border-gray-100",a),children:e})}function d(e){return(0,s.jsxs)("div",{className:(0,r.cn)("flex flex-col space-y-0.5 px-container pt-container",e.className),children:[(0,s.jsx)(i.A,{type:4,children:e.title}),(0,s.jsx)(l.A,{condition:e.description,children:(0,s.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:e.description})})]})}function o(e){return(0,s.jsx)("div",{className:(0,r.cn)("flex flex-col p-container",e.className),children:e.children})}},35297:(e,a,t)=>{"use strict";t.d(a,{A:()=>d});var s=t(37876),r=t(79955),i=t(24491),l=t(77198);let n={General:{path:"/settings/profile",label:"profile:generalTab"},Appearance:{path:"/settings/profile/appearance",label:"common:appearanceSettingsTabLabel"},Authentication:{path:"/settings/profile/authentication",label:"profile:authenticationTab"},Email:{path:"/settings/profile/email",label:"profile:emailTab"},Password:{path:"/settings/profile/password",label:"profile:passwordTab"},ApiKeys:{path:"/settings/profile/api-keys",label:"profile:apiKeysTab"}},d=()=>{let e="flex justify-center lg:justify-start items-center w-full";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"hidden w-[12rem] lg:flex",children:(0,s.jsxs)(i.A,{vertical:!0,pill:!0,children:[(0,s.jsx)(r.A,{className:e,link:n.General,depth:0}),(0,s.jsx)(r.A,{className:e,link:n.Appearance}),(0,s.jsx)(r.A,{className:e,link:n.Authentication}),(0,s.jsx)(r.A,{className:e,link:n.Email}),(0,s.jsx)(r.A,{className:e,link:n.Password}),(0,s.jsx)(r.A,{className:e,link:n.ApiKeys})]})}),(0,s.jsx)("div",{className:"block w-full lg:hidden",children:(0,s.jsx)(l.A,{links:Object.values(n)})})]})}},50406:(e,a,t)=>{"use strict";t.d(a,{A:()=>i});var s=t(37876),r=t(29672);let i=({children:e,heading:a,subHeading:t,className:i})=>(0,s.jsxs)(r.wn,{className:i,children:[(0,s.jsx)(r.X3,{title:a,description:t}),(0,s.jsx)(r.iq,{children:e})]})},70619:(e,a,t)=>{"use strict";t.d(a,{A:()=>r});var s=t(14232);let r=s.forwardRef(function({title:e,titleId:a,...t},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),e?s.createElement("title",{id:a},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))})},77198:(e,a,t)=>{"use strict";t.d(a,{A:()=>m});var s=t(37876),r=t(89099),i=t(48230),l=t.n(i),n=t(14232),d=t(62002),o=t(70619),c=t(11308),p=t(33715);let m=({links:e})=>{let a=(0,r.useRouter)().asPath,t=(0,n.useMemo)(()=>{let t=Object.values(e).find(e=>e.path===a);return t?t.label:""},[e,a]);return(0,s.jsxs)(c.rI,{children:[(0,s.jsx)(c.ty,{asChild:!0,children:(0,s.jsx)(p.A,{variant:"secondary",block:!0,children:(0,s.jsxs)("span",{className:"flex w-full items-center justify-between space-x-2",children:[(0,s.jsx)("span",{children:(0,s.jsx)(d.x6,{i18nKey:t,defaults:t})}),(0,s.jsx)(o.A,{className:"h-5"})]})})}),(0,s.jsx)(c.SQ,{className:"divide-y divide-gray-100 dark:divide-dark-700 w-screen rounded-none",children:Object.values(e).map(e=>(0,s.jsx)(c._2,{asChild:!0,children:(0,s.jsx)(l(),{className:"flex h-12 w-full items-center",href:e.path,children:(0,s.jsx)(d.x6,{i18nKey:e.label,defaults:e.label})})},e.path))})]})}}
1,77702:(e,a,t)=>{"use strict";t.d(a,{A:()=>n});var s=t(34333),r=t(85670);async function i(e){try{return await l(e.getIdToken(!0),1e4,"Timed out refreshing sign-in token.")}catch(a){return console.warn("[useCreateServerSideSession] Fresh token unavailable; trying cached token",a),l(e.getIdToken(!1),1e4,"Timed out reading sign-in token.")}}function l(e,a,t){return new Promise((s,r)=>{let i=window.setTimeout(()=>{r(Error(t))},a);e.then(e=>{window.clearTimeout(i),s(e)},e=>{window.clearTimeout(i),r(e)})})}let n=function(){let{trigger:e}=(0,r.o)();return(0,s.A)(["create-session"],async(a,{arg:t})=>{let s=await i(t);return await e({idToken:s}),!0})}}},e=>{e.O(0,[8230,2749,7602,6564,674,7448,9598,9688,6091,6777,838,789,636,6593,8792],()=>e(e.s=268)),_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.