1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5168],{80438:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/settings",function(){return t(98274)}])},98274:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return C}});var a=t(52322),l=t(80781),o=t(1803),i=t(28535),r=t(38035),s=t(35183),u=t(97166),c=t(41098),d=t(62614),h=t(99793),g=t(84482),m=t(67538),p=t(28269),x=t(75845),f=t(63397),j=t(75652),v=t.n(j),y=t(96577),w=t.n(y),b=t(2784),N=t(74424),k=t(68721),L=t(4869),T=t(99169);function C(){var e,n,t,l;let{user:h}=(0,g.aC)(),{onUpdateUser:j}=(0,g.ow)(),{upload:y}=(0,g.FL)(),{translate:w}=(0,T.Z)();return(0,a.jsx)(L.Z,{noFooter:!0,padding:"2rem 2rem calc(var(--player-height, 0px) + 2rem) 2rem",children:(0,a.jsx)(f.J9,{initialValues:{country:(null==h?void 0:h.country)||"GR",email:(null==h?void 0:h.email)||"",fullName:(null==h?void 0:h.fullName)||"",language:(null==h?void 0:h.isoLanguageCode)||"el",photoFile:void 0,photoUrl:(null==h?void 0:h.photoUrl)||"",autoplayNext:(null==h?void 0:null===(e=h.settings)||void 0===e?void 0:e.autoplayNext)===void 0||!!(null==h?void 0:null===(n=h.settings)||void 0===n?void 0:n.autoplayNext),otherLanguagesToShow:(null==h?void 0:null===(t=h.settings)||void 0===t?void 0:t.otherLanguagesToShow)||[],themePreference:(null==h?void 0:null===(l=h.settings)||void 0===l?void 0:l.themePreference)||"system"},onSubmit:async e=>{let n="";if(e.photoFile){let t=await y(e.photoFile,{fileName:e.photoFile.name,blobId:"users/".concat(null==h?void 0:h.id,"/photo"),containerName:"others"});n="".concat(t.url,"?").concat(Date.now())}await j({country:e.country,fullName:e.fullName,isoLanguageCode:e.language,settings:{autoplayNext:e.autoplayNext,otherLanguagesToShow:v()(e.otherLanguagesToShow),themePreference:e.themePreference},photoUrl:n||(null==e?void 0:e.photoUrl)||null})},children:e=>{let{isSubmitting:n,values:t,setFieldValue:l}=e;return(0,a.jsxs)(o.M,{spacing:"1.5rem",as:f.l0,children:[(0,a.jsx)(m.H4,{as:"h1",children:w("Settings")}),(0,a.jsxs)(i.xu,{display:"grid",gridTemplateColumns:{mobile:"1fr",desktop:"2fr 1fr"},gap:"1.5rem",children:[(0,a.jsxs)(F,{display:"grid",gridTemplateColumns:{mobile:"1fr",desktop:"1fr 1fr"},children:[(0,a.jsx)(g.UP,{name:"fullName",label:w("Full name"),placeholder:w("Type your name",!0),variant:"filled"}),(0,a.jsx)(g.mg,{name:"country",label:w("Country"),children:(0,x._G)().map(e=>(0,a.jsx)("option",{value:e.iso2,children:e.name},e.iso2))}),(0,a.jsx)(g.UP,{name:"email",label:w("Email"),placeholder:w("Type your email",!0),variant:"filled",isDisabled:!0}),(0,a.jsx)(g.mg,{name:"language",label:w("Language"),children:(0,p.Cf)().map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsx)(S,{fileFieldName:"photoFile",urlFieldName:"photoUrl",alt:(null==h?void 0:h.fullName)||"User photo"})]}),(0,a.jsxs)(F,{display:"flex",flexDirection:"column",gap:"1.5rem",children:[(0,a.jsx)(m.H5,{children:w("Content settings")}),(0,a.jsxs)(r.k,{gap:"2rem",wrap:"wrap",children:["en"===t.language&&(0,a.jsxs)(s.NI,{children:[(0,a.jsx)(u.l,{htmlFor:"showGreekPodcasts",children:w("Show podcasts in Greek",!0)}),(0,a.jsx)(c.r,{id:"showGreekPodcasts",isChecked:t.otherLanguagesToShow.includes("el"),onChange:e=>{e.target.checked?l("otherLanguagesToShow",[...t.otherLanguagesToShow,"el"]):l("otherLanguagesToShow",t.otherLanguagesToShow.filter(e=>"el"!==e))}})]}),"el"===t.language&&(0,a.jsxs)(s.NI,{children:[(0,a.jsx)(u.l,{htmlFor:"showEnglishPodcasts",children:w("Show podcasts in English")}),(0,a.jsx)(c.r,{id:"showEnglishPodcasts",isChecked:t.otherLanguagesToShow.includes("en"),onChange:e=>{e.target.checked?l("otherLanguagesToShow",[...t.otherLanguagesToShow,"en"]):l("otherLanguagesToShow",t.otherLanguagesToShow.filter(e=>"en"!==e))}})]}),(0,a.jsxs)(s.NI,{children:[(0,a.jsx)(u.l,{htmlFor:"autoplayNext",children:w("Autoplay next podcast")}),(0,a.jsx)(c.r,{id:"autoplayNext",isChecked:t.autoplayNext,onChange:e=>l("autoplayNext",e.target.checked)})]})]})]}),(0,a.jsxs)(F,{display:"flex",flexDirection:"column",gap:"1.5rem",children:[(0,a.jsx)(m.H5,{children:w("Appearance")}),(0,a.jsxs)(g.mg,{name:"themePreference",label:w("Mode"),width:"fit-content",children:[(0,a.jsx)("option",{value:"system",children:w("Automatic (based on system settings)")}),(0,a.jsx)("option",{value:"light",children:w("Light")}),(0,a.jsx)("option",{value:"dark",children:w("Dark")})]})]}),(0,a.jsx)(d.z,{isLoading:n,type:"submit",width:{mobile:"auto",desktop:"fit-content"},children:w("Save")})]})}})})}function S(e){let{urlFieldName:n,fileFieldName:t,alt:o}=e,[i,u,c]=(0,f.U$)(t),[g,m,p]=(0,f.U$)(n),x=!!(m.touched&&m.error),j=(0,b.useCallback)(e=>{let n=e[0];c.setValue(Object.assign(n,{preview:URL.createObjectURL(n)})),p.setValue(URL.createObjectURL(n))},[c,p]),{getRootProps:v,getInputProps:y}=(0,N.uI)({onDrop:j,accept:"image/jpeg, image/png, image/svg+xml",maxFiles:1}),{translate:k}=(0,T.Z)();return(0,a.jsxs)(F,{display:"flex",gap:"2rem",alignItems:"center",justifyContent:"center",flexWrap:"wrap",children:[(0,a.jsxs)(s.NI,{id:i.name,isInvalid:x,children:[(0,a.jsxs)(r.k,{as:"button",type:"button",align:"center",justify:"center",height:"10rem",width:"10rem",borderRadius:"100%",background:"sys-surface-elev-1",...v({}),children:[g.value?(0,a.jsx)(w(),{width:160,height:160,alt:o,src:g.value,style:{borderRadius:"50%",objectFit:"cover",height:"10rem"}}):(0,a.jsx)(l.gq,{width:"50%",height:"50%"}),(0,a.jsx)("input",{...y()})]}
1),(0,a.jsx)(h.J1,{children:m.error})]}),(0,a.jsxs)(r.k,{direction:"column",gap:"1rem",children:[(0,a.jsxs)(d.z,{variant:"secondary",...v({}),children:[k("Upload photo")," ",(0,a.jsx)("input",{...y()})]}),(0,a.jsx)(d.z,{type:"button",variant:"secondary",isDisabled:!g.value,onClick:()=>{p.setValue(""),c.setValue(void 0)},children:k("Remove photo")})]})]})}function F(e){return(0,a.jsx)(i.xu,{background:"sys-surface-elev-2",borderRadius:"1rem",padding:(0,k.Z)({min:1,max:2}),gap:(0,k.Z)({min:1,max:2}),...e})}C.getLayout=function(e){return(0,a.jsx)(g.M8,{type:"write",children:e})}},68721:function(e,n,t){"use strict";function a(e){let{min:n=1,max:t=3,breakPoints:a={min:375,max:1280},rem:l=16}=e;if("number"!=typeof a.max)return"NaN";let o=a.min/l,i=(t-n)/(a.max/l-o);return"clamp(".concat(n,"rem, ").concat(-1*o*i+n,"rem + ").concat(100*i,"vw, ").concat(t,"rem)")}t.d(n,{Z:function(){return a}})}},function(e){e.O(0,[2177,9884,5845,9912,6289,4869,9774,2888,179],function(){return e(e.s=80438)}),_N_E=e.O()}]);
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.