PageSourceSearch

https://redbullsport.com/_nuxt/BKiIWNaf.js

js redbullsport.com collected 2026-10-07 20:49:37 UTC 14,788 bytes, 1 lines download raw bytes

1import{a as de,_ as ie}from"./Db0ybvGl.js";import{x as pe,a4 as ue,aa as me,ap as ce,av as fe,a2 as U,V as h,au as E,P as ge,s as _e,p as m,v as n,aw as f,a0 as e,m as ve,c as we,u as w,$ as b,d as be,e as xe,_ as he,A as F,g as ye,F as Ve,o as V,W as Ce,j as Ne}from"./DQIkdDWl.js";import{_ as Ie}from"./CkobgwMp.js";import{_ as Oe}from"./7XiEFmDg.js";import{_ as ke,a as Be}from"./Tw_Zpfbd.js";import{u as Re}from"./B3bp7SI6.js";const je={class:"min-h-screen relative bg-gradient-main profile"},Ae={class:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:px-[20px] 2xl:px-0"},Ue={class:"animate-in fade-in lg:col-span-9 xl:col-span-10 space-y-[28px]"},Ee={class:"bg-white p-[20px] lg:px-[56px] lg:py-[36px] xl:px-[112px] xl:py-[72px]"},Pe={class:"grid grid-cols-1 md:grid-cols-2 gap-x-[10px] lg:gap-x-[20px] gap-y-[16px] lg:gap-y-[32px]"},Le={class:"phone-number flex flex-col"},Me={class:"flex grow-1 items-center gap-1 mb-2"},$e={class:"flex"},qe={class:"w-24"},Se={class:"flex-1"},De={class:"mt-[25px] lg:mt-[40px] flex justify-end"},Fe={class:"bg-white p-[20px] lg:px-[56px] lg:py-[36px] xl:px-[112px] xl:py-[72px]"},Te={class:"space-y-[16px] lg:space-y-[32px]"},Ge={class:"grid grid-cols-1 gap-x-[10px] lg:gap-x-[20px] gap-y-[16px] lg:gap-y-[32px]"},ze={class:"mt-[25px] lg:mt-[40px] flex justify-end"},We={class:"text-center py-4 space-y-4 flex flex-col items-center"},He={class:"flex flex-col items-center py-6"},Je={class:"mb-4 text-brand-red text-6xl"},Ke=pe({__name:"index",async setup(Qe){let B,P;Re(void 0,{noIndex:!0});const{user:x,updateProfile:T,fetchProfile:G,changePassword:z}=ue(),{t:s,locale:L}=me(),{public:{apiBase:M}}=ce(),[{data:W},{data:H},{data:$}]=([B,P]=fe(()=>Promise.all([U("metadata-countries",()=>$fetch(`${M}/countries`)),U("metadata-languages",()=>$fetch(`${M}/languages`)),U("profile-me-data",()=>G())])),B=await B,P(),B),N=V(()=>W.value?.countries||[]),J=V(()=>H.value?.languages||[]),_=V(()=>$.value),K=[{id:"profile",label:s("pages.profile.nav.profile"),path:"/profile"},{id:"my-next-generation-status",label:s("pages.profile.nav.my_next_generation_status"),path:"/my-next-generation-status"}],o=h({firstName:_.value?.firstName||x.value?.firstName||"",lastName:_.value?.familyName||x.value?.lastName||"",nickName:_.value?.nickName||x.value?.nickName||"",email:x.value?.email||"",phoneNumber:_.value?.phoneNumber||"",phoneCode:_.value?.phoneCode||"",gender:_.value?.gender||"",nationalityId:_.value?.nationalityId||_.value?.nationality?.id||null,countryOfResidenceId:_.value?.countryOfResidenceId||_.value?.residence?.id||null,dob:_.value?.dateOfBirth?.split("T")[0]||"",languageIds:_.value?.languages?.map(l=>l.languageId||l.language?.id).filter(Boolean)||[]});if(!o.value.phoneCode&&N.value.length>0){const l=N.value.find(a=>a.mappingCode?.toLowerCase()===L.value.toLowerCase());l&&(o.value.phoneCode=l.phoneCode)}const y=h({old_password:"",new_password:"",confirm_new_password:""}),A=h(!1),R=h(!1),I=h(!1),O=h(!1),k=h(""),v=h({}),C=h({});function Q(l,a=[]){const u={};l.forEach((t,i)=>{const p=a[i]||"";let r="";p==="firstName"?r="firstName":p==="familyName"?r="lastName":p==="nickName"?r="nickName":p==="gender"?r="gender":p==="dateOfBirth"?r="dob":p==="nationalityId"?r="nationality_select":p==="countryOfResidenceId"?r="country":p==="languageIds"?r="languageIds":p==="email"?r="email":p==="phoneNumber"?r="phoneNumber":p==="phoneCode"?r="phoneCode":p==="old_password"?r="old_password":p==="new_password"?r="new_password":p==="confirm_new_password"&&(r="confirm_new_password"),r&&(u[r]??=[],u[r].includes(t)||u[r].push(t))}),Object.keys(u).forEach(t=>{v.value[t]=u[t].join(", "),["old_password","new_password","confirm_new_password"].includes(t)&&(C.value[t]=u[t].join(", "))})}function X(l,a=[]){const u={};(Array.isArray(l)?l:[l]).forEach((i,p)=>{const r=a[p]||"",g=i.toLowerCase();let c="";r==="old_password"?c="old_password":r==="new_password"?c="new_password":r==="confirm_new_password"?c="confirm_new_password":g.includes("old_password")?c="old_password":g.includes("new_password")?c="new_password":g.includes("confirm_new_password")||g.includes("mismatch")?c="confirm_new_password":g.includes("wrong")&&(c="old_password"),c&&(u[c]??=[],u[c].includes(i)||u[c].push(i))}),Object.keys(u).forEach(i=>
1{C.value[i]=u[i].join(", ")})}const Y=async()=>{A.value=!0;try{const l=(o.value.gender||"").toLowerCase(),u=["male","female","other"].includes(l)?l:void 0,t={nickName:o.value.nickName||void 0,gender:u,dateOfBirth:o.value.dob||void 0,nationalityId:o.value.nationalityId||void 0,countryOfResidenceId:o.value.countryOfResidenceId||void 0,languageIds:o.value.languageIds?.length>0?o.value.languageIds:void 0,phoneNumber:o.value.phoneNumber||void 0,phoneCode:o.value.phoneCode||void 0},i=Object.fromEntries(Object.entries(t).filter(([,r])=>r!==void 0));v.value={};const p=await T(i);if(p.success)I.value=!0;else{const r=p.error,g=r?.data?.message||r?.message,c=r?.data?.fields||[];if(Array.isArray(g)&&Q(g,c),Object.keys(v.value).length===0){const j=Array.isArray(g)?g.filter(Boolean):g?[g]:[];k.value=j.length>0?j.join(", "):s("pages.campaign.not_found_title"),O.value=!!k.value}}}catch{}finally{A.value=!1}},Z=async()=>{if(!R.value)try{R.value=!0,C.value={};const{success:l,error:a}=await z(y.value);if(l)I.value=!0,y.value={old_password:"",new_password:"",confirm_new_password:""};else{const u=a,t=u?.data?.message||u?.message,i=u?.data?.fields||[];if(t&&X(t,i),Object.keys(C.value).length===0){const p=Array.isArray(t)?t.filter(Boolean):t?[t]:[];k.value=p.length>0?p.join(", "):"Failed to change password",O.value=!!k.value}}}catch{}finally{R.value=!1}},ee=async()=>{await Ce("profile-me-data");const l=$.value;l&&(o.value.nickName=l.nickName||"",o.value.gender=l.gender||"",o.value.nationalityId=l.nationalityId||l.nationality?.id||null,o.value.countryOfResidenceId=l.countryOfResidenceId||l.residence?.id||null,o.value.dob=l.dateOfBirth?.split("T")[0]||"",o.value.languageIds=l.languages?.map(a=>a.languageId||a.language?.id).filter(Boolean)||[],o.value.phoneNumber=l.phoneNumber||"",o.value.phoneCode=l.phoneCode||"")},ae=V(()=>N.value.map(l=>({label:l.name||"",value:l.id})).sort((l,a)=>l.label.localeCompare(a.label))),le=V(()=>N.value.map(l=>({label:l.nationality||l.name||"",value:l.id})).sort((l,a)=>l.label.localeCompare(a.label))),oe=[{label:"Male",value:"male"},{label:"Female",value:"female"},{label:"Other",value:"other"}],se=V(()=>J.value.map(l=>({label:l.name||"",value:l.id})).sort((l,a)=>l.label.localeCompare(a.label)));function ne(l){o.value.languageIds.includes(l)||o.value.languageIds.push(l)}function te(l){o.value.languageIds=o.value.languageIds.filter(a=>a!==l)}const q=V(()=>{const l=N.value,a=[],u=new Set;return l.forEach(t=>{const i=t?.phoneCode;i&&!u.has(i)&&(u.add(i),a.push({label:i,value:i,phoneDigitCount:t?.phoneDigitCount,mappingCode:t?.mappingCode}))}),a}),re=V(()=>q.value.find(a=>a.value===o.value.phoneCode)?.phoneDigitCount||15);return E(()=>x.value?.uid,l=>{l&&(o.value.firstName||Object.assign(o.value,{...x.value}))}),E(()=>o.value.phoneCode,()=>{o.value.phoneNumber=""}),E(L,l=>{if(!o.value.phoneCode||o.value.phoneCode===""){const a=N.value.find(u=>u.mappingCode?.toLowerCase()===l.toLowerCase());a&&(o.value.phoneCode=a.phoneCode)}}),(l,a)=>{const u=ie,t=we,i=Ie,p=Oe,r=ke,g=Be,c=be,j=xe,S=he,D=ye;return ge(),_e(Ve,null,[m("div",je,[a[18]||(a[18]=m("div",{class:"mx-auto w-full max-w-[1320px] px-[20px] 2xl:px-0 lg:pb-[12px]"},[m("div",{class:"w-[260px] sm:w-[400px] md:w-[706px] relative top-[10px] md:top-[40px] pt-20 md:pt-[20px] 2xl:left-[-70px]"},[m("h1",{class:"sr-only"},"My Profile | Red Bull Next Generation"),m("img",{src:de,alt:"My Profile",class:"w-full mask-b-from-50% mask-b-to-80%"})])],-1)),n(j,{class:"relative z-20 pb-[50px] !max-w-[1320px]"},{default:f(()=>[m("div",Ae,[n(u,{"nav-items":K,"first-name":e(x)?.firstName,"family-name":e(x)?.familyName,"last-name":e(x)?.lastName,"profile-image":e(ve)(e(x)?.profileImage)},null,8,["first-name","family-name","last-name","profile-image"]),m("div",Ue,[m("div",Ee,[n(t,{as:"h2",variant:"hl",family:"condensed",weight:"black",color:"brand-navy",class:"mb-[8px]"},{default:f(()=>[w(b(e(s)("pages.profile.form_personal.title")),1)]),_:1}),n(t,{as:"h3",variant:"body-lg",weight:"bold",color:"default",class:"!text-brand-text mb-[24px] lg:mb-[48px]"},{default:f(()=>[w(b(e(s)("pages.profile.form_personal.sub_title")),1)]),_:1}),m("div",Pe,[n(i,{modelValue:e(o).firstName,"onUpdate:modelValue":a[0]||(a[0]=d=>e(o).firstName=d),label:e(s)("form-nextgen.step1.labels.name"),required:"",placeholder:e(s)("form-nextgen.step1.labels.name"),textOnly:"",disabled:""},null,8,["modelValue","label","placeholder"]),n(i,{modelValue:e(o).lastName,"onUpdate:modelValue":a[1]||(a[1]=d=>e(o).lastName=d),label:e(s)("form-nextgen.step1.labels.family_name"),required:"",placeholder:e(s)("form-nextgen.step1.labels.family_name"),textOnly:"",disabled:""},null,8,["modelValue","label","placeholder"]),n(i,{modelValue:e(o).nickName,"onUpdate:modelValue":a[2]||(a[2]=d=>e(o).nickName=d),label:e(s)("form-nextgen.step1.labels.nick_name"),placeholder:e(s)("form-nextgen.step1.labels.nick_name"),error:e(v).nickName,textOnly:""},null,8,["modelValue","label","placeholder","error"]),n(p,{modelValue:e(o).gender,"onUpdate:modelValue":a[3]||(a[3]=d=>e(o).gender=d),label:e(s)("form-nextgen.step1.labels.gender"),placeholder:e(s)("form-nextgen.step1.labels.select_gender"),required:"",options:oe,"full-width":"",error:e(v).gender},null,8,["modelValue","label","placeholder","error"]),n(p,{modelValue:e(o).nationalityId,"onUpdate:modelValue":a[4]||(a[4]=d=>e(o).nationalityId=d),label:e(s)("form-nextgen.step1.labels.nationality"),required:"",options:e(le),placeholder:e(s)("form-nextgen.step1.labels.nationality"),"full-width":"",error:e(v).nationality_select},null,8,["modelValue","label","options","placeholder","error"]),n(p,{modelValue:e(o).countryOfResidenceId,"onUpdate:modelValue":a[5]||(a[5]=d=>e(o).countryOfResidenceId=d),label:e(s)("form-nextgen.step1.labels.country_where_you_live"),required:"",options:e(ae),placeholder:e(s)("form-nextgen.step1.labels.select_country"),"full-width":"",error:e(v).country},null,8,["modelValue","label","options","placeholder","error"]),n(r,{label:e(s)("common.language"),required:"",tags:e(o).languageIds,options:e(se),onAdd:ne,onRemove:te,error:e(v).languageIds},null,8,["label","tags","options","error"]),n(g,{modelValue:e(o).dob,"onUpdate:modelValue":a[6]||(a[6]=d=>e(o).dob=d),label:e(s)("form-nextgen.step1.labels.date_of_birth"),required:"",placeholder:e(s)("form-nextgen.step1.labels.mm_dd_yyyy"),"full-width":"","birth-day":"",error:e(v).dob},null,8,["modelValue","label","placeholder","error"]),n(i,{modelValue:e(o).email,"onUpdate:modelValue":a[7]||(a[7]=d=>e(o).email=d),disabled:"",required:"",type:"email",label:e(s)("form-nextgen.step1.labels.email_address"),placeholder:e(s)("form-nextgen.step1.labels.email_address"),error:e(v).email,name:"user_email",autocomplete:"user_email"},null,8,["modelValue","label","placeholder","error"]),m("div",Le,[m("div",Me,[n(t,{variant:"label",as:"span",color:"brand-navy",weight:"bold"},{default:f(()=>[w(b(e(s)("form-nextgen.step5.labels.phone"))+" ",1),a[17]||(a[17]=m("span",{class:"text-brand-red font-bold text-sm"},"*",-1))]),_:1})]),m("div",$e,[m("div",qe,[n(p,{modelValue:e(o).phoneCode,"onUpdate:modelValue":a[8]||(a[8]=d=>e(o).phoneCode=d),options:e(q),phone:""},null,8,["modelValue","options"])]),m("div",Se,[n(i,{phonestyle:"",modelValue:e(o).phoneNumber,"onUpdate:modelValue":a[9]||(a[9]=d=>e(o).phoneNumber=d),type:"tel",placeholder:"000 000 000",maxlength:e(re),error:e(v).phoneNumber,name:"phonenumber",autocomplete:"one-time-code"},null,8,["modelValue","maxlength","error"])])])])]),m("div",De,[n(c,{variant:"red-solid",onClick:Y,loading:e(A),class:"!w-auto"},{default:f(()=>[w(b(e(s)("common.buttons.save_changes")),1)]),_:1},8,["loading"])])]),m("div",Fe,[n(t,{as:"h2",variant:"hl",family:"c
1ondensed",weight:"black",color:"brand-navy",class:"mb-[8px]"},{default:f(()=>[w(b(e(s)("pages.profile.form_change_password.title")),1)]),_:1}),n(t,{as:"h3",variant:"body-lg",weight:"bold",color:"default",class:"!text-brand-text mb-[24px] lg:mb-[48px]"},{default:f(()=>[w(b(e(s)("pages.profile.form_change_password.sub_title")),1)]),_:1}),m("div",Te,[m("div",null,[n(i,{modelValue:e(y).old_password,"onUpdate:modelValue":a[10]||(a[10]=d=>e(y).old_password=d),type:"password",label:e(s)("pages.profile.form_change_password.old_password"),placeholder:e(s)("pages.profile.form_change_password.old_password"),error:e(C).old_password,name:"useroldpassword",autocomplete:"new-password"},null,8,["modelValue","label","placeholder","error"])]),m("div",Ge,[n(i,{modelValue:e(y).new_password,"onUpdate:modelValue":a[11]||(a[11]=d=>e(y).new_password=d),hintLable:e(s)("pages.registration.hint_password"),type:"password",label:e(s)("pages.profile.form_change_password.new_password"),placeholder:e(s)("pages.profile.form_change_password.new_password"),error:e(C).new_password,name:"usernewpassword",autocomplete:"new-password"},null,8,["modelValue","hintLable","label","placeholder","error"]),n(i,{modelValue:e(y).confirm_new_password,"onUpdate:modelValue":a[12]||(a[12]=d=>e(y).confirm_new_password=d),type:"password",label:e(s)("pages.profile.form_change_password.confirm_new_password"),placeholder:e(s)("pages.profile.form_change_password.confirm_new_password"),error:e(C).confirm_new_password,name:"userconfirmnewpassword",autocomplete:"new-password"},null,8,["modelValue","label","placeholder","error"])])]),m("div",ze,[n(c,{variant:"red-solid",class:"!w-auto",loading:e(R),onClick:Z},{default:f(()=>[w(b(e(s)("common.buttons.save_changes")),1)]),_:1},8,["loading"])])])])])]),_:1})]),n(D,{modelValue:e(I),"onUpdate:modelValue":a[14]||(a[14]=d=>F(I)?I.value=d:null),title:e(s)("pages.profile.modal.title_success"),width:"sm"},{footer:f(()=>[n(c,{block:"",variant:"red-solid",onClick:a[13]||(a[13]=()=>{I.value=!1,ee()})},{default:f(()=>[w(b(e(s)("common.buttons.close")),1)]),_:1})]),default:f(()=>[m("div",We,[n(S,{name:"lucide:check-circle",class:"!w-12 !h-12 text-green-500"}),n(t,{variant:"body-lg",weight:"bold",color:"brand-navy"},{default:f(()=>[w(b(e(s)("pages.profile.modal.success")),1)]),_:1})])]),_:1},8,["modelValue","title"]),n(D,{modelValue:e(O),"onUpdate:modelValue":a[16]||(a[16]=d=>F(O)?O.value=d:null),title:"ERROR"},{footer:f(()=>[n(c,{block:"",variant:"red-solid",onClick:a[15]||(a[15]=d=>O.value=!1)},{default:f(()=>[w(b(e(s)("common.buttons.close")),1)]),_:1})]),default:f(()=>[m("div",He,[m("div",Je,[n(S,{name:"uil:exclamation-triangle"})]),n(t,{variant:"body-lg",weight:"bold",color:"brand-navy",align:"center"},{default:f(()=>[w(b(e(k)),1)]),_:1})])]),_:1},8,["modelValue"])],64)}}}),oa=Ne(Ke,[["__scopeId","data-v-684fc106"]]);export{oa 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.