1import{r,j as e}from"./vendor-clerk-MwDNJv5P.js";import{c as ke,a as me,b as xe,O as Ne,l as w,P as we,Q as Ce,R as He,U as Se,V as Ke,X as Le,W as Te,t as p,Y as Ee,Z as $e,u as Ue,_ as Ae,$ as De,a0 as Me,a1 as Pe,k as _e,B as Be,a2 as Fe}from"./index-BE7kE0xl.js";import{C as Ie}from"./Kinetic-D6QIzA5r.js";import{M as fe}from"./MagneticButton-HYNDKOJe.js";import{W as Re}from"./Wordmark-0tSWuUUW.js";import{S as ze,V as Ve}from"./VerifiedBadge-CRPb40a8.js";import{T as qe,U as Oe}from"./TopupModal-CS_0hVP5.js";import{C as We}from"./check-D17JMznP.js";import{L as Ge}from"./link-2-C2w6ZcHb.js";import"./vendor-pdf-DfO2iUf6.js";import"./vendor-motion-Ca9LltCM.js";import"./badge-check-BBj7wTsW.js";const Xe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ye=ke("external-link",Xe),Qe="/assets/card-bg-credits-DknbZp3s.jpg",Ze="h-10 w-full border-0 border-b border-border bg-transparent px-0 text-sm outline-none transition-colors placeholder:text-muted-foreground/60 focus:border-foreground",oe={openai:"h-[20px]",anthropic:"h-[10px]",openrouter:"h-[15px]",xai:"h-[10px]",gemini:"h-[15px]",kimi:"h-[15px]"},de=({provider:t,label:u})=>e.jsxs("span",{className:"inline-flex shrink-0 items-center",children:[e.jsx("img",{src:`/builder-logos/wordmarks/${t}-black.png`,alt:u,title:u,loading:"lazy",className:`${oe[t]||"h-[14px]"} w-auto max-w-none dark:hidden`}),e.jsx("img",{src:`/builder-logos/wordmarks/${t}-white.png`,alt:u,title:u,loading:"lazy",className:`${oe[t]||"h-[14px]"} hidden w-auto max-w-none dark:block`})]}),M="py-3 text-[10px] font-bold uppercase tracking-[0.2em] text-muted-foreground/70",ce="text-[11px] font-semibold text-foreground/55 transition-colors hover:text-foreground disabled:opacity-50";function Je(){const{t,lang:u}=me(),{refresh:b}=xe(),[W,P]=r.useState(!0),[G,$]=r.useState(!1),[_,B]=r.useState(!0),[n,F]=r.useState([]),[C,I]=r.useState([]),[j,v]=r.useState({}),[c,H]=r.useState(null),[U,y]=r.useState(""),R=r.useCallback(async()=>{const a=await Ne();if(!a.ok){$(!0),P(!1);return}B(a.configured!==!1),F(a.providers||[]),I(a.keys||[]),$(!1),P(!1)},[]);r.useEffect(()=>{R()},[R]);const h=(a,d)=>{if(a&&a.error==="byok_key_failed"){const l=a.kind||"provider_error";return t(l==="auth"?"apiKeys.errAuth":l==="quota"?"apiKeys.errQuota":l==="model_access"?"apiKeys.errModelAccess":"apiKeys.errProvider").replace("{provider}",d)}return a&&a.error==="validation_unavailable"?t("apiKeys.errTransient"):a&&a.error==="vault_unconfigured"?t("apiKeys.errVault"):a&&a.status===429?t("apiKeys.errRate"):t("apiKeys.errGeneric")},S=async a=>{I(a||[]);try{await b()}catch{}},f=!!(c&&j[c.provider]),A=a=>{y(""),H({provider:a.provider,label:a.label})},x=async()=>{if(!c)return;const{provider:a,label:d}=c,l=U.trim();if(!l)return;v(m=>({...m,[a]:!0}));const o=await $e(a,l);if(v(m=>({...m,[a]:!1})),!o.ok){p.error(h(o,d));return}y(""),H(null),await S(o.keys),p.success(t("apiKeys.savedToast").replace("{provider}",d))},D=async(a,d)=>{v(o=>({...o,[a]:!0}));const l=await Ee(a);if(v(o=>({...o,[a]:!1})),!l.ok){p.error(h(l,d));return}await S(l.keys),p.success(t("apiKeys.removedToast").replace("{provider}",d))},K=async(a,d,l)=>{v(m=>({...m,[a]:!0}));const o=await Te(a,l);if(v(m=>({...m,[a]:!1})),!o.ok){p.error(h(o,d));return}await S(o.keys)},k=a=>e.jsxs("td",{className:"px-3 py-4 text-center align-middle",children:[a?e.jsx(We,{className:"inline h-3.5 w-3.5 text-foreground","aria-hidden":!0}):e.jsx(Le,{className:"inline h-3.5 w-3.5 text-muted-foreground/40","aria-hidden":!0}),e.jsx("span",{className:"sr-only",children:a?"yes":"no"})]});return W?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(w,{className:"h-4 w-4 animate-spin"})," ",t("apiKeys.loading")]}):G?e.jsx("div",{className:"text-sm text-muted-foreground",children:t("apiKeys.loadError")}):e.jsxs("div",{"data-testid":"api-keys-section",children:[e.jsx("p",{className:"max-w-[560px] text-sm text-muted-foreground",children:t("apiKeys.hint")}),_?null:e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:t("apiKeys.errVault")}),e.jsx("div",{className:"mt-6 overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[640px] border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border/40 text-left",children:[e.jsx("th",{className:`${M} pr-4`,children:t("apiKeys.colProvider")}),e.jsx("th",{className:`${M} px-3 text-center`,children:t("apiKeys.coverText")}),e.jsx("th",{className:`${M} px-3 text-center`,children:t("apiKeys.coverLogo")}),e.jsx("th",{className:`${M} px-3 text-center`,children:t("apiKeys.coverImage")}),e.jsx("th",{className:`${M} pl-4 text-right`,children:t("apiKeys.colKey")})]})}),e.jsx("tbody",{className:"divide-y divide-border/40",children:n.map(a=>{const d=C.find(o=>o.provider===a.provider)||null,l=!!j[a.provider];return e.jsxs("tr",{"data-testid":`api-key-card-${a.provider}`,children:[e.jsx("td",{className:"py-4 pr-4 align-middle",children:e.jsx(de,{provider:a.provider,label:a.label})}),k(a.coverage?.text),k(a.coverage?.logo),k(a.coverage?.image),e.jsx("td",{className:"py-4 pl-4 text-right al
1ign-middle",children:d?e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5",children:[e.jsx("code",{"data-testid":`api-key-masked-${a.provider}`,title:t("apiKeys.validatedOn").replace("{date}",new Date(d.validatedAt).toLocaleDateString(u)),className:"font-mono text-xs text-foreground",children:d.masked}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11px] font-semibold",children:[e.jsx("input",{type:"checkbox",checked:!!d.isDefault,disabled:l,"data-testid":`api-key-default-${a.provider}`,onChange:o=>K(a.provider,a.label,o.target.checked),className:"h-3.5 w-3.5 accent-[hsl(var(--brand))]"}),t("apiKeys.defaultLabel")]}),e.jsx("button",{type:"button",disabled:l,"data-testid":`api-key-replace-${a.provider}`,onClick:()=>A(a),className:ce,children:t("apiKeys.replace")}),e.jsxs("button",{type:"button",disabled:l,"data-testid":`api-key-delete-${a.provider}`,onClick:()=>D(a.provider,a.label),className:ce,children:[l?e.jsx(w,{className:"inline h-3 w-3 animate-spin"}):null," ",t("apiKeys.remove")]})]}):e.jsx("button",{type:"button",disabled:!_||l,"data-testid":`api-key-add-${a.provider}`,onClick:()=>A(a),className:"text-[11px] font-bold uppercase tracking-[0.15em] text-foreground/70 underline decoration-border underline-offset-4 transition-colors hover:text-foreground disabled:opacity-50",children:t("apiKeys.add")})})]},a.provider)})})]})}),e.jsx(we,{open:!!c,onOpenChange:a=>{!a&&!f&&(H(null),y(""))},children:e.jsx(Ce,{className:"sm:max-w-md","data-testid":"api-key-modal",children:c?e.jsxs(e.Fragment,{children:[e.jsxs(He,{children:[e.jsxs(Se,{className:"flex items-center gap-3",children:[e.jsx(de,{provider:c.provider,label:c.label}),e.jsx("span",{className:"text-sm font-black uppercase tracking-tight",children:t("apiKeys.modalTitle")})]}),e.jsx(Ke,{className:"text-left text-xs",children:t("apiKeys.maskedNote")})]}),e.jsx("input",{type:"password",autoComplete:"off",autoFocus:!0,"aria-label":t("apiKeys.placeholder").replace("{provider}",c.label),value:U,disabled:f,"data-testid":`api-key-input-${c.provider}`,onChange:a=>y(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),x())},placeholder:t("apiKeys.placeholder").replace("{provider}",c.label),className:Ze}),e.jsxs(fe,{type:"button",disabled:f||!U.trim(),"data-testid":`api-key-save-${c.provider}`,onClick:x,className:"h-9 self-start rounded-lg bg-[hsl(var(--brand))] px-4 text-xs font-semibold text-[hsl(var(--brand-foreground))] hover:bg-[hsl(var(--brand-2))] disabled:opacity-50",children:[f?e.jsx(w,{className:"h-4 w-4 animate-spin"}):null,t(f?"apiKeys.saving":"apiKeys.save")]})]}):null})})]})}const ae=({eyebrow:t,children:u,testid:b})=>e.jsxs("section",{"data-testid":b,className:"mt-12 grid gap-4 border-t border-border pt-10 lg:grid-cols-[220px_1fr] lg:gap-x-14",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:t}),e.jsx("div",{children:u})]}),pe=(t,u)=>(t&&t.trim()[0]||u&&u[0]||"?").toUpperCase(),et=["image/png","image/jpeg","image/webp"],tt=5*1024*1024,ue="mt-1 h-10 w-full border-0 border-b border-border bg-transparent px-0 text-sm outline-none transition-colors placeholder:text-muted-foreground/60 focus:border-foreground",at="mt-1 h-10 w-full border-0 border-b border-red-500 bg-transparent px-0 text-sm outline-none transition-colors placeholder:text-muted-foreground/60 focus:border-red-500",g="text-[10px] font-bold uppercase tracking-[0.2em] text-muted-foreground/70";function ht(){const{t,lang:u}=me(),{email:b,refresh:W}=xe(),P=Ue(),[G,$]=r.useState(!0),[_,B]=r.useState(!1),[n,F]=r.useState(null),[C,I]=r.useState(null),[j,v]=r.useState(null),[c,H]=r.useState(!1),[U,y]=r.useState(!1),R=r.useCallback(async s=>{y(!1),H(!0);const i=await Ae({returnTo:window.location.pathname+window.location.search,tier:s});if(i.ok&&i.url){window.location.href=i.url;return}H(!1),p.error(t("billing.error"))},[t]),[h,S]=r.useState(""),[f,A]=r.useState(""),[x,D]=r.useState(""),[K,k]=r.useState(""),[a,d]=r.useState(""),[l,o]=r.useState(""),[m,X]=r.useState(""),[z,Y]=r.useState(""),[V,Q]=r.useState(""),[Z,se]=r.useState(!1),[re,J]=r.useState([]),[ee,ie]=r.useState(!1),te=r.useRef(null),le=r.useCallback(async()=>{$(!0);const s=await De();if($(!1),!s.ok||!s.profile){B(!0);return}B(!1),F(s.profile),S(s.profile.displayName||""),A(s.profile.bio||""),D(s.profile.avatarUrl||""),k(s.profile.websiteUrl||""),d(s.profile.githubHandle||""),o(s.profile.xHandle||""),X(s.profile.instagramHandle||""),Y(s.profile.tiktokHandle||""),Q(s.profile.linkedinHandle||"")},[]);r.useEffect(()=>{le()},[le]);const ne=r.useCallback(async()=>{const s=await Me();s.ok&&I(s)},[]);r.useEffect(()=>{ne()},[ne]);const q=r.useCallback(async()=>{const s=await Pe();s.ok&&v(s)},[]);r.useEffect(()=>{q()},[q]),r.useEffect(()=>{const s=()=>{let i=0;const N=()=>{i+=1,q(),i<4&&setTimeout(N,2e3)};setTimeout(N,1500)};return window.addEventListener("billing:topup_success",s),()=>window.removeEventListener("billing:topup_success",s)},[q]);const he=r.useMemo(()=>n?h!==(n.displayName||"")||f!==(n.bio||"")||x!==(n.avatarUrl||"")||K!==(n.websiteUrl||"")||a!==(n.githubHandle||"")||l!==(n.xHandle||"")||m!==(n.instagramHandle||"")||z!==(n.tiktokHandle||"")||V!==(n.linkedinHandle||""):!1,[n,h,f,x,K,a,l,m,z,V]),ge=async s=>{s.preventDefault(),se(!0),J([]);const i=await Fe({displayName:h.trim(),bio:f.trim(),avatarUrl:x.trim(),websiteUrl:K.trim(),githubHandle:a.trim(),xHandle:l.trim(),instagramHandle:m.trim(),tiktokHandle:z.trim(),linkedinHandle:V.trim()});if(se(!1),!i.ok){J(i.fields||[]),p.error(t("profile.saveError"));return}F(i.profile),k(i.profile.websiteUrl||""),d(i.profile.githubHandle||""),o(i.profile.xHandle||""),X(i.profile.instagramHandle||""),Y(i.profile.tiktokHandle||""),Q(i.profile.linkedinHandle||""),p.success(t("profile.saved")),W()},L=s=>J(i=>i.includes(s)?i.filter(N=>N!==s):i),T=s=>re.includes(s)?at:ue,E=s=>re.includes(s)?e.jsx("p",{className:"mt-1.5 text-xs font-medium text-red-500",children:t("profile.fieldInvalid")}):null,be=async s=>{const i=s.target.files&&s.target.files[0];if(s.target.value="",!!i){if(!et.includes(i.type)){p.error(t("profile.avatarError"));return}if(i.size>tt){p.error(t("profile.avatarTooLarge"));return}ie(!0);try{const N=await fetch("/api/storage/uploads/request-url",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({name:i.name,size:i.size,contentType:i.type})});if(!N.ok)throw new Error("request-url failed");const{uploadURL:ye,objectPath:je}=await N.json();if(!(await fetch(ye,{method:"PUT",headers:{"Content-Type":i.type},body:i})).ok)throw new Error("upload failed");D(`/api/storage${je}`)}catch{p.error(t("profile.avatarError"))}ie(!1)}},O=n?`/u/${n.id}`:null,ve=async()=>
1{if(O)try{await navigator.clipboard.writeText(`${window.location.origin}${O}`),p.success(t("profile.linkCopied"))}catch{p.error(t("profile.saveError"))}};return e.jsxs("div",{"data-testid":"profile-page",className:"relative flex min-h-screen flex-col bg-background text-foreground antialiased",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 hero-radial"}),e.jsxs("header",{className:"relative z-10 flex h-16 items-center justify-between px-4 sm:px-8",children:[e.jsx(Re,{}),e.jsx(ze,{triggerTestId:"profile-menu-trigger"})]}),e.jsx("main",{className:"relative z-10 flex flex-1 flex-col px-5 py-10 sm:px-8",children:e.jsxs(Ie,{className:"w-full max-w-[1060px]",children:[e.jsxs("div",{className:"flex items-center gap-4 text-[10px] font-bold uppercase tracking-[0.25em] text-muted-foreground",children:[e.jsx("span",{className:"h-px w-8 bg-muted-foreground/50"}),t("profile.eyebrow")]}),e.jsx("h1",{className:"mt-6 max-w-[18ch] text-[clamp(2rem,6vw,4.5rem)] font-bold uppercase leading-[0.9] tracking-tighter text-foreground",style:{fontFamily:"'Archivo Black', sans-serif"},children:t("profile.heading")}),G?e.jsxs("div",{className:"mt-10 flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(w,{className:"h-4 w-4 animate-spin"})," ",t("profile.loading")]}):_?e.jsx("div",{className:"mt-10 rounded-2xl border border-border bg-card/70 p-6 text-sm text-muted-foreground",children:t("profile.loadError")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-10 grid gap-8 lg:grid-cols-[minmax(0,1fr)_320px] lg:items-center",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-5",children:[x?e.jsx("img",{src:x,alt:"",className:"h-20 w-20 rounded-full border border-border object-cover"}):e.jsx("span",{className:"flex h-20 w-20 items-center justify-center rounded-full bg-[hsl(var(--brand))]/[0.1] text-2xl font-black text-[hsl(var(--brand))]",children:pe(n.displayName,b)}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-testid":"profile-name",className:"truncate text-xl font-black tracking-tight",children:n.displayName||b}),n.verified?e.jsx(Ve,{size:"md",label:t("profile.verifiedTag")}):null]}),n.displayName?e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:b}):null,O?e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-4 text-xs",children:[e.jsxs(_e,{to:O,"data-testid":"profile-view-public",className:"inline-flex items-center gap-1 font-semibold text-[hsl(var(--brand))] hover:underline",children:[e.jsx(Ye,{className:"h-3.5 w-3.5"})," ",t("profile.viewPublic")]}),e.jsxs("button",{type:"button",onClick:ve,className:"inline-flex items-center gap-1 font-semibold text-foreground/55 hover:text-foreground",children:[e.jsx(Ge,{className:"h-3.5 w-3.5"})," ",t("profile.copyLink")]})]}):null]})]}),e.jsx("div",{"data-testid":"billing-card",children:e.jsxs("div",{className:"relative overflow-hidden rounded-2xl",style:{backgroundImage:`url(${Qe})`,backgroundSize:"cover",backgroundPosition:"top center"},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/95 via-black/60 to-black/10"}),e.jsxs("div",{className:"relative flex h-56 flex-col justify-end p-4","data-testid":"credits-card",style:{textShadow:"0 1px 2px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.6)"},children:[e.jsx("p",{className:"mb-1.5 text-[10px] font-bold uppercase tracking-widest text-white/75",children:t("billing.creditsEyebrow")}),e.jsx("p",{className:"text-3xl font-black tracking-tight text-white tabular-nums",children:j?j.total:"â"}),e.jsx("p",{className:"mt-1 text-[11px] text-white/80",children:t("billing.creditsHint")}),e.jsxs(Be,{type:"button",disabled:c||C&&!C.configured,"data-testid":"credits-topup",onClick:()=>y(!0),className:"mt-3 h-8 rounded-lg bg-white/10 px-4 text-xs font-semibold text-white hover:bg-white/20 disabled:opacity-50 backdrop-blur-sm",children:[c&&e.jsx(w,{className:"h-3.5 w-3.5 animate-spin"}),t("billing.topup")]}),C&&!C.configured?e.jsx("p",{"data-testid":"billing-unavailable",className:"mt-1.5 text-[11px] text-white/40",children:t("billing.unavailable")}):null,e.jsx(qe,{open:U,onClose:()=>y(!1),balance:j?j.total:null,busy:c,onPick:R})]})]})})]}),e.jsxs("form",{onSubmit:ge,children:[e.jsx(ae,{eyebrow:t("profile.editEyebrow"),children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("span",{className:g,children:t("profile.avatarLabel")}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-4",children:[x?e.jsx("img",{src:x,alt:"",className:"h-14 w-14 roun
1ded-full border border-border object-cover"}):e.jsx("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-[hsl(var(--brand))]/[0.1] text-lg font-black text-[hsl(var(--brand))]",children:pe(h||n.displayName,b)}),e.jsx("input",{ref:te,id:"profile-avatar-file","data-testid":"profile-avatar-file",type:"file",accept:"image/png,image/jpeg,image/webp",className:"hidden",onChange:be}),e.jsxs("button",{type:"button",disabled:ee,"data-testid":"profile-avatar-upload",onClick:()=>te.current&&te.current.click(),className:"inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-[0.15em] text-foreground/70 underline decoration-border underline-offset-4 transition-colors hover:text-foreground disabled:opacity-50",children:[ee?e.jsx(w,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Oe,{className:"h-3.5 w-3.5"}),t(ee?"profile.avatarUploading":"profile.avatarUpload")]}),x?e.jsx("button",{type:"button",onClick:()=>D(""),"data-testid":"profile-avatar-remove",className:"text-xs font-semibold text-foreground/50 hover:text-foreground",children:t("profile.avatarRemove")}):null]}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:t("profile.avatarHint")})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-name-input",className:g,children:t("profile.nameLabel")}),e.jsx("input",{id:"profile-name-input","data-testid":"profile-input-name",value:h,maxLength:80,onChange:s=>S(s.target.value),placeholder:t("profile.namePlaceholder"),className:ue})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-website-input",className:g,children:t("profile.websiteLabel")}),e.jsx("input",{id:"profile-website-input","data-testid":"profile-input-website",value:K,maxLength:500,onChange:s=>{k(s.target.value),L("websiteUrl")},placeholder:"https://â¦",className:T("websiteUrl")}),E("websiteUrl")]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-bio-input",className:g,children:t("profile.bioLabel")}),e.jsx("textarea",{id:"profile-bio-input","data-testid":"profile-input-bio",value:f,maxLength:600,rows:4,onChange:s=>A(s.target.value),placeholder:t("profile.bioPlaceholder"),className:"mt-1 w-full resize-y border-0 border-b border-border bg-transparent px-0 py-2 text-sm outline-none transition-colors placeholder:text-muted-foreground/60 focus:border-foreground"})]})]})}),e.jsxs(ae,{eyebrow:t("profile.socialEyebrow"),children:[e.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-x-input",className:g,children:"X"}),e.jsx("input",{id:"profile-x-input","data-testid":"profile-input-x",value:l,maxLength:16,onChange:s=>{o(s.target.value),L("xHandle")},placeholder:"@username",className:T("xHandle")}),E("xHandle")]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-instagram-input",className:g,children:"Instagram"}),e.jsx("input",{id:"profile-instagram-input","data-testid":"profile-input-instagram",value:m,maxLength:31,onChange:s=>{X(s.target.value),L("instagramHandle")},placeholder:"@username",className:T("instagramHandle")}),E("instagramHandle")]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-tiktok-input",className:g,children:"TikTok"}),e.jsx("input",{id:"profile-tiktok-input","data-testid":"profile-input-tiktok",value:z,maxLength:25,onChange:s=>{Y(s.target.value),L("tiktokHandle")},placeholder:"@username",className:T("tiktokHandle")}),E("tiktokHandle")]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-linkedin-input",className:g,children:"LinkedIn"}),e.jsx("input",{id:"profile-linkedin-input","data-testid":"profile-input-linkedin",value:V,maxLength:160,onChange:s=>{Q(s.target.value),L("linkedinHandle")},placeholder:"https://linkedin.com/in/your-name",className:T("linkedinHandle")}),E("linkedinHandle")]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"profile-github-input",className:g,children:"GitHub"}),e.jsx("input",{id:"profile-github-input","data-testid":"profile-input-github",value:a,maxLength:40,onChange:s=>{d(s.target.value),L("githubHandle")},placeholder:"username",className:T("githubHandle")}
1),E("githubHandle")]})]}),e.jsx("div",{className:"mt-8",children:e.jsxs(fe,{type:"submit",disabled:Z||!he,"data-testid":"profile-save",className:"h-9 rounded-lg bg-[hsl(var(--brand))] px-4 text-xs font-semibold text-[hsl(var(--brand-foreground))] hover:bg-[hsl(var(--brand-2))] disabled:opacity-50",children:[Z?e.jsx(w,{className:"h-4 w-4 animate-spin"}):null,t(Z?"profile.saving":"profile.save")]})})]})]}),e.jsx(ae,{eyebrow:t("apiKeys.eyebrow"),testid:"profile-api-keys",children:e.jsx(Je,{})})]}),e.jsx("div",{className:"mt-10 border-t border-border pt-8",children:e.jsx("button",{type:"button",onClick:()=>P("/app"),className:"text-sm font-medium text-foreground/50 hover:text-foreground",children:t("profile.backWorkspace")})})]})})]})}export{ht 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.