UNPKG

@asoftwareworld/form-builder-pro

Version:

ASW Form Builder Pro helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same b

657 lines 113 kB
/** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, HostListener, Inject, Input, isDevMode, Optional, Output, ViewChild } from '@angular/core'; import { HAMMER_LOADER } from '@angular/platform-browser'; import { CropperSettings, MoveTypes } from '@asoftwareworld/form-builder-pro/api'; import { getEventForKey, getInvertedPositionForKey, getPositionForKey } from '@asoftwareworld/form-builder-pro/utils'; import { first, fromEvent, merge, takeUntil } from 'rxjs'; import * as i0 from "@angular/core"; import * as i1 from "./services/crop.service"; import * as i2 from "./services/cropper-position.service"; import * as i3 from "./services/load-image.service"; import * as i4 from "@angular/platform-browser"; import * as i5 from "@angular/common"; export class AswImageCropComponent { cropService; cropperPositionService; loadImageService; sanitizer; cd; zone; hammerLoader; settings = new CropperSettings(); setImageMaxSizeRetries = 0; moveStart; loadedImage; resizedWhileHidden = false; safeImgDataUrl; safeTransformStyle; marginLeft = '0px'; maxSize = { width: 0, height: 0 }; moveTypes = MoveTypes; imageVisible = false; wrapper; sourceImage; imageChangedEvent; imageURL; imageBase64; imageFile; imageAltText; cropperFrameAriaLabel = this.settings.cropperFrameAriaLabel; output = this.settings.output; format = this.settings.format; transform = {}; maintainAspectRatio = this.settings.maintainAspectRatio; aspectRatio = this.settings.aspectRatio; resetCropOnAspectRatioChange = this.settings.resetCropOnAspectRatioChange; resizeToWidth = this.settings.resizeToWidth; resizeToHeight = this.settings.resizeToHeight; cropperMinWidth = this.settings.cropperMinWidth; cropperMinHeight = this.settings.cropperMinHeight; cropperMaxHeight = this.settings.cropperMaxHeight; cropperMaxWidth = this.settings.cropperMaxWidth; cropperStaticWidth = this.settings.cropperStaticWidth; cropperStaticHeight = this.settings.cropperStaticHeight; canvasRotation = this.settings.canvasRotation; initialStepSize = this.settings.initialStepSize; roundCropper = this.settings.roundCropper; onlyScaleDown = this.settings.onlyScaleDown; imageQuality = this.settings.imageQuality; autoCrop = this.settings.autoCrop; backgroundColor = this.settings.backgroundColor; containWithinAspectRatio = this.settings.containWithinAspectRatio; hideResizeSquares = this.settings.hideResizeSquares; allowMoveImage = false; cropper = { x1: -100, y1: -100, x2: 10000, y2: 10000 }; alignImage = this.settings.alignImage; disabled = false; hidden = false; imageCropped = new EventEmitter(); startCropImage = new EventEmitter(); imageLoaded = new EventEmitter(); cropperReady = new EventEmitter(); loadImageFailed = new EventEmitter(); transformChange = new EventEmitter(); constructor(cropService, cropperPositionService, loadImageService, sanitizer, cd, zone, hammerLoader) { this.cropService = cropService; this.cropperPositionService = cropperPositionService; this.loadImageService = loadImageService; this.sanitizer = sanitizer; this.cd = cd; this.zone = zone; this.hammerLoader = hammerLoader; this.reset(); } ngOnChanges(changes) { this.onChangesUpdateSettings(changes); this.onChangesInputImage(changes); if (this.loadedImage?.original.image.complete && (changes['containWithinAspectRatio'] || changes['canvasRotation'])) { this.loadImageService .transformLoadedImage(this.loadedImage, this.settings) .then((res) => this.setLoadedImage(res)) .catch((err) => this.loadImageError(err)); } if (changes['cropper'] || changes['maintainAspectRatio'] || changes['aspectRatio']) { this.setMaxSize(); this.setCropperScaledMinSize(); this.setCropperScaledMaxSize(); if (this.maintainAspectRatio && (this.resetCropOnAspectRatioChange || !this.aspectRatioIsCorrect()) && (changes['maintainAspectRatio'] || changes['aspectRatio'])) { this.resetCropperPosition(); } else if (changes['cropper']) { this.checkCropperPosition(false); this.doAutoCrop(); } } if (changes['transform']) { this.transform = this.transform || {}; this.setCssTransform(); this.doAutoCrop(); } if (changes['hidden'] && this.resizedWhileHidden && !this.hidden) { setTimeout(() => { this.onResize(); this.resizedWhileHidden = false; }); } } onChangesUpdateSettings(changes) { this.settings.setOptionsFromChanges(changes); if (this.settings.cropperStaticHeight && this.settings.cropperStaticWidth) { this.hideResizeSquares = true; this.settings.setOptions({ hideResizeSquares: true, cropperMinWidth: this.settings.cropperStaticWidth, cropperMinHeight: this.settings.cropperStaticHeight, cropperMaxHeight: this.settings.cropperStaticHeight, cropperMaxWidth: this.settings.cropperStaticWidth, maintainAspectRatio: false }); } } onChangesInputImage(changes) { if (changes['imageChangedEvent'] || changes['imageURL'] || changes['imageBase64'] || changes['imageFile']) { this.reset(); } if (changes['imageChangedEvent'] && this.isValidImageChangedEvent()) { this.loadImageFile(this.imageChangedEvent.target.files[0]); } if (changes['imageURL'] && this.imageURL) { this.loadImageFromURL(this.imageURL); } if (changes['imageBase64'] && this.imageBase64) { this.loadBase64Image(this.imageBase64); } if (changes['imageFile'] && this.imageFile) { this.loadImageFile(this.imageFile); } } isValidImageChangedEvent() { return this.imageChangedEvent?.target?.files?.length > 0; } setCssTransform() { const translateUnit = this.transform?.translateUnit || '%'; this.safeTransformStyle = this.sanitizer.bypassSecurityTrustStyle(`translate(${this.transform.translateH || 0}${translateUnit}, ${this.transform.translateV || 0}${translateUnit})` + ' 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 = false; this.loadedImage = undefined; this.safeImgDataUrl = 'data:image/png;base64,iVBORw0KGg' + 'oAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAU' + 'AAarVyFEAAAAASUVORK5CYII='; this.moveStart = { active: false, 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 = 10000; this.cropper.y2 = 10000; } loadImageFile(file) { this.loadImageService .loadImageFile(file, this.settings) .then((res) => this.setLoadedImage(res)) .catch((err) => this.loadImageError(err)); } loadBase64Image(imageBase64) { this.loadImageService .loadBase64Image(imageBase64, this.settings) .then((res) => this.setLoadedImage(res)) .catch((err) => this.loadImageError(err)); } loadImageFromURL(url) { this.loadImageService .loadImageFromURL(url, this.settings) .then((res) => this.setLoadedImage(res)) .catch((err) => this.loadImageError(err)); } setLoadedImage(loadedImage) { this.loadedImage = loadedImage; this.safeImgDataUrl = this.sanitizer.bypassSecurityTrustResourceUrl(loadedImage.transformed.objectUrl); this.cd.markForCheck(); } loadImageError(error) { console.log(error); this.loadImageFailed.emit(); } imageLoadedInView() { if (this.loadedImage != null) { this.imageLoaded.emit(this.loadedImage); this.setImageMaxSizeRetries = 0; setTimeout(() => this.checkImageMaxSizeRecursively()); } } checkImageMaxSizeRecursively() { if (this.setImageMaxSizeRetries > 40) { this.loadImageFailed.emit(); } else if (this.sourceImageLoaded()) { this.setMaxSize(); this.setCropperScaledMinSize(); this.setCropperScaledMaxSize(); this.resetCropperPosition(); this.cropperReady.emit({ ...this.maxSize }); this.cd.markForCheck(); } else { this.setImageMaxSizeRetries++; setTimeout(() => this.checkImageMaxSizeRecursively(), 50); } } sourceImageLoaded() { return this.sourceImage?.nativeElement?.offsetWidth > 0; } onResize() { if (!this.loadedImage) { return; } if (this.hidden) { this.resizedWhileHidden = true; } else { const oldMaxSize = { ...this.maxSize }; this.setMaxSize(); this.resizeCropperPosition(oldMaxSize); this.setCropperScaledMinSize(); this.setCropperScaledMaxSize(); } } async activatePinchGesture() { // Loads HammerJS via angular APIs if configured await this.hammerLoader?.(); const Hammer = window?.['Hammer'] || null; if (Hammer) { const hammer = new Hammer(this.wrapper.nativeElement); hammer.get('pinch').set({ enable: true }); hammer.on('pinchmove', this.onPinch.bind(this)); hammer.on('pinchend', this.pinchStop.bind(this)); hammer.on('pinchstart', this.startPinch.bind(this)); } else if (isDevMode()) { console.warn("[AswImageCropper] Could not find HammerJS - Pinch Gesture won't work"); } } resizeCropperPosition(oldMaxSize) { if (oldMaxSize.width !== this.maxSize.width || oldMaxSize.height !== this.maxSize.height) { this.cropper.x1 = (this.cropper.x1 * this.maxSize.width) / oldMaxSize.width; this.cropper.x2 = (this.cropper.x2 * this.maxSize.width) / oldMaxSize.width; this.cropper.y1 = (this.cropper.y1 * this.maxSize.height) / oldMaxSize.height; this.cropper.y2 = (this.cropper.y2 * this.maxSize.height) / oldMaxSize.height; } } resetCropperPosition() { this.cropperPositionService.resetCropperPosition(this.sourceImage, this.cropper, this.settings, this.maxSize); this.doAutoCrop(); this.imageVisible = true; } keyboardAccess(event) { this.changeKeyboardStepSize(event); this.keyboardMoveCropper(event); } changeKeyboardStepSize(event) { const key = +event.key; if (key >= 1 && key <= 9) { this.settings.stepSize = key; } } keyboardMoveCropper(event) { const keyboardWhiteList = ['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft']; if (!keyboardWhiteList.includes(event.key)) { return; } const moveType = event.shiftKey ? MoveTypes.Resize : MoveTypes.Move; const position = event.altKey ? getInvertedPositionForKey(event.key) : getPositionForKey(event.key); const moveEvent = getEventForKey(event.key, this.settings.stepSize); event.preventDefault(); event.stopPropagation(); this.startMove({ clientX: 0, clientY: 0 }, moveType, position); this.handleMouseMove(moveEvent); this.handleMouseUp(); } startMove(event, moveType, position = null) { if (this.disabled || (this.moveStart?.active && this.moveStart?.type === MoveTypes.Pinch) || (moveType === MoveTypes.Drag && !this.allowMoveImage)) { return; } if (event.preventDefault) { event.preventDefault(); } this.moveStart = { active: true, type: moveType, position, transform: { ...this.transform }, clientX: this.cropperPositionService.getClientX(event), clientY: this.cropperPositionService.getClientY(event), ...this.cropper }; this.initMouseMove(); } initMouseMove() { merge(fromEvent(document, 'mousemove'), fromEvent(document, 'touchmove')) .pipe(takeUntil(merge(fromEvent(document, 'mouseup'), fromEvent(document, 'touchend')).pipe(first()))) .subscribe({ next: (event) => this.zone.run(() => { this.handleMouseMove(event); this.cd.markForCheck(); }), complete: () => this.zone.run(() => { this.handleMouseUp(); this.cd.markForCheck(); }) }); } startPinch(event) { if (!this.safeImgDataUrl) { return; } if (event.preventDefault) { event.preventDefault(); } this.moveStart = { active: true, type: MoveTypes.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(event) { if (this.moveStart.active) { if (event.stopPropagation) { event.stopPropagation(); } if (event.preventDefault) { event.preventDefault(); } if (this.moveStart.type === MoveTypes.Move) { this.cropperPositionService.move(event, this.moveStart, this.cropper); this.checkCropperPosition(true); } else if (this.moveStart.type === MoveTypes.Resize) { if (!this.cropperStaticWidth && !this.cropperStaticHeight) { this.cropperPositionService.resize(event, this.moveStart, this.cropper, this.maxSize, this.settings); } this.checkCropperPosition(false); } else if (this.moveStart.type === MoveTypes.Drag) { const diffX = this.cropperPositionService.getClientX(event) - this.moveStart.clientX; const diffY = this.cropperPositionService.getClientY(event) - this.moveStart.clientY; this.transform = { ...this.transform, translateH: (this.moveStart.transform?.translateH || 0) + diffX, translateV: (this.moveStart.transform?.translateV || 0) + diffY }; this.setCssTransform(); } } } onPinch(event) { if (this.moveStart.active) { if (event.stopPropagation) { event.stopPropagation(); } if (event.preventDefault) { event.preventDefault(); } if (this.moveStart.type === MoveTypes.Pinch) { this.cropperPositionService.resize(event, this.moveStart, this.cropper, this.maxSize, this.settings); this.checkCropperPosition(false); } this.cd.markForCheck(); } } setMaxSize() { if (this.sourceImage) { const sourceImageStyle = getComputedStyle(this.sourceImage.nativeElement); this.maxSize.width = parseFloat(sourceImageStyle.width); this.maxSize.height = parseFloat(sourceImageStyle.height); this.marginLeft = this.sanitizer.bypassSecurityTrustStyle('calc(50% - ' + this.maxSize.width / 2 + 'px)'); } } setCropperScaledMinSize() { if (this.loadedImage?.transformed?.image) { this.setCropperScaledMinWidth(); this.setCropperScaledMinHeight(); } else { 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() { if (this.maintainAspectRatio) { this.settings.cropperScaledMinHeight = Math.max(20, this.settings.cropperScaledMinWidth / this.aspectRatio); } else if (this.cropperMinHeight > 0) { this.settings.cropperScaledMinHeight = Math.max(20, (this.cropperMinHeight / this.loadedImage.transformed.image.height) * this.maxSize.height); } else { this.settings.cropperScaledMinHeight = 20; } } setCropperScaledMaxSize() { if (this.loadedImage?.transformed?.image) { const ratio = this.loadedImage.transformed.size.width / this.maxSize.width; this.settings.cropperScaledMaxWidth = this.cropperMaxWidth > 20 ? this.cropperMaxWidth / ratio : this.maxSize.width; this.settings.cropperScaledMaxHeight = this.cropperMaxHeight > 20 ? this.cropperMaxHeight / ratio : this.maxSize.height; if (this.maintainAspectRatio) { if (this.settings.cropperScaledMaxWidth > this.settings.cropperScaledMaxHeight * this.aspectRatio) { this.settings.cropperScaledMaxWidth = this.settings.cropperScaledMaxHeight * this.aspectRatio; } else if (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(maintainSize = false) { if (this.cropper.x1 < 0) { this.cropper.x2 -= maintainSize ? this.cropper.x1 : 0; this.cropper.x1 = 0; } if (this.cropper.y1 < 0) { this.cropper.y2 -= maintainSize ? this.cropper.y1 : 0; this.cropper.y1 = 0; } if (this.cropper.x2 > this.maxSize.width) { this.cropper.x1 -= maintainSize ? this.cropper.x2 - this.maxSize.width : 0; this.cropper.x2 = this.maxSize.width; } if (this.cropper.y2 > this.maxSize.height) { this.cropper.y1 -= maintainSize ? this.cropper.y2 - this.maxSize.height : 0; this.cropper.y2 = this.maxSize.height; } } handleMouseUp() { if (this.moveStart.active) { this.moveStart.active = false; if (this.moveStart?.type === MoveTypes.Drag) { this.transformChange.emit(this.transform); } else { this.doAutoCrop(); } } } pinchStop() { if (this.moveStart.active) { this.moveStart.active = false; this.doAutoCrop(); } } doAutoCrop() { if (this.autoCrop) { void this.crop(); } } crop(output = this.settings.output) { if (this.loadedImage?.transformed?.image != null) { this.startCropImage.emit(); if (output === 'blob') { return this.cropToBlob(); } else if (output === 'base64') { return this.cropToBase64(); } } return null; } cropToBlob() { return new Promise((resolve, reject) => this.zone.run(async () => { const result = await this.cropService.crop(this.loadedImage, this.cropper, this.settings, 'blob', this.maxSize); if (result) { this.imageCropped.emit(result); resolve(result); } else { reject('Crop image failed'); } })); } cropToBase64() { const result = this.cropService.crop(this.loadedImage, this.cropper, this.settings, 'base64', this.maxSize); if (result) { this.imageCropped.emit(result); return result; } return null; } aspectRatioIsCorrect() { const currentCropAspectRatio = (this.cropper.x2 - this.cropper.x1) / (this.cropper.y2 - this.cropper.y1); return currentCropAspectRatio === this.aspectRatio; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswImageCropComponent, deps: [{ token: i1.CropService }, { token: i2.CropperPositionService }, { token: i3.LoadImageService }, { token: i4.DomSanitizer }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.8", type: AswImageCropComponent, selector: "asw-image-crop", 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" }, host: { listeners: { "window:resize": "onResize()" }, properties: { "style.text-align": "this.alignImage", "class.disabled": "this.disabled", "class.asw-ix-hidden": "this.hidden" } }, viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, static: true }, { propertyName: "sourceImage", first: true, predicate: ["sourceImage"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [style.background]=\"imageVisible && backgroundColor\" #wrapper>\r\n <img #sourceImage class=\"asw-ic-source-image\" role=\"presentation\" *ngIf=\"safeImgDataUrl\" [src]=\"safeImgDataUrl\"\r\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\" [style.transform]=\"safeTransformStyle\"\r\n [class.asw-ic-draggable]=\"!disabled && allowMoveImage\" [attr.alt]=\"imageAltText\" (load)=\"imageLoadedInView()\"\r\n (mousedown)=\"startMove($event, moveTypes.Drag)\" (touchstart)=\"startMove($event, moveTypes.Drag)\"\r\n (error)=\"loadImageError($event)\">\r\n <div class=\"asw-ic-overlay\" [style.width.px]=\"maxSize.width\" [style.height.px]=\"maxSize.height\"\r\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"></div>\r\n <div class=\"asw-ic-cropper\" *ngIf=\"imageVisible\" [class.asw-ic-round]=\"roundCropper\"\r\n [attr.aria-label]=\"cropperFrameAriaLabel\" [style.top.px]=\"cropper.y1\" [style.left.px]=\"cropper.x1\"\r\n [style.width.px]=\"cropper.x2 - cropper.x1\" [style.height.px]=\"cropper.y2 - cropper.y1\"\r\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\r\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\" (keydown)=\"keyboardAccess($event)\" tabindex=\"0\">\r\n <div (mousedown)=\"startMove($event, moveTypes.Move)\" (touchstart)=\"startMove($event, moveTypes.Move)\"\r\n class=\"asw-ic-move\" role=\"presentation\">\r\n </div>\r\n <ng-container *ngIf=\"!hideResizeSquares\">\r\n <span class=\"asw-ic-resize asw-ic-topleft\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topleft')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topleft')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-top\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-topright\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topright')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topright')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-right\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottomright\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomright')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomright')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottom\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottomleft\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomleft')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomleft')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-left\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-top\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'top')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'top')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-right\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'right')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'right')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-bottom\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottom')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottom')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-left\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'left')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'left')\">\r\n </span>\r\n </ng-container>\r\n </div>\r\n</div>", styles: [":host{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}:host>div{width:100%;position:relative}:host>div img.asw-ic-source-image{max-width:100%;max-height:100%;transform-origin:center}:host>div img.asw-ic-source-image.asw-ic-draggable{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}:host .asw-ic-overlay{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}:host .asw-ic-cropper{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){:host .asw-ic-cropper{outline-width:100vh}}:host .asw-ic-cropper:after{position:absolute;content:\"\";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}:host .asw-ic-cropper .asw-ic-move{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}:host .asw-ic-cropper:focus .asw-ic-move{border-color:#1e90ff;border-width:2px}:host .asw-ic-cropper .asw-ic-resize{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}:host .asw-ic-cropper .asw-ic-resize .asw-ic-square{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}:host .asw-ic-cropper .asw-ic-resize.asw-ic-topleft{top:-12px;left:-12px;cursor:nwse-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-top{top:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-topright{top:-12px;right:-12px;cursor:nesw-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-right{top:calc(50% - 12px);right:-12px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottomright{bottom:-12px;right:-12px;cursor:nwse-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottom{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottomleft{bottom:-12px;left:-12px;cursor:nesw-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-left{top:calc(50% - 12px);left:-12px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize-bar{position:absolute;z-index:1}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-top{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-right{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-bottom{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-left{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .asw-ic-cropper.asw-ic-round{outline-color:transparent}:host .asw-ic-cropper.asw-ic-round: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){:host .asw-ic-cropper.asw-ic-round:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}:host .asw-ic-cropper.asw-ic-round .asw-ic-move{border-radius:100%}:host.disabled .asw-ic-cropper .asw-ic-resize,:host.disabled .asw-ic-cropper .asw-ic-resize-bar,:host.disabled .asw-ic-cropper .asw-ic-move{display:none}:host.asw-ix-hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: AswImageCropComponent, decorators: [{ type: Component, args: [{ selector: 'asw-image-crop', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.background]=\"imageVisible && backgroundColor\" #wrapper>\r\n <img #sourceImage class=\"asw-ic-source-image\" role=\"presentation\" *ngIf=\"safeImgDataUrl\" [src]=\"safeImgDataUrl\"\r\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\" [style.transform]=\"safeTransformStyle\"\r\n [class.asw-ic-draggable]=\"!disabled && allowMoveImage\" [attr.alt]=\"imageAltText\" (load)=\"imageLoadedInView()\"\r\n (mousedown)=\"startMove($event, moveTypes.Drag)\" (touchstart)=\"startMove($event, moveTypes.Drag)\"\r\n (error)=\"loadImageError($event)\">\r\n <div class=\"asw-ic-overlay\" [style.width.px]=\"maxSize.width\" [style.height.px]=\"maxSize.height\"\r\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"></div>\r\n <div class=\"asw-ic-cropper\" *ngIf=\"imageVisible\" [class.asw-ic-round]=\"roundCropper\"\r\n [attr.aria-label]=\"cropperFrameAriaLabel\" [style.top.px]=\"cropper.y1\" [style.left.px]=\"cropper.x1\"\r\n [style.width.px]=\"cropper.x2 - cropper.x1\" [style.height.px]=\"cropper.y2 - cropper.y1\"\r\n [style.margin-left]=\"alignImage === 'center' ? marginLeft : null\"\r\n [style.visibility]=\"imageVisible ? 'visible' : 'hidden'\" (keydown)=\"keyboardAccess($event)\" tabindex=\"0\">\r\n <div (mousedown)=\"startMove($event, moveTypes.Move)\" (touchstart)=\"startMove($event, moveTypes.Move)\"\r\n class=\"asw-ic-move\" role=\"presentation\">\r\n </div>\r\n <ng-container *ngIf=\"!hideResizeSquares\">\r\n <span class=\"asw-ic-resize asw-ic-topleft\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topleft')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topleft')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-top\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-topright\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'topright')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'topright')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-right\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottomright\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomright')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomright')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottom\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-bottomleft\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottomleft')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottomleft')\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize asw-ic-left\">\r\n <span class=\"asw-ic-square\"></span>\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-top\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'top')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'top')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-right\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'right')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'right')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-bottom\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'bottom')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'bottom')\">\r\n </span>\r\n <span class=\"asw-ic-resize-bar asw-ic-left\" role=\"presentation\"\r\n (mousedown)=\"startMove($event, moveTypes.Resize, 'left')\"\r\n (touchstart)=\"startMove($event, moveTypes.Resize, 'left')\">\r\n </span>\r\n </ng-container>\r\n </div>\r\n</div>", styles: [":host{display:flex;position:relative;width:100%;max-width:100%;max-height:100%;overflow:hidden;padding:5px;text-align:center}:host>div{width:100%;position:relative}:host>div img.asw-ic-source-image{max-width:100%;max-height:100%;transform-origin:center}:host>div img.asw-ic-source-image.asw-ic-draggable{user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;cursor:grab}:host .asw-ic-overlay{position:absolute;pointer-events:none;touch-action:none;outline:var(--cropper-overlay-color, white) solid 100vw;top:0;left:0}:host .asw-ic-cropper{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){:host .asw-ic-cropper{outline-width:100vh}}:host .asw-ic-cropper:after{position:absolute;content:\"\";inset:0;pointer-events:none;border:dashed 1px;opacity:.75;color:inherit;z-index:1}:host .asw-ic-cropper .asw-ic-move{width:100%;cursor:move;border:1px solid rgba(255,255,255,.5)}:host .asw-ic-cropper:focus .asw-ic-move{border-color:#1e90ff;border-width:2px}:host .asw-ic-cropper .asw-ic-resize{position:absolute;display:inline-block;line-height:6px;padding:8px;opacity:.85;z-index:1}:host .asw-ic-cropper .asw-ic-resize .asw-ic-square{display:inline-block;background:#53535c;width:6px;height:6px;border:1px solid rgba(255,255,255,.5);box-sizing:content-box}:host .asw-ic-cropper .asw-ic-resize.asw-ic-topleft{top:-12px;left:-12px;cursor:nwse-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-top{top:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-topright{top:-12px;right:-12px;cursor:nesw-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-right{top:calc(50% - 12px);right:-12px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottomright{bottom:-12px;right:-12px;cursor:nwse-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottom{bottom:-12px;left:calc(50% - 12px);cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-bottomleft{bottom:-12px;left:-12px;cursor:nesw-resize}:host .asw-ic-cropper .asw-ic-resize.asw-ic-left{top:calc(50% - 12px);left:-12px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize-bar{position:absolute;z-index:1}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-top{top:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-right{top:11px;right:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-bottom{bottom:-11px;left:11px;width:calc(100% - 22px);height:22px;cursor:ns-resize}:host .asw-ic-cropper .asw-ic-resize-bar.asw-ic-left{top:11px;left:-11px;height:calc(100% - 22px);width:22px;cursor:ew-resize}:host .asw-ic-cropper.asw-ic-round{outline-color:transparent}:host .asw-ic-cropper.asw-ic-round: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){:host .asw-ic-cropper.asw-ic-round:after{box-shadow:0 0 0 100vh #ffffff4d;box-shadow:0 0 0 100vh var(--cropper-outline-color, rgba(255, 255, 255, .3))}}:host .asw-ic-cropper.asw-ic-round .asw-ic-move{border-radius:100%}:host.disabled .asw-ic-cropper .asw-ic-resize,:host.disabled .asw-ic-cropper .asw-ic-resize-bar,:host.disabled .asw-ic-cropper .asw-ic-move{display:none}:host.asw-ix-hidden{display:none}\n"] }] }], ctorParameters: () => [{ type: i1.CropService }, { type: i2.CropperPositionService }, { type: i3.LoadImageService }, { type: i4.DomSanitizer }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [HAMMER_LOADER] }] }], propDecorators: { wrapper: [{ type: ViewChild, args: ['wrapper', { static: true }] }], sourceImage: [{ type: ViewChild, args: ['sourceImage', { static: false }] }], imageChangedEvent: [{ type: Input }], imageURL: [{ type: Input }], imageBase64: [{ type: Input }], imageFile: [{ type: Input }], imageAltText: [{ type: Input }], cropperFrameAriaLabel: [{ type: Input }], output: [{ type: Input }], format: [{ type: Input }], transform: [{ type: Input }], maintainAspectRatio: [{ type: Input }], aspectRatio: [{ type: Input }], resetCropOnAspectRatioChange: [{ type: Input }], resizeToWidth: [{ type: Input }], resizeToHeight: [{ type: Input }], cropperMinWidth: [{ type: Input }], cropperMinHeight: [{ type: Input }], cropperMaxHeight: [{ type: Input }], cropperMaxWidth: [{ type: Input }], cropperStaticWidth: [{ type: Input }], cropperStaticHeight: [{ type: Input }], canvasRotation: [{ type: Input }], initialStepSize: [{ type: Input }], roundCropper: [{ type: Input }], onlyScaleDown: [{ type: Input }], imageQuality: [{ type: Input }], autoCrop: [{ type: Input }], backgroundColor: [{ type: Input }], containWithinAspectRatio: [{ type: Input }], hideResizeSquares: [{ type: Input }], allowMoveImage: [{ type: Input }], cropper: [{ type: Input }], alignImage: [{ type: HostBinding, args: ['style.text-align'] }, { type: Input }], disabled: [{ type: HostBinding, args: ['class.disabled'] }, { type: Input }], hidden: [{ type: HostBinding, args: ['class.asw-ix-hidden'] }, { type: Input }], imageCropped: [{ type: Output }], startCropImage: [{ type: Output }], imageLoaded: [{ type: Output }], cropperReady: [{ type: Output }], loadImageFailed: [{ type: Output }], transformChange: [{ type: Output }], onResize: [{ type: HostListener, args: ['window:resize'] }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UtY3JvcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9pbWFnZS1jcm9wL2ltYWdlLWNyb3AuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvaW1hZ2UtY3JvcC9pbWFnZS1jcm9wLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBRSx1QkFBdUIsRUFBcUIsU0FBUyxFQUFjLFlBQVksRUFBRSxXQUFXLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUE2QixRQUFRLEVBQUUsTUFBTSxFQUFpQixTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDNU8sT0FBTyxFQUFnQixhQUFhLEVB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