1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2014],{69701:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/profile",function(){return t(73175)}])},73175:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSG:function(){return i}});var l=t(31549),r=t(38049),n=t(8374),i=!0;a.default=()=>(0,l.jsx)(n.a,{children:(0,l.jsx)(r.L,{})})},90203:function(e,a,t){"use strict";t.d(a,{W:function(){return n}});var l=t(31549),r=t(95870);let n=e=>{let{children:a,className:t}=e;return(0,l.jsx)("div",{className:(0,r.cn)("w-full max-w-[1800px] mx-auto",t),children:a})}},52048:function(e,a,t){"use strict";t.d(a,{m:function(){return f}});var l=t(31549),r=t(40257),n=t(95870),i=t(9314),s=t(59709),c=t(437),o=t(52493),d=t(72301),m=t(1456),u=t(96697),x=e=>{let{title:a}=e;return(0,l.jsx)(u.Z,{variant:"h6",className:"font-bold md:font-semibold md:text-[2.25rem] md:leading-[2.5rem]",children:a})};let f=e=>{let{title:a,canGoBack:t,clickableGoBack:u="chevronOnly",action:f,className:v,isLoading:h,customRoute:g}=e,{t:j}=(0,s.$G)(),p=(0,c.useRouter)(),w=(0,o.DT)("md"),b=()=>{g?p.push(g):p.back()},y=h?(0,l.jsx)("div",{className:"w-1/3 h-10 bg-slate-300 animate-pulse dark:bg-tertiary-sl12 rounded-lg"}):t&&"all"===u?(0,l.jsx)(r.k,{onPress:b,className:(0,n.cn)("text-start p-0"),startIcon:(0,l.jsx)(d.J,{name:"arrow_mini_outline_left",label:j("back")}),children:"string"==typeof a?(0,l.jsx)(x,{title:a}):a}):t?(0,l.jsxs)("div",{className:"gap-3 items-center flex",children:[(0,l.jsx)(i.h,{onPress:b,variant:"text",color:"white",className:"flex-shrink-0 [&>span]:w-6 [&>span]:h-6 ",children:(0,l.jsx)(d.J,{name:"arrow_mini_outline_left",label:j("back")})}),"string"==typeof a?(0,l.jsx)(x,{title:a}):a]}):"string"==typeof a?(0,l.jsx)(x,{title:a}):a;return(0,l.jsxs)("div",{className:(0,n.cn)("w-full flex justify-between items-center",v),children:[y,w?null:f,w&&!!f&&(0,l.jsx)(m.Z,{children:f})]})}},1456:function(e,a,t){"use strict";var l=t(31549),r=t(38511),n=t(44194);a.Z=e=>{let[a,t]=(0,n.useState)(0),i=(0,r.q_)({transform:"translateY(".concat(a,"px)"),config:{duration:200}}),s=(0,n.useRef)(0);return(0,n.useEffect)(()=>{let e=()=>{let e=window.scrollY;s.current<e&&0!==e?t(104):t(0),s.current=e};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,l.jsx)(r.q.div,{className:"flex flex-1 justify-end flex-row items-center gap-4 fixed py-4 z-10 bottom-0 w-full left-0 px-4 md:px-6 bg-gradient-to-r from-primary to-[rgb(180,_213,_232)] dark:from-tertiary dark:to-[rgb(47,_53,_85)]",style:{...i},children:e.children})}},61434:function(e,a,t){"use strict";t.d(a,{Y:function(){return w}});var l=t(31549),r=t(83503),n=t(9314),i=t(39233),s=t(41187),c=t(65370),o=t(59709),d=t(44194),m=t(6232),u=t.n(m),x=t(72301),f=t(53058),v=t(76597);let h={maxSizeMB:.15,maxWidthOrHeight:1080,useWebWorker:!0};async function g(e,a){return await (0,v.Z)(e,null!=a?a:h)}async function j(e,a){try{var t;if(e&&(null===(t=e.props)||void 0===t?void 0:t.image)){let t=e.getImage();if(t){let e=await new Promise((e,l)=>{t.toBlob(t=>{var r;t?e(new File([t],null!==(r=null==a?void 0:a.name)&&void 0!==r?r:"",{type:"image/jpeg"})):l("Image cannot be cropped")})});return await g(e)}}return Promise.reject("No image to crop")}catch(e){return Promise.reject("Failed to crop image")}}function p(e){return(e-.2)*100/2.8+0}let w=r.rf.create(e=>{let{image:a,onSuccess:t}=e,{t:m}=(0,o.$G)(["common"]),v=(0,d.useRef)(null),[h,g]=(0,d.useState)(1),[w,b]=(0,d.useState)(p(1)),{visible:y}=(0,r.A2)(),{popModal:N}=(0,r.Ty)(),_=()=>{k||(g(1),b(p(1)),N())},[k,z]=(0,d.useState)(!1);return(0,l.jsx)(f.Z,{open:y,onClose:()=>_(),className:"max-h-[80vh] md:w-[420px]",header:(0,l.jsx)(n.h,{variant:"text",color:"white",className:"ml-auto",onPress:()=>{_()},children:(0,l.jsx)(x.J,{label:m("close"),name:"close"})}),footer:(0,l.jsxs)("div",{className:"flex w-full justify-between gap-4",children:[(0,l.jsx)(i.z,{onPress:()=>{_()},variant:"outlined",size:"medium",color:"white",className:"md:w-[30%]",isDisabled:k,children:m("cancel")}),(0,l.jsx)(i.z,{isLoading:k,onPress:async()=>{z(!0);try{let e=await j(v.current,a);await (null==t?void 0:t(e)),_()}catch(e){(0,s.yv)(m("anErrorOccurredTryAgain"),{variant:"error"})}z(!1)},variant:"contained",size:"medium",className:"max-md:flex-1 md:w-[70%]",children:m("common:selectImage")})]}),children:(0,l.jsxs)(d.Fragment,{children:[a&&(0,l.jsx)("div",{className:"m-auto w-fit overflow-hidden rounded-sm",children:(0,l.jsx)(u(),{ref:v,image:a,width:256,height:256,borderRadius:128,scale:h,border:0})}),(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 pb-8 pt-6",children:[(0,l.jsx)(n.h,{color:"white",variant:"text",size:"small",onPress:()=>{let e;g(((e=w>=25?w-25:0)-0)*2.8/100+.2),b(e)},children:(0,l.jsx)(x.J,{name:"remove",size:24,label:m("iconLabels.makeSmaller")})}),(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(c.i,{color:"primary",value:[w],onValueChange:e=>{b(e[0]),g((e[0]-0)*2.8/100+.2)},className:"[&>span]:w-full w-full"})}),(0,l.jsx)(n.h,{size:"small",color:"white",variant:"text",onClick:()=>{let e;g(((e=w<=75?w+25:100)-0)*2.8/100+.2),b(e)},children:(0,l.jsx)(x.J,{label:m("iconLabels.makeLarger"),name:"add"})})]})]})})})},38049:function(e,a,t){"use strict";t.d(a,{L:function(){return y}});
1var l=t(31549),r=t(49456),n=t(59709),i=t(52493),s=t(90203),c=t(52048),o=t(83503),d=t(41418),m=t(96697),u=t(41187),x=t(39233),f=t(75234),v=t(99474),h=t(13381),g=t(85866),j=t(44194),p=t(72301),w=t(61434),b=()=>{let{t:e}=(0,n.$G)(["common","settings"]),{data:a}=(0,i.Pi)(),t=(0,j.useRef)(null),{pushModalByComponent:r}=(0,o.Ty)(),s=()=>{t.current&&(t.current.value="")},c=(0,f.NL)(),{mutate:b,isLoading:y,mutateAsync:N}=(0,v.im0)();return(0,l.jsxs)("div",{className:"flex flex-col items-stretch justify-center gap-6 md:flex-row md:items-center",children:[(0,l.jsx)(d.q,{src:(0,i.yo)(null==a?void 0:a.imageUrl),alt:"User image",className:"h-24 w-24",fallback:(0,i.t8)(a),color:"primary"}),(0,l.jsxs)("div",{className:"flex flex-grow flex-col gap-2",children:[(0,l.jsx)(m.Z,{variant:"subtitle1",className:"mb-2",children:e("settings:editProfileImage")}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,l.jsx)("input",{ref:t,type:"file",accept:"image/*",onChange:a=>{var t,l;(null===(t=a.target.files)||void 0===t?void 0:t[0])&&((null===(l=a.target.files)||void 0===l?void 0:l[0].size)>26214400?(0,u.yv)(e("settings:imageSizeError"),{variant:"error"}):(r(w.Y,{image:a.target.files[0]}).then(async e=>{let{data:{uploadUrl:a,fileUrl:t}}=await (0,h.bTl)({fileName:e.name});await g.default.put(a,e,{headers:{"Content-Type":"application/octet-stream"}}),await N({data:{imageUrl:t}}),c.invalidateQueries((0,v.WZt)())}),s()))},className:"hidden"}),(0,l.jsx)(x.z,{variant:"contained",size:"medium",color:"primary",startIcon:(0,l.jsx)(p.J,{label:"",name:"edit_outline_01"}),onClick:()=>{var e;null===(e=t.current)||void 0===e||e.click()},children:e("edit")}),(null==a?void 0:a.imageUrl)&&(null==a?void 0:a.imageUrl)!=="null"&&(0,l.jsx)(x.z,{variant:"outlined",size:"medium",color:"white",isLoading:y,startIcon:(0,l.jsx)(p.J,{label:"",name:"delete_outline"}),onClick:()=>{s(),b({data:{imageUrl:"null"}},{onSuccess:()=>{c.invalidateQueries((0,v.WZt)())},onError:()=>{(0,u.yv)(e("anErrorOccurredTryAgain"),{variant:"error"})}})},children:e("remove")})]}),(0,l.jsx)(m.Z,{variant:"caption",children:e("maxSize")})]})]})};let y=()=>{var e,a,t;let{t:o}=(0,n.$G)(["common","settings"]),{data:d}=(0,i.Pi)();return(0,l.jsxs)(s.W,{children:[(0,l.jsx)(c.m,{title:o("settings:editProfile"),canGoBack:!0,className:"mb-14"}),(0,l.jsx)(b,{}),(0,l.jsxs)("div",{className:"mt-14 flex flex-col gap-4",children:[(0,l.jsx)(r.n,{isReadOnly:!0,label:o("name"),placeholder:null!==(e=null==d?void 0:d.name)&&void 0!==e?e:"",className:"max-w-[512px]"}),(0,l.jsx)(r.n,{isReadOnly:!0,label:o("surname"),placeholder:null!==(a=null==d?void 0:d.surname)&&void 0!==a?a:"",className:"max-w-[512px]"}),(0,l.jsx)(r.n,{isReadOnly:!0,label:o("email"),placeholder:null!==(t=null==d?void 0:d.email)&&void 0!==t?t:"",className:"max-w-[512px]"})]})]})}}},function(e){e.O(0,[5669,8275,6969,992,7292,706,3251,3205,5809,9456,2211,5370,8374,2888,9774,179],function(){return e(e.s=69701)}),_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.