1import{X as k,g as c,s as h,j as e,ax as _,ay as j,L as z,az as b}from"./together-shared-50D9s7a5.js";const g=[{key:"axis_1",title:"Communication style",low:"Exploratory & conversational",high:"Direct & structured"},{key:"axis_2",title:"Opportunity vs. risk",low:"Opportunity-focused",high:"Risk & prevention-focused"},{key:"axis_3",title:"Big-picture vs. detail",low:"Abstract & big-picture",high:"Concrete & detail-oriented"},{key:"axis_4",title:"Preferred depth",low:"Concise answers",high:"Comprehensive depth"},{key:"axis_5",title:"Reasoning style",low:"Associative & lateral",high:"Systematic & sequential"}];function N(d,t,x){const r=t??.5;return(x??0)<.3?"Still learning â not enough signal yet":r>=.65?d.high:r<=.35?d.low:"Balanced â adapts to context"}function C(){const d=k(),[t,x]=c.useState(null),[r,f]=c.useState(!0),[u,y]=c.useState(!1),[p,v]=c.useState(!1);c.useEffect(()=>{let s=!1;return(async()=>{const{data:l}=await h.auth.getUser(),n=l.user?.id;if(!n){s||f(!1);return}const{data:a}=await h.from("profiles").select("axis_1_score, axis_2_score, axis_3_score, axis_4_score, axis_5_score, axis_1_confidence, axis_2_confidence, axis_3_confidence, axis_4_confidence, axis_5_confidence, accuracy_response").eq("user_id",n).maybeSingle();if(!s){if(a){const o={};for(const i of g)o[`${i.key}_score`]=a[`${i.key}_score`]!=null?Number(a[`${i.key}_score`]):null,o[`${i.key}_confidence`]=a[`${i.key}_confidence`]!=null?Number(a[`${i.key}_confidence`]):null;x(o),a.accuracy_response!=null&&v(!0)}f(!1)}})(),()=>{s=!0}},[]);const m=async s=>{if(!u){y(!0);try{const{error:l}=await h.rpc("fn_set_profile_accuracy",{p_response:s});if(l)throw l;v(!0),b.success("Thanks â that helps Azail tune to you."),setTimeout(()=>d({to:"/chat"}),900)}catch{b.error("Couldn't save your response. Please try again.")}finally{y(!1)}}};return e.jsxs("div",{className:"min-h-[100dvh] flex flex-col",style:{background:"var(--az-bg)",color:"var(--az-dark)"},children:[e.jsx(_,{}),e.jsx("div",{className:"flex-1 flex flex-col items-center px-4 py-10",children:e.jsxs("div",{className:"w-full max-w-[560px]",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-medium",style:{fontFamily:"var(--font-display)"},children:"Your reasoning profile"}),e.jsx("p",{className:"mt-3 text-sm leading-relaxed",style:{color:"var(--az-mid)"},children:"These are the five dimensions Azail has inferred from how you think. Have a look â does it feel like you? Your answer helps Azail tune to you, and you can change it any time as it keeps learning."}),r&&e.jsx("p",{className:"mt-8 text-sm",style:{color:"var(--az-hint)"},children:"Loading your profileâ¦"}),!r&&!t&&e.jsx("div",{className:"mt-6 rounded-2xl border p-6 text-sm",style:{background:"var(--az-panel)",borderColor:"var(--az-border)",color:"var(--az-mid)"},children:"Azail is still building your profile from your conversations. Ask a few more questions, then come back to review it."}),!r&&t&&e.jsx("div",{className:"mt-6 flex flex-col gap-3",children:g.map(s=>{const l=t[`${s.key}_score`],n=t[`${s.key}_confidence`],a=Math.round((l??.5)*100),o=(n??0)<.3;return e.jsxs("div",{className:"rounded-2xl border p-5",style:{background:"var(--az-panel)",borderColor:"var(--az-border)"},children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsx("h3",{className:"text-[15px] font-semibold",style:{color:"var(--az-dark)"},children:s.title}),e.jsx("span",{className:"text-[13px] font-medium",style:{color:o?"var(--az-hint)":"var(--az-teal)"},children:N(s,l,n)})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"relative h-1.5 w-full rounded-full",style:{background:"var(--az-surface)"},children:!o&&e.jsx("div",{className:"absolute top-1/2 h-3 w-3 -translate-y-1/2 rounded-full",style:{left:`calc(${a}% - 6px)`,background:"var(--az-teal)"}})}),e.jsxs("div",{className:"mt-2 flex justify-between text-[11px]",style:{color:"var(--az-hint)"},children:[e.jsx("span",{children:s.low}),e.jsx("span",{children:s.high})]})]})]},s.key)})}),!r&&t&&!p&&e.jsxs("div",{className:"mt-7 flex flex-col gap-3",children:[e.jsx("button",{onClick:()=>m("accurate"),disabled:u,className:"w-full rounded-xl py-3 text-sm font-semibold text-white transition-opacity hover:opacity-90 disabled:opacity-60",style:{background:"var(--az-teal)"},children:"Yes, this feels like me"}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>m("partly"),disabled:u,className:"flex-1 rounded-xl py-2.5 text-sm font-medium transition-colors disabled:opacity-60",style:{border:"0.5px solid var(--az-border2)",color:"var(--az-dark)"},children:"Partly"}),e.jsx("button",{onClick:()=>m("inaccurate"),disabled:u,className:"flex-1 rounded-xl py-2.5 text-sm font-medium transition-colors disabled:opacity-60",style:{border:"0.5px solid var(--az-border2)",color:"var(--az-dark)"},children:"Not quite"})]})]}),p&&e.jsxs("div",{className:"mt-7 rounded-2xl border p-5 flex items-center justify-between gap-3",style:{background:"var(--az-tl)",borderColor:"var(--az-tb)"},children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-medium",style:{color:"var(--az-td)"},children:[e.jsx(j,{size:16}
1)," Saved â thanks for confirming."]}),e.jsx(z,{to:"/chat",className:"text-sm font-semibold",style:{color:"var(--az-teal)"},children:"Start chatting"})]})]})})]})}export{C as component};
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.