1import{_ as w}from"./BeX-Hsyr.js";import{_ as E}from"./C3v_Kl_J.js";import{_ as I}from"./DeUkmaoz.js";import{F as N}from"./CX23051B.js";import{c as _}from"./BBHoRNMC.js";import{u as D}from"./C423m0ye.js";import{u as P}from"./BHMXy5BB.js";import{aQ as R,aR as k,aS as B,b6 as C,aW as F,b0 as O,bg as g,aY as s,b2 as b,aZ as V,ba as p,a$ as d,b7 as J,bt as T}from"./D1H_JJLP.js";import"./D0abqZ7o.js";import"./D9-nhe2T.js";import"./CIRxkCxW.js";import"./BfK2LgmP.js";import"./C6IU3H6L.js";import"./Br8TSoCL.js";import"./Cs3I7f3I.js";import"./DJp94Oj3.js";import"./CB_nVR7C.js";import"./DOvD_P7u.js";import"./Ol1aomyo.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"2022193d"};var t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="6da80811-9268-4f4e-ab9c-1c58f1f7f394",r._sentryDebugIdIdentifier="sentry-dbid-6da80811-9268-4f4e-ab9c-1c58f1f7f394")}catch{}})();const A={class:"content-field-container"},$={class:"relative mx-auto w-full max-w-[460px]"},u="career goal",q="20 scholarships require this information.",le=R({__name:"career-goal",async setup(r){let t,i;const{$steps:v}=k(),m=b(!1),n=b(!1),y=_({careerGoal:_().required("Please select career goal").typeError("Please select career goal")}),{localProfile:o,patch:G}=([t,i]=B(()=>D({localProfile:{relationships:["careerGoal"]}})),t=await t,i(),t);C(()=>{F(()=>o.value.careerGoal,e=>{e&&sessionStorage.setItem("profile:careerGoal",JSON.stringify(e))},{immediate:!0,deep:!0});const l=localStorage.getItem("public-scholarship:fieldsData"),a=l?JSON.parse(l):null;if(a&&a.careerGoal&&!o.value.careerGoal){const e=f.find(c=>c.id===a.careerGoal);o.value.careerGoal={id:a.careerGoal,_type:"careerGoal",name:e.name}}else{const e=sessionStorage.getItem("profile:careerGoal");e&&(o.value.careerGoal=JSON.parse(e))}});const f=P("careerGoal"),h=async(l,{setErrors:a})=>{try{if(n.value)return;n.value=!0,J().trackRegistrationButton(u,"next"),await G(o.value),await v.navigateNext()}catch(e){if(n.value=!1,m.value=!0,e instanceof T&&e.data?.validationErrors){a(e.data.validationErrors);return}}};return(l,a)=>{const e=w,c=E,x=I;return V(),O(x,{title:"What is your career goal?",description:q,"server-error":s(m),step:u},{default:g(()=>[p(s(N),{"validation-schema":s(y),name:"careerGoal",class:"w-full",onSubmit:h},{default:g(()=>[d("div",A,[d("div",$,[a[1]||(a[1]=d("label",{class:"font-inter text-lg font-semibold text-true-gray-400"}," Career goal ",-1)),p(e,{modelValue:s(o).careerGoal,"onUpdate:modelValue":a[0]||(a[0]=S=>s(o).careerGoal=S),options:s(f),"data-test":"careerGoal",placeholder:"Select your career goal",name:"careerGoal","append-to":"body",class:"mt-2.5"},null,8,["modelValue","options"])])]),p(c,{loading:s(n),step:u},null,8,["loading"])]),_:1},8,["validation-schema"])]),_:1},8,["server-error"])}}});export{le 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.