1import{u as X,Q as Z,Y as J,h as ee,q as ie,o as te,g as c,i as o,a as i,z as re,d,T as le,S as g,t as m,w as ne,H as oe}from"./index-af63ee6b.js";import{A as x}from"./api-341fc769.js";import{P as S}from"./progress-dfb4d349.js";import{I as se}from"./input-f020fffe.js";import{I as v}from"./icon-61fab027.js";import{F as ae,B as $,T as k}from"./focus-container-04c0884f.js";import{A as ue}from"./avatar-937e14c8.js";import{a as h,i as fe}from"./utils-3d0a6139.js";import"./front-error-ba1c6c6c.js";var ce=m("<main class=p-profile>"),D=m("<li>"),_e=m('<ul class="p-profile__links u-form__links"><!$><!/><!$><!/><li>'),de=m('<div class="p-profile__form u-form"><div class="p-profile__title u-form__title"><!$><!/><h1 class="u-text u-text--2xl u-text--desktop-3xl u-text--bold"></h1></div><div class=u-form__columns><div class=u-form__column><div class=p-profile__avatar></div></div><div class=u-form__column><div class="p-profile__fields u-form__fields"><div class=u-form__field></div></div><!$><!/>');function be(n){let w;const s=X(),p=s.wrappedNavigate(Z()),I=J(),[L,E]=ee(null),b=ie(()=>{const t=(n==null?void 0:n.id)||I.id||null;return t&&t!=="+"?t:null}),M=t=>{const{key:r,methods:e,currentFocused:u,groupIndex:l}=t.detail,a=u.focusindex;return r==="Enter"&&u.node.click(),r==="Escape"&&(n!=null&&n.onClose)&&n.onClose(),l===1||l===4?r==="ArrowDown"?e.transferFocus({group:"profile",index:l+1}):r==="ArrowUp"?e.transferFocus({group:"profile",index:l-1})||e.transferFocus({group:"profile",index:l-2}):r==="ArrowRight"?e.focus(a+1):r==="ArrowLeft"&&(a===0?e.transferFocus({group:"profileAvatar"}):e.focus(a-1)):r==="ArrowDown"?e.focus(a+1)||e.transferFocus({group:"profile",index:l+1})||e.transferFocus({group:"profile",index:l+2}):r==="ArrowUp"?e.focus(a-1)||e.transferFocus({group:"profile",index:l-1}):r==="ArrowLeft"&&e.transferFocus({group:"profileAvatar"}),!0},T=t=>{n!=null&&n.onClose&&window.config.APP_MODE==="tv"?n.onClose(t):p(window.__LAST_PAGE_PATHNAME__||"/")},q=()=>{ne.setCookies(null),T(!0)};return te(async()=>{S.start();const[t,r,e]=await Promise.all([b()?x.get(`/api/v1/profiles/${b()}`):null,x.get("/api/v1/avatars"),x.get("/api/v1/settings")]);E({profile:(t==null?void 0:t.body)||{},avatars:r.body,settings:e==null?void 0:e.body}),S.stop()}),(()=>{var t=c(ce),r=w;return typeof r=="function"?oe(r,t):w=t,o(t,i(g,{get when(){var e;return(e=L())==null?void 0:e.profile},keyed:!0,get fallback(){return i(re,{mode:"overlay"})},children:e=>(()=>{var u=c(de),l=u.firstChild,a=l.firstChild,[A,N]=d(a.nextSibling),H=A.nextSibling,B=l.nextSibling,C=B.firstChild,O=C.firstChild,z=C.nextSibling,y=z.firstChild,R=y.firstChild,U=y.nextSibling,[V,G]=d(U.nextSibling);return o(l,i(le,{get children(){return s==null?void 0:s.t("profile")}}),A,N),o(H,()=>s==null?void 0:s.t("profile")),o(O,i(ue,{size:"9xl",get ariaLabel(){return s==null?void 0:s.t("profile_avatars_description")}})),o(R,i(se,{type:"text",name:"email",label:"form_field_email",required:!0,get initialValue(){return e.email},disabled:!0,autocomplete:"username"})),o(z,i(g,{get when(){return e.id},get children(){return i(ae,{onChildFocusKey:M,group:"profile",index:3,get children(){var _=c(_e),K=_.firstChild,[F,Q]=d(K.nextSibling),W=F.nextSibling,[P,Y]=d(W.nextSibling),j=P.nextSibling;return o(_,i(g,{get when(){return window.config.APP_MODE!=="tv"},get children(){var f=c(D);return o(f,i($,{focusIndex:0,class:"p-profile__link u-form__iconLink u-form__iconLink--caret",onClick:()=>p("/account"),role:"link",get tabIndex(){return h()?0:-1},get children(){return[i(k,{size:"xl",sizeDesktop:"2xl",bold:!0,t:"form_field_account"}),i(v,{filter:"secondary-text",icon:"caret",size:"xl",sizeDesktop:"2xl"})]}})),f}}),F,Q),o(_,i(g,{get when(){return window.config.APP_MODE!=="tv"},get children(){var f=c(D);return o(f,i($,{focusIndex:0,class:"p-profile__link u-form__iconLink u-form__iconLink--caret",onClick:()=>p("/faq"),role:"link",get tabIndex(){return h()?0:-1},get children(){return[i(k,{size:"xl",sizeDesktop:"2xl",bold:!0,t:"faqs"}),i(v,{filter:"secondary-text",icon:"caret",size:"xl",sizeDesktop:"2xl"})]}})),f}}),P,Y),o(j,i($,{get focusIndex(){return fe()?1:2},class:"p-profile__link u-form__iconLink",onClick:q,role:"button",get tabIndex(){return h()?0:-1},get children(){return[i(v,{filter:"secondary-text",icon:"log_in",size:"2xl",sizeDesktop:"4xl"}),i(k,{size:"lg",sizeDesktop:"xl",t:"account_logout"})]}})),_}})}}),V,G),u})()})),t})()}export{be 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.