1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9584],{66337:function(s,e,t){t.d(e,{Z:function(){return a}});let a=(0,t(79205).Z)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},23340:function(s,e,t){t.d(e,{pm:function(){return m}});var a=t(2265);let r=0,i=new Map,n=s=>{if(i.has(s))return;let e=setTimeout(()=>{i.delete(s),l({type:"REMOVE_TOAST",toastId:s})},1e6);i.set(s,e)},d=(s,e)=>{switch(e.type){case"ADD_TOAST":return{...s,toasts:[e.toast,...s.toasts].slice(0,1)};case"UPDATE_TOAST":return{...s,toasts:s.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case"DISMISS_TOAST":{let{toastId:t}=e;return t?n(t):s.toasts.forEach(s=>{n(s.id)}),{...s,toasts:s.toasts.map(s=>s.id===t||void 0===t?{...s,open:!1}:s)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...s,toasts:[]};return{...s,toasts:s.toasts.filter(s=>s.id!==e.toastId)}}},o=[],c={toasts:[]};function l(s){c=d(c,s),o.forEach(s=>{s(c)})}function u(s){let{...e}=s,t=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>l({type:"DISMISS_TOAST",toastId:t});return l({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||a()}}}),{id:t,dismiss:a,update:s=>l({type:"UPDATE_TOAST",toast:{...s,id:t}})}}function m(){let[s,e]=a.useState(c);return a.useEffect(()=>(o.push(e),()=>{let s=o.indexOf(e);s>-1&&o.splice(s,1)}),[s]),{...s,toast:u,dismiss:s=>l({type:"DISMISS_TOAST",toastId:s})}}},49584:function(s,e,t){t.r(e),t.d(e,{default:function(){return f}});var a=t(57437),r=t(2265),i=t(85237),n=t(79820),d=t(12381),o=t(40279),c=t(75060),l=t(88906);let u=(0,t(79205).Z)("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);var m=t(66337),x=t(41671),h=t(23340),p=t(1072),w=t(15389);function f(){var s;let{user:e}=(0,w.a)(),{toast:t}=(0,h.pm)(),[f,y]=(0,r.useState)(!1),[g,j]=(0,r.useState)({currentPassword:"",newPassword:"",confirmPassword:""}),v=(s,e)=>{j(t=>({...t,[s]:e}))},N=async s=>{s.preventDefault(),y(!0);try{if(g.newPassword!==g.confirmPassword)throw Error("New passwords don't match");if(g.newPassword.length<6)throw Error("Password must be at least 6 characters long");if(g.newPassword===g.currentPassword)throw Error("New password must be different from current password");let{error:s}=await p.supabase.auth.updateUser({password:g.newPassword});if(s)throw s;t({title:"Password updated successfully!",description:"Your password has been changed. Please use your new password for future logins."}),j({currentPassword:"",newPassword:"",confirmPassword:""})}catch(s){t({title:"Error",description:s.message,variant:"destructive"})}finally{y(!1)}},b=async()=>{if(null==e?void 0:e.email)try{let{error:s}=await p.supabase.auth.resetPasswordForEmail(e.email,{redirectTo:"".concat(window.location.origin,"/forgot-password")});if(s)throw s;t({title:"Reset link sent!",description:"Check your email for a password reset link. You can use this to set a new password."})}catch(s){t({title:"Error",description:s.message,variant:"destructive"})}},P=[{icon:l.Z,title:"Account Protection",description:"Your account is protected with industry-standard security measures",status:"Active"},{icon:u,title:"Password Security",description:"Use a strong, unique password for your trading account",status:"Good"},{icon:m.Z,title:"Data Encryption",description:"All your trading data is encrypted both in transit and at rest",status:"Active"}];return(0,a.jsx)("div",{className:"min-h-screen bg-background p-6",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsxs)(i.E.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold text-foreground mb-2",children:"Security Settings"}),(0,a.jsx)("p",{className:"text-muted-foreground",children:"Manage your account security and password settings"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,a.jsx)("div",{className:"lg:col-span-2 space-y-6",children:(0,a.jsx)(i.E.div,{initial:{opacity:0,x:-20}
1,animate:{opacity:1,x:0},transition:{delay:.1},children:(0,a.jsxs)(n.Zb,{className:"bg-card",children:[(0,a.jsx)(n.Ol,{children:(0,a.jsxs)(n.ll,{className:"flex items-center gap-2",children:[(0,a.jsx)(u,{className:"h-5 w-5"}),"Change Password"]})}),(0,a.jsxs)(n.aY,{children:[(0,a.jsxs)("form",{onSubmit:N,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{htmlFor:"current-password",children:"Current Password"}),(0,a.jsx)(o.I,{id:"current-password",type:"password",value:g.currentPassword,onChange:s=>v("currentPassword",s.target.value),placeholder:"Enter your current password",required:!0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{htmlFor:"new-password",children:"New Password"}),(0,a.jsx)(o.I,{id:"new-password",type:"password",value:g.newPassword,onChange:s=>v("newPassword",s.target.value),placeholder:"Enter your new password",required:!0,minLength:6}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Password must be at least 6 characters long"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{htmlFor:"confirm-password",children:"Confirm New Password"}),(0,a.jsx)(o.I,{id:"confirm-password",type:"password",value:g.confirmPassword,onChange:s=>v("confirmPassword",s.target.value),placeholder:"Confirm your new password",required:!0,minLength:6})]}),(0,a.jsxs)("div",{className:"flex gap-4 pt-4",children:[(0,a.jsx)(d.z,{type:"submit",disabled:f,className:"flex-1",children:f?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2"}),"Updating..."]}):"Update Password"}),(0,a.jsx)(d.z,{type:"button",variant:"outline",onClick:b,className:"flex-1",children:"Send Reset Link"})]})]}),(0,a.jsxs)("div",{className:"mt-6 p-4 bg-muted/50 rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium text-sm mb-2",children:"Password Requirements:"}),(0,a.jsxs)("ul",{className:"text-xs text-muted-foreground space-y-1",children:[(0,a.jsx)("li",{children:"⢠At least 6 characters long"}),(0,a.jsx)("li",{children:"⢠Different from your current password"}),(0,a.jsx)("li",{children:"⢠Use a combination of letters, numbers, and symbols for better security"})]})]})]})]})})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(i.E.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},children:(0,a.jsxs)(n.Zb,{className:"bg-card",children:[(0,a.jsx)(n.Ol,{children:(0,a.jsxs)(n.ll,{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Z,{className:"h-5 w-5"}),"Security Overview"]})}),(0,a.jsx)(n.aY,{className:"space-y-4",children:P.map((s,e)=>(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-muted/30 rounded-lg",children:[(0,a.jsx)(s.icon,{className:"h-5 w-5 text-primary mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsx)("h4",{className:"font-medium text-sm",children:s.title}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(x.Z,{className:"h-3 w-3 text-green-500"}),(0,a.jsx)("span",{className:"text-xs text-green-600",children:s.status})]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:s.description})]})]},e))})]})}),(0,a.jsx)(i.E.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.3},className:"mt-6",children:(0,a.jsxs)(n.Zb,{className:"bg-card",children:[(0,a.jsx)(n.Ol,{children:(0,a.jsx)(n.ll,{className:"text-sm",children:"Account Information"})}),(0,a.jsxs)(n.aY,{className:"space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{className:"text-xs text-muted-foreground",children:"Email"}),(0,a.jsx)("p",{className:"text-sm font-medium",children:null==e?void 0:e.email})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{className:"text-xs text-muted-foreground",children:"Account ID"}),(0,a.jsxs)("p",{className:"text-xs font-mono bg-muted px-2 py-1 rounded",children:[null==e?void 0:null===(s=e.id)||void 0===s?void 0:s.slice(0,8),"..."]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c._,{className:"text-xs text-muted-foreground",children:"Last Sign In"}),(0,a.jsx)("p",{className:"text-sm",children:(null==e?void 0:e.last_sign_in_at)?new Date(e.last_sign_in_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"Today"})]})]})]})})]})]})]})})}}}]);
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.