1var f=Object.defineProperty;var x=(o,i,r)=>i in o?f(o,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[i]=r;var t=(o,i,r)=>x(o,typeof i!="symbol"?i+"":i,r);import{j as e,H as a,B as c,S as n,R as u,T as s,C as m,b as y,$ as j}from"./mui-ZFEuIFCw.js";import{o as g,m as P,d as h,b as l}from"./vendor-A-YorxFT.js";import{u as S,r as v}from"./router-B2frf3SN.js";import{A as C}from"./index-Df1MvH2Z.js";import{A as E,a as A}from"./AgentProfileEditDrawer-DKQ6quIk.js";import"./radar-FoYaEdoU.js";import"./axios-DZ_Kha3d.js";import"./diff-CVofqCa5.js";import"./collaborative-4uy_9tVE.js";import"./diagrams-SBztlGna.js";import"./zod-Ds6h46eQ.js";import"./mermaid-BSFrglau.js";import"./motion-CTm-JDf7.js";import"./markdown-Bsq8sw2N.js";import"./codemirror-Qe0_VBHG.js";import"./reactflow-C2WAYIqT.js";import"./syntax-CPOtN5Bo.js";const q=g(()=>{const o=S();return e.jsx(L,{navigate:o})});var d;const L=g((d=class extends v.Component{constructor(r){super(r);t(this,"isLoading",!1);t(this,"error",null);t(this,"edit",!1);t(this,"setLoading",r=>{this.isLoading=r});t(this,"setError",r=>{this.error=r});t(this,"loadUserProfile",async()=>{this.setLoading(!0),this.setError(null);try{const r=await this.profileStore.getMyProfile();if(r!=null&&r.data.agentProfile.profileId){this.setLoading(!1);return}this.setError("No agent profile exists yet. Click 'Create My Profile' to get started.")}catch(r){console.error("Failed to load user profile:",r),this.setError("Failed to load your profile. Please try again.")}finally{this.setLoading(!1)}});t(this,"toggleEdit",()=>{this.edit=!this.edit});t(this,"onSaveProfile",async r=>{try{this.setLoading(!0),await this.profileStore.updateProfile(r),this.setError(null),this.edit=!1}catch(p){console.error("Failed to update profile:",p),this.setError("Failed to update your profile. Please try again.")}finally{this.setLoading(!1)}});P(this,{isLoading:l,edit:l,error:l,setLoading:h,setError:h})}componentDidMount(){this.loadUserProfile()}get rootStore(){return this.context}get userStore(){return this.rootStore.userStore}get profileStore(){return this.rootStore.profileStore}get userAgentProfile(){return this.profileStore.myProfile??null}get navigate(){return this.props.navigate}render(){return this.isLoading?e.jsx(a,{maxWidth:"md",sx:{mt:4},children:e.jsx(c,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:e.jsxs(n,{spacing:2,sx:{alignItems:"center"},children:[e.jsx(u,{}),e.jsx(s,{children:"Loading your profile..."})]})})}):this.userAgentProfile?e.jsxs(a,{maxWidth:"md",sx:{mt:4},children:[e.jsxs(n,{spacing:3,children:[e.jsxs(c,{children:[e.jsx(s,{variant:"h4",gutterBottom:!0,children:"My Profile"}),e.jsx(s,{sx:{color:"text.secondary"},children:"Manage your agent profile and settings"})]}),this.userAgentProfile&&e.jsx(E,{agent:this.userAgentProfile,onEdit:this.toggleEdit,onAssignTask:()=>{console.log("Assign task - not applicable for user profile")},showActions:!0}),this.error&&e.jsx(s,{color:"error",variant:"body2",children:this.error})]}),e.jsx(A,{open:this.edit,onClose:this.toggleEdit,agent:this.userAgentProfile,onSave:this.onSaveProfile})]}):e.jsx(a,{maxWidth:"md",sx:{mt:4},children:e.jsx(m,{children:e.jsx(y,{children:e.jsxs(n,{spacing:3,sx:{alignItems:"center"},children:[e.jsx(j,{sx:{fontSize:60,color:"text.secondary"}}),e.jsx(s,{variant:"h5",align:"center",children:"Profile Setup"}),e.jsx(s,{align:"center",sx:{color:"text.secondary"},children:this.error??"You don't have an agent profile yet. Create one to get started!"})]})})})})}},t(d,"contextType",C),d));export{q 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.