1"use strict";(self.webpackChunkcabinet=self.webpackChunkcabinet||[]).push([[247],{2247:(di,H,d)=>{d.r(H),d.d(H,{ProfilePageModule:()=>ai,createTranslateLoader:()=>$});var v=d(6895),O=d(6410),F=d(7533),t=d(8274),A=d(9383),rt=d(3541),ct=d(5726),z=d(3625),Q=d(6079),L=d(8617),k=d(4810),y=d(1652),u=d(3791),m=d(2722),lt=d(8505),dt=d(4351),gt=d(4004),b=d(1135),J=d(1111),pt=d(8275),ht=d(3266),mt=d(2253),B=d(7304),W=d(3669),ft=d(6403),Y=d(1724),_t=d(3599),ut=d(1517),w=d(4006),xt=d(4330),Ct=d(995),vt=d(8030),Mt=d(7579),At=d(7613),yt=d(9798),G=d(5861),bt=d(1481);const wt=["wrapper"],Tt=["sourceImage"];function Pt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"img",4,5),t.NdJ("load",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.imageLoadedInView())})("mousedown",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.startMove(n,a.moveTypes.Drag))})("touchstart",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.startMove(n,a.moveTypes.Drag))}),t.qZA()}if(2&o){const e=t.oxw();t.Udp("visibility",e.imageVisible?"visible":"hidden")("transform",e.safeTransformStyle),t.ekj("ngx-ic-draggable",!e.disabled&&e.allowMoveImage),t.Q6J("src",e.safeImgDataUrl,t.LSH),t.uIk("alt",e.imageAltText)}}function St(o,r){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"span",9),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"topleft"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"topleft"))}
1),t._UZ(2,"span",10),t.qZA(),t.TgZ(3,"span",11),t._UZ(4,"span",10),t.qZA(),t.TgZ(5,"span",12),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"topright"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"topright"))}),t._UZ(6,"span",10),t.qZA(),t.TgZ(7,"span",13),t._UZ(8,"span",10),t.qZA(),t.TgZ(9,"span",14),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottomright"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottomright"))}),t._UZ(10,"span",10),t.qZA(),t.TgZ(11,"span",15),t._UZ(12,"span",10),t.qZA(),t.TgZ(13,"span",16),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottomleft"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottomleft"))}),t._UZ(14,"span",10),t.qZA(),t.TgZ(15,"span",17),t._UZ(16,"span",10),t.qZA(),t.TgZ(17,"span",18),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"top"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"top"))}),t.qZA(),t.TgZ(18,"span",19),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"right"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"right"))}),t.qZA(),t.TgZ(19,"span",20),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottom"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"bottom"))}),t.qZA(),t.TgZ(20,"span",21),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"left"))})("touchstart",function(n){t.CHM(e);const a=t.oxw(2);return t.KtG(a.startMove(n,a.moveTypes.Resize,"left"))}),t.qZA(),t.BQk()}}function It(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",6),t.NdJ("keydown",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.keyboardAccess(n))}),t.TgZ(1,"div",7),t.NdJ("mousedown",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.startMove(n,a.moveTypes.Move))})("touchstart",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.startMove(n,a.moveTypes.Move))}),t.qZA(),t.YNc(2,St,21,0,"ng-container",8),t.qZA()}if(2&o){const e=t.oxw();t.Udp("top",e.cropper.y1,"px")("left",e.cropper.x1,"px")("width",e.cropper.x2-e.cropper.x1,"px")("height",e.cropper.y2-e.cropper.y1,"px")("margin-left","center"===e.alignImage?e.marginLeft:null)("visibility",e.imageVisible?"visible":"hidden"),t.ekj("ngx-ic-round",e.roundCropper),t.xp6(2),t.Q6J("ngIf",!e.hideResizeSquares)}}class Ot{constructor(){this.format="png",this.maintainAspectRatio=!0,this.transform={},this.aspectRatio=1,this.resetCropOnAspectRatioChange=!0,this.resizeToWidth=0,this.resizeToHeight=0,this.cropperMinWidth=0,this.cropperMinHeight=0,this.cropperMaxHeight=0,this.cropperMaxWidth=0,this.cropperStaticWidth=0,this.cropperStaticHeight=0,this.canvasRotation=0,this.initialStepSize=3,this.roundCropper=!1,this.onlyScaleDown=!1,this.imageQuality=92,this.autoCrop=!0,this.backgroundColor=null,this.containWithinAspectRatio=!1,this.hideResizeSquares=!1,this.alignImage="center",this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=this.initialStepSize}setOptions(r){Object.keys(r).filter(e=>e in this).forEach(e=>this[e]=r[e]),this.validateOptions()}setOptionsFromChanges(r){Object.keys(r).filter(e=>e in this).forEach(e=>this[e]=r[e].currentValue),this.validateOptions()}validateOptions(){if(this.maintainAspectRatio&&!this.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}}var f=(()=>{return(o=f||(f={})).Drag="drag",o.Move="move",o.Resize="resize",o.Pinch="pinch",f;var o})();function q(o,r){return o/100*r}let Ft=(()=>{class o{crop(e,i,n,a){const s=this.getImagePosition(e,i,n,a),c=s.x2-s.x1,l=s.y2-s.y1,g=document.createElement("canvas");g.width=c,g.height=l;const h=g.getContext("2d");
1if(!h)return null;null!=a.backgroundColor&&(h.fillStyle=a.backgroundColor,h.fillRect(0,0,c,l));const p=(a.transform.scale||1)*(a.transform.flipH?-1:1),C=(a.transform.scale||1)*(a.transform.flipV?-1:1),{translateH:P,translateV:T}=this.getCanvasTranslate(e,i,a),x=i.transformed;h.setTransform(p,0,0,C,x.size.width/2+P,x.size.height/2+T),h.translate(-s.x1/p,-s.y1/C),h.rotate((a.transform.rotate||0)*Math.PI/180),h.drawImage(x.image,-x.size.width/2,-x.size.height/2);const _={width:c,height:l,imagePosition:s,cropperPosition:{...n}};a.containWithinAspectRatio&&(_.offsetImagePosition=this.getOffsetImagePosition(e,i,n,a));const Z=this.getResizeRatio(c,l,a);return 1!==Z&&(_.width=Math.round(c*Z),_.height=a.maintainAspectRatio?Math.round(_.width/a.aspectRatio):Math.round(l*Z),function Et(o,r,e){const i=o.width,n=o.height,a=i/(r=Math.round(r)),s=n/(e=Math.round(e)),c=Math.ceil(a/2),l=Math.ceil(s/2),g=o.getContext("2d");if(g){const h=g.getImageData(0,0,i,n),p=g.createImageData(r,e),C=h.data,P=p.data;for(let T=0;T<e;T++)for(let x=0;x<r;x++){const _=4*(x+T*r),Z=T*s;let M=0,R=0,tt=0,et=0,it=0,nt=0,ot=0;const si=Math.floor(x*a),ri=Math.floor(T*s);let U=Math.ceil((x+1)*a),N=Math.ceil((T+1)*s);U=Math.min(U,i),N=Math.min(N,n);for(let D=ri;D<N;D++){const at=Math.abs(Z-D)/l,ci=x*a,li=at*at;for(let E=si;E<U;E++){const st=Math.abs(ci-E)/c,S=Math.sqrt(li+st*st);if(S>=1)continue;M=2*S*S*S-3*S*S+1;const I=4*(E+D*i);ot+=M*C[I+3],tt+=M,C[I+3]<255&&(M=M*C[I+3]/250),et+=M*C[I],it+=M*C[I+1],nt+=M*C[I+2],R+=M}}P[_]=et/R,P[_+1]=it/R,P[_+2]=nt/R,P[_+3]=ot/tt}o.width=r,o.height=e,g.putImageData(p,0,0)}}(g,_.width,_.height)),_.base64=g.toDataURL("image/"+a.format,this.getQuality(a)),_}getCanvasTranslate(e,i,n){if("px"===n.transform.translateUnit){const a=this.getRatio(e,i);return{translateH:(n.transform.translateH||0)*a,translateV:(n.transform.translateV||0)*a}}return{translateH:n.transform.translateH?q(n.transform.translateH,i.transformed.size.width):0,translateV:n.transform.translateV?q(n.transform.translateV,i.transformed.size.height):0}}getRatio(e,i){return i.transformed.size.width/e.nativeElement.offsetWidth}getImagePosition(e,i,n,a){const s=this.getRatio(e,i),c={x1:Math.round(n.x1*s),y1:Math.round(n.y1*s),x2:Math.round(n.x2*s),y2:Math.round(n.y2*s)};return a.containWithinAspectRatio||(c.x1=Math.max(c.x1,0),c.y1=Math.max(c.y1,0),c.x2=Math.min(c.x2,i.transformed.size.width),c.y2=Math.min(c.y2,i.transformed.size.height)),c}getOffsetImagePosition(e,i,n,a){const l=i.transformed.size.width/e.nativeElement.offsetWidth;let g,h;(a.canvasRotation+i.exifTransform.rotate)%2?(g=(i.transformed.size.width-i.original.size.height)/2,h=(i.transformed.size.height-i.original.size.width)/2):(g=(i.transformed.size.width-i.original.size.width)/2,h=(i.transformed.size.height-i.original.size.height)/2);const p={x1:Math.round(n.x1*l)-g,y1:Math.round(n.y1*l)-h,x2:Math.round(n.x2*l)-g,y2:Math.round(n.y2*l)-h};return a.containWithinAspectRatio||(p.x1=Math.max(p.x1,0),p.y1=Math.max(p.y1,0),p.x2=Math.min(p.x2,i.transformed.size.width),p.y2=Math.min(p.y2,i.transformed.size.height)),p}getResizeRatio(e,i,n){const a=n.resizeToWidth/e,s=n.resizeToHeight/i,c=new Array;n.resizeToWidth>0&&c.push(a),n.resizeToHeight>0&&c.push(s);const l=0===c.length?1:Math.min(...c);return l>1&&!n.onlyScaleDown?l:Math.min(l,1)}getQuality(e){return Math.min(1,Math.max(0,e.imageQuality/100))}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})(),Ut=(()=>{class o{resetCropperPosition(e,i,n){if(null==e||!e.nativeElement)return;const a=e.nativeElement;if(n.cropperStaticHeight&&n.cropperStaticWidth)i.x1=0,i.x2=a.offsetWidth>n.cropperStaticWidth?n.cropperStaticWidth:a.offsetWidth,i.y1=0,i.y2=a.offsetHeight>n.cropperStaticHeight?n.cropperStaticHeight:a.offsetHeight;else{const s=Math.min(n.cropperScaledMaxWidth,a.offsetWidth),c=Math.min(n.cropperScaledMaxHeight,a.offsetHeight);if(n.maintainAspectRatio)if(a.offsetWidth/n.aspectRatio<a.offsetHeight){i.x1=0,i.x2=s;const l=s/n.aspectRatio;i.y1=(a.offsetHeight-l)/2,i.y2=i.y1+l}else{i.y1=0,i.y2=c;const l=c*n.aspectRatio;i.x1=(a.offsetWidth-l)/2,i.x2=i.x1+l}else i.x1=0,i.x2=s,i.y1=0,i.y2=c}}move(e,i,n){const a=this.getClientX(e)-i.clientX,s=this.getClientY(e)-i.clientY;n.x1=i.x1+a,n.y1=i.y1+s,n.x2=i.x2+a,n.y2=i.y2+s}resize(e,i,n,a,s){const c=this.getClientX(e)-i.clientX,l=this.getClientY(e)-i.clientY;switch(i.position){case"left":n.x1=Math.min(Math.max(i.x1+c,n.x2-s.cropperScaledMaxWidth),n.x2-s.cropperScaledMinWidth);break;case"topleft":n.x1=Math.min(Math.max(i.x1+c,n.x2-s.cropperScaledMaxWidth),n.x2-s.cropperScaledMinWidth),n.y1=Math.min(Math.max(i.y1+l,n.y2-s.cropperScaledMaxHeight),n.y2-s.cropperScaledMinHeight);break;case"top":n.y1=Math.min(Math.max(i.y1+l,n.y2-s.cropperScaledMaxHeight),n.y2-s.cropperScaledMinHeight);break;case"topright":n.x2=Math.max(Math.min(i.x2+c,n.x1+s.cropperScaledMaxWidth),n.x1+s.cropperScaledMinWidth),n.y1=Math.min(Math.max(i.y1+l,n.y2-s.cropperScaledMaxHeight),n.y2-s.cropperScaledMinHeight);break;case"right":n.x2=Math.max(Math.min(i.x2+c,n.x1+s.cropperScaledMaxWidth),n.x1+s.cropperScaledMinWidth);break;case"bottomright":n.x2=Math.max(Math.min(i.x2+c,n.x1+s.cropperScaledMaxWidth),n.x1+s.cropperScaledMinWidth),n.y2=Math.max(Math.min(i.y2+l,n.y1+s.cropperScaledMaxHeight),n.y1+s.cropperScaledMinHeight);break;case"bottom":n.y2=Math.max(Math.min(i.y2+l,n.y1+s.cropperScaledMaxHeight),n.y1+s.cropperScaledMinHeight);break;case"bottomleft":n.x1=Math.min(Math.max(i.x1+c,n.x2-s.cropperScaledMaxWidth),n.x2-s.cropperScaledMinWidth),n.y2=Math.max(Math.min(i.y2+l,n.y1+s.cropperScaledMaxHeight),n.y1+s.cropperScaledMinHeight);break;case"center":const g=e.scale,h=Math.min(Math.max(s.cropperScaledMinWidth,Math.abs(i.x2-i.x1)*g),s.cropperScaledMaxWidth),p=Math.min(Math.max(s.cropperScaledMinHeight,Math.abs(i.y2-i.y1)*g),s.cropperScaledMaxHeight);n.x1=i.clientX-h/2,n.x2=i.clientX+h/2,n.y1=i.clientY-p/2,n.y2=i.clientY+p/2,n.x1<0?(n.x2-=n.x1,n.x1=0):n.x2>a.width&&(n.x1-=n.x2-a.width,n.x2=a.width),n.y1<0?(n.y2-=n.y1,n.y1=0):n.y2>a.height&&(n.y1-=n.y2-a.height,n.y2=a.height)}s.maintainAspectRatio&&this.checkAspectRatio(i.position,n,a,s)}checkAspectRatio(e,i,n,a){let s=0,c=0;switch(e){case"top":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,s=Math.max(i.x2-n.width,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"bottom":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,s=Math.max(i.x2-n.width,0),c=Math.max(i.y2-n.height,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"topleft":i.y1=i.y2-(i.x2-i.x1)/a.aspectRatio,s=Math.max(0-i.x1,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x1+=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"topright":i.y1=i.y2-(i.x2-i.x1)/a.aspectRatio,s=Math.max(i.x2-n.width,0),c=Math.max(0-i.y1,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y1+=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"right":case"bottomright":i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio,s=Math.max(i.x2-n.width,0),c=Math.max(i.y2-n.height,0),(s>0||c>0)&&(i.x2-=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"left":case"bottomleft":i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio,s=Math.max(0-i.x1,0),c=Math.max(i.y2-n.height,0),(s>0||c>0)&&(i.x1+=c*a.aspectRatio>s?c*a.aspectRatio:s,i.y2-=c*a.aspectRatio>s?c:s/a.aspectRatio);break;case"center":i.x2=i.x1+(i.y2-i.y1)*a.aspectRatio,i.y2=i.y1+(i.x2-i.x1)/a.aspectRatio;const l=Math.max(0-i.x1,0),g=Math.max(i.x2-n.width,0),h=Math.max(i.y2-n.height,0),p=Math.max(0-i.y1,0);(l>0||g>0||h>0||p>0)&&(i.x1+=h*a.aspectRatio>l?h*a.aspectRatio:l,i.x2-=p*a.aspectRatio>g?p*a.aspectRatio:g,i.y1+=p*a.aspectRatio>g?p:g/a.aspectRatio,i.y2-=h*a.aspectRatio>l?h:l/a.aspectRatio)}}getClientX(e){var i;return(null===(i=e.touches)||void 0===i?void 0:i[0].clientX)||e.clientX||0}getClientY(e){var i;return(null===(i=e.touches)||void 0===i?void 0:i[0].clientY)||e.clientY||0}}return o.\u0275fac=function(e){return new(e||o)}
1,o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();let kt=(()=>{class o{constructor(){this.autoRotateSupported=function Ht(){return new Promise(o=>{const r=new Image;r.onload=()=>{o(1===r.width&&2===r.height)},r.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})}()}loadImageFile(e,i){return new Promise((n,a)=>{const s=new FileReader;s.onload=c=>{this.loadImage(c.target.result,e.type,i).then(n).catch(a)},s.readAsDataURL(e)})}loadImage(e,i,n){return this.isValidImageType(i)?this.loadBase64Image(e,n):Promise.reject(new Error("Invalid image type"))}isValidImageType(e){return/image\/(png|jpg|jpeg|bmp|gif|tiff|webp|x-icon|vnd.microsoft.icon)/.test(e)}loadImageFromURL(e,i){return new Promise((n,a)=>{const s=new Image;s.onerror=()=>a,s.onload=()=>{const c=document.createElement("canvas"),l=c.getContext("2d");c.width=s.width,c.height=s.height,null==l||l.drawImage(s,0,0),this.loadBase64Image(c.toDataURL(),i).then(n)},s.crossOrigin="anonymous",s.src=e})}loadBase64Image(e,i){return new Promise((n,a)=>{const s=new Image;s.onload=()=>n({originalImage:s,originalBase64:e}),s.onerror=a,s.src=e}).then(n=>this.transformImageBase64(n,i))}transformImageBase64(e,i){var n=this;return(0,G.Z)(function*(){const a=yield n.autoRotateSupported,s=yield function zt(o){switch("string"==typeof o&&(o=function Qt(o){const r=new DataView(function Lt(o){o=o.replace(/^data\:([^\;]+)\;base64,/gim,"");const r=atob(o),e=r.length,i=new Uint8Array(e);for(let n=0;n<e;n++)i[n]=r.charCodeAt(n);return i.buffer}(o));if(65496!==r.getUint16(0,!1))return-2;const e=r.byteLength;let i=2;for(;i<e;){if(r.getUint16(i+2,!1)<=8)return-1;const n=r.getUint16(i,!1);if(i+=2,65505==n){if(1165519206!==r.getUint32(i+=2,!1))return-1;const a=18761==r.getUint16(i+=6,!1);i+=r.getUint32(i+4,a);const s=r.getUint16(i,a);i+=2;for(let c=0;c<s;c++)if(274==r.getUint16(i+12*c,a))return r.getUint16(i+12*c+8,a)}else{if(65280!=(65280&n))break;i+=r.getUint16(i,!1)}}return-1}(o)),o){case 2:return{rotate:0,flip:!0};case 3:return{rotate:2,flip:!1};case 4:return{rotate:2,flip:!0};case 5:return{rotate:1,flip:!0};case 6:return{rotate:1,flip:!1};case 7:return{rotate:3,flip:!0};case 8:return{rotate:3,flip:!1};default:return{rotate:0,flip:!1}}}(a?-1:e.originalBase64);return e.originalImage&&e.originalImage.complete?n.transformLoadedImage({original:{base64:e.originalBase64,image:e.originalImage,size:{width:e.originalImage.naturalWidth,height:e.originalImage.naturalHeight}},exifTransform:s},i):Promise.reject(new Error("No image loaded"))})()}transformLoadedImage(e,i){var n=this;return(0,G.Z)(function*(){const a=i.canvasRotation+e.exifTransform.rotate,s={width:e.original.image.naturalWidth,height:e.original.image.naturalHeight};if(0===a&&!e.exifTransform.flip&&!i.containWithinAspectRatio)return{original:{base64:e.original.base64,image:e.original.image,size:{...s}},transformed:{base64:e.original.base64,image:e.original.image,size:{...s}},exifTransform:e.exifTransform};const c=n.getTransformedSize(s,e.exifTransform,i),l=document.createElement("canvas");l.width=c.width,l.height=c.height;const g=l.getContext("2d");null==g||g.setTransform(e.exifTransform.flip?-1:1,0,0,1,l.width/2,l.height/2),null==g||g.rotate(Math.PI*(a/2)),null==g||g.drawImage(e.original.image,-s.width/2,-s.height/2);const h=l.toDataURL(),p=yield n.loadImageFromBase64(h);return{original:{base64:e.original.base64,image:e.original.image,size:{...s}},transformed:{base64:h,image:p,size:{width:p.width,height:p.height}},exifTransform:e.exifTransform}})()}loadImageFromBase64(e){return new Promise((i,n)=>{const a=new Image;a.onload=()=>i(a),a.onerror=n,a.src=e})}getTransformedSize(e,i,n){const a=n.canvasRotation+i.rotate;if(n.containWithinAspectRatio){if(a%2){const c=e.height/n.aspectRatio;return{width:Math.max(e.height,e.width*n.aspectRatio),height:Math.max(e.width,c)}}{const c=e.width/n.aspectRatio;return{width:Math.max(e.width,e.height*n.aspectRatio),height:Math.max(e.height,c)}}}return a%2?{height:e.width,width:e.height}:{width:e.width,height:e.height}}}return o.\u0275fac=function(e){return new(e||o)}
1,o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})(),Jt=(()=>{class o{constructor(e,i,n,a,s){var c;this.cropService=e,this.cropperPositionService=i,this.loadImageService=n,this.sanitizer=a,this.cd=s,this.Hammer=(null===(c=window)||void 0===c?void 0:c.Hammer)||null,this.settings=new Ot,this.setImageMaxSizeRetries=0,this.resizedWhileHidden=!1,this.marginLeft="0px",this.maxSize={width:0,height:0},this.moveTypes=f,this.imageVisible=!1,this.format=this.settings.format,this.transform={},this.maintainAspectRatio=this.settings.maintainAspectRatio,this.aspectRatio=this.settings.aspectRatio,this.resetCropOnAspectRatioChange=this.settings.resetCropOnAspectRatioChange,this.resizeToWidth=this.settings.resizeToWidth,this.resizeToHeight=this.settings.resizeToHeight,this.cropperMinWidth=this.settings.cropperMinWidth,this.cropperMinHeight=this.settings.cropperMinHeight,this.cropperMaxHeight=this.settings.cropperMaxHeight,this.cropperMaxWidth=this.settings.cropperMaxWidth,this.cropperStaticWidth=this.settings.cropperStaticWidth,this.cropperStaticHeight=this.settings.cropperStaticHeight,this.canvasRotation=this.settings.canvasRotation,this.initialStepSize=this.settings.initialStepSize,this.roundCropper=this.settings.roundCropper,this.onlyScaleDown=this.settings.onlyScaleDown,this.imageQuality=this.settings.imageQuality,this.autoCrop=this.settings.autoCrop,this.backgroundColor=this.settings.backgroundColor,this.containWithinAspectRatio=this.settings.containWithinAspectRatio,this.hideResizeSquares=this.settings.hideResizeSquares,this.allowMoveImage=!1,this.cropper={x1:-100,y1:-100,x2:1e4,y2:1e4},this.alignImage=this.settings.alignImage,this.disabled=!1,this.hidden=!1,this.imageCropped=new t.vpe,this.startCropImage=new t.vpe,this.imageLoaded=new t.vpe,this.cropperReady=new t.vpe,this.loadImageFailed=new t.vpe,this.transformChange=new t.vpe,this.reset()}ngOnChanges(e){var i;this.onChangesUpdateSettings(e),this.onChangesInputImage(e),null!==(i=this.loadedImage)&&void 0!==i&&i.original.image.complete&&(e.containWithinAspectRatio||e.canvasRotation)&&this.loadImageService.transformLoadedImage(this.loadedImage,this.settings).then(n=>this.setLoadedImage(n)).catch(n=>this.loadImageError(n)),(e.cropper||e.maintainAspectRatio||e.aspectRatio)&&(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),!this.maintainAspectRatio||!this.resetCropOnAspectRatioChange&&this.aspectRatioIsCorrect()||!e.maintainAspectRatio&&!e.aspectRatio?e.cropper&&(this.checkCropperPosition(!1),this.doAutoCrop()):this.resetCropperPosition(),this.cd.markForCheck()),e.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop(),this.cd.markForCheck()),e.hidden&&this.resizedWhileHidden&&!this.hidden&&setTimeout(()=>{this.onResize(),this.resizedWhileHidden=!1})}onChangesUpdateSettings(e){this.settings.setOptionsFromChanges(e),this.settings.cropperStaticHeight&&this.settings.cropperStaticWidth&&this.settings.setOptions({hideResizeSquares:!0,cropperMinWidth:this.settings.cropperStaticWidth,cropperMinHeight:this.settings.cropperStaticHeight,cropperMaxHeight:this.settings.cropperStaticHeight,cropperMaxWidth:this.settings.cropperStaticWidth,maintainAspectRatio:!1})}onChangesInputImage(e){(e.imageChangedEvent||e.imageURL||e.imageBase64||e.imageFile)&&this.reset(),e.imageChangedEvent&&this.isValidImageChangedEvent()&&this.loadImageFile(this.imageChangedEvent.target.files[0]),e.imageURL&&this.imageURL&&this.loadImageFromURL(this.imageURL),e.imageBase64&&this.imageBase64&&this.loadBase64Image(this.imageBase64),e.imageFile&&this.imageFile&&this.loadImageFile(this.imageFile)}isValidImageChangedEvent(){var e,i,n;return(null===(e=this.imageChangedEvent)||void 0===e||null===(i=e.target)||void 0===i||null===(n=i.files)||void 0===n?void 0:n.length)>0}setCssTransform(){var e;const i=(null===(e=this.transform)||void 0===e?void 0:e.translateUnit)||"%";this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle(`translate(${this.transform.translateH||0}${i}, ${this.transform.translateV||0}${i}) scaleX(`+(this.transform.scale||1)*(this.transform.flipH?-1:1)+") scaleY("+(this.transform.scale||1)*(this.transform.flipV?-1:1)+") rotate("+(this.transform.rotate||0)+"deg)")}ngOnInit(){this.settings.stepSize=this.initialStepSize,this.activatePinchGesture()}reset(){this.imageVisible=!1,this.loadedImage=void 0,this.safeImgDataUrl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=",this.moveStart={active:!1,type:null,position:null,x1:0,y1:0,x2:0,y2:0,clientX:0,clientY:0},this.maxSize={width:0,height:0},this.cropper.x1=-100,this.cropper.y1=-100,this.cropper.x2=1e4,this.cropper.y2=1e4}loadImageFile(e){this.loadImageService.loadImageFile(e,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadBase64Image(e){this.loadImageService.loadBase64Image(e,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}loadImageFromURL(e){this.loadImageService.loadImageFromURL(e,this.settings).then(i=>this.setLoadedImage(i)).catch(i=>this.loadImageError(i))}setLoadedImage(e){this.loadedImage=e,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(e.transformed.base64),this.cd.markForCheck()}loadImageError(e){console.error(e),this.loadImageFailed.emit()}imageLoadedInView(){null!=this.loadedImage&&(this.imageLoaded.emit(this.loadedImage),this.setImageMaxSizeRetries=0,setTimeout(()=>this.checkImageMaxSizeRecursively()))}checkImageMaxSizeRecursively(){this.setImageMaxSizeRetries>40?this.loadImageFailed.emit():this.sourceImageLoaded()?(this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize(),this.resetCropperPosition(),this.cropperReady.emit({...this.maxSize}),this.cd.markForCheck()):(this.setImageMaxSizeRetries++,setTimeout(()=>this.checkImageMaxSizeRecursively(),50))}sourceImageLoaded(){var e,i;return(null===(e=this.sourceImage)||void 0===e||null===(i=e.nativeElement)||void 0===i?void 0:i.offsetWidth)>0}onResize(){this.loadedImage&&(this.hidden?this.resizedWhileHidden=!0:(this.resizeCropperPosition(),this.setMaxSize(),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize()))}activatePinchGesture(){if(this.Hammer){const e=new this.Hammer(this.wrapper.nativeElement);e.get("pinch").set({enable:!0}),e.on("pinchmove",this.onPinch.bind(this)),e.on("pinchend",this.pinchStop.bind(this)),e.on("pinchstart",this.startPinch.bind(this))}else(0,t.X6Q)()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")}resizeCropperPosition(){const e=this.sourceImage.nativeElement;(this.maxSize.width!==e.offsetWidth||this.maxSize.height!==e.offsetHeight)&&(this.cropper.x1=this.cropper.x1*e.offsetWidth/this.maxSize.width,this.cropper.x2=this.cropper.x2*e.offsetWidth/this.maxSize.width,this.cropper.y1=this.cropper.y1*e.offsetHeight/this.maxSize.height,this.cropper.y2=this.cropper.y2*e.offsetHeight/this.maxSize.height)}resetCropperPosition(){this.cropperPositionService.resetCropperPosition(this.sourceImage,this.cropper,this.settings),this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(e){this.changeKeyboardStepSize(e),this.keyboardMoveCropper(e)}changeKeyboardStepSize(e){const i=+e.key;i>=1&&i<=9&&(this.settings.stepSize=i)}keyboardMoveCropper(e){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(e.ke
1y))return;const n=e.shiftKey?f.Resize:f.Move,a=e.altKey?function Rt(o){switch(o){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";default:return"right"}}(e.key):function Zt(o){switch(o){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";default:return"left"}}(e.key),s=function Dt(o,r){switch(o){case"ArrowUp":return{clientX:0,clientY:-1*r};case"ArrowRight":return{clientX:r,clientY:0};case"ArrowDown":return{clientX:0,clientY:r};default:return{clientX:-1*r,clientY:0}}}(e.key,this.settings.stepSize);e.preventDefault(),e.stopPropagation(),this.startMove({clientX:0,clientY:0},n,a),this.moveImg(s),this.moveStop()}startMove(e,i,n=null){var a,s;this.disabled||null!==(a=this.moveStart)&&void 0!==a&&a.active&&(null===(s=this.moveStart)||void 0===s?void 0:s.type)===f.Pinch||i===f.Drag&&!this.allowMoveImage||(e.preventDefault&&e.preventDefault(),this.moveStart={active:!0,type:i,position:n,transform:{...this.transform},clientX:this.cropperPositionService.getClientX(e),clientY:this.cropperPositionService.getClientY(e),...this.cropper})}startPinch(e){this.safeImgDataUrl&&(e.preventDefault&&e.preventDefault(),this.moveStart={active:!0,type:f.Pinch,position:"center",clientX:this.cropper.x1+(this.cropper.x2-this.cropper.x1)/2,clientY:this.cropper.y1+(this.cropper.y2-this.cropper.y1)/2,...this.cropper})}moveImg(e){if(this.moveStart.active){if(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===f.Move)this.cropperPositionService.move(e,this.moveStart,this.cropper),this.checkCropperPosition(!0);else if(this.moveStart.type===f.Resize)!this.cropperStaticWidth&&!this.cropperStaticHeight&&this.cropperPositionService.resize(e,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1);else if(this.moveStart.type===f.Drag){var i,n;const a=this.cropperPositionService.getClientX(e)-this.moveStart.clientX,s=this.cropperPositionService.getClientY(e)-this.moveStart.clientY;this.transform={...this.transform,translateH:((null===(i=this.moveStart.transform)||void 0===i?void 0:i.translateH)||0)+a,translateV:((null===(n=this.moveStart.transform)||void 0===n?void 0:n.translateV)||0)+s},this.setCssTransform()}this.cd.detectChanges()}}onPinch(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===f.Pinch&&(this.cropperPositionService.resize(e,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1)),this.cd.detectChanges())}setMaxSize(){if(this.sourceImage){const e=this.sourceImage.nativeElement;this.maxSize.width=e.offsetWidth,this.maxSize.height=e.offsetHeight,this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){var e,i;null!==(e=this.loadedImage)&&void 0!==e&&null!==(i=e.transformed)&&void 0!==i&&i.image?(this.setCropperScaledMinWidth(),this.setCropperScaledMinHeight()):(this.settings.cropperScaledMinWidth=20,this.settings.cropperScaledMinHeight=20)}setCropperScaledMinWidth(){this.settings.cropperScaledMinWidth=this.cropperMinWidth>0?Math.max(20,this.cropperMinWidth/this.loadedImage.transformed.image.width*this.maxSize.width):20}setCropperScaledMinHeight(){this.settings.cropperScaledMinHeight=this.maintainAspectRatio?Math.max(20,this.settings.cropperScaledMinWidth/this.aspectRatio):this.cropperMinHeight>0?Math.max(20,this.cropperMinHeight/this.loadedImage.transformed.image.height*this.maxSize.height):20}setCropperScaledMaxSize(){var e,i;if(null!==(e=this.loadedImage)&&void 0!==e&&null!==(i=e.transformed)&&void 0!==i&&i.image){const n=this.loadedImage.transformed.size.width/this.maxSize.width;this.settings.cropperScaledMaxWidth=this.cropperMaxWidth>20?this.cropperMaxWidth/n:this.maxSize.width,this.settings.cropperScaledMaxHeight=this.cropperMaxHeight>20?this.cropperMaxHeight/n:this.maxSize.height,this.maintainAspectRatio&&(this.settings.cropperScaledMaxWidth>this.settings.cropperScaledMaxHeight*this.aspectRatio?this.settings.cropperScaledMaxWidth=this.settings.cropperScaledMaxHeight*this.aspectRatio:this.settings.cropperScaledMaxWidth<this.settings.cropperScaledMaxHeight*this.aspectRatio&&(this.settings.cropperScaledMaxHeight=this.settings.cropperScaledMaxWidth/this.aspectRatio))}else this.settings.cropperScaledMaxWidth=this.maxSize.width,this.settings.cropperScaledMaxHeight=this.maxSize.height}checkCropperPosition(e=!1){this.cropper.x1<0&&(this.cropper.x2-=e?this.cropper.x1:0,this.cropper.x1=0),this.cropper.y1<0&&(this.cropper.y2-=e?this.cropper.y1:0,this.cropper.y1=0),this.cropper.x2>this.maxSize.width&&(this.cropper.x1-=e?this.cropper.x2-this.maxSize.width:0,this.cropper.x2=this.maxSize.width),this.cropper.y2>this.maxSize.height&&(this.cropper.y1-=e?this.cropper.y2-this.maxSize.height:0,this.cropper.y2=this.maxSize.height)}moveStop(){var e;this.moveStart.active&&(this.moveStart.active=!1,(null===(e=this.moveStart)||void 0===e?void 0:e.type)===f.Drag?this.transformChange.emit(this.transform):this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}doAutoCrop(){this.autoCrop&&this.crop()}crop(){var e,i;if(null!=(null===(e=this.loadedImage)||void 0===e||null===(i=e.transformed)||void 0===i?void 0:i.image)){this.startCropImage.emit();const n=this.cropService.crop(this.sourceImage,this.loadedImage,this.cropper,this.settings);return null!=n&&this.imageCropped.emit(n),n}return null}aspectRatioIsCorrect(){return(this.cropper.x2-this.cropper.x1)/(this.cropper.y2-this.cropper.y1)===this.aspectRatio}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(Ft),t.Y36(Ut),t.Y36(kt),t.Y36(bt.H7),t.Y36(t.sBO))}
1,o.\u0275cmp=t.Xpm({type:o,selectors:[["image-cropper"]],viewQuery:function(e,i){if(1&e&&(t.Gf(wt,7),t.Gf(Tt,5)),2&e){let n;t.iGM(n=t.CRH())&&(i.wrapper=n.first),t.iGM(n=t.CRH())&&(i.sourceImage=n.first)}},hostVars:6,hostBindings:function(e,i){1&e&&t.NdJ("resize",function(){return i.onResize()},!1,t.Jf7)("mousemove",function(a){return i.moveImg(a)},!1,t.evT)("touchmove",function(a){return i.moveImg(a)},!1,t.evT)("mouseup",function(){return i.moveStop()},!1,t.evT)("touchend",function(){return i.moveStop()},!1,t.evT),2&e&&(t.Udp("text-align",i.alignImage),t.ekj("disabled",i.disabled)("ngx-ix-hidden",i.hidden))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",imageAltText:"imageAltText",format:"format",transform:"transform",maintainAspectRatio:"maintainAspectRatio",aspectRatio:"aspectRatio",resetCropOnAspectRatioChange:"resetCropOnAspectRatioChange",resizeToWidth:"resizeToWidth",resizeToHeight:"resizeToHeight",cropperMinWidth:"cropperMinWidth",cropperMinHeight:"cropperMinHeight",cropperMaxHeight:"cropperMaxHeight",cropperMaxWidth:"cropperMaxWidth",cropperStaticWidth:"cropperStaticWidth",cropperStaticHeight:"cropperStaticHeight",canvasRotation:"canvasRotation",initialStepSize:"initialStepSize",roundCropper:"roundCropper",onlyScaleDown:"onlyScaleDown",imageQuality:"imageQuality",autoCrop:"autoCrop",backgroundColor:"backgroundColor",containWithinAspectRatio:"containWithinAspectRatio",hideResizeSquares:"hideResizeSquares",allowMoveImage:"allowMoveImage",cropper:"cropper",alignImage:"alignImage",disabled:"disabled",hidden:"hidden"},outputs:{imageCropped:"imageCropped",startCropImage:"startCropImage",imageLoaded:"imageLoaded",cropperReady:"cropperReady",loadImageFailed:"loadImageFailed",transformChange:"transformChange"},features:[t.TTD],decls:5,vars:10,consts:[["wrapper",""],["class","ngx-ic-source-image",3,"src","visibility","transform","ngx-ic-draggable","load","mousedown","touchstart",4,"ngIf"],[1,"ngx-ic-overlay"],["class","ngx-ic-cropper","tabindex","0",3,"ngx-ic-round","top","left","width","height","margin-left","visibility","keydown",4,"ngIf"],[1,"ngx-ic-source-image",3,"src","load","mousedown","touchstart"],["sourceImage",""],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],[1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],[1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],[1,"ngx-ic-resize","ngx-ic-top"],[1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right"],[1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom"],[1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left"],[1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],[1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"]],template:function(e,i){1&e&&(t.TgZ(0,"div",null,0),t.YNc(2,Pt,2,8,"img",1),t._UZ(3,"div",2),t.YNc(4,It,3,15,"div",3),t.qZA()),2&e&&(t.Udp("background",i.imageVisible&&i.backgroundColor),t.xp6(2),t.Q6J("ngIf",i.safeImgDataUrl),t.xp6(1),t.Udp("width",i.maxSize.width,"px")("height",i.maxSize.height,"px")("margin-left","center"===i.alignImage?i.marginLeft:null),t.xp6(1),t.Q6J("ngIf",i.imageVisible))},dependencies:[v.O5],styles:['[_nghost-%COMP%]{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{width:100%;position:relative}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.ngx-ic-source-image[_ngcontent-%COMP%]{max-width:100%;max-height:100%;transform-origin:center}[_nghost-%COMP%] > div[_ngcontent-%COMP%] img.ngx-ic-source-image.ngx-ic-draggable[_ngcontent-%COMP%]{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}[_nghost-%COMP%] .ngx-ic-overlay[_ngcontent-%COMP%]{position:absolute;pointer-events:none;touch-action:none;
1outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{position:absolute;display:flex;color:#53535c;background:transparent;outline:rgba(255,255,255,.3) solid 100vw;outline:var(--cropper-outline-color, rgba(255, 255, 255, .3)) solid 100vw;touch-action:none}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]{outline-width:100vh}}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:after{position:absolute;content:"";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%]:focus .ngx-ic-move[_ngcontent-%COMP%]{border-color:#1e90ff;border-width:2px}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%]{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%] .ngx-ic-square[_ngcontent-%COMP%]{display:inline-block;background:#53535C;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topleft[_ngcontent-%COMP%]{top:-12px;left:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-top[_ngcontent-%COMP%]{top:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-topright[_ngcontent-%COMP%]{top:-12px;right:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-right[_ngcontent-%COMP%]{top:calc(50% - 12px);right:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomright[_ngcontent-%COMP%]{bottom:-12px;right:-12px;cursor:nwse-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-bottomleft[_ngcontent-%COMP%]{bottom:-12px;left:-12px;cursor:nesw-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize.ngx-ic-left[_ngcontent-%COMP%]{top:calc(50% - 12px);left:-12px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%]{position:absolute;z-index:1}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-top[_ngcontent-%COMP%]{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-right[_ngcontent-%COMP%]{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-bottom[_ngcontent-%COMP%]{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar.ngx-ic-left[_ngcontent-%COMP%]{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]{outline-color:transparent}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{border-radius:100%;box-shadow:0 0 0 100vw #ffffff4d;box-shadow:0 0 0 100vw var(--cropper-outline-color, rgba(255, 255, 255, .3))}@media (orientation: portrait){[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%]:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}[_nghost-%COMP%] .ngx-ic-cropper.ngx-ic-round[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{border-radius:100%}.disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-resize-bar[_ngcontent-%COMP%], .disabled[_nghost-%COMP%] .ngx-ic-cropper[_ngcontent-%COMP%] .ngx-ic-move[_ngcontent-%COMP%]{display:none}.ngx-ix-hidden[_nghost-%COMP%]{display:none}'],changeDetection:0}),o})(),Bt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)}
1,o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[[v.ez]]}),o})();function Wt(o,r){1&o&&(t.TgZ(0,"div",2),t._UZ(1,"app-icon",3),t.qZA()),2&o&&(t.xp6(1),t.Q6J("file","auth")("name","user"))}function Yt(o,r){if(1&o&&t._UZ(0,"img",4),2&o){const e=t.oxw();t.Q6J("src",e.path,t.LSH)}}let Gt=(()=>{class o{constructor(){this.path=""}ngOnInit(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-user-photo"]],inputs:{path:"path"},decls:2,vars:2,consts:[["class","empty",4,"ngIf"],["class","photo",3,"src",4,"ngIf"],[1,"empty"],[1,"image-avatar",3,"file","name"],[1,"photo",3,"src"]],template:function(e,i){1&e&&(t.YNc(0,Wt,2,2,"div",0),t.YNc(1,Yt,1,1,"img",1)),2&e&&(t.Q6J("ngIf",!i.path),t.xp6(1),t.Q6J("ngIf",i.path))},dependencies:[v.O5,Y.o],styles:["[_nghost-%COMP%]{display:block}app-icon[_ngcontent-%COMP%]{width:96px;height:96px;fill:#dadada;display:block}.empty[_ngcontent-%COMP%]{width:100%;min-width:280px;height:auto;min-height:320px;border:1px solid #E2E1DF;border-radius:4px;display:flex;align-items:center;justify-content:center}.empty[_ngcontent-%COMP%] app-icon[_ngcontent-%COMP%]{display:block}.photo[_ngcontent-%COMP%]{max-width:100%;width:auto;height:auto;max-height:500px}"]}),o})();function qt(o,r){if(1&o&&t._UZ(0,"app-user-photo",9),2&o){const e=t.oxw();t.Q6J("path",e.settingsData.pathToPhoto(e.Settings))}}function Vt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"image-cropper",10),t.NdJ("loadImageFailed",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.loadImageFailed(n))})("imageCropped",function(n){t.CHM(e);const a=t.oxw();return t.KtG(a.imageCropped(n))}),t.qZA()}if(2&o){const e=t.oxw();t.Q6J("imageFile",e.imageFile)("maintainAspectRatio",!0)("aspectRatio",1)("resizeToWidth",128)}}function Kt(o,r){if(1&o&&(t.TgZ(0,"div",11),t._UZ(1,"img",12),t.qZA()),2&o){const e=t.oxw();
1t.xp6(1),t.Q6J("src",e.croppedImageBase64,t.LSH)}}function Xt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",13)(1,"button",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.deleteAllPhoto())}),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&o){const e=t.oxw();t.xp6(1),t.Q6J("disabled",e.isLoading),t.xp6(1),t.Oqu(t.lcZ(3,2,"PHOTO.DELETE"))}}function jt(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",15)(1,"button",16),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.startUploadImages())}),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&o){const e=t.oxw();t.xp6(1),t.Q6J("disabled",e.isLoading),t.xp6(1),t.Oqu(t.lcZ(3,2,"PHOTO.SAVE"))}}const V=function(o){return{hidden:o}};let $t=(()=>{class o extends z.k{constructor(e,i,n,a,s){super(),this.auth=e,this.err=i,this.api=n,this.settings=a,this.logger=s,this.afterChangeImages=new t.vpe,this.startUploadBigPhoto$=new Mt.x,this.croppedImageBase64="",this.userDescription=this.auth.getUserDescription(),this.Settings=this.settings}ngOnInit(){this.clearAll()}clearAll(){this.imageFile=void 0,this.croppedImageBase64="",this.setLoading(!1)}setLoading(e){this.isLoading=e}afterSelectFile(e){this.logger.log("After select image file:",e),this.imageFile=e.file}imageCropped(e){this.logger.log("Image crop data:",e),this.croppedImageBase64=e.base64?e.base64:""}loadImageFailed(e){this.err.register("Wrong image file type"),this.clearAll()}startUploadImages(){this.setLoading(!0),this.uploadBigPhoto()}uploadBigPhoto(){this.startUploadBigPhoto$.next()}afterErrorUploadBigPhoto(e){this.clearAll()}afterUploadBigPhoto(e){this.uploadAvatar()}uploadAvatar(){const e={avatar:(0,At.H)(this.croppedImageBase64)};this.api.Get("userSettings/save",e,u.$m.edu,this.auth.SearchParams(),y.p9,u.XI.json).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>{this.logger.log("After upload avatar:",i),this.endUploadImages()},i=>this.err.register(i))}endUploadImages(){this.auth.UpdateUseDescription(void 0,!0),this.afterChangeImages.emit(),this.clearAll()}deleteAllPhoto(){this.setLoading(!0),this.api.Get("userSettings/save",{avatar:"",photo:""},u.$m.edu,this.auth.SearchParams(),y.lX,u.XI.json).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>{this.logger.log("After delete photo:",i),this.afterChangeImages.emit()},i=>this.err.register(i),()=>this.setLoading(!1))}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(L.e),t.Y36(Q.r),t.Y36(k.s),t.Y36(J.g),t.Y36(B.m))}
1,o.\u0275cmp=t.Xpm({type:o,selectors:[["sdo-profile-image"]],inputs:{settingsData:"settingsData"},outputs:{afterChangeImages:"afterChangeImages"},features:[t.qOj],decls:11,vars:20,consts:[[1,"photo"],[3,"path",4,"ngIf"],[3,"imageFile","maintainAspectRatio","aspectRatio","resizeToWidth","loadImageFailed","imageCropped",4,"ngIf"],[1,"commands",3,"ngClass"],["class","command avatar",4,"ngIf"],[1,"command","selectPhotoButton",3,"label","ownerType","ownerID","disabled","startUpload","autoUpload","clearAfterSelect","afterUpload","afterSelect","afterErrorUpload"],["class","command delete",4,"ngIf"],["class","command save",4,"ngIf"],[1,"loading",3,"ngClass"],[3,"path"],[3,"imageFile","maintainAspectRatio","aspectRatio","resizeToWidth","loadImageFailed","imageCropped"],[1,"command","avatar"],[1,"image",3,"src"],[1,"command","delete"],[1,"button","button-light",3,"disabled","click"],[1,"command","save"],[1,"button",3,"disabled","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,qt,1,1,"app-user-photo",1),t.YNc(2,Vt,1,4,"image-cropper",2),t.qZA(),t.TgZ(3,"div",3),t.YNc(4,Kt,2,1,"div",4),t.TgZ(5,"app-upload",5),t.NdJ("afterUpload",function(a){return i.afterUploadBigPhoto(a)})("afterSelect",function(a){return i.afterSelectFile(a)})("afterErrorUpload",function(a){return i.afterErrorUploadBigPhoto(a)}),t.ALo(6,"translate"),t.qZA(),t.YNc(7,Xt,4,4,"div",6),t.YNc(8,jt,4,4,"div",7),t.qZA(),t.TgZ(9,"div",8),t._UZ(10,"app-loader"),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",!i.imageFile),t.xp6(1),t.Q6J("ngIf",i.imageFile),t.xp6(1),t.Q6J("ngClass",t.VKq(16,V,i.isLoading)),t.xp6(1),t.Q6J("ngIf",i.croppedImageBase64),t.xp6(1),t.Q6J("label",t.lcZ(6,14,"PHOTO.SELECT"))("ownerType","userPhoto")("ownerID",i.userDescription.id)("disabled",i.isLoading)("startUpload",i.startUploadBigPhoto$.asObservable())("autoUpload",!1)("clearAfterSelect",!1),t.xp6(2),t.Q6J("ngIf",i.settingsData.photo&&!i.croppedImageBase64),t.xp6(1),t.Q6J("ngIf",i.croppedImageBase64),t.xp6(1),t.Q6J("ngClass",t.VKq(18,V,!i.isLoading)))},dependencies:[v.mk,v.O5,W.R,yt.o,Jt,Gt,A.X$],styles:["[_nghost-%COMP%]{display:block;padding:0 16px 16px}.photo[_ngcontent-%COMP%]{display:flex;justify-content:center}.photo[_ngcontent-%COMP%] app-user-photo[_ngcontent-%COMP%]{max-width:100%}@media (max-width: 767px){.photo[_ngcontent-%COMP%] app-user-photo[_ngcontent-%COMP%]{width:100%}}.photo[_ngcontent-%COMP%] image-cropper[_ngcontent-%COMP%]{width:300px}.hidden[_ngcontent-%COMP%]{visibility:hidden}.commands[_ngcontent-%COMP%]{display:flex;padding:8px 0}@media (max-width: 340px){.commands[_ngcontent-%COMP%]{padding:8px 0 0 8px}}.commands[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%}.commands[_ngcontent-%COMP%] .command[_ngcontent-%COMP%]{margin-right:16px;display:inline-flex;align-items:center}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:-30px}"]}),o})();const te=["onlyMobileElement"];function ee(o,r){1&o&&(t.TgZ(0,"div",5),t._UZ(1,"app-loader"),t.qZA())}function ie(o,r){1&o&&t._UZ(0,"app-loader",6),2&o&&t.Q6J("modal",!0)}function ne(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",43),t.ALo(1,"translate"),t.TgZ(2,"sdo-profile-image",44),t.NdJ("afterChangeImages",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.refreshData())}),t.qZA()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,3,"PHOTO.TITLE"))("manager",e.modalPhotoManager),t.xp6(2),t.Q6J("settingsData",e.serverData)}}function oe(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",45),t.ALo(1,"translate"),t.TgZ(2,"form",46,47),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.saveNewPassword())}),t._UZ(4,"sdo-form-field",48)(5,"sdo-form-field",48),t.TgZ(6,"div",49)(7,"button",50),t._uU(8),t.ALo(9,"translate"),t.qZA()()()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,7,"CHANGE_PASSWORD.TITLE"))("manager",e.modalChangePasswordManager)("displayCloseButton",e.mode!==e.modes.setPassword)("closeByHost",e.mode!==e.modes.setPassword),t.xp6(4),t.Q6J("fieldData",e.changePasswordFormData.password),t.xp6(1),t.Q6J("fieldData",e.changePasswordFormData.passwordConfirm),t.xp6(3),t.Oqu(t.lcZ(9,9,"CHANGE_PASSWORD.SAVE"))}}function ae(o,r){if(1&o&&t._UZ(0,"sdo-form-field",56),2&o){const e=r.$implicit,i=t.oxw(3);t.Q6J("fieldData",e)("readonly",i.disableContactBlock())}}function se(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.hideContactInformation)}}function re(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",43),t.ALo(1,"translate"),t.TgZ(2,"form",51,52),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(4,ae,1,2,"sdo-form-field",53),t.YNc(5,se,1,1,"sdo-form-field",54),t.TgZ(6,"div",49)(7,"button",55),t._uU(8),t.ALo(9,"translate"),t.qZA()()()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,5,"CONTACTS.TITLE"))("manager",e.modalContactsManager),t.xp6(4),t.Q6J("ngForOf",e.formData.contacts),t.xp6(1),t.Q6J("ngIf",e.formData.hideContactInformation),t.xp6(3),t.Oqu(t.lcZ(9,7,"SETTINGS.SAVE"))}}function ce(o,r){if(1&o&&t._UZ(0,"sdo-form-field",56),2&o){const e=r.$implicit,i=t.oxw(3);t.Q6J("fieldData",e)("readonly",i.disableAdditionalBlock())}}function le(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.hideAdditionalInformation)}}function de(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",43),t.ALo(1,"translate"),t.TgZ(2,"form",51,5
17),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(4,ce,1,2,"sdo-form-field",53),t.YNc(5,le,1,1,"sdo-form-field",54),t.TgZ(6,"div",49)(7,"button",55),t._uU(8),t.ALo(9,"translate"),t.qZA()()()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,5,"ADDITIONAL.TITLE"))("manager",e.modalAdditionalManager),t.xp6(4),t.Q6J("ngForOf",e.formData.additionalInfo),t.xp6(1),t.Q6J("ngIf",e.formData.hideAdditionalInformation),t.xp6(3),t.Oqu(t.lcZ(9,7,"SETTINGS.SAVE"))}}function ge(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyMailing)}}function pe(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyNewForumTopicsMailing)}}function he(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyNewMessagesMailing)}}function me(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",43),t.ALo(1,"translate"),t.TgZ(2,"form",51,58),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(4,ge,1,1,"sdo-form-field",54),t.YNc(5,pe,1,1,"sdo-form-field",54),t.YNc(6,he,1,1,"sdo-form-field",54),t.TgZ(7,"div",49)(8,"button",55),t._uU(9),t.ALo(10,"translate"),t.qZA()()()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,6,"NOTICE.TITLE"))("manager",e.modalNoticeManager),t.xp6(4),t.Q6J("ngIf",e.formData.denyMailing),t.xp6(1),t.Q6J("ngIf",e.formData.denyNewForumTopicsMailing),t.xp6(1),t.Q6J("ngIf",e.formData.denyNewMessagesMailing),t.xp6(3),t.Oqu(t.lcZ(10,8,"SETTINGS.SAVE"))}}function fe(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",59),t.ALo(1,"translate"),t._UZ(2,"app-pin-codes-list",60),t.TgZ(3,"div",49)(4,"button",61),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayNewPinCodeBlock())}),t._uU(5),t.ALo(6,"translate"),t.qZA()()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,4,"PIN_CODES.TITLE"))("manager",e.modalPinCodesManager),t.xp6(2),t.Q6J("pinCodes",e.serverData.pinCodes),t.xp6(3),t.Oqu(t.lcZ(6,6,"PIN_CODES.START_NEW"))}}function _e(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"app-custom-modal",62),t.ALo(1,"translate"),t.TgZ(2,"sdo-register-pin",63),t.NdJ("submitPin",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.activatePinCode())}),t.qZA()()}if(2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,3,"PIN_CODES.NEW_TITLE"))("manager",e.modalNewPinCodeManager),t.xp6(2),t.Q6J("formData",e.pinCodeFormData)}}function ue(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",66)(1,"input",67),t.NdJ("ngModelChange",function(n){t.CHM(e);const a=t.oxw(3);return t.KtG(a.currentLang=n)})("change",function(){t.CHM(e);const n=t.oxw(3);return t.KtG(n.saveUserLanguage())}),t.qZA(),t.TgZ(2,"label",68),t._uU(3),t.qZA()()}if(2&o){const e=r.$implicit,i=t.oxw(3);t.xp6(1),t.Q6J("ngModel",i.currentLang)("value",e.name)("id",e.name),t.xp6(1),t.Q6J("for",e.name),t.xp6(1),t.Oqu(e.label)}}function xe(o,r){if(1&o&&(t.TgZ(0,"app-custom-modal",59),t.ALo(1,"translate"),t.TgZ(2,"div",64),t.YNc(3,ue,4,5,"div",65),t.qZA()()),2&o){const e=t.oxw(2);t.Q6J("title",t.lcZ(1,3,"LANGUAGE.TITLE"))("manager",e.modalLanguageManager),t.xp6(3),t.Q6J("ngForOf",e.descriptionLangs)}}function Ce(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",69),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayModalPhotoBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","photo"),t.xp6(2),t.Oqu(t.lcZ(4,3,"PHOTO.ADD")))}function ve(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",72),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.changePassword())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","lock"),t.xp6(2),t.Oqu(t.lcZ(4,3,"SETTINGS.CHANGE_PASSWORD")))}function Me(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",73),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayContactsBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","contacts"),t.xp6(2),t.Oqu(t.lcZ(4,3,"CONTACTS.TITLE")))}function Ae(o,r){if(1&o){const e=t.EpF();
1t.TgZ(0,"div",74),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayAdditionalBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","reader"),t.xp6(2),t.Oqu(t.lcZ(4,3,"ADDITIONAL.TITLE")))}function ye(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",75),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayNoticeBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","notifications"),t.xp6(2),t.Oqu(t.lcZ(4,3,"NOTICE.TITLE")))}function be(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",76),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayPinCodesBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","pin"),t.xp6(2),t.Oqu(t.lcZ(4,3,"PIN_CODES.TITLE")))}function we(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",77),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayLanguageBlock())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","language"),t.xp6(2),t.Oqu(t.lcZ(4,3,"LANGUAGE.TITLE")))}function Te(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",78),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.out())}),t._UZ(1,"app-icon",70),t.TgZ(2,"div",71),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&o&&(t.xp6(1),t.Q6J("file","hardware")("name","exit"),t.xp6(2),t.Oqu(t.lcZ(4,3,"SETTINGS.LOGOUT")))}function Pe(o,r){if(1&o&&(t.TgZ(0,"div",79)(1,"div",80)(2,"span"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t._UZ(5,"app-period",81),t.qZA()()),2&o){const e=t.oxw(2);t.xp6(3),t.hij("",t.lcZ(4,4,"ACCESS.DESCRIPTION")," "),t.xp6(2),t.Q6J("start",e.serverData.accessTime.startDateAccess)("end",e.serverData.accessTime.endDateAccess)("hideTime",!1)}}function Se(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"sdo-avatar",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayModalPhotoBlock())}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("path",e.pathToAvatar)("big",!0)}}function Ie(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"sdo-avatar",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayMyCard())}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("path",e.pathToAvatar)("big",!0)}}function Oe(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"a",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayModalPhotoBlock())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&o&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"PHOTO.ADD")))}function Ze(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"a",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.changePassword())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&o&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"SETTINGS.CHANGE_PASSWORD")))}function Re(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"a",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.out())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&o&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"SETTINGS.LOGOUT")))}function De(o,r){if(1&o&&t._UZ(0,"sdo-form-field",56),2&o){const e=r.$implicit,i=t.oxw(3);t.Q6J("fieldData",e)("readonly",i.disableContactBlock())}}function Ee(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.hideContactInformation)}}function Fe(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",82)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"form",83,52),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(6,De,1,2,"sdo-form-field",53),t.YNc(7,Ee,1,1,"sdo-form-field",54),t.TgZ(8,"button",55),t._uU(9),t.ALo(10,"translate"),t.qZA()()()}if(2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,4,"CONTACTS.TITLE")),t.xp6(4),t.Q6J("ngForOf",e.formData.contacts),t.xp6(1),t.Q6J("ngIf",e.formData.hideContactInformation),t.xp6(2),t.Oqu(t.lcZ(10,6,"SETTINGS.SAVE"))}}function Ue(o,r){if(1&o&&t._UZ(0,"sdo-form-field",56),2&o){const e=r.$implicit,i=t.oxw(3);t.Q6J("fieldData",e)("readonly",i.disableAdditionalBlock())}}function Ne(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.hideAdditionalInformation)}}function He(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",84)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"form",83,57),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(6,Ue,1,2,"sdo-form-field",53),t.YNc(7,Ne,1,1,"sdo-form-field",54),t.TgZ(8,"button",55),t._uU(9),t.ALo(10,"translate"),t.qZA()()()}if(2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,4,"ADDITIONAL.TITLE")),t.xp6(4),t.Q6J("ngForOf",e.formData.additionalInfo),t.xp6(1),t.Q6J("ngIf",e.formData.hideAdditionalInformation),t.xp6(2),t.Oqu(t.lcZ(10,6,"SETTINGS.SAVE"))}}function ze(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyMailing)}}function Qe(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyNewForumTopicsMailing)}}function Le(o,r){if(1&o&&t._UZ(0,"sdo-form-field",48),2&o){const e=t.oxw(3);t.Q6J("fieldData",e.formData.denyNewMessagesMailing)}}function ke(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",85)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"form",83,58),t.NdJ("ngSubmit",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.submit())}),t.YNc(6,ze,1,1,"sdo-form-field",54),t.YNc(7,Qe,1,1,"sdo-form-field",54),t.YNc(8,Le,1,1,"sdo-form-field",54),t.TgZ(9,"button",55),t._uU(10),t.ALo(11,"translate"),t.qZA()()()}if(2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,5,"NOTICE.TITLE")),t.xp6(4),t.Q6J("ngIf",e.formData.denyMailing),t.xp6(1),t.Q6J("ngIf",e.formData.denyNewForumTopicsMailing),t.xp6(1),t.Q6J("ngIf",e.formData.denyNewMessagesMailing),t.xp6(2),t.Oqu(t.lcZ(11,7,"SETTINGS.SAVE"))}}function Je(o,r){if(1&o&&(t.TgZ(0,"div",86)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"div",87)(5,"span"),t._uU(6),t.ALo(7,"translate"),t.qZA(),t._UZ(8,"a
1pp-period",81),t.qZA()()),2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,5,"ACCESS.TITLE")),t.xp6(4),t.hij("",t.lcZ(7,7,"ACCESS.DESCRIPTION")," "),t.xp6(2),t.Q6J("start",e.serverData.accessTime.startDateAccess)("end",e.serverData.accessTime.endDateAccess)("hideTime",!1)}}function Be(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",88)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t._UZ(4,"app-pin-codes-list",60),t.TgZ(5,"div",89)(6,"a",90),t.NdJ("click",function(){t.CHM(e);const n=t.oxw(2);return t.KtG(n.displayNewPinCodeBlock())}),t._uU(7),t.ALo(8,"translate"),t.qZA()()()}if(2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,3,"PIN_CODES.TITLE")),t.xp6(2),t.Q6J("pinCodes",e.serverData.pinCodes),t.xp6(3),t.Oqu(t.lcZ(8,5,"PIN_CODES.START_NEW"))}}function We(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",66)(1,"input",67),t.NdJ("ngModelChange",function(n){t.CHM(e);const a=t.oxw(3);return t.KtG(a.currentLang=n)})("change",function(){t.CHM(e);const n=t.oxw(3);return t.KtG(n.saveUserLanguage())}),t.qZA(),t.TgZ(2,"label",68),t._uU(3),t.qZA()()}if(2&o){const e=r.$implicit,i=t.oxw(3);t.xp6(1),t.Q6J("ngModel",i.currentLang)("value",e.name)("id",e.name),t.xp6(1),t.Q6J("for",e.name),t.xp6(1),t.Oqu(e.label)}}function Ye(o,r){if(1&o&&(t.TgZ(0,"div",91)(1,"h6"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"div",92),t.YNc(5,We,4,5,"div",65),t.qZA()()),2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(t.lcZ(3,2,"LANGUAGE.TITLE")),t.xp6(3),t.Q6J("ngForOf",e.descriptionLangs)}}function Ge(o,r){if(1&o){const e=t.EpF();t.TgZ(0,"div",7),t.YNc(1,ne,3,5,"app-custom-modal",8),t.YNc(2,oe,10,11,"app-custom-modal",9),t.YNc(3,re,10,9,"app-custom-modal",8),t.YNc(4,de,10,9,"app-custom-modal",8),t.YNc(5,me,11,10,"app-custom-modal",8),t.YNc(6,fe,7,8,"app-custom-modal",10),t.YNc(7,_e,3,5,"app-custom-modal",11),t.YNc(8,xe,4,5,"app-custom-modal",10),t.TgZ(9,"div",12)(10,"div",13)(11,"sdo-avatar",14),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.displayMyCard())}),t.qZA()(),t.TgZ(12,"div",15)(13,"div",16),t._uU(14),t.qZA(),t.TgZ(15,"div",17),t._uU(16),t.qZA()()(),t.TgZ(17,"div",18),t.YNc(18,Ce,5,5,"div",19),t.YNc(19,ve,5,5,"div",20),t.YNc(20,Me,5,5,"div",21),t.YNc(21,Ae,5,5,"div",22),t.YNc(22,ye,5,5,"div",23),t.YNc(23,be,5,5,"div",24),t.YNc(24,we,5,5,"div",25),t.YNc(25,Te,5,5,"div",26),t.YNc(26,Pe,6,6,"div",27),t.qZA(),t.TgZ(27,"div",28)(28,"div",29),t.YNc(29,Se,1,2,"sdo-avatar",30),t.YNc(30,Ie,1,2,"sdo-avatar",30),t.qZA(),t.TgZ(31,"div",31)(32,"div",15)(33,"h6"),t._uU(34),t.qZA(),t.TgZ(35,"div",32),t._uU(36),t.qZA()(),t.TgZ(37,"div",33),t.YNc(38,Oe,3,3,"a",34),t.YNc(39,Ze,3,3,"a",34),t.TgZ(40,"a",35),t.NdJ("click",function(){t.CHM(e);const n=t.oxw();return t.KtG(n.displayMyCard())}),t._uU(41),t.ALo(42,"translate"),t.qZA(),t.YNc(43,Re,3,3,"a",34),t.qZA()()(),t.TgZ(44,"div",36)(45,"div",29),t.YNc(46,Fe,11,8,"div",37),t.YNc(47,He,11,8,"div",38),t.qZA(),t.TgZ(48,"div",31),t.YNc(49,ke,12,9,"div",39),t.YNc(50,Je,9,9,"div",40),t.YNc(51,Be,9,7,"div",41),t.YNc(52,Ye,6,4,"div",42),t.qZA()()()}if(2&o){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.modalPhotoBlockVisibility),t.xp6(1),t.Q6J("ngIf",e.modalChangePasswordVisibility),t.xp6(1),t.Q6J("ngIf",e.modalContactsVisibility),t.xp6(1),t.Q6J("ngIf",e.modalAdditionalVisibility),t.xp6(1),t.Q6J("ngIf",e.modalNoticeVisibility),t.xp6(1),t.Q6J("ngIf",e.modalPinCodesVisibility),t.xp6(1),t.Q6J("ngIf",e.modalNewPinCodeBlockVisibility),t.xp6(1),t.Q6J("ngIf",e.modalLanguageVisibility),t.xp6(3),t.Q6J("path",e.pathToAvatar)("big",!0),t.xp6(3),t.Oqu(e.userDescription.name),t.xp6(2),t.hij("(",e.userDescription.login,")"),t.xp6(2),t.Q6J("ngIf",!e.disableProfilePhoto()),t.xp6(1),t.Q6J("ngIf",!e.disableChangePassword()),t.xp6(1),t.Q6J("ngIf",e.formData.contacts&&e.formData.contacts.length),t.xp6(1),t.Q6J("ngIf",e.formData.additionalInfo&&e.formData.additionalInfo.length),t.xp6(1),t.Q6J("ngIf",!e.disableNoticeBlock()),t.xp6(1),t.Q6J("ngIf",e.serverData.pinCodes&&e.serverData.pinCodes.using),t.xp6(1),t.Q6J("ngIf",e.displayChangeLanguageBlock()),t.xp6(1),t.Q6J("ngIf",e.displayLogOut),t.xp6(1),t.Q6J("ngIf",e.serverData&&e.serverData.accessTime),t.xp6(3),t.Q6J("ngIf",!e.disableProfilePhoto()),t.xp6(1),t.Q6J("ngIf",e.disableProfilePhoto()),t.xp6(4),t.Oqu(e.userDescription.name),t.xp6(2),t.hij("(",e.userDescription.login,")"),t.xp6(2),t.Q6J("ngIf",!e.disableProfilePhoto()),t.xp6(1),t.Q6J("ngIf",!e.disableChangePassword()),t.xp6(2),t.Oqu(t.lcZ(42,35,"SETTINGS.MY_CARD")),t.xp6(2),t.Q6J("ngIf",e.displayLogOut),t.xp6(3),t.Q6J("ngIf",e.formData.contacts&&e.formData.contacts.length),t.xp6(1),t.Q6J("ngIf",e.formData.additionalInfo&&e.formData.additionalInfo.length),t.xp6(2),t.Q6J("ngIf",!e.disableNoticeBlock()),t.xp6(1),t.Q6J("ngIf",e.serverData&&e.serverData.accessTime),t.xp6(1),t.Q6J("ngIf",e.serverData.pinCodes&&e.serverData.pinCodes.using),t.xp6(1),t.Q6J("ngIf",e.serverData&&e.displayChangeLanguageBlock())}}let qe=(()=>{class o extends z.k{constructor(e,i,n,a,s,c,l,g,h,p,C){super(),this.api=e,this.auth=i,this.err=n,this.translate=a,this.settings=s,this.alert=c,this.user=l,this.notifications=g,this.activatedRoute=h,this.router=p,this.logger=C,this.pathToAvatar="",this.isLoading=!1,this.isSaving=!1,this.mode="",this.modes=y.kl,this.modalPhotoManager=new b.X(!1),this.modalPhotoBlockVisibility=!1,this.modalNewPinCodeManager=new b.X(!1),this.modalNewPinCodeBlockVisibility=!1,this.modalChangePasswordManager=new b.X(!1),this.modalChangePasswordVisibility=!1,this.modalContactsManager=new b.X(!1),this.modalContactsVisibility=!1,this.modalAdditionalManager=new b.X(!1),this.modalAdditionalVisibility=!1,this.modalNoticeManager=new b.X(!1),this.modalNoticeVisibility=!1,this.modalPinCodesManager=new b.X(!1),this.modalPinCodesVisibility=!1,this.modalLanguageManager=new b.X(!1),this.modalLanguageVisibility=!1,this.displayLogOut=!1,this.descriptionLangs=F.S.descriptionLangs(),this.currentLang=F.S.get(this.translate),this.displayLogOut=this.auth.availableSignOut()}ngOnInit(){this.getData(),this.initChangePasswordFormData(),this.initPinCodeFormData(),this.activatedRoute.params.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>{this.mode="mode"in e?e.mode:"",this.setMode()}),this.auth.OnChangeUserData$.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>{this.userDescription=e,this.pathToAvatar=this.userDescription.pathToAvatar(this.settings)},e=>this.err.register(e)),this.modalPhotoManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalPhotoBlockVisibility=e,e=>this.err.register(e)),this.modalNewPinCodeManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalNewPinCodeBlockVisibility=e,e=>this.err.register(e)),this.modalChangePasswordManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>{this.modalChangePasswordVisibility=e},e=>this.err.register(e)),this.modalContactsManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalContactsVisibility=e,e=>this.err.register(e)),this.modalAdditionalManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalAdditionalVisibility=e,e=>this.err.register(e)),this.modalNoticeManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalNoticeVisibility=e,e=>this.err.register(e)),this.modalPinCodesManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalPinCodesVisibility=e,e=>this.err.register(e)),this.modalLanguageManager.pipe((0,m.R)(this.ngUnsubscribe)).subscribe(e=>this.modalLanguageVisibility=e,e=>this.err.register(e))}setMode(){this.mode===this.modes.setPassword&&this.changePassword()}refreshData(){this.getData(),this.notifications.RefreshFromServer(),this.modalPhotoManager.next(!1)}initPinCodeFormData(){this.pinCodeFormData=new y.d}initChangePasswordFormData(){this.changePasswordFormData=void 0;const e=(i,n)=>
1{const a={field:{id:"password",name:i,typeInput:"password",required:!0,confirm:!0,confirmName:n,typeValue:"string",variants:void 0,description:"",readonly:!1},value:"",startValue:"",confirmedField:void 0,source:void 0};this.changePasswordFormData={password:a,passwordConfirm:{field:a.field,value:"",startValue:"",confirmedField:a,source:void 0}}};this.translate.get(["CHANGE_PASSWORD.FIELD","CHANGE_PASSWORD.FIELD_CONFIRM"]).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>e(i["CHANGE_PASSWORD.FIELD"],i["CHANGE_PASSWORD.FIELD_CONFIRM"]),i=>this.err.register(i))}getData(){this.isLoading=!0,this.formData=void 0,this.getServerData$().pipe((0,lt.b)(e=>{this.logger.log("Profile settings data:",e),this.serverData=e}),(0,dt.b)(e=>this.getFormData$(e)),(0,m.R)(this.ngUnsubscribe)).subscribe(e=>{this.formData=e,this.logger.log("Profile form data:",this.formData)},e=>{this.err.register(e),this.isLoading=!1},()=>this.isLoading=!1)}getServerData$(){return this.api.Get("userSettings/get",{},u.$m.edu,this.auth.SearchParams(),y.GN,u.XI.json)}getFormData$(e){const i={denyMailing:void 0,denyNewMessagesMailing:void 0,denyNewForumTopicsMailing:void 0,hideContactInformation:void 0,hideAdditionalInformation:void 0},n=s=>`FIXED_FORM_DATA.${s}`;return this.translate.get(Object.keys(i).map(s=>n(s))).pipe((0,gt.U)(s=>{for(const l of Object.keys(i))i[l]={field:{id:l,name:s&&n(l)in s?s[n(l)]:l,typeInput:"text",required:!1,typeValue:"boolean",variants:void 0,description:"",confirm:!1,confirmName:"",readonly:!1},value:e[l],startValue:e[l],confirmedField:void 0,source:void 0};return{...i,contacts:e.contactInformation?e.contactInformation.formFieldsData:[],additionalInfo:e.additionalInformation?e.additionalInformation.formFieldsData:[]}}))}submit(){if(!this.formData)return;this.isSaving=!0;const e={};for(const i of Object.keys(this.formData)){const n=this.formData[i];if(Array.isArray(n)){const a=n.filter(s=>s.startValue!==s.value);a.length&&(e[i]=a.map(s=>{if("contacts"===i){const c=s.source;return{num:c.numString,value:s.value,kind:c.kind,type:c.type}}if("additionalInfo"===i){const c=s.source;return{propertyId:c.property,typeValue:c.typeValue,value:s.value}}}))}else n.startValue!==n.value&&(e[i]=n.value)}return this.logger.log("Save settings request data:",e),this.api.Get("userSettings/save",e,u.$m.edu,this.auth.SearchParams(),y.sC,u.XI.json).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>{this.logger.log("Save settings response:",i),i&&i.operationComplete&&(this.resetStartValues(),this.translate.get("SETTINGS.SAVE_COMPLETE").subscribe(n=>{this.isMobile()?(this.modalAdditionalManager.next(!1),this.modalContactsManager.next(!1),this.modalNoticeManager.next(!1)):this.alert.Open({text:n})},n=>this.err.register(n)))},i=>{this.err.register(i),this.isSaving=!1},()=>this.isSaving=!1)}resetStartValues(){if(this.formData)for(const e of Object.keys(this.formData)){const i=this.formData[e];if(Array.isArray(i))for(const n of i)n.startValue=n.value;else i.startValue=i.value}}out(){return this.auth.SignOut(),!1}displayMyCard(){return this.user.Open(this.userDescription.id,this.userDescription.name),!1}saveNewPassword(){if(this.changePasswordFormData)return this.isSaving=!0,this.modalChangePasswordManager.next(!1),this.api.Get("user/password/change",{changePasswordData:[{name:"password",value:this.changePasswordFormData.password.value}]},u.$m.users,this.auth.SearchParams(),y.N5,u.XI.json).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>{this.logger.log("Change password response:",i),i&&i.operationComplete&&(this.initChangePasswordFormData(),this.translate.get("CHANGE_PASSWORD.SUCCESS").subscribe(n=>{this.isMobile()||this.alert.Open({text:n})},n=>this.err.register(n)),this.mode===this.modes.setPassword&&(this.mode="",this.router.navigate(["/profile"],{replaceUrl:!0})))},i=>{this.err.register(i),this.isSaving=!1},()=>this.isSaving=!1)}activatePinCode(){this.pinCodeFormData.isLoading=!0;const e={pinCode:this.pinCodeFormData.pinCodeData.value};return this.pinCodeFormData.additionalInformation.length&&(e.pinCodeOption=this.pinCodeFormData.additionalInformation[0].value),this.api.Get("userSettings/pinCodes/activate",e,u.$m.edu,this.auth.SearchParams(),y.mx,u.XI.json).pipe((0,m.R)(this.ngUnsubscribe)).subscribe(i=>{this.logger.log("Activate pin code response:",i),this.pinCodeFormData.errorCode=i.codeError,this.pinCodeFormData.additionalInformation=i.requiredOption?[i.availableOptions]:[],!this.pinCodeFormData.errorCode&&i.availableForActivate&&(i.notification?this.alert.Open({text:i.notification}):this.translate.get("PIN_CODES.SUCCESS").subscribe(n=>{this.isMobile()||this.alert.Open({text:n})},n=>this.err.register(n)),this.modalNewPinCodeManager.next(!1),this.initPinCodeFormData(),this.getData())},i=>this.err.register(i),()=>this.pinCodeFormData.isLoading=!1)}changePassword(){return this.modalChangePasswordManager.next(!0),!1}displayNewPinCodeBlock(){return this.modalNewPinCodeManager.next(!0),!1}displayModalPhotoBlock(){if(!this.disableProfilePhoto())return this.modalPhotoManager.next(!0),!1}displayContactsBlock(){return this.modalContactsManager.next(!0),!1}displayAdditionalBlock(){return this.modalAdditionalManager.next(!0),!1}displayNoticeBlock(){if(!this.disableNoticeBlock())return this.modalNoticeManager.next(!0),!1}displayPinCodesBlock(){return this.modalPinCodesManager.next(!0),!1}displayChangeLanguageBlock(){return this.settings.AllowChangeUserLanguage()}displayLanguageBlock(){return this.modalLanguageManager.next(!0),!1}saveUserLanguage(){this.settings.SaveUserLanguage(this.currentLang),this.isSaving=!0,setTimeout(()=>{location.reload()},1500)}
1isMobile(){return!!this.onlyMobileElement&&null!==this.onlyMobileElement.nativeElement.offsetParent}disableProfilePhoto(){if(this.settings.ESSIntegration())return!0;const e=this.settings.Users();return"disableProfilePhoto"in e&&e.disableProfilePhoto}disableChangePassword(){return this.settings.ESSIntegration()}disableAdditionalBlock(){const e=this.settings.Users();return"disableProfileAdditional"in e&&e.disableProfileAdditional}disableContactBlock(){const e=this.settings.Users();return"disableProfileContacts"in e&&e.disableProfileContacts}disableNoticeBlock(){const e=this.settings.Users();return"disableProfileNotice"in e&&e.disableProfileNotice}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(k.s),t.Y36(L.e),t.Y36(Q.r),t.Y36(A.sK),t.Y36(J.g),t.Y36(pt.c),t.Y36(ht.K),t.Y36(mt.T),t.Y36(O.gz),t.Y36(O.F0),t.Y36(B.m))},o.\u0275cmp=t.Xpm({type:o,selectors:[["sdo-profile-settings"]],viewQuery:function(e,i){if(1&e&&t.Gf(te,7),2&e){let n;t.iGM(n=t.CRH())&&(i.onlyMobileElement=n.first)}},features:[t.qOj],decls:5,vars:3,consts:[["class","loader",4,"ngIf"],[3,"modal",4,"ngIf"],["class","body",4,"ngIf"],[1,"mobileMarker"],["onlyMobileElement",""],[1,"loader"],[3,"modal"],[1,"body"],[3,"title","manager",4,"ngIf"],[3,"title","manager","displayCloseButton","closeByHost",4,"ngIf"],["class","modal-pins",3,"title","manager",4,"ngIf"],["class","modal-new-pin",3,"title","manager",4,"ngIf"],[1,"headMobile"],[1,"avatar"],[1,"avatar",3,"path","big","click"],[1,"name"],[1,"subtitle-2","title"],[1,"caption","login"],[1,"bodyMobile"],["class","element addPhoto",3,"click",4,"ngIf"],["class","element changePassword",3,"click",4,"ngIf"],["class","element contacts",3,"click",4,"ngIf"],["class","element additional",3,"click",4,"ngIf"],["class","element notice",3,"click",4,"ngIf"],["class","element pinCodes",3,"click",4,"ngIf"],["class","element language",3,"click",4,"ngIf"],["class","element logout",3,"click",4,"ngIf"],["class","element access",4,"ngIf"],[1,"head"],[1,"left"],["class","avatar",3,"path","big","click",4,"ngIf"],[1,"right"],[1,"login"],[1,"links"],["class","link",3,"click",4,"ngIf"],[1,"link",3,"click"],[1,"settings"],["class","block contacts",4,"ngIf"],["class","block additional",4,"ngIf"],["class","block notice",4,"ngIf"],["class","block access",4,"ngIf"],["class","block pinCodes",4,"ngIf"],["class","block language",4,"ngIf"],[3,"title","manager"],[3,"settingsData","afterChangeImages"],[3,"title","manager","displayCloseButton","closeByHost"],["ngNativeValidate","",1,"modal-form",3,"ngSubmit"],["changePasswordForm","ngForm"],[1,"field",3,"fieldData"],[1,"modal-submit"],["type","submit",1,"button"],[1,"modal-form",3,"ngSubmit"],["contactsForm","ngForm"],["class","field",3,"fieldData","readonly",4,"ngFor","ngForOf"],["class","field",3,"fieldData",4,"ngIf"],["type","submit",1,"button","button-light"],[1,"field",3,"fieldData","readonly"],["additionalForm","ngForm"],["noticeForm","ngForm"],[1,"modal-pins",3,"title","manager"],[1,"pinCodesList",3,"pinCodes"],[1,"button",3,"click"],[1,"modal-new-pin",3,"title","manager"],[3,"formData","submitPin"],[1,"modal-langs"],["class","lang",4,"ngFor","ngForOf"],[1,"lang"],["type","radio","name","variants",3,"ngModel","value","id","ngModelChange","change"],[3,"for"],[1,"element","addPhoto",3,"click"],[1,"element-icon",3,"file","name"],[1,"element-label"],[1,"element","changePassword",3,"click"],[1,"element","contacts",3,"click"],[1,"element","additional",3,"click"],[1,"element","notice",3,"click"],[1,"element","pinCodes",3,"click"],[1,"element","language",3,"click"],[1,"element","logout",3,"click"],[1,"element","access"],[1,"caption","description"],[3,"start","end","hideTime"],[1,"block","contacts"],[3,"ngSubmit"],[1,"block","additional"],[1,"block","notice"],[1,"block","access"],[1,"description"],[1,"block","pinCodes"],[1,"addNew"],["href","",3,"click"],[1,"block","language"],[1,"langs"]],template:function(e,i){1&e&&(t.YNc(0,ee,2,0,"div",0),t.YNc(1,ie,1,1,"app-loader",1),t.YNc(2,Ge,53,37,"div",2),t._UZ(3,"div",3,4)),2&e&&(t.Q6J("ngIf",i.isLoading),t.xp6(1),t.Q6J("ngIf",i.isSaving),t.xp6(1),t.Q6J("ngIf",i.formData&&i.changePasswordFormData&&i.pinCodeFormData&&i.serverData&&!i.isLoading))},dependencies:[v.sg,v.O5,W.R,ft.z,Y.o,_t.R,ut.h,w._Y,w.Fj,w._,w.JJ,w.JL,w.On,w.F,xt.w,Ct.K,vt.A,$t,A.X$],styles:["[_nghost-%COMP%]{display:block}sdo-form-field[_ngcontent-%COMP%]{margin-bottom:24px}app-custom-modal[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{padding:16px}@media (max-width: 767px){app-custom-modal[_ngcontent-%COMP%] .modal
1-form[_ngcontent-%COMP%]{padding:16px 16px 88px}}@media (max-width: 767px){.modal-submit[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;padding:16px 20px;display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;background:#FFFFFF;box-shadow:0 0 4px #00000040}.modal-submit[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:40px;width:100%}}.modal-pins[_ngcontent-%COMP%] .pinCodesList[_ngcontent-%COMP%]{padding:16px}.modal-new-pin[_ngcontent-%COMP%]{z-index:2002}.modal-langs[_ngcontent-%COMP%]{padding:8px 20px 20px}.modal-langs[_ngcontent-%COMP%] .lang[_ngcontent-%COMP%]{margin-top:16px}.modal-langs[_ngcontent-%COMP%] .lang[_ngcontent-%COMP%]:first-child{margin-top:0}@media (max-width: 767px){.loader[_ngcontent-%COMP%]{padding-top:48px}}.body[_ngcontent-%COMP%] .headMobile[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:24px 16px 16px}@media (min-width: 768px){.body[_ngcontent-%COMP%] .headMobile[_ngcontent-%COMP%]{display:none}}.body[_ngcontent-%COMP%] .headMobile[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{padding-top:16px}.body[_ngcontent-%COMP%] .headMobile[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .headMobile[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{text-align:center}.body[_ngcontent-%COMP%] .bodyMobile[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media (min-width: 768px){.body[_ngcontent-%COMP%] .bodyMobile[_ngcontent-%COMP%]{display:none}}.body[_ngcontent-%COMP%] .bodyMobile[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{color:#464540;padding:16px;display:block;box-sizing:border-box;display:flex;line-height:1.5rem;border-bottom:1px solid #EFEFED}.body[_ngcontent-%COMP%] .bodyMobile[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .element-icon[_ngcontent-%COMP%]{flex:0 0 auto;fill:#737169;height:24px;width:24px;margin-right:16px}.body[_ngcontent-%COMP%] .bodyMobile[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] .element-label[_ngcontent-%COMP%]{flex:1 1 auto;font-size:1rem}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%]{padding:24px 24px 6px;display:flex;align-items:center}@media (max-width: 767px){.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%]{display:none}}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{flex:0 0 auto;padding:0 24px 0 0}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{cursor:pointer}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{flex:1 1 100%}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] h6[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{display:block;margin-right:8px}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{color:#949287}.body[_ngcontent-%COMP%] .head[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] .links[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{margin-right:16px}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%]{display:flex;flex-direction:row;padding-bottom:32px}@media (max-width: 767px){.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%]{display:none}}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:16px}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .block[_ngcontent-%COMP%]{margin-bottom:24px;padding:16px 18px}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .language[_ngcontent-%COMP%] .langs[_ngcontent-%COMP%] .lang[_ngcontent-%COMP%]{margin-top:16px}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .language[_ngcontent-%COMP%] .langs[_ngcontent-%COMP%] .lang[_ngcontent-%COMP%]:first-child{margin-top:0}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-top:32px solid #F5F6FA;border-left:16px solid #F5F6FA;border-right:16px solid #F5F6FA;flex:1 1 50%}@media (max-width: 767px){.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border:none}}.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-top:32px solid #F5F6FA;border-left:16px solid #F5F6FA;border-right:16px solid #F5F6FA;flex:1 1 50%}@media (max-width: 767px){.body[_ngcontent-%COMP%] .settings[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border:none}}@media (min-width: 768px){.mobileMarker[_ngcontent-%COMP%]{display:none}}"]}),o})(),K=(()=>{class o{constructor(e){this.translate=e,this.isPage=!0,F.S.init(this.translate)}}return o.\u0275fac=function(e){return new(e||o)(t.Y36(A.sK))},o.\u0275cmp=t.Xpm({type:o,selectors:[["sdo-profile"]],hostVars:2,hostBindings:function(e,i){2&e&&t.ekj("page-host",i.isPage)},decls:9,vars:4,consts:[[1,"page-nav"],[1,"page-body"],[1,"container"],[1,"head"],[3,"displayVersion"]],template:function(e,i){1&e&&(t._UZ(0,"sdo-app-nav",0),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"h5"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t._UZ(7,"sdo-profile-settings"),t.qZA(),t._UZ(8,"a
1pp-copyright",4),t.qZA()),2&e&&(t.xp6(5),t.Oqu(t.lcZ(6,2,"SETTINGS.TITLE")),t.xp6(3),t.Q6J("displayVersion",!0))},dependencies:[rt.r,ct.l,qe,A.X$],styles:[".head[_ngcontent-%COMP%]{padding:32px 16px 0}@media (max-width: 767px){.head[_ngcontent-%COMP%]{display:none}}@media (max-width: 767px){app-copyright[_ngcontent-%COMP%]{display:none}}"]}),o})();const Ve=[{path:"",component:K,children:[]},{path:"mode/:mode",component:K,children:[]}];let Ke=(()=>{class o{constructor(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[O.Bz.forChild(Ve),O.Bz]}),o})();var X=d(4178),Xe=d(379),je=d(6930),$e=d(6817),ti=d(8538),ei=d(7576);let ii=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[v.ez,A.aw,X.e,w.u5,je.u,Bt,$e.z,ei.d,ti.z]}),o})();var j=d(529),ni=d(4844),oi=d(443);function $(o){return new ni.z(o,[{prefix:"./assets/i18n/modules/root/",suffix:".json"},{prefix:"./assets/i18n/modules/profile/",suffix:".json"},...oi.Qg])}let ai=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[v.ez,Ke,O.Bz,A.aw.forChild({loader:{provide:A.Zw,useFactory:$,deps:[j.eN]},isolate:!0}),j.JF,X.e,Xe.n,ii]}),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.