PageSourceSearch

https://vcbdigibank.vietcombank.com.vn/default-node_modules_ngx-im…0_ngx-image-cropper_mjs.caf12aebe5ae30b6.js

js vietcombank.com.vn collected 2026-09-24 09:14:24 UTC 45,553 bytes, 1 lines download raw bytes

1(self.webpackChunkdigibank_omni=self.webpackChunkdigibank_omni||[]).push([["default-node_modules_ngx-image-cropper_fesm2020_ngx-image-cropper_mjs","node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-_5cc20","node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-_5cc21"],{25391:($,B,C)=>{C.r(B),C.d(B,{CropService:()=>j,CropperSettings:()=>H,ImageCropperComponent:()=>se,ImageCropperModule:()=>he,LoadImageService:()=>Y,base64ToFile:()=>ce,resizeCanvas:()=>L});var d=C(15861),a=C(98056),I=C(54122),z=C(65893),y=C(33635),b=C(75950);const E=["wrapper"],O=["sourceImage"];function S(s,h){if(1&s){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"img",4,5),a.\u0275\u0275listener("load",function(){a.\u0275\u0275restoreView(e);const i=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(i.imageLoadedInView())})("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Drag))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Drag))})("error",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.loadImageError(i))}),a.\u0275\u0275elementEnd()}if(2&s){const e=a.\u0275\u0275nextContext();a.\u0275\u0275styleProp("visibility",e.imageVisible?"visible":"hidden")("transform",e.safeTransformStyle),a.\u0275\u0275classProp("ngx-ic-draggable",!e.disabled&&e.allowMoveImage),a.\u0275\u0275property("src",e.safeImgDataUrl,a.\u0275\u0275sanitizeUrl),a.\u0275\u0275attribute("alt",e.imageAltText)}}function R(s,h){if(1&s){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementContainerStart(0),a.\u0275\u0275elementStart(1,"span",9),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"topleft"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"topleft"))}
1),a.\u0275\u0275element(2,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(3,"span",11),a.\u0275\u0275element(4,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(5,"span",12),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"topright"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"topright"))}),a.\u0275\u0275element(6,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(7,"span",13),a.\u0275\u0275element(8,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(9,"span",14),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottomright"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottomright"))}
1),a.\u0275\u0275element(10,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(11,"span",15),a.\u0275\u0275element(12,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(13,"span",16),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottomleft"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottomleft"))}),a.\u0275\u0275element(14,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(15,"span",17),a.\u0275\u0275element(16,"span",10),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(17,"span",18),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"top"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"top"))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(18,"span",19),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"right"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"right"))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(19,"span",20),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottom"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"bottom"))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementStart(20,"span",21),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"left"))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext(2);return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Resize,"left"))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275elementContainerEnd()}}function A(s,h){if(1&s){const e=a.\u0275\u0275getCurrentView();a.\u0275\u0275elementStart(0,"div",6),a.\u0275\u0275listener("keydown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.keyboardAccess(i))}),a.\u0275\u0275elementStart(1,"div",7),a.\u0275\u0275listener("mousedown",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Move))})("touchstart",function(i){a.\u0275\u0275restoreView(e);const r=a.\u0275\u0275nextContext();return a.\u0275\u0275resetView(r.startMove(i,r.moveTypes.Move))}),a.\u0275\u0275elementEnd(),a.\u0275\u0275template(2,R,21,0,"ng-container",8),a.\u0275\u0275elementEnd()}if(2&s){const e=a.\u0275\u0275nextContext();a.\u0275\u0275styleProp("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"),a.\u0275\u0275classProp("ngx-ic-round",e.roundCropper),a.\u0275\u0275attribute("aria-label",e.cropperFrameAriaLabel),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",!e.hideResizeSquares)}}class H{constructor(){this.format="png",this.output="blob",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.cropperFrameAriaLabel="Crop photo",this.cropperScaledMinWidth=20,this.cropperScaledMinHeight=20,this.cropperScaledMaxWidth=20,this.cropperScaledMaxHeight=20,this.stepSize=this.initialStepSize}setOptions(h){Object.keys(h).filter(e=>
1e in this).forEach(e=>this[e]=h[e]),this.validateOptions()}setOptionsFromChanges(h){Object.keys(h).filter(e=>e in this).forEach(e=>this[e]=h[e].currentValue),this.validateOptions()}validateOptions(){if(this.maintainAspectRatio&&!this.aspectRatio)throw new Error("`aspectRatio` should > 0 when `maintainAspectRatio` is enabled")}}var u=function(s){return s.Drag="drag",s.Move="move",s.Resize="resize",s.Pinch="pinch",s}(u||{});function L(s,h,e){const t=s.width,i=s.height,r=t/(h=Math.round(h)),n=i/(e=Math.round(e)),o=Math.ceil(r/2),c=Math.ceil(n/2),p=s.getContext("2d");if(p){const l=p.getImageData(0,0,t,i),g=p.createImageData(h,e),m=l.data,x=g.data;for(let _=0;_<e;_++)for(let v=0;v<h;v++){const w=4*(v+_*h),M=_*n;let f=0,V=0,P=0,X=0,K=0,Z=0,G=0;const pe=Math.floor(v*r),le=Math.floor(_*n);let F=Math.ceil((v+1)*r),D=Math.ceil((_+1)*n);F=Math.min(F,t),D=Math.min(D,i);for(let k=le;k<D;k++){const N=Math.abs(M-k)/c,ge=v*r,me=N*N;for(let U=pe;U<F;U++){const q=Math.abs(ge-U)/o,T=Math.sqrt(me+q*q);if(T>=1)continue;f=2*T*T*T-3*T*T+1;const W=4*(U+k*t);G+=f*m[W+3],P+=f,m[W+3]<255&&(f=f*m[W+3]/250),X+=f*m[W],K+=f*m[W+1],Z+=f*m[W+2],V+=f}}x[w]=X/V,x[w+1]=K/V,x[w+2]=Z/V,x[w+3]=G/P}s.width=h,s.height=e,p.putImageData(g,0,0)}}function Q(s,h){return s/100*h}let j=(()=>{class s{crop(e,t,i,r,n){const o=this.getImagePosition(e,t,i,n),c=o.x2-o.x1,p=o.y2-o.y1,l=document.createElement("canvas");l.width=c,l.height=p;const g=l.getContext("2d");if(!g)return null;null!=i.backgroundColor&&(g.fillStyle=i.backgroundColor,g.fillRect(0,0,c,p));const m=(i.transform.scale||1)*(i.transform.flipH?-1:1),x=(i.transform.scale||1)*(i.transform.flipV?-1:1),{translateH:_,translateV:v}=this.getCanvasTranslate(e,i,n),w=e.transformed;g.setTransform(m,0,0,x,w.size.width/2+_,w.size.height/2+v),g.translate(-o.x1/m,-o.y1/x),g.rotate((i.transform.rotate||0)*Math.PI/180),g.drawImage(w.image,-w.size.width/2,-w.size.height/2);const M={width:c,height:p,imagePosition:o,cropperPosition:{...t}};i.containWithinAspectRatio&&(M.offsetImagePosition=this.getOffsetImagePosition(e,t,i,n));const f=this.getResizeRatio(c,p,i);return 1!==f&&(M.width=Math.round(c*f),M.height=i.maintainAspectRatio?Math.round(M.width/i.aspectRatio):Math.round(p*f),L(l,M.width,M.height)),"blob"===r?this.cropToBlob(M,l,i):(M.base64=l.toDataURL("image/"+i.format,this.getQuality(i)),M)}cropToBlob(e,t,i){var r=this;return(0,d.Z)(function*(){return e.blob=yield new Promise(n=>t.toBlob(n,"image/"+i.format,r.getQuality(i))),e.blob&&(e.objectUrl=URL.createObjectURL(e.blob)),e})()}getCanvasTranslate(e,t,i){if("px"===t.transform.translateUnit){const r=this.getRatio(e,i);return{translateH:(t.transform.translateH||0)*r,translateV:(t.transform.translateV||0)*r}}return{translateH:t.transform.translateH?Q(t.transform.translateH,e.transformed.size.width):0,translateV:t.transform.translateV?Q(t.transform.translateV,e.transformed.size.height):0}}getRatio(e,t){return e.transformed.size.width/t.width}getImagePosition(e,t,i,r){const n=this.getRatio(e,r),o={x1:Math.round(t.x1*n),y1:Math.round(t.y1*n),x2:Math.round(t.x2*n),y2:Math.round(t.y2*n)};return i.containWithinAspectRatio||(o.x1=Math.max(o.x1,0),o.y1=Math.max(o.y1,0),o.x2=Math.min(o.x2,e.transformed.size.width),o.y2=Math.min(o.y2,e.transformed.size.height)),o}getOffsetImagePosition(e,t,i,r){const n=i.canvasRotation+e.exifTransform.rotate,o=this.getRatio(e,r);let c,p;n%2?(c=(e.transformed.size.width-e.original.size.height)/2,p=(e.transformed.size.height-e.original.size.width)/2):(c=(e.transformed.size.width-e.original.size.width)/2,p=(e.transformed.size.height-e.original.size.height)/2);const l={x1:Math.round(t.x1*o)-c,y1:Math.round(t.y1*o)-p,x2:Math.round(t.x2*o)-c,y2:Math.round(t.y2*o)-p};return i.containWithinAspectRatio||(l.x1=Math.max(l.x1,0),l.y1=Math.max(l.y1,0),l.x2=Math.min(l.x2,e.transformed.size.width),l.y2=Math.min(l.y2,e.transformed.size.height)),l}getResizeRatio(e,t,i){const r=i.resizeToWidth/e,n=i.resizeToHeight/t,o=new Array;i.resizeToWidth>0&&o.push(r),i.resizeToHeight>0&&o.push(n);const c=0===o.length?1:Math.min(...o);return c>1&&!i.onlyScaleDown?c:Math.min(c,1)}getQuality(e){return Math.min(1,Math.max(0,e.imageQuality/100))}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=a.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),ie=(()=>{class s{resetCropperPosition(e,t,i,r){if(e?.nativeElement)if(i.cropperStaticHeight&&i.cropperStaticWidth)t.x1=0,t.x2=r.width>i.cropperStaticWidth?i.cropperStaticWidth:r.width,t.y1=0,t.y2=r.height>i.cropperStaticHeight?i.cropperStaticHeight:r.height;else{const n=Math.min(i.cropperScaledMaxWidth,r.width),o=Math.min(i.cropperScaledMaxHeight,r.height);if(i.maintainAspectRatio)if(r.width/i.aspectRatio<r.height){t.x1=0,t.x2=n;const c=n/i.aspectRatio;t.y1=(r.height-c)/2,t.y2=t.y1+c}else{t.y1=0,t.y2=o;const c=o*i.aspectRatio;t.x1=(r.width-c)/2,t.x2=t.x1+c}else t.x1=0,t.x2=n,t.y1=0,t.y2=o}}move(e,t,i){const r=this.getClientX(e)-t.clientX,n=this.getClientY(e)-t.clientY;i.x1=t.x1+r,i.y1=t.y1+n,i.x2=t.x2+r,i.y2=t.y2+n}resize(e,t,i,r,n){const o=this.getClientX(e)-t.clientX,c=this.getClientY(e)-t.clientY;switch(t.position){case"left":i.x1=Math.min(Math.max(t.x1+o,i.x2-n.cropperScaledMaxWidth),i.x2-n.cropperScaledMinWidth);break;case"topleft":i.x1=Math.min(Math.max(t.x1+o,i.x2-n.cropperScaledMaxWidth),i.x2-n.cropperScaledMinWidth),i.y1=Math.min(Math.max(t.y1+c,i.y2-n.cropperScaledMaxHeight),i.y2-n.cropperScaledMinHeight);break;case"top":i.y1=Math.min(Math.max(t.y1+c,i.y2-n.cropperScaledMaxHeight),i.y2-n.cropperScaledMinHeight);break;case"topright":i.x2=Math.max(Math.min(t.x2+o,i.x1+n.cropperScaledMaxWidth),i.x1+n.cropperScaledMinWidth),i.y1=Math.min(Math.max(t.y1+c,i.y2-n.cropperScaledMaxHeight),i.y2-n.cropperScaledMinHeight);break;case"right":i.x2=Math.max(Math.min(t.x2+o,i.x1+n.cropperScaledMaxWidth),i.x1+n.cropperScaledMinWidth);break;case"bottomright":i.x2=Math.max(Math.min(t.x2+o,i.x1+n.cropperScaledMaxWidth),i.x1+n.cropperScaledMinWidth),i.y2=Math.max(Math.min(t.y2+c,i.y1+n.cropperScaledMaxHeight),i.y1+n.cropperScaledMinHeight);break;case"bottom":i.y2=Math.max(Math.min(t.y2+c,i.y1+n.cropperScaledMaxHeight),i.y1+n.cropperScaledMinHeight);break;case"bottomleft":i.x1=Math.min(Math.max(t.x1+o,i.x2-n.cropperScaledMaxWidth),i.x2-n.cropperScaledMinWidth),i.y2=Math.max(Math.min(t.y2+c,i.y1+n.cropperScaledMaxHeight),i.y1+n.cropperScaledMinHeight);break;case"center":const p=e.scale,l=Math.min(Math.max(n.cropperScaledMinWidth,Math.abs(t.x2-t.x1)*p),n.cropperScaledMaxWidth),g=Math.min(Math.max(n.cropperScaledMinHeight,Math.abs(t.y2-t.y1)*p),n.cropperScaledMaxHeight);i.x1=t.clientX-l/2,i.x2=t.clientX+l/2,i.y1=t.clientY-g/2,i.y2=t.clientY+g/2,i.x1<0?(i.x2-=i.x1,i.x1=0):i.x2>r.width&&(i.x1-=i.x2-r.width,i.x2=r.width),i.y1<0?(i.y2-=i.y1,i.y1=0):i.y2>r.height&&(i.y1-=i.y2-r.height,i.y2=r.height)}
1n.maintainAspectRatio&&this.checkAspectRatio(t.position,i,r,n)}checkAspectRatio(e,t,i,r){let n=0,o=0;switch(e){case"top":t.x2=t.x1+(t.y2-t.y1)*r.aspectRatio,n=Math.max(t.x2-i.width,0),o=Math.max(0-t.y1,0),(n>0||o>0)&&(t.x2-=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y1+=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"bottom":t.x2=t.x1+(t.y2-t.y1)*r.aspectRatio,n=Math.max(t.x2-i.width,0),o=Math.max(t.y2-i.height,0),(n>0||o>0)&&(t.x2-=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y2-=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"topleft":t.y1=t.y2-(t.x2-t.x1)/r.aspectRatio,n=Math.max(0-t.x1,0),o=Math.max(0-t.y1,0),(n>0||o>0)&&(t.x1+=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y1+=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"topright":t.y1=t.y2-(t.x2-t.x1)/r.aspectRatio,n=Math.max(t.x2-i.width,0),o=Math.max(0-t.y1,0),(n>0||o>0)&&(t.x2-=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y1+=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"right":case"bottomright":t.y2=t.y1+(t.x2-t.x1)/r.aspectRatio,n=Math.max(t.x2-i.width,0),o=Math.max(t.y2-i.height,0),(n>0||o>0)&&(t.x2-=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y2-=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"left":case"bottomleft":t.y2=t.y1+(t.x2-t.x1)/r.aspectRatio,n=Math.max(0-t.x1,0),o=Math.max(t.y2-i.height,0),(n>0||o>0)&&(t.x1+=o*r.aspectRatio>n?o*r.aspectRatio:n,t.y2-=o*r.aspectRatio>n?o:n/r.aspectRatio);break;case"center":t.x2=t.x1+(t.y2-t.y1)*r.aspectRatio,t.y2=t.y1+(t.x2-t.x1)/r.aspectRatio;const c=Math.max(0-t.x1,0),p=Math.max(t.x2-i.width,0),l=Math.max(t.y2-i.height,0),g=Math.max(0-t.y1,0);(c>0||p>0||l>0||g>0)&&(t.x1+=l*r.aspectRatio>c?l*r.aspectRatio:c,t.x2-=g*r.aspectRatio>p?g*r.aspectRatio:p,t.y1+=g*r.aspectRatio>p?g:p/r.aspectRatio,t.y2-=l*r.aspectRatio>c?l:c/r.aspectRatio)}}getClientX(e){return e.touches?.[0].clientX||e.clientX||0}getClientY(e){return e.touches?.[0].clientY||e.clientY||0}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=a.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();let Y=(()=>{class s{constructor(){this.autoRotateSupported=function ae(){return new Promise(s=>{const h=new Image;h.onload=()=>{s(1===h.width&&2===h.height)},h.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q=="})}()}loadImageFile(e,t){var i=this;return(0,d.Z)(function*(){const r=yield e.arrayBuffer();return yield i.checkImageTypeAndLoadImageFromArrayBuffer(r,e.type,t)})()}checkImageTypeAndLoadImageFromArrayBuffer(e,t,i){return this.isValidImageType(t)?this.loadImageFromArrayBuffer(e,i,t):Promise.reject(new Error("Invalid image type"))}isValidImageType(e){return/image\/(png|jpg|jpeg|bmp|gif|tiff|svg|webp|x-icon|vnd.microsoft.icon)/.test(e)}loadImageFromURL(e,t){var i=this;return(0,d.Z)(function*(){const n=yield(yield fetch(e)).blob(),o=yield n.arrayBuffer();return yield i.loadImageFromArrayBuffer(o,t,n.type)})()}loadBase64Image(e,t){const i=this.base64ToArrayBuffer(e);return this.loadImageFromArrayBuffer(i,t)}base64ToArrayBuffer(e){e=e.replace(/^data:([^;]+);base64,/gim,"");const t=atob(e),i=t.length,r=new Uint8Array(i);for(let n=0;n<i;n++)r[n]=t.charCodeAt(n);return r.buffer}loadImageFromArrayBuffer(e,t,i){var r=this;return(0,d.Z)(function*(){const n=yield new Promise(function(){var o=(0,d.Z)(function*(c,p){try{const l=new Blob([e],i?{type:i}:void 0),g=URL.createObjectURL(l),m=new Image,_="image/svg+xml"===i?yield r.getSvgImageSize(l):void 0;m.onload=()=>c({originalImage:m,originalImageSize:_,originalObjectUrl:g,originalArrayBuffer:e}),m.onerror=p,m.src=g}catch(l){p(l)}});return function(c,p){return o.apply(this,arguments)}}());return yield r.transformImageFromArrayBuffer(n,t,null!=n.originalImageSize)})()}getSvgImageSize(e){return(0,d.Z)(function*(){const r=(new DOMParser).parseFromString(yield e.text(),"image/svg+xml").querySelector("svg");if(!r)throw Error("Failed to parse SVG image");const n=r.getAttribute("width"),o=r.getAttribute("height");if(n&&o)return null;const c=r.getAttribute("viewBox")||r.getAttribute("viewbox");if(c){const p=c.split(" ");return{width:+p[2],height:+p[3]}}throw Error("Failed to load SVG image. SVG must have width + height or viewBox definition.")})()}transformImageFromArrayBuffer(e,t,i=!1){var r=this;return(0,d.Z)(function*(){const o=function ne(s){switch("object"==typeof s&&(s=function oe(s){const h=new DataView(s);if(65496!==h.getUint16(0,!1))return-2;const e=h.byteLength;let t=2;for(;t<e;){if(h.getUint16(t+2,!1)<=8)return-1;const i=h.getUint16(t,!1);if(t+=2,65505==i){if(1165519206!==h.getUint32(t+=2,!1))return-1;const r=18761==h.getUint16(t+=6,!1);t+=h.getUint32(t+4,r);const n=h.getUint16(t,r);t+=2;
1for(let o=0;o<n;o++)if(274==h.getUint16(t+12*o,r))return h.getUint16(t+12*o+8,r)}else{if(65280!=(65280&i))break;t+=h.getUint16(t,!1)}}return-1}(s)),s){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}}}((yield r.autoRotateSupported)?-1:e.originalArrayBuffer);return e.originalImage&&e.originalImage.complete?r.transformLoadedImage({original:{objectUrl:e.originalObjectUrl,image:e.originalImage,size:e.originalImageSize??{width:e.originalImage.naturalWidth,height:e.originalImage.naturalHeight}},exifTransform:o},t,i):Promise.reject(new Error("No image loaded"))})()}transformLoadedImage(e,t,i=!1){var r=this;return(0,d.Z)(function*(){const n=t.canvasRotation+e.exifTransform.rotate,o=e.original.size;if(!i&&0===n&&!e.exifTransform.flip&&!t.containWithinAspectRatio)return{original:{objectUrl:e.original.objectUrl,image:e.original.image,size:{...o}},transformed:{objectUrl:e.original.objectUrl,image:e.original.image,size:{...o}},exifTransform:e.exifTransform};const c=r.getTransformedSize(o,e.exifTransform,t),p=document.createElement("canvas");p.width=c.width,p.height=c.height;const l=p.getContext("2d");l?.setTransform(e.exifTransform.flip?-1:1,0,0,1,p.width/2,p.height/2),l?.rotate(Math.PI*(n/2)),l?.drawImage(e.original.image,-o.width/2,-o.height/2);const g=yield new Promise(_=>p.toBlob(_,t.format));if(!g)throw new Error("Failed to get Blob for transformed image.");const m=URL.createObjectURL(g),x=yield r.loadImageFromObjectUrl(m);return{original:{objectUrl:e.original.objectUrl,image:e.original.image,size:{...o}},transformed:{objectUrl:m,image:x,size:{width:x.width,height:x.height}},exifTransform:e.exifTransform}})()}loadImageFromObjectUrl(e){return new Promise((t,i)=>{const r=new Image;r.onload=()=>t(r),r.onerror=i,r.src=e})}getTransformedSize(e,t,i){const r=i.canvasRotation+t.rotate;if(i.containWithinAspectRatio){if(r%2){const o=e.height/i.aspectRatio;return{width:Math.max(e.height,e.width*i.aspectRatio),height:Math.max(e.width,o)}}{const o=e.width/i.aspectRatio;return{width:Math.max(e.width,e.height*i.aspectRatio),height:Math.max(e.height,o)}}}return r%2?{height:e.width,width:e.height}:{width:e.width,height:e.height}}}return s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=a.\u0275\u0275defineInjectable({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),se=(()=>{class s{constructor(e,t,i,r,n,o,c){this.cropService=e,this.cropperPositionService=t,this.loadImageService=i,this.sanitizer=r,this.cd=n,this.zone=o,this.hammerLoader=c,this.settings=new H,this.setImageMaxSizeRetries=0,this.resizedWhileHidden=!1,this.marginLeft="0px",this.maxSize={width:0,height:0},this.moveTypes=u,this.imageVisible=!1,this.cropperFrameAriaLabel=this.settings.cropperFrameAriaLabel,this.output=this.settings.output,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 a.EventEmitter,this.startCropImage=new a.EventEmitter,this.imageLoaded=new a.EventEmitter,this.cropperReady=new a.EventEmitter,this.loadImageFailed=new a.EventEmitter,this.transformChange=new a.EventEmitter,this.reset()}ngOnChanges(e){this.onChangesUpdateSettings(e),this.onChangesInputImage(e),this.loadedImage?.original.image.complete&&(e.containWithinAspectRatio||e.canvasRotation)&&this.loadImageService.transformLoadedImage(this.loadedImage,this.settings).then(t=>this.setLoadedImage(t)).catch(t=>this.loadImageError(t)),(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()),e.transform&&(this.transform=this.transform||{},this.setCssTransform(),this.doAutoCrop()),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.hideResizeSquares=!0,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.
1imageChangedEvent&&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(){return this.imageChangedEvent?.target?.files?.length>0}setCssTransform(){const e=this.transform?.translateUnit||"%";this.safeTransformStyle=this.sanitizer.bypassSecurityTrustStyle(`translate(${this.transform.translateH||0}${e}, ${this.transform.translateV||0}${e}) 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(t=>this.setLoadedImage(t)).catch(t=>this.loadImageError(t))}loadBase64Image(e){this.loadImageService.loadBase64Image(e,this.settings).then(t=>this.setLoadedImage(t)).catch(t=>this.loadImageError(t))}loadImageFromURL(e){this.loadImageService.loadImageFromURL(e,this.settings).then(t=>this.setLoadedImage(t)).catch(t=>this.loadImageError(t))}setLoadedImage(e){this.loadedImage=e,this.safeImgDataUrl=this.sanitizer.bypassSecurityTrustResourceUrl(e.transformed.objectUrl),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(){return this.sourceImage?.nativeElement?.offsetWidth>0}onResize(){if(this.loadedImage)if(this.hidden)this.resizedWhileHidden=!0;else{const e={...this.maxSize};this.setMaxSize(),this.resizeCropperPosition(e),this.setCropperScaledMinSize(),this.setCropperScaledMaxSize()}}activatePinchGesture(){var e=this;return(0,d.Z)(function*(){yield e.hammerLoader?.();const t=window?.Hammer||null;if(t){const i=new t(e.wrapper.nativeElement);i.get("pinch").set({enable:!0}),i.on("pinchmove",e.onPinch.bind(e)),i.on("pinchend",e.pinchStop.bind(e)),i.on("pinchstart",e.startPinch.bind(e))}else(0,a.isDevMode)()&&console.warn("[NgxImageCropper] Could not find HammerJS - Pinch Gesture won't work")})()}resizeCropperPosition(e){(e.width!==this.maxSize.width||e.height!==this.maxSize.height)&&(this.cropper.x1=this.cropper.x1*this.maxSize.width/e.width,this.cropper.x2=this.cropper.x2*this.maxSize.width/e.width,this.cropper.y1=this.cropper.y1*this.maxSize.height/e.height,this.cropper.y2=this.cropper.y2*this.maxSize.height/e.height)}resetCropperPosition(){this.cropperPositionService.resetCropperPosition(this.sourceImage,this.cropper,this.settings,this.maxSize),this.doAutoCrop(),this.imageVisible=!0}keyboardAccess(e){this.changeKeyboardStepSize(e),this.keyboardMoveCropper(e)}changeKeyboardStepSize(e){const t=+e.key;t>=1&&t<=9&&(this.settings.stepSize=t)}keyboardMoveCropper(e){if(!["ArrowUp","ArrowDown","ArrowRight","ArrowLeft"].includes(e.key))return;const i=e.shiftKey?u.Resize:u.Move,r=e.altKey?function ee(s){switch(s){case"ArrowUp":return"bottom";case"ArrowRight":return"left";case"ArrowDown":return"top";default:return"right"}}(e.key):function J(s){switch(s){case"ArrowUp":return"top";case"ArrowRight":return"right";case"ArrowDown":return"bottom";default:return"left"}}
1(e.key),n=function te(s,h){switch(s){case"ArrowUp":return{clientX:0,clientY:-1*h};case"ArrowRight":return{clientX:h,clientY:0};case"ArrowDown":return{clientX:0,clientY:h};default:return{clientX:-1*h,clientY:0}}}(e.key,this.settings.stepSize);e.preventDefault(),e.stopPropagation(),this.startMove({clientX:0,clientY:0},i,r),this.handleMouseMove(n),this.handleMouseUp()}startMove(e,t,i=null){this.disabled||this.moveStart?.active&&this.moveStart?.type===u.Pinch||t===u.Drag&&!this.allowMoveImage||(e.preventDefault&&e.preventDefault(),this.moveStart={active:!0,type:t,position:i,transform:{...this.transform},clientX:this.cropperPositionService.getClientX(e),clientY:this.cropperPositionService.getClientY(e),...this.cropper},this.initMouseMove())}initMouseMove(){(0,y.merge)((0,y.fromEvent)(document,"mousemove"),(0,y.fromEvent)(document,"touchmove")).pipe((0,z.takeUntil)((0,y.merge)((0,y.fromEvent)(document,"mouseup"),(0,y.fromEvent)(document,"touchend")).pipe((0,z.first)()))).subscribe({next:e=>this.zone.run(()=>{this.handleMouseMove(e),this.cd.markForCheck()}),complete:()=>this.zone.run(()=>{this.handleMouseUp(),this.cd.markForCheck()})})}startPinch(e){this.safeImgDataUrl&&(e.preventDefault&&e.preventDefault(),this.moveStart={active:!0,type:u.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})}handleMouseMove(e){if(this.moveStart.active)if(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===u.Move)this.cropperPositionService.move(e,this.moveStart,this.cropper),this.checkCropperPosition(!0);else if(this.moveStart.type===u.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===u.Drag){const t=this.cropperPositionService.getClientX(e)-this.moveStart.clientX,i=this.cropperPositionService.getClientY(e)-this.moveStart.clientY;this.transform={...this.transform,translateH:(this.moveStart.transform?.translateH||0)+t,translateV:(this.moveStart.transform?.translateV||0)+i},this.setCssTransform()}}onPinch(e){this.moveStart.active&&(e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),this.moveStart.type===u.Pinch&&(this.cropperPositionService.resize(e,this.moveStart,this.cropper,this.maxSize,this.settings),this.checkCropperPosition(!1)),this.cd.markForCheck())}setMaxSize(){if(this.sourceImage){const e=getComputedStyle(this.sourceImage.nativeElement);this.maxSize.width=parseFloat(e.width),this.maxSize.height=parseFloat(e.height),this.marginLeft=this.sanitizer.bypassSecurityTrustStyle("calc(50% - "+this.maxSize.width/2+"px)")}}setCropperScaledMinSize(){this.loadedImage?.transformed?.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(){if(this.loadedImage?.transformed?.image){const e=this.loadedImage.transformed.size.width/this.maxSize.width;this.settings.cropperScaledMaxWidth=this.cropperMaxWidth>20?this.cropperMaxWidth/e:this.maxSize.width,this.settings.cropperScaledMaxHeight=this.cropperMaxHeight>20?this.cropperMaxHeight/e: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)}handleMouseUp(){this.moveStart.active&&(this.moveStart.active=!1,this.moveStart?.type===u.Drag?this.transformChange.emit(this.transform):this.doAutoCrop())}pinchStop(){this.moveStart.active&&(this.moveStart.active=!1,this.doAutoCrop())}doAutoCrop(){this.autoCrop&&this.crop()}crop(e=this.settings.output){if(null!=this.loadedImage?.transformed?.image){if(this.startCropImage.emit(),"blob"===e)return this.cropToBlob();if("base64"===e)return this.cropToBase64()}return null}cropToBlob(){var e=this;return new Promise((t,i)=>this.zone.run((0,d.Z)(function*(){const r=yield e.cropService.crop(e.loadedImage,e.cropper,e.settings,"blob",e.maxSize);
1r?(e.imageCropped.emit(r),t(r)):i("Crop image failed")})))}cropToBase64(){const e=this.cropService.crop(this.loadedImage,this.cropper,this.settings,"base64",this.maxSize);return e?(this.imageCropped.emit(e),e):null}aspectRatioIsCorrect(){return(this.cropper.x2-this.cropper.x1)/(this.cropper.y2-this.cropper.y1)===this.aspectRatio}}return s.\u0275fac=function(e){return new(e||s)(a.\u0275\u0275directiveInject(j),a.\u0275\u0275directiveInject(ie),a.\u0275\u0275directiveInject(Y),a.\u0275\u0275directiveInject(I.DomSanitizer),a.\u0275\u0275directiveInject(a.ChangeDetectorRef),a.\u0275\u0275directiveInject(a.NgZone),a.\u0275\u0275directiveInject(I.HAMMER_LOADER,8))},s.\u0275cmp=a.\u0275\u0275defineComponent({type:s,selectors:[["image-cropper"]],viewQuery:function(e,t){if(1&e&&(a.\u0275\u0275viewQuery(E,7),a.\u0275\u0275viewQuery(O,5)),2&e){let i;a.\u0275\u0275queryRefresh(i=a.\u0275\u0275loadQuery())&&(t.wrapper=i.first),a.\u0275\u0275queryRefresh(i=a.\u0275\u0275loadQuery())&&(t.sourceImage=i.first)}},hostVars:6,hostBindings:function(e,t){1&e&&a.\u0275\u0275listener("resize",function(){return t.onResize()},!1,a.\u0275\u0275resolveWindow),2&e&&(a.\u0275\u0275styleProp("text-align",t.alignImage),a.\u0275\u0275classProp("disabled",t.disabled)("ngx-ix-hidden",t.hidden))},inputs:{imageChangedEvent:"imageChangedEvent",imageURL:"imageURL",imageBase64:"imageBase64",imageFile:"imageFile",imageAltText:"imageAltText",cropperFrameAriaLabel:"cropperFrameAriaLabel",output:"output",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:[a.\u0275\u0275NgOnChangesFeature],decls:5,vars:10,consts:[["wrapper",""],["class","ngx-ic-source-image","role","presentation",3,"src","visibility","transform","ngx-ic-draggable","load","mousedown","touchstart","error",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"],["role","presentation",1,"ngx-ic-source-image",3,"src","load","mousedown","touchstart","error"],["sourceImage",""],["tabindex","0",1,"ngx-ic-cropper",3,"keydown"],["role","presentation",1,"ngx-ic-move",3,"mousedown","touchstart"],[4,"ngIf"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topleft",3,"mousedown","touchstart"],[1,"ngx-ic-square"],[1,"ngx-ic-resize","ngx-ic-top"],["role","presentation",1,"ngx-ic-resize","ngx-ic-topright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-right"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomright",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-bottom"],["role","presentation",1,"ngx-ic-resize","ngx-ic-bottomleft",3,"mousedown","touchstart"],[1,"ngx-ic-resize","ngx-ic-left"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-top",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-right",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-bottom",3,"mousedown","touchstart"],["role","presentation",1,"ngx-ic-resize-bar","ngx-ic-left",3,"mousedown","touchstart"]],template:function(e,t){1&e&&(a.\u0275\u0275elementStart(0,"div",null,0),a.\u0275\u0275template(2,S,2,8,"img",1),a.\u0275\u0275element(3,"div",2),a.\u0275\u0275template(4,A,3,16,"div",3),a.\u0275\u0275elementEnd()),2&e&&(a.\u0275\u0275styleProp("background",t.imageVisible&&t.backgroundColor),a.\u0275\u0275advance(2),a.\u0275\u0275property("ngIf",t.safeImgDataUrl),a.\u0275\u0275advance(1),a.\u
10275\u0275styleProp("width",t.maxSize.width,"px")("height",t.maxSize.height,"px")("margin-left","center"===t.alignImage?t.marginLeft:null),a.\u0275\u0275advance(1),a.\u0275\u0275property("ngIf",t.imageVisible))},dependencies:[b.NgIf],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;outline: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;
1cursor: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}),s})(),he=(()=>{class s{}return s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=a.\u0275\u0275defineNgModule({type:s}),s.\u0275inj=a.\u0275\u0275defineInjector({imports:[[b.CommonModule]]}),s})();function ce(s){const h=s.split(","),e=h[0].replace("data:","").replace(";
1base64",""),t=atob(h[1]),i=new ArrayBuffer(t.length),r=new Uint8Array(i);for(let n=0;n<t.length;n+=1)r[n]=t.charCodeAt(n);return new Blob([i],{type:e})}},15861:($,B,C)=>{function d(I,z,y,b,E,O,S){try{var R=I[O](S),A=R.value}catch(H){return void y(H)}R.done?z(A):Promise.resolve(A).then(b,E)}function a(I){return function(){var z=this,y=arguments;return new Promise(function(b,E){var O=I.apply(z,y);function S(A){d(O,b,E,S,R,"next",A)}function R(A){d(O,b,E,S,R,"throw",A)}S(void 0)})}}C.d(B,{Z:()=>a})}}]);

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.