1import{j as e}from"./state-DKBP_IF5.js";import{f as ce,j as ge,r as d}from"./react-vendor-Unhn4PzF.js";import{u as pe}from"./forms-GD8l5aEM.js";import{d as ue,Z as me,e as z,u as he,$ as fe,a0 as M,a1 as xe}from"./index-Br3_ARw7.js";import{t as c}from"./ui-Dw3dkPmY.js";import"./charts-D5dg506X.js";window.CESIUM_BASE_URL="/cesium/";const ye={pageBg:"#F6F8FC",heroGrad:"linear-gradient(180deg, #ECF1FA 0%, #F6F8FC 80%)",glowGold:"rgba(255, 183, 77, 0.22)",glowWarm:"rgba(224, 151, 47, 0.12)",railBg:"#ffffff",railBorder:"#E7ECF3",railIcon:"#64748b",railIconActive:"#E0972F",railActiveBg:"#F1F4F9",railHoverBg:"#F1F4F9",topLabel:"#64748b",toggleBg:"rgba(15, 23, 42, 0.05)",toggleIcon:"#64748b",accentColor:"#E0972F",heading:"#0f172a",subtitle:"#64748b",sectionTitle:"#1e293b",cardBg:"#ffffff",cardBorder:"rgba(15, 23, 42, 0.06)",cardShadow:"0 1px 4px rgba(15, 23, 42, 0.05)",label:"#94a3b8",value:"#1e293b",statValue:"#0f172a",statLabel:"#94a3b8",inputBg:"#ffffff",inputBorder:"rgba(10, 24, 80, 0.12)",inputColor:"#1e293b",inputFocusRing:"rgba(224, 151, 47, 0.12)",btnPrimaryBg:"#FFB74D",btnPrimaryColor:"#1b2440",btnPrimaryHover:"#ffc970",btnOutlineBorder:"#E3E8F0",btnOutlineColor:"#64748b",btnOutlineHoverBg:"#F1F4F9",pillBg:"#ffffff",pillColor:"#475569",pillBorder:"#E3E8F0",pillHoverBg:"#eef2f8",roleBadgeBg:"rgba(224, 151, 47, 0.12)",roleBadgeColor:"#b8760f",planBadgeBg:"#F1F4F9",planBadgeColor:"#5b6b8c",progTrack:"#eef1f6",dangerBg:"rgba(239, 68, 68, 0.06)",dangerBorder:"rgba(239, 68, 68, 0.15)",dangerBody:"#64748b",scrollThumb:"rgba(100, 116, 139, 0.25)",modalScrim:"rgba(15, 23, 42, 0.4)",modalBg:"#ffffff",modalBorder:"rgba(15, 23, 42, 0.06)",modalShadow:"0 20px 60px rgba(15, 23, 42, 0.18)"},be={pageBg:"#0a1628",heroGrad:"linear-gradient(180deg, #0c1a3a 0%, #111d3a 60%, #0a1628 100%)",glowGold:"rgba(255, 183, 77, 0.10)",glowWarm:"rgba(255, 183, 77, 0.06)",railBg:"#0d1525",railBorder:"rgba(255, 255, 255, 0.06)",railIcon:"rgba(255, 255, 255, 0.45)",railIconActive:"#FFB74D",railActiveBg:"rgba(255, 255, 255, 0.06)",railHoverBg:"rgba(255, 255, 255, 0.06)",topLabel:"rgba(255, 255, 255, 0.5)",toggleBg:"rgba(255, 255, 255, 0.08)",toggleIcon:"rgba(255, 255, 255, 0.6)",accentColor:"#FFB74D",heading:"#ffffff",subtitle:"rgba(255, 255, 255, 0.55)",sectionTitle:"#e8eaf0",cardBg:"#161f33",cardBorder:"rgba(255, 255, 255, 0.06)",cardShadow:"0 2px 12px rgba(0, 0, 0, 0.3)",label:"rgba(255, 255, 255, 0.4)",value:"#e8eaf0",statValue:"#ffffff",statLabel:"rgba(255, 255, 255, 0.5)",inputBg:"rgba(255, 255, 255, 0.04)",inputBorder:"rgba(255, 255, 255, 0.12)",inputColor:"#e8eaf0",inputFocusRing:"rgba(255, 183, 77, 0.18)",btnPrimaryBg:"#FFB74D",btnPrimaryColor:"#0c1a3a",btnPrimaryHover:"#ffc970",btnOutlineBorder:"rgba(255, 255, 255, 0.14)",btnOutlineColor:"rgba(255, 255, 255, 0.65)",btnOutlineHoverBg:"rgba(255, 255, 255, 0.08)",pillBg:"rgba(255, 255, 255, 0.05)",pillColor:"rgba(255, 255, 255, 0.6)",pillBorder:"rgba(255, 255, 255, 0.1)",pillHoverBg:"rgba(255, 255, 255, 0.1)",roleBadgeBg:"rgba(255, 183, 77, 0.15)",roleBadgeColor:"#FFB74D",planBadgeBg:"rgba(255, 255, 255, 0.08)",planBadgeColor:"rgba(255, 255, 255, 0.65)",progTrack:"rgba(255, 255, 255, 0.08)",dangerBg:"rgba(239, 68, 68, 0.10)",dangerBorder:"rgba(239, 68, 68, 0.25)",dangerBody:"rgba(255, 255, 255, 0.6)",scrollThumb:"rgba(255, 255, 255, 0.18)",modalScrim:"rgba(0, 0, 0, 0.6)",modalBg:"#1a2540",modalBorder:"rgba(255, 255, 255, 0.08)",modalShadow:"0 20px 60px rgba(0, 0, 0, 0.5)"};function ve(m){return m==="dark"?be:ye}const G=[{id:"profile",label:"Profile"},{id:"account",label:"Account"},{id:"billing",label:"Billing"},{id:"usage",label:"Usage"},{id:"privacy",label:"Privacy"}];function je(m){const j=m.replace("#",""),y=parseInt(j.slice(0,2),16),b=parseInt(j.slice(2,4),16),w=parseInt(j.slice(4,6),16);return`linear-gradient(180deg, rgba(${y},${b},${w},0) 0%, rgba(${y},${b},${w},0.85) 60%, rgb(${y},${b},${w}) 100%)`}function Ie(){const m=ce(),[j]=ge(),y=j.get("tab")||"profile",[b,w]=d.useState(G.some(r=>r.id===y)?y:"profile"),[R,V]=d.useState(null),[J,A]=d.useState(!0),[T,P]=d.useState(!1),[E,W]=d.useState(""),[Y,S]=d.use
1State(!1),[f,x]=d.useState({firstName:"",lastName:"",email:"",company:"",message:""}),[I,q]=d.useState(!1),[Q,k]=d.useState(!1),{themeMode:O}=ue(),t=d.useMemo(()=>ve(O),[O]),{register:L,handleSubmit:X,formState:{errors:v,isSubmitting:D},reset:Z,watch:K}=pe({resolver:me(xe),mode:"onBlur",defaultValues:{current_password:"",new_password:"",confirm_password:""}}),ee=K("new_password");d.useEffect(()=>{$()},[]);const $=async()=>{try{A(!0);const r=await z.request("profile");V(r),W(r.user.full_name)}catch{c.error("Failed to load profile")}finally{A(!1)}},te=async()=>{try{await z.request("profile",{method:"PUT",body:JSON.stringify({full_name:E})}),c.success("Profile updated"),P(!1),await $()}catch{c.error("Failed to update profile")}},re=async r=>{try{await z.request("profile/change-password",{method:"POST",body:JSON.stringify({current_password:r.current_password,new_password:r.new_password,confirm_password:r.confirm_password})}),c.success("Password changed successfully"),Z()}catch(s){c.error(s?.message||"Failed to change password")}},ie=async()=>{try{c.info("Preparing your data export...");const r=await z.request("profile/export-data"),s=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),l=window.URL.createObjectURL(s),p=document.createElement("a");p.href=l,p.download=`solar_intelligence_export_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(l),c.success("Data exported!")}catch{c.error("Failed to export data")}},se=async r=>{r.preventDefault();const{firstName:s,lastName:l,email:p,message:n}=f;if(!s.trim()||!l.trim()||!p.trim()||!n.trim()){c.error("Please fill in all required fields");return}q(!0);try{await fetch("/api/v1/contact/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:`${s.trim()} ${l.trim()}`,email:p.trim(),company:f.company.trim()||void 0,message:n.trim()})}),k(!0),c.success("Message sent! We'll get back to you soon.")}catch{c.error("Failed to send message. Please try again.")}finally{q(!1)}},ne=r=>new Date(r).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),oe=r=>new Date(r).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0});if(J||!R)return e.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",minHeight:0,background:t.pageBg,color:t.heading,fontFamily:"'Inter', system-ui, sans-serif"},children:[e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx("div",{style:{width:40,height:40,border:`3px solid ${t.cardBorder}`,borderTopColor:t.accentColor,borderRadius:"50%",animation:"spin 0.8s linear infinite",margin:"0 auto 16px"}}),e.jsx("div",{style:{color:t.statLabel,fontSize:"0.875rem"},children:"Loading your settings..."})]}),e.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]});const i=R,o=i.plan_info.type?.toLowerCase()||"free",N=i.user.full_name?.split(" ")[0]||"",U=i.user.full_name?.split(" ").slice(1).join(" ")||"",ae=N.charAt(0).toUpperCase()||"?",g={background:t.cardBg,border:`1px solid ${t.cardBorder}`,borderRadius:16,padding:"24px 28px",boxShadow:t.cardShadow},a={fontSize:"0.625rem",fontWeight:600,color:t.label,textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:6},F={fontSize:"0.9375rem",color:t.value,fontWeight:500},u={width:"100%",padding:"10px 14px",background:t.inputBg,border:`1px solid ${t.inputBorder}`,borderRadius:12,color:t.inputColor,fontSize:"0.875rem",fontFamily:"'Inter', system-ui, sans-serif",outline:"none",transition:"border-color 0.2s, box-shadow 0.2s"},B={padding:"10px 24px",borderRadius:12,border:"none",background:t.btnPrimaryBg,color:t.btnPrimaryColor,fontSize:"0.8125rem",fontWeight:600,cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif",transition:"filter 0.2s"},C={padding:"10px 22px",borderRadius:12,border:`1px solid ${t.btnOutlineBorder}`,background:"transparent",color:t.btnOutlineColor,fontSize:"0.8125rem",fontWeight:500,cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif",transition:"background 0.2s"},h={fontSize:"1.0625rem",fontWeight:600,color:t.sectionTitle,margin:0},le={profile:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:920},children:[e.jsxs("div",{style:g,children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:22},children:[e.jsx("h3",{style:h,children:"Personal Information"}),!T&&e.jsx("button",{style:C,onClick:()=>P(!0),children:"Edit"})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:22},children:[e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Full Name"}),T?e.jsx("input",{style:u,value:E,onChange:r=>W(r.target.value)}):e.jsx("div",{style:F,children:i.user.full_name})]}),e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Email Address"}),e.jsx("div",{style:F,children:i.user.username})]}),e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Member Since"}),e.jsx("div",{style:F,children:ne(i.user.created_at)})]}),e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Account Type"}),e.jsx("div",{style:{...F,textTransform:"capitalize"},children:i.user.role})]})]}),T&&e.jsxs("div",{style:{display:"flex",gap:10,marginTop:20},children:[e.jsx("button",{style:B,onClick:te,children:"Save Changes"}),e.jsx("button",{style:C,onClick:()=>{P(!1),W(i.user.full_name)},children:"Cancel"})]})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:16},children:[{label:"Total Queries",val:i.usage_stats.total_queries.toLocaleStr
1ing(),sub:"All time"},{label:"Conversations",val:i.usage_stats.total_conversations.toLocaleString(),sub:"Created"},{label:"Account Age",val:`${i.usage_stats.account_age_days}`,sub:"Days"}].map(r=>e.jsxs("div",{style:{...g,padding:"22px 16px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"1.75rem",fontWeight:600,color:t.statValue,letterSpacing:"-0.02em",marginBottom:4},children:r.val}),e.jsx("div",{style:{fontSize:"0.75rem",color:t.statLabel},children:r.label}),e.jsx("div",{style:{fontSize:"0.6875rem",color:t.statLabel,opacity:.8,marginTop:2},children:r.sub})]},r.label))})]}),account:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:920},children:[e.jsxs("div",{style:g,children:[e.jsx("h3",{style:{...h,marginBottom:8},children:"Change Password"}),e.jsx("p",{style:{fontSize:"0.8125rem",color:t.subtitle,margin:"0 0 20px",lineHeight:1.6},children:"Update your password to keep your account secure. Use a strong password with at least 8 characters."}),e.jsxs("form",{onSubmit:X(re),style:{maxWidth:440},children:[e.jsxs("div",{style:{marginBottom:16},children:[e.jsx("div",{style:a,children:"Current Password"}),e.jsx("input",{type:"password",style:u,...L("current_password")}),v.current_password&&e.jsx("p",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:4},children:v.current_password.message})]}),e.jsxs("div",{style:{marginBottom:16},children:[e.jsx("div",{style:a,children:"New Password"}),e.jsx("input",{type:"password",style:u,...L("new_password")}),v.new_password&&e.jsx("p",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:4},children:v.new_password.message}),e.jsx(fe,{password:ee||"",showRequirements:!1})]}),e.jsxs("div",{style:{marginBottom:24},children:[e.jsx("div",{style:a,children:"Confirm New Password"}),e.jsx("input",{type:"password",style:u,...L("confirm_password")}),v.confirm_password&&e.jsx("p",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:4},children:v.confirm_password.message})]}),e.jsx("button",{type:"submit",disabled:D,style:{...B,opacity:D?.6:1},children:D?"Changing...":"Update Password"})]})]}),e.jsxs("div",{style:{background:t.dangerBg,border:`1px solid ${t.dangerBorder}`,borderRadius:16,padding:"24px 28px"},children:[e.jsx("h3",{style:{...h,color:"#ef4444",marginBottom:8},children:"Danger Zone"}),e.jsx("p",{style:{fontSize:"0.8125rem",color:t.dangerBody,lineHeight:1.6,margin:"0 0 16px"},children:"Account deletion is permanent and cannot be undone. All your data, conversations, and settings will be removed."}),e.jsx("button",{onClick:()=>{x({firstName:i.user.full_name.split(" ")[0]||"",lastName:i.user.full_name.split(" ").slice(1).join(" ")||"",email:i.user.username,company:"",message:"I would like to request the deletion of my account and all associated data."}),S(!0)},style:{padding:"10px 22px",borderRadius:12,border:"1px solid rgba(239, 68, 68, 0.4)",background:"transparent",color:"#ef4444",fontSize:"0.8125rem",fontWeight:600,cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif",transition:"background 0.2s"},children:"Request Account Deletion"})]})]}),billing:()=>{const r=[{id:"analyst",name:"Analyst",price:"â¬99",features:[M("analyst"),"Data & chart export","Email support"],url:"https://www.becquerelinstitute.eu/shop/solarintelligenceai-monthly-subscription-70?attribute_values=52"},{id:"analyst_plus",name:"Analyst+",price:"â¬109",features:["Everything in Analyst","+ Orchestrator (Orion)","Multi-agent queries"],url:"https://www.becquerelinstitute.eu/shop/solarintelligenceai-monthly-subscription-70?attribute_values=54"},{id:"strategist",name:"Strategist",price:"â¬149",features:[M("strategist"),"BIPV Design & Materials","Priority support"],popular:!0,url:"https://www.becquerelinstitute.eu/shop/solarintelligenceai-monthly-subscription-70?attribute_values=53"},{id:"strategist_plus",name:"Strategist+",price:"â¬164",features:["Everything in Strategist","+ Orchestrator (Orion)","Full platform access"],url:"https://www.becquerelinstitute.eu/shop/solarintelligenceai-monthly-subscription-70?attribute_values=55"}],s=n=>o!=="free"&&o!=="scout"&&(o===n||o.replace("+","_plus")===n),l=["free","analyst","analyst_plus","strategist","strategist_plus","enterprise","admin"],p=n=>l.indexOf(n)<l.indexOf(o.replace("+","_plus"));return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:920},children:[e.jsxs("div",{style:{position:"relative",overflow:"hidden",borderRadius:16,padding:"24px 28px",background:"linear-gradient(135deg, #0c1a3a 0%, #162a52 100%)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx("div",{style:{position:"absolute",top:-30,right:-30,width:140,height:140,borderRadius:"50%",background:"rgba(255,183,77,0.12)"}}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx("div",{style:{fontSize:"0.6875rem",fontWeight:600,color:"rgba(255,255,255,0.55)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:6},children:"Current Plan"}),e.jsx("span",{style:{fontSize:"1.5rem",fontWeight:600,color:"#FFB74D",textTransform:"capitalize"},children:o==="free"||o==="scout"?"Free Trial":i.plan_info.type}),e.jsx("div",{style:{fontSize:"0.8125rem",color:"rgba(255,255,255,0.55)",marginTop:4},children:o==="free"||o==="scout"?"15 trial queries included":"Unlimited queries"})]}),e.jsx("div",{style:{position:"relative",width:52,height:52,borderRadius:14,background:"rgba(255,255,255,0.08)",display:"flex",alignItems:"center",justifyContent:"center",color:"#FFB74D"},children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2L15 8.5 22 9.3l-5 4.6L18.5 21 12 17.3 5.5 21 7 13.9l-5-4.6 7-0.8z"})})})]}),e.jsxs("div",{children:[e.jsx("h3",{style:{...h,marginBottom:16},children:"Available Plans"}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},children:r.map(n=>{const _=s(n.id),de=p(n.id);return e.jsxs("div",{style:{position:"relative",background:t.cardBg,border:_?`2px solid ${t.accentColor}`:n.popular?"2px solid #FFB74D":`1px solid ${t.cardBorder}`,borderRadius:16,padding:"22px 20px",boxShadow:t.cardShadow},children:[n.popular&&!_&&e.jsx("div",{style:{position:"absolute",top:-10,left:"50%",transform:"translateX(-50%)",background:"linear-gradient(135deg, #FFB74D, #E0972F)",color:"#1b2440",fontSize:"0.5625rem",fontWeight:700,padding:"3px 12px",borderRadius:20,letterSpacing:"0.06em",textTransform:"uppercase",whiteSpace:"nowrap"},children:"Most Popular"}),_&&e.jsx("div",{style:{position:"absolute",top:-10,left:"50%",transform:"translateX(-50%)",background:"#22c55e",color:"#fff",fontSize:"0.5625rem",fontWeight:700,padding:"3px 12px",borderRadius:20,letterSpacing:"0.06em",textTransform:"uppercase"},children:"Active"}),e.jsx("div",{style:{fontSize:"0.9375rem",fontWeight:600,color:t.sectionTitle,marginBottom:8},children:n.name}),e.jsxs("div",{style:{marginBottom:16},children:[e.jsx("span",{style:{fontSize:"1.75rem",fontWeight:700,color:t.heading},children:n.price}),e.jsx("span",{style:{fontSize:"0.75rem",color:t.statLabel},children:" /mo"})]}),e.jsx("ul",{style:{listStyle:"none",padding:0,margin:"0 0 18px",fontSize:"0.75rem",color:t.subtitle},children:n.features.map(H=>e.jsxs("li",{style:{marginBottom:8,display:"flex",alignItems:"flex-start",ga
1p:7},children:[e.jsx("span",{style:{color:t.accentColor,fontWeight:700},children:"â"})," ",H]},H))}),_?e.jsx("div",{style:{textAlign:"center",padding:9,borderRadius:10,background:"rgba(34,197,94,0.08)",color:"#22c55e",fontSize:"0.78rem",fontWeight:600},children:"Current"}):de?e.jsx("div",{style:{textAlign:"center",padding:9,color:t.statLabel,fontSize:"0.78rem"},children:"â"}):e.jsx("button",{onClick:()=>window.open(n.url,"_blank","noopener,noreferrer"),style:{width:"100%",padding:9,borderRadius:10,border:n.popular?"none":`1px solid ${t.btnOutlineBorder}`,background:n.popular?t.btnPrimaryBg:"transparent",color:n.popular?t.btnPrimaryColor:t.btnOutlineColor,fontSize:"0.78rem",fontWeight:600,cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif"},children:o==="free"||o==="scout"?"Subscribe":"Upgrade"})]},n.id)})})]}),e.jsxs("div",{children:[e.jsx("h3",{style:{...h,marginBottom:8},children:"Standalone Agent Subscriptions"}),e.jsx("p",{style:{fontSize:"0.8125rem",color:t.subtitle,margin:"0 0 16px",lineHeight:1.6},children:"Subscribe to individual specialized agents without a full platform plan."}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:16},children:e.jsxs("div",{style:{...g,position:"relative"},children:[e.jsx("div",{style:{position:"absolute",top:-10,right:16,background:"linear-gradient(135deg, #0c1a3a, #1e3a8a)",color:"#fff",fontSize:"0.5625rem",fontWeight:700,padding:"3px 12px",borderRadius:20,letterSpacing:"0.06em",textTransform:"uppercase"},children:"Standalone"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:14},children:[e.jsx("div",{style:{width:44,height:44,borderRadius:10,background:"linear-gradient(135deg, #FFB74D, #E0972F)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,padding:8},children:e.jsx("img",{src:"/agents/Groove.svg",alt:"Groove",style:{width:"100%",height:"100%",filter:"brightness(0) saturate(100%)"}})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"1.0625rem",fontWeight:600,color:t.sectionTitle},children:"Groove"}),e.jsx("div",{style:{fontSize:"0.75rem",color:t.statLabel},children:"PV Plant Optimization Agent"})]})]}),e.jsx("ul",{style:{listStyle:"none",padding:0,margin:"0 0 20px",fontSize:"0.8125rem",color:t.subtitle},children:["Utility-scale plant design","Yield & shading analysis","Tracker & fixed-tilt optimization","Dedicated agent subscription"].map(n=>e.jsxs("li",{style:{marginBottom:8,display:"flex",alignItems:"center",gap:8},children:[e.jsx("span",{style:{color:t.accentColor,fontSize:"0.75rem",fontWeight:700},children:"â"})," ",n]},n))}),e.jsx("button",{onClick:()=>window.open("https://www.becquerelinstitute.eu/shop/solarintelligenceai-groove-agent-80","_blank","noopener,noreferrer"),style:{...B,width:"100%",padding:10,fontSize:"0.8125rem"},children:"Subscribe"})]})})]}),e.jsxs("div",{style:{...g,display:"flex",alignItems:"center",justifyContent:"space-between",gap:24},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"1rem",fontWeight:600,color:t.sectionTitle,marginBottom:4},children:"Enterprise"}),e.jsx("div",{style:{fontSize:"0.8125rem",color:t.subtitle,lineHeight:1.5},children:"Custom agents, dedicated support, SSO, and tailored solutions for your organization"})]}),e.jsx("button",{style:{...C,flexShrink:0},onClick:()=>S(!0),children:"Contact Sales"})]})]})},usage:()=>{const r=i.usage_stats.query_limit==="Unlimited"||parseInt(i.usage_stats.query_limit)>=999999,s=r?0:i.usage_stats.monthly_queries/parseInt(i.usage_stats.query_limit)*100;return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:920},children:[e.jsxs("div",{style:g,children:[e.jsx("h3",{style:{...h,marginBottom:16},children:"Monthly Usage"}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:10},children:[e.jsx("span",{style:{fontSize:"0.875rem",color:t.subtitle},children:"Queries this month"}),e.jsxs("span",{style:{fontSize:"1rem",fontWeight:700,color:t.heading},children:[i.usage_stats.monthly_queries,r?"":` / ${i.usage_stats.query_limit}`]})]}),!r&&e.jsx("div",{style:{height:8,borderRadius:4,background:t.progTrack,overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${Math.min(s,100)}%`,background:s>90?"#ef4444":"linear-gradient(90deg, #FFB74D, #E0972F)",borderRadius:4,transition:"width 0.4s cubic-bezier(0.4, 0, 0.2, 1)"}})}),e.jsx("div",{style:{fontSize:"0.75rem",color:t.statLabel,marginTop:8},children:r?"Unlimited queries on your current plan":`${i.usage_stats.queries_remaining} queries remaining this month`})]}),e.jsxs("div",{children:[e.jsx("h3",{style:{...h,marginBottom:16},children:"All-Time Statistics"}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},children:[{label:"Total Queries",val:i.usage_stats.total_queries.toLocaleStr
1ing()},{label:"Conversations",val:i.usage_stats.total_conversations.toLocaleString()},{label:"Messages",val:i.usage_stats.total_messages.toLocaleString()},{label:"Account Age",val:`${i.usage_stats.account_age_days}d`}].map(l=>e.jsxs("div",{style:{...g,textAlign:"center",padding:"22px 16px"},children:[e.jsx("div",{style:{fontSize:"1.75rem",fontWeight:600,color:t.statValue,marginBottom:6,letterSpacing:"-0.02em"},children:l.val}),e.jsx("div",{style:{fontSize:"0.75rem",color:t.statLabel,fontWeight:500},children:l.label})]},l.label))})]}),i.usage_stats.last_query_date&&e.jsxs("div",{style:{...g,padding:"20px 28px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"0.875rem",fontWeight:500,color:t.sectionTitle},children:"Last Activity"}),e.jsx("div",{style:{fontSize:"0.8125rem",color:t.statLabel},children:oe(i.usage_stats.last_query_date)})]}),e.jsx("button",{style:C,onClick:()=>m("/chat"),children:"Go to Chat"})]})]})},privacy:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:18,maxWidth:920},children:[e.jsxs("div",{style:g,children:[e.jsx("h3",{style:{...h,marginBottom:8},children:"Your Data Rights"}),e.jsxs("p",{style:{fontSize:"0.875rem",color:t.subtitle,lineHeight:1.7,margin:0},children:["Under GDPR, you have the right to access, rectify, erase, or export your personal data. You can exercise these rights through the options below or by contacting"," ",e.jsx("a",{href:"mailto:[email protected]",style:{color:t.accentColor,fontWeight:600,textDecoration:"none"},children:"[email protected]"}),"."]})]}),[{title:"Export Your Data",desc:"Download all your personal data including conversations, profile, and usage history as a JSON file.",action:"Export",onClick:ie},{title:"Privacy Policy",desc:"Read our full privacy policy to understand how we collect, use, and protect your personal data.",action:"View",onClick:()=>m("/privacy")},{title:"Terms of Service",desc:"Review the terms and conditions governing your use of Solar Intelligence AI.",action:"View",onClick:()=>m("/terms")}].map(r=>e.jsxs("div",{style:{...g,padding:"20px 28px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:24},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontSize:"0.9375rem",fontWeight:600,color:t.sectionTitle,marginBottom:4},children:r.title}),e.jsx("div",{style:{fontSize:"0.8125rem",color:t.subtitle,lineHeight:1.5},children:r.desc})]}),e.jsx("button",{style:{...C,flexShrink:0},onClick:r.onClick,children:r.action})]},r.title))]})};return e.jsxs("div",{style:{display:"flex",height:"100%",minHeight:0,width:"100%",fontFamily:"'Inter', system-ui, sans-serif"},children:[e.jsxs("div",{className:"app-scrollbar",style:{flex:1,height:"100%",overflowY:"auto",overflowX:"hidden",background:t.pageBg},children:[e.jsxs("div",{style:{position:"relative",background:t.heroGrad,padding:"18px 40px 36px",paddingTop:"calc(18px + var(--app-content-inset, 64px))",overflow:"hidden"},children:[e.jsx("div",{style:{position:"absolute",top:-180,right:-90,width:520,height:520,background:`conic-gradient(from 200deg at 50% 50%, transparent 0deg, ${t.glowGold} 40deg, transparent 80deg)`,transform:"rotate(-25deg)",filter:"blur(60px)",pointerEvents:"none"}}),e.jsx("div",{style:{position:"absolute",bottom:-120,left:-40,width:400,height:400,borderRadius:"50%",background:`radial-gradient(circle, ${t.glowWarm} 0%, transparent 70%)`,pointerEvents:"none"}}),e.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:120,background:je(t.pageBg),pointerEvents:"none"}}),e.jsxs("div",{style:{position:"relative",maxWidth:920,margin:"0 auto",zIndex:2},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:28},children:[e.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600,color:t.topLabel,letterSpacing:"0.08em",textTransform:"uppercase"},children:"Account Settings"}),e.jsx("div",{style:{display:"flex",alignItems:"center",gap:10},children:e.jsxs("button",{onClick:async()=>{await he.getState().logout(),m("/login")},style:{padding:"8px 18px",borderRadius:100,border:`1px solid ${t.btnOutlineBorder}`,background:"transparent",color:t.btnOutlineColor,fontSize:"0.8125rem",fontWeight:500,cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif",display:"flex",alignItems:"center",gap:6},children:[e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e.jsx("polyline",{points:"16 17 21 12 16 7"}),e.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),"Log out"]})})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:22},children:[e.jsx("div",{style:{width:80,height:80,borderRadius:"50%",background:"linear-gradient(135deg, #FFB74D 0%, #E0972F 100%)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2rem",fontWeight:600,color:"#fff",flexShrink:0,boxShadow:"0 10px 30px rgba(224, 151, 47, 0.3)"},children:ae}),e.jsxs("div",{children:[e.jsxs("h1",{style:{fontSize:"2.5rem",fontWeight:200,color:t.heading,margin:"0 0 4px",letterSpacing:"-0.025em",lineHeight:1.05},children:[N," ",U&&e.jsx("span",{style:{color:t.accentColor,fontWeight:400},children:U})]}),e.jsx("div",{style:{fontSize:"0.8125rem",color:t.subtitle},children:i.user.username}),e.jsxs("div",{style:{marginTop:10,display:"flex",gap:8},children:[e.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600,padding:"4px 12px",borderRadius:20,background:t.roleBadgeBg,color:t.roleBadgeColor,textTransform:"capitalize"},children:i.user.role}),e.jsx("span",{style:{fontSize:"0.6875rem",fontWeight:600,padding:"4px 12px",borderRadius:20,background:t.planBadgeBg,color:t.planBadgeColor},children:o==="free"||o==="scout"?"Free Plan":i.plan_info.type})]})]})]})]})," "]}),e.jsx("div",{style:{padding:"0 40px",position:"relative",zIndex:3,marginTop:-6},children:e.jsx("div",{style:{maxWidth:920,margin:"0 auto",display:"flex",gap:8,flexWrap:"wrap"},children:G.map(r=>{const s=b===r.id;return e.jsx("button",{onClick:()=>w(r.id),style:{padding:"8px 18px",borderRadius:9999,fontSize:"0.8125rem",cursor:"pointer",fontFamily:"'Inter', system-ui, sans-serif",transition:"all 0.2s",border:s?"1px solid transparent":`1px solid ${t.pillBorder}`,background:s?"#FFB74D":t.pillBg,color:s?"#1b2440":t.pillColor,fontWeight:s?600:500},children:r.label},r.id)})})}),e.jsx("div",{style:{padding:"24px 40px 56px",display:"flex",justifyContent:"center"},children:e.jsx("div",{style:{maxWidth:920,width:"100%"},children:le[b]()})})]}),Y&&e.jsx("div",{onClick:r=>{r.target===r.currentTarget&&(S(!1),k(!1))},style:{position:"fixed",inset:0,zIndex:1e3,background:t.modalScrim,backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:e.jsxs("div",{style:{background:t.modalBg,border:`1px solid ${t.modalBorder}`,borderRadius:20,width:"100%",maxWidth:520,padding:"32px 36px",position:"relative",boxShadow:t.modalShadow},children:[e.jsx("button",{onClick:()=>{S(!1),k(!1)},style:{position:"absolute",top:16,right:16,background:"none",border:"none",cursor:"pointer",padding:4,color:t.statLabel},children:e.jsx("svg",{width:"20",height:"20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}
1),Q?e.jsxs("div",{style:{textAlign:"center",padding:"24px 0"},children:[e.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{marginBottom:16},children:[e.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),e.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),e.jsx("h3",{style:{fontSize:"1.25rem",fontWeight:600,color:t.heading,marginBottom:8},children:"Message Sent!"}),e.jsx("p",{style:{fontSize:"0.875rem",color:t.subtitle,marginBottom:24,lineHeight:1.6},children:"Thank you for your message! We will get back to you soon."}),e.jsx("button",{onClick:()=>{S(!1),k(!1),x({firstName:"",lastName:"",email:"",company:"",message:""})},style:{...B,borderRadius:9999,padding:"10px 32px"},children:"Close"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("h2",{style:{fontSize:"1.5rem",fontWeight:200,color:t.heading,margin:"0 0 8px",letterSpacing:"-0.02em"},children:["Get in ",e.jsx("span",{style:{color:t.accentColor,fontWeight:400},children:"touch"})]}),e.jsx("p",{style:{fontSize:"0.8125rem",color:t.subtitle,margin:"0 0 24px",lineHeight:1.6},children:"We'd love to hear from you. Send us a message and we'll respond as soon as possible."}),e.jsxs("form",{onSubmit:se,children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[e.jsxs("div",{children:[e.jsx("div",{style:a,children:"First name *"}),e.jsx("input",{style:u,value:f.firstName,onChange:r=>x(s=>({...s,firstName:r.target.value})),required:!0})]}),e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Last name *"}),e.jsx("input",{style:u,value:f.lastName,onChange:r=>x(s=>({...s,lastName:r.target.value})),required:!0})]})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:16,marginBottom:16},children:[e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Email *"}),e.jsx("input",{type:"email",style:u,value:f.email,onChange:r=>x(s=>({...s,email:r.target.value})),required:!0})]}),e.jsxs("div",{children:[e.jsx("div",{style:a,children:"Company"}),e.jsx("input",{style:u,value:f.company,onChange:r=>x(s=>({...s,company:r.target.value}))})]})]}),e.jsxs("div",{style:{marginBottom:24},children:[e.jsx("div",{style:a,children:"Message *"}),e.jsx("textarea",{value:f.message,onChange:r=>x(s=>({...s,message:r.target.value})),rows:3,style:{...u,resize:"vertical",minHeight:80,lineHeight:1.6},required:!0})]}),e.jsx("button",{type:"submit",disabled:I,style:{...B,width:"100%",padding:12,borderRadius:9999,fontSize:"0.9375rem",opacity:I?.6:1},children:I?"Sending...":"Send Message"})]})]})]})})]})}export{Ie as default};
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.