@firestitch/file
Advanced tools
Comparing version 0.3.30 to 0.3.31
@@ -0,0 +0,0 @@ import 'fileapi/plugins/FileAPI.exif.js'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './file-processor'; | ||
export * from './input-processor'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ElementRef, EventEmitter, NgZone } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ElementRef } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './fs-file-drag-base'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -15,2 +15,3 @@ import { ElementRef, EventEmitter, OnInit, NgZone } from '@angular/core'; | ||
imageQuality: any; | ||
showFilename: boolean; | ||
file: any; | ||
@@ -17,0 +18,0 @@ accept: any; |
@@ -38,2 +38,3 @@ "use strict"; | ||
_this.instruction = 'Drag & Drop your file or use the button below'; | ||
_this.showFilename = true; | ||
_this.previewWidth = 150; | ||
@@ -106,2 +107,6 @@ _this.previewHeight = 150; | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], FsFilePickerComponent.prototype, "showFilename", void 0); | ||
__decorate([ | ||
core_1.Input('file'), | ||
@@ -108,0 +113,0 @@ __metadata("design:type", Object), |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFilePickerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../fs-file-drag-base","name":"FsFileDragBaseComponent","line":25,"character":43},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"fs-file-picker","templateUrl":"fs-file-picker.component.html","styleUrls":["fs-file-picker.component.css"]}]}],"members":{"imageWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"imageHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"imageQuality":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"file":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3},"arguments":["file"]}]}],"accept":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"previewWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"previewHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"allowDownload":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"allowReupload":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"allowRemove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"select":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":65,"character":3}}]}],"remove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":66,"character":3}}]}],"fileInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":68,"character":3},"arguments":["fileInput"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":72,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":72,"character":27},"arguments":[{"__symbolic":"reference","module":"../../fs-file.providers","name":"FS_FILE_MODULE_CONFIG","line":72,"character":34}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":71,"character":25},null,{"__symbolic":"reference","module":"../../services","name":"CordovaService","line":73,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":74,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"selectFile":[{"__symbolic":"method"}],"removeFile":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFilePickerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../fs-file-drag-base","name":"FsFileDragBaseComponent","line":25,"character":43},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"fs-file-picker","templateUrl":"fs-file-picker.component.html","styleUrls":["fs-file-picker.component.css"]}]}],"members":{"imageWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"imageHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"imageQuality":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"showFilename":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"file":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3},"arguments":["file"]}]}],"accept":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"previewWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"previewHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"allowDownload":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"allowReupload":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"allowRemove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"select":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":66,"character":3}}]}],"remove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":67,"character":3}}]}],"fileInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":69,"character":3},"arguments":["fileInput"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":73,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":73,"character":27},"arguments":[{"__symbolic":"reference","module":"../../fs-file.providers","name":"FS_FILE_MODULE_CONFIG","line":73,"character":34}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":72,"character":25},null,{"__symbolic":"reference","module":"../../services","name":"CordovaService","line":74,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":75,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"selectFile":[{"__symbolic":"method"}],"removeFile":[{"__symbolic":"method"}]}}}}] |
export * from './fs-file-picker.component'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare class FsFilePreviewsBaseComponent { |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './fs-file-preview-base'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -7,2 +7,3 @@ import { EventEmitter, AfterViewInit } from '@angular/core'; | ||
preview: string; | ||
showFilename: boolean; | ||
_actions: any; | ||
@@ -9,0 +10,0 @@ _actionsTemplate: any; |
@@ -31,2 +31,3 @@ "use strict"; | ||
var _this = _super.call(this) || this; | ||
_this.showFilename = true; | ||
_this.previewWidth = 150; | ||
@@ -136,2 +137,6 @@ _this.previewHeight = 150; | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], FsFilePreviewComponent.prototype, "showFilename", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object), | ||
@@ -138,0 +143,0 @@ __metadata("design:paramtypes", [Object]) |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFilePreviewComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../fs-file-preview-base","name":"FsFilePreviewsBaseComponent","line":19,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":14,"character":1},"arguments":[{"selector":"fs-file-preview","templateUrl":"fs-file-preview.component.html","styleUrls":["fs-file-preview.component.css"]}]}],"members":{"_actions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"_actionsTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"previewWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"previewHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"_file":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3},"arguments":["file"]}]}],"remove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":37,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngAfterViewInit":[{"__symbolic":"method"}],"getActionClasses":[{"__symbolic":"method"}],"callAction":[{"__symbolic":"method"}],"generateFilePreview":[{"__symbolic":"method"}],"cleanActions":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFilePreviewComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../fs-file-preview-base","name":"FsFilePreviewsBaseComponent","line":19,"character":44},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":14,"character":1},"arguments":[{"selector":"fs-file-preview","templateUrl":"fs-file-preview.component.html","styleUrls":["fs-file-preview.component.css"]}]}],"members":{"showFilename":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"_actions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"_actionsTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"previewWidth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"previewHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"_file":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3},"arguments":["file"]}]}],"remove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngAfterViewInit":[{"__symbolic":"method"}],"getActionClasses":[{"__symbolic":"method"}],"callAction":[{"__symbolic":"method"}],"generateFilePreview":[{"__symbolic":"method"}],"cleanActions":[{"__symbolic":"method"}]}}}}] |
export * from './fs-file-preview.component'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { OnInit } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './fs-file-previews.component'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ElementRef, EventEmitter, AfterViewInit, NgZone } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './fs-file.component'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export * from './fs-file'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { EventEmitter } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './fs-file-preview-action.directive'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ModuleWithProviders } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
import { InjectionToken } from '@angular/core'; | ||
export declare const FS_FILE_MODULE_CONFIG: InjectionToken<any[]>; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function createBlob(data: any, name: any, type: any): any; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function getCordovaCamera(): any; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function getCordovaCapture(): any; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function getCordovaResolveLocalFileSystemURL(): any; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function hasCordovaCameraSupport(): any; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function hasCordovaCaptureSupport(): any; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export * from './scale-exif-image'; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function isImageType(type: string): RegExpMatchArray; |
@@ -0,0 +0,0 @@ "use strict"; |
export declare function ScaleExifImage(canvas: any, orientation: any, maxWidth?: any, maxHeight?: any): any; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export * from './fs-file.module'; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@firestitch/file",[],t):"object"==typeof exports?exports["@firestitch/file"]=t():e["@firestitch/file"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./index.ts")}({"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-picker/fs-file-picker.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,':host.dragover .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n}\n\n:host.dragover .select button {\n display: none;\n}\n\n:host.dragover .select .mat-icon {\n color: #07a8e6;\n}\n\n:host.dragover ::ng-deep .preview-container:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.select mat-icon {\n -webkit-transform: scale(1.8);\n transform: scale(1.8);\n color: #ddd;\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n',"",{version:3,sources:["/Users/mendor/work/fs-file/src/components/fs-file-picker/src/components/fs-file-picker/fs-file-picker.component.scss","/Users/mendor/work/fs-file/src/components/fs-file-picker/fs-file-picker.component.scss"],names:[],mappings:"AAEI;EACE,2BAAA;EACA,eAAA;CCDL;;ADHD;EAOQ,cAAA;CCAP;;ADGK;EACE,eAAA;CCAP;;ADXD;EAiBU,YAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,QAAA;EACA,OAAA;EACA,2BAAA;EACA,oBAAA;EACA,aAAA;CCFT;;ADSD;EACE,eAAA;CCND;;ADSD;EACE,mBAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;EACA,cAAA;EACA,oBAAA;EACA,uBAAA;EACA,cAAA;EACA,yBAAA;MAAA,sBAAA;UAAA,wBAAA;EACA,6BAAA;EAAA,8BAAA;MAAA,2BAAA;UAAA,uBAAA;EACA,+BAAA;UAAA,uBAAA;CCND;;ADSC;EACE,8BAAA;UAAA,sBAAA;EACA,YAAA;CCNH;;ADUD;EACE,gBAAA;EACA,eAAA;CCPD",file:"fs-file-picker.component.scss",sourcesContent:[':host {\n &.dragover {\n .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n\n button {\n display: none;\n }\n\n .mat-icon {\n color: #07a8e6;\n }\n }\n ::ng-deep {\n .preview-container {\n &:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n }\n }\n }\n }\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n justify-content: center;\n flex-direction: column;\n box-sizing: border-box;\n\n\n mat-icon {\n transform: scale(1.8);\n color: #ddd;\n }\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n.label {\n\n}\n',':host.dragover .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n}\n\n:host.dragover .select button {\n display: none;\n}\n\n:host.dragover .select .mat-icon {\n color: #07a8e6;\n}\n\n:host.dragover ::ng-deep .preview-container:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n justify-content: center;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.select mat-icon {\n transform: scale(1.8);\n color: #ddd;\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n'],sourceRoot:""}])},"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-preview/fs-file-preview.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,".file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n@media only screen and (max-width: 767.98px) {\n .actions {\n display: block;\n }\n}\n\n@media only screen and (min-width: 768px) {\n .actions {\n display: none;\n background: rgba(0, 0, 0, .5);\n }\n}\n\n.actions .action {\n position: absolute;\n cursor: pointer;\n}\n\n.actions .action.top-left {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.top-right {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.bottom-left {\n bottom: 5%;\n left: 5%;\n}\n\n.actions .action.bottom-right {\n bottom: 5%;\n right: 5%;\n}\n\n.actions .action.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n}\n\n.actions .action.mat-mini-fab .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n}\n\n:host {\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n}\n\n:host:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n}\n\n:host:hover .has-actions .actions,\n:host:focus .has-actions .actions {\n display: block;\n}\n\n:host img {\n display: block;\n border-radius: 3px;\n -o-object-fit: cover;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n:host ::ng-deep .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n}\n\n:host ::ng-deep .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n\n","",{version:3,sources:["/Users/mendor/work/fs-file/src/components/fs-file-preview/src/components/fs-file-preview/fs-file-preview.component.scss","/Users/mendor/work/fs-file/src/components/fs-file-preview/fs-file-preview.component.scss","/Users/mendor/work/fs-file/src/components/fs-file-preview/src/styles/_mixins.scss"],names:[],mappings:"AAEA;EACE,kBAAA;EACA,mBAAA;EACA,0BAAA;EACA,gBAAA;EACA,gBAAA;CCDD;;ADID;EACE,oBAAA;EACA,iBAAA;EACA,wBAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;CCDD;;ADID;EACE,iBAAA;CCDD;;ADID;EACE,mBAAA;EAWA,YAAA;EACA,aAAA;EACA,OAAA;EACA,QAAA;CCXD;;ACKC;EFTF;IAII,eAAA;GCKD;CACF;;ACDC;EFTF;IAQI,cAAA;IACA,8BAAA;GCOD;CACF;;ADjBD;EAmBI,mBAAA;EACA,gBAAA;CCEH;;ADtBD;EAuBM,QAAA;EACA,UAAA;CCGL;;ADAG;EACE,QAAA;EACA,UAAA;CCGL;;ADhCD;EAiCM,WAAA;EACA,SAAA;CCGL;;ADrCD;EAsCM,WAAA;EACA,UAAA;CCGL;;AD1CD;EA2CM,WAAA;EACA,YAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,6BAAA;CCGL;;ADpDD;EAoDQ,eAAA;EACA,6BAAA;CCIP;;ADED;EAEE,sBAAA;EACA,mBAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;CCAD;;ADEC;EACE,kBAAA;EACA,oBAAA;EACA,sBAAA;CCCH;;ADZD;;EAiBM,eAAA;CCAL;;ADjBD;EAsBI,eAAA;EACA,mBAAA;EACA,qBAAA;KAAA,kBAAA;EACA,YAAA;EACA,aAAA;CCDH;;ADKD;EAEI,WAAA;EACA,6BAAA;CCHH;;ADAD;EAOI,mBAAA;EACA,SAAA;EACA,UAAA;EACA,kBAAA;EACA,iBAAA;CCHH;;ADOD;EACE;IACI,eAAA;IACA,iBAAA;GCJH;CACF",file:"fs-file-preview.component.scss",sourcesContent:['@import "../../styles/mixins";\n\n.file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n\n @include apply-to(less-than, phone) {\n display: block;\n }\n\n @include apply-to(greater-than, phone) {\n display: none;\n background: rgba(0, 0, 0, 0.5);\n }\n\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n\n .action {\n\n position: absolute;\n cursor: pointer;\n\n &.top-left {\n top: 5%;\n right: 5%;\n }\n\n &.top-right {\n top: 5%;\n right: 5%;\n }\n\n &.bottom-left {\n bottom: 5%;\n left: 5%;\n }\n\n &.bottom-right {\n bottom: 5%;\n right: 5%;\n }\n\n &.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n\n .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n }\n }\n }\n}\n\n:host {\n\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n\n &:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n }\n\n &:hover .has-actions,\n &:focus .has-actions {\n .actions {\n display: block;\n }\n }\n\n img {\n display: block;\n border-radius: 3px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n}\n\n:host ::ng-deep {\n .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n }\n\n .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n }\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n',".file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n@media only screen and (max-width: 767.98px) {\n .actions {\n display: block;\n }\n}\n\n@media only screen and (min-width: 768px) {\n .actions {\n display: none;\n background: rgba(0, 0, 0, 0.5);\n }\n}\n\n.actions .action {\n position: absolute;\n cursor: pointer;\n}\n\n.actions .action.top-left {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.top-right {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.bottom-left {\n bottom: 5%;\n left: 5%;\n}\n\n.actions .action.bottom-right {\n bottom: 5%;\n right: 5%;\n}\n\n.actions .action.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n}\n\n.actions .action.mat-mini-fab .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n}\n\n:host {\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n}\n\n:host:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n}\n\n:host:hover .has-actions .actions,\n:host:focus .has-actions .actions {\n display: block;\n}\n\n:host img {\n display: block;\n border-radius: 3px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n:host ::ng-deep .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n}\n\n:host ::ng-deep .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n\n",'@import "variables";\n\n\n@mixin apply-to($ltgt, $device) {\n $extrema: null;\n $boundary-target: null;\n $delta: null;\n\n @if $ltgt == less-than {\n $extrema: max;\n $delta: -1;\n } @else if $ltgt == greater-than {\n $extrema: min;\n $delta: +1;\n }\n\n @if $device == phone {\n @if $ltgt == less-than {\n $boundary-target: $phone-width-max;\n } @else if $ltgt == greater-than {\n $boundary-target: $tablet-width-min;\n }\n } @else if $device == tablet {\n @if $ltgt == less-than {\n $boundary-target: $tablet-width-min;\n } @else if $ltgt == greater-than {\n $boundary-target: $tablet-width-max;\n }\n } @else if $device == desktop {\n $boundary-target: $desktop-width-min;\n }\n\n @media only screen and (#{$extrema}-width: $boundary-target) {\n @content;\n }\n}\n\n@mixin phone {\n @media only screen and (max-width: #{$phone-width-max}) {\n @content;\n }\n}\n\n@mixin tablet {\n @media only screen and (min-width: #{$tablet-width-min}) and (max-width: #{$tablet-width-max}) {\n @content;\n }\n}\n\n@mixin desktop {\n @media only screen and (min-width: #{$desktop-width-min}) {\n @content;\n }\n}\n'],sourceRoot:""}])},"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-previews/fs-file-previews.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview {\n margin-right: 10px;\n}\n\nfs-file-preview:last-child {\n margin-right: 0;\n}\n\n","",{version:3,sources:["/Users/mendor/work/fs-file/src/components/fs-file-previews/src/components/fs-file-previews/fs-file-previews.component.scss","/Users/mendor/work/fs-file/src/components/fs-file-previews/fs-file-previews.component.scss"],names:[],mappings:"AAAA;EACE,mBAAA;EACA,eAAA;CCCD;;ADED;EACE,mBAAA;CCCD;;ADFD;EAII,gBAAA;CCEH",file:"fs-file-previews.component.scss",sourcesContent:[".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview { \n margin-right: 10px; \n\n &:last-child {\n margin-right: 0;\n }\n}",".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview {\n margin-right: 10px;\n}\n\nfs-file-preview:last-child {\n margin-right: 0;\n}\n\n"],sourceRoot:""}])},"../node_modules/css-loader/lib/css-base.js":function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=o(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([r]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=n(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},"./classes/file-processor.ts":function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function a(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}c((o=o.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,r=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=t.call(e,c)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var r=n("fileapi");n("fileapi/plugins/FileAPI.exif.js");var s=n("rxjs/Observable"),a=n("rxjs/operators/switchMap"),c=n("rxjs/observable/of");n("rxjs/add/observable/fromPromise");var p=n("./models/index.ts"),l=n("./helpers/index.ts"),f=function(){function e(){}return e.prototype.process=function(e,t){var n=this,o=!0,i=new p.ProcessConfig(t);Array.isArray(e)||(e=[e],o=!1);var r=[];return e.forEach(function(e){if(e.typeImage){var t=new Promise(function(t,o){n.applyTransforms(e,t,o,i)});r.push(t)}else r.push(e)}),s.Observable.fromPromise(Promise.all(r)).pipe(a.switchMap(function(e){return!o&&e[0]?c.of(e[0]):c.of(e)}))},e.prototype.getImageInfo=function(e){return new Promise(function(t,n){r.getInfo(e.file,function(e,o){e?n(e):t(o)})})},e.prototype.transformFile=function(e,t,n){return o(this,void 0,void 0,function(){var n=this;return i(this,function(o){return[2,new Promise(function(o,i){r.Image.transform(e.file,[t],!0,function(r,s){if(!r&&s[0]){var a=void 0;a=l.ScaleExifImage(s[0],e.exifInfo.Orientation),a.toBlob(function(t){e.file=l.createBlob([t],e.file.name,e.type),n.getImageInfo(e).then(function(t){e.parseInfo(t),o(e)}).catch(function(t){i({error:t,originFile:e})})},t.type,a.quality)}else i(r)})})]})})},e.prototype.applyTransforms=function(e,t,n,r){return o(this,void 0,void 0,function(){var o,s,a,c;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getImageInfo(e)];case 1:return o=i.sent(),e.parseInfo(o),s=this.generateTransformParams(e,r),[4,this.transformFile(e,s,r)];case 2:return a=i.sent(),t(a),[3,4];case 3:return c=i.sent(),n(c),[3,4];case 4:return[2]}})})},e.prototype.generateTransformParams=function(e,t){var n={};return n.type=t.format?"image/"+t.format:e.type,n.maxWidth=t.width,n.maxHeight=t.height,void 0!==t.quality&&(n.quality=t.quality||1),n},e.prototype.alertImageProcessingError=function(e){alert("File "+e.name+" can't be processed as image. File was rejected")},e}();t.FileProcessor=f},"./classes/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./classes/file-processor.ts")),o(n("./classes/input-processor.ts"))},"./classes/input-processor.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("@angular/core"),i=n("fileapi"),r=n("./models/index.ts"),s=n("./helpers/index.ts"),a=function(){function e(e,t){var n=this;this.cordovaService=e,this.ngZone=t,this.cordova={camera:null,capture:null,resolveLocalFileSystemURL:null},this.multiple=!1,this.api=null,this.capture=null,this.select=new o.EventEmitter,this._accept="*",this._acceptableTypes=new Map,this._acceptableExts=new Set,e.isReady().subscribe(function(){n.cordova.camera=s.getCordovaCamera(),n.cordova.capture=s.getCordovaCapture(),n.cordova.resolveLocalFileSystemURL=s.getCordovaResolveLocalFileSystemURL()})}return Object.defineProperty(e.prototype,"accept",{get:function(){return this._accept},set:function(e){this._acceptableTypes.clear(),this._acceptableExts.clear(),this.parseAcceptTypes(e),this._accept=e.trim()},enumerable:!0,configurable:!0}),e.prototype.registerInput=function(e){var t=this;e&&(this.inputEl=e.nativeElement,i.event.on(this.inputEl,"change",function(e){var n=i.getFiles(e).filter(function(e){var n,o=e.name.split(".");return o&&Array.isArray(o)&&(n=o[o.length-1]),t.checkAcceptableTypes(e.type,n)});n&&n.length>0&&(t.inputEl.value=null,t.selectFiles(n))}))},e.prototype.registerDrop=function(e){var t=this;e&&(this.containerEl=e.nativeElement,i.event.on(this.containerEl,"drop",function(e){var n=i.getFiles(e).filter(function(e){var n,o=e.name.split(".");return o&&Array.isArray(o)&&(n=o[o.length-1]),t.checkAcceptableTypes(e.type,n)});n&&n.length>0&&(t.inputEl.value=null,t.selectFiles(n))}))},e.prototype.registerLabel=function(e){var t=this;e&&i.event.on(e.nativeElement,"click",function(){if("cordova"===t.api||!t.api){if(s.hasCordovaCameraSupport()){if("library"===t.capture)return t.selectCordovaCameraLibrary();if(t.isAcceptImage())return t.selectCordovaCameraPicture()}if(s.hasCordovaCaptureSupport()&&null!==t.capture&&t.isAcceptVideo())return t.selectCordovaCaptureVideo()}t.inputEl.click()})},e.prototype.cordovaCameraCleanup=function(){this.cordova.camera.cleanup()},e.prototype.selectCordovaCaptureImage=function(){var e=this;this.cordova.capture.captureImage(function(t){e.successCaptureFiles(t)},this.errorCaptureFiles,{limit:1})},e.prototype.selectCordovaCaptureVideo=function(){var e=this;this.cordova.capture.captureVideo(function(t){e.successCaptureFiles(t)},this.errorCaptureFiles,{limit:1})},e.prototype.successCaptureFiles=function(e){var t=this;e.forEach(function(e){t.getCordovaFile(e.fullPath).then(function(e){t.ngZone.run(function(){t.selectFiles([e])})}).catch(function(e){console.log(e)})})},e.prototype.errorCaptureFiles=function(e){console.log(e)},e.prototype.selectCordovaCameraLibrary=function(){return this.selectCordovaCamera(this.cordova.camera.PictureSourceType.PHOTOLIBRARY,this.cordova.camera.MediaType.ALLMEDIA)},e.prototype.selectCordovaCameraPicture=function(){return this.selectCordovaCamera(this.cordova.camera.PictureSourceType.CAMERA,this.cordova.camera.MediaType.PICTURE)},e.prototype.selectCordovaCamera=function(e,t){var n=this,o={destinationType:this.cordova.camera.DestinationType.FILE_URI,encodingType:this.cordova.camera.DestinationType.JPEG,sourceType:e,mediaType:t,quality:100,correctOrientation:!1};if(this.accept.length){var i=this.isAcceptVideo(),r=this.isAcceptImage();i&&!r?o.mediaType=this.cordova.camera.MediaType.VIDEO:r&&!i&&(o.mediaType=this.cordova.camera.MediaType.PICTURE)}this.cordova.camera.getPicture(function(e){n.getCordovaFile(e).then(function(e){n.ngZone.run(function(){n.selectFiles([e])}),n.cordovaCameraCleanup()}).catch(function(e){console.log(e),n.cordovaCameraCleanup()})},function(){n.cordovaCameraCleanup()},o)},e.prototype.getCordovaFile=function(e){var t=this;return e.match(/^file:/)||(e="file://".concat(e)),new Promise(function(n,o){t.cordova.resolveLocalFileSystemURL(e,function(e){e.file(function(e){var t=new FileReader;t.onloadend=function(t){for(var o=t.target.result.split("base64,").pop(),i=atob(o),r=i.length,a=new Uint8Array(r);r--;)a[r]=i.charCodeAt(r);var c=s.createBlob([a],e.name,e.type);n(c)},t.readAsDataURL(e)},function(e){o(e)})},function(e){o(e)})})},e.prototype.isAcceptVideo=function(){return this.accept.match(/video/i)},e.prototype.isAcceptImage=function(){return this.accept.match(/image/i)},e.prototype.selectFiles=function(e){e=e.map(function(e){return new r.FsFile(e)}),1===e.length&&(e=e[0]),this.select.emit(e)},e.prototype.checkAcceptableTypes=function(e,t){e=e.trim();var n=e.split("/"),o=n[0],i=n[1],r=this._acceptableTypes.get(o);return"*"===this.accept||!!r&&(r.has("*")||r.has(i))||this._acceptableExts.has("."+t)},e.prototype.parseAcceptTypes=function(e){var t=this;if("string"==typeof e||0!==e.length){e.split(",").map(function(e){return e.trim()}).forEach(function(e){var n=e.indexOf("/")>-1,o=0===e.indexOf(".");if(n){var i=e.split("/"),r=i[0],s=i[1];if(t._acceptableTypes.has(r)){var a=t._acceptableTypes.get(r);a.has(s)||a.add(s)}else{var c=new Set;t._acceptableTypes.set(r,c),c.add(s)}}o&&(t._acceptableExts.has(e)||t._acceptableExts.add(e))})}},e}();t.InputProcessor=a},"./components/fs-file-drag-base/fs-file-drag-base.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=function(){function e(e){this.el=e,this.fileOverTarget=!1}return e.prototype.onDragOverElement=function(e){this.el.nativeElement.contains(e.target)&&(this.fileOverTarget=!0)},e.prototype.onDrop=function(e){this.fileOverTarget&&(e.preventDefault(),e.stopPropagation(),this.fileOverTarget=!1)},e.prototype.onDragOver=function(e){this.fileOverTarget&&(e.preventDefault(),e.stopPropagation(),this.el.nativeElement.contains(e.target)||(this.fileOverTarget=!1))},o([r.HostBinding("class.dragover"),i("design:type",Object)],e.prototype,"fileOverTarget",void 0),o([r.HostListener("dragenter",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDragOverElement",null),o([r.HostListener("window:drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),o([r.HostListener("window:dragover",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDragOver",null),e=o([r.Component({selector:"fs-file-drag-base",template:""}),i("design:paramtypes",[r.ElementRef])],e)}();t.FsFileDragBaseComponent=s},"./components/fs-file-drag-base/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-drag-base/fs-file-drag-base.ts"))},"./components/fs-file-picker/fs-file-picker.component.html":function(e,t){e.exports='<div class="mat-form-field-label fs-form-field-label">\n <ng-content select="[fs-file-label]"></ng-content>\n</div>\n<fs-file-preview class="preview"\n *ngIf="_file; else preview"\n (remove)="removeFile($event)"\n [file]="_file"\n [previewWidth]="previewWidth"\n [previewHeight]="previewHeight">\n <ng-template fs-file-preview-action placement="top-right" action="remove" tooltip="Remove" *ngIf="allowRemove">\n <mat-icon>close</mat-icon>\n </ng-template>\n <ng-template fs-file-preview-action placement="bottom-right" tooltip="Reupload" *ngIf="allowReupload">\n <fs-file [accept]="accept"\n (select)="selectFile($event)"\n [imageWidth]="imageWidth"\n [imageHeight]="imageHeight"\n [imageQuality]="imageQuality">\n <mat-icon>cloud_upload</mat-icon>\n </fs-file>\n </ng-template>\n <ng-template fs-file-preview-action placement="bottom-left" action="download" tooltip="Download" *ngIf="allowDownload && _file.url">\n <a [href]="_file.url" target="_blank" class="download"><mat-icon>cloud_download</mat-icon></a>\n </ng-template>\n</fs-file-preview>\n\n<ng-template #preview>\n <fs-file (select)="selectFile($event)"\n [accept]="accept"\n [imageWidth]="imageWidth"\n [imageHeight]="imageHeight"\n [imageQuality]="imageQuality">\n <div class="select">\n <mat-icon>cloud_upload</mat-icon>\n <div class="instruction">{{instruction}}</div>\n <div class="mat-raised-button mat-primary">Upload</div>\n </div>\n </fs-file>\n</ng-template>\n\n'},"./components/fs-file-picker/fs-file-picker.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-picker/fs-file-picker.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-picker/fs-file-picker.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n("@angular/core"),c=n("./components/fs-file-drag-base/index.ts"),p=n("./classes/index.ts"),l=n("./services/index.ts"),f=n("./fs-file.providers.ts"),u=function(e){function t(t,n,o,i){var r=e.call(this,t)||this;return r.el=t,r.moduleConfig=n,r.inputProcessor=null,r.instruction="Drag & Drop your file or use the button below",r.previewWidth=150,r.previewHeight=150,r.allowReupload=!0,r.select=new a.EventEmitter,r.remove=new a.EventEmitter,r.inputProcessor=new p.InputProcessor(o,i),r}return o(t,e),Object.defineProperty(t.prototype,"file",{set:function(e){this._file=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"accept",{get:function(){return this.inputProcessor.accept||"*"},set:function(e){this.inputProcessor.accept=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.moduleConfig&&(void 0===this.allowDownload&&(this.allowDownload=this.moduleConfig.allowDownload),void 0===this.allowRemove&&(this.allowRemove=this.moduleConfig.allowRemove))},t.prototype.selectFile=function(e){this._file=e,this.select.emit(e)},t.prototype.removeFile=function(e){this._file=void 0,this.remove.emit(this._file)},i([a.Input(),r("design:type",Object)],t.prototype,"imageWidth",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"imageHeight",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"imageQuality",void 0),i([a.Input("file"),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"file",null),i([a.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"accept",null), | ||
i([a.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"disabled",null),i([a.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowDownload",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowReupload",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowRemove",void 0),i([a.Output(),r("design:type",Object)],t.prototype,"select",void 0),i([a.Output(),r("design:type",Object)],t.prototype,"remove",void 0),i([a.ViewChild("fileInput"),r("design:type",Object)],t.prototype,"fileInput",void 0),t=i([a.Component({selector:"fs-file-picker",template:n("./components/fs-file-picker/fs-file-picker.component.html"),styles:[n("./components/fs-file-picker/fs-file-picker.component.scss")]}),s(1,a.Optional()),s(1,a.Inject(f.FS_FILE_MODULE_CONFIG)),r("design:paramtypes",[a.ElementRef,Object,l.CordovaService,a.NgZone])],t)}(c.FsFileDragBaseComponent);t.FsFilePickerComponent=u},"./components/fs-file-picker/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-picker/fs-file-picker.component.ts"))},"./components/fs-file-preview-base/fs-file-preview-base.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=n("./directives/index.ts"),a=function(){function e(){this.actions=[],this.actionsTemplate=[]}return Object.defineProperty(e.prototype,"actionsParams",{set:function(e){var t=e.toArray().map(function(e,t){var n=Object.assign({},e);return n.index=t,n.forTypes&&!Array.isArray(n.forTypes)&&(n.forTypes=n.forTypes.split(",").map(function(e){return e.trim()})),n});(n=this.actions).push.apply(n,t);var n},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionsTemplateRefs",{set:function(e){(t=this.actionsTemplate).push.apply(t,e.toArray());var t},enumerable:!0,configurable:!0}),o([r.ContentChildren(s.FsFilePreviewActionDirective),i("design:type",r.QueryList),i("design:paramtypes",[r.QueryList])],e.prototype,"actionsParams",null),o([r.ContentChildren(s.FsFilePreviewActionDirective,{read:r.TemplateRef}),i("design:type",r.QueryList),i("design:paramtypes",[r.QueryList])],e.prototype,"actionsTemplateRefs",null),e=o([r.Component({selector:"fs-file-previews-base",template:""}),i("design:paramtypes",[])],e)}();t.FsFilePreviewsBaseComponent=a},"./components/fs-file-preview-base/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-preview-base/fs-file-preview-base.ts"))},"./components/fs-file-preview/fs-file-preview.component.html":function(e,t){e.exports='<div [style.width.px]="previewWidth" [style.height.px]="previewHeight" class="preview-container" [ngClass]="{ \'has-actions\': !!actions.length }">\n\n \x3c!-- Image container --\x3e\n <ng-container *ngIf="file.typeImage; else nonImage">\n <img [src]="preview" *ngIf="preview">\n <mat-spinner class="spinner" *ngIf="file.progress" [diameter]="previewWidth/2"></mat-spinner>\n </ng-container>\n\n \x3c!-- Non image container --\x3e\n <ng-template #nonImage>\n <div class="file-ext">{{file.extension}}</div>\n <div class="file-name" [matTooltip]="file.name">{{file.name}}</div>\n <mat-spinner class="spinner" *ngIf="file.progress" [diameter]="previewWidth/2"></mat-spinner>\n </ng-template>\n\n \x3c!-- Actions --\x3e\n <div class="actions">\n \x3c!--\n Used label instead of button because FireFox doesn\'t work properly with click event on button.\n If we have action with <input type="file"> inside button\n --\x3e\n <label class="action mat-mini-fab mat-primary"\n *ngFor="let action of filteredActions"\n [ngClass]="getActionClasses(action)"\n [matTooltip]="action.tooltip"\n (click)="callAction(action)">\n <span class="mat-button-wrapper">\n <ng-template [ngTemplateOutlet]="actionsTemplate[action.index]"></ng-template>\n </span>\n </label>\n </div>\n</div>\n'},"./components/fs-file-preview/fs-file-preview.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-preview/fs-file-preview.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-preview/fs-file-preview.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("fileapi"),c=n("./models/index.ts"),p=n("./components/fs-file-preview-base/index.ts"),l=n("./helpers/index.ts"),f=function(e){function t(){var t=e.call(this)||this;return t.previewWidth=150,t.previewHeight=150,t.remove=new s.EventEmitter,t.filteredActions=[],t}return o(t,e),Object.defineProperty(t.prototype,"_actions",{set:function(e){(t=this.actions).push.apply(t,e);var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_actionsTemplate",{set:function(e){(t=this.actionsTemplate).push.apply(t,e);var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_file",{set:function(e){this.file=e,this.generateFilePreview(e)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.cleanActions()},t.prototype.getActionClasses=function(e){return e.placement?[e.placement]:[]},t.prototype.callAction=function(e){e.click&&e.click.emit(this.file),"remove"==e.action&&this.remove.emit(this.file)},t.prototype.generateFilePreview=function(e){var t=this;if(e.url)return void(this.preview=e.url);this.file.typeImage&&(e.progress=!0,a.Image.transform(e.file,[{width:this.previewWidth,height:this.previewHeight,preview:!0}],!0,function(n,o){if(!n&&o[0]){var i=l.ScaleExifImage(o[0],e.exifInfo.Orientation,t.previewWidth,t.previewHeight);t.preview=i.toDataURL(e.type),e.progress=!1}else console.log("FsFilePreview: Image preview error for file "+e.name),e.progress=!1}))},t.prototype.cleanActions=function(){for(var e in this.actions)if(this.actions.hasOwnProperty(e))if(this.actions[e].forTypes)for(var t=this.file.type.split("/"),n=t[0],o=t[1],i=this.actions[e].forTypes,r=0;r<i.length;r++){var s=i[r].split("/"),a=s[0],c=s[1],p=a===n&&(c===o||"*"===c);if(p){this.filteredActions.push(this.actions[e]);break}}else this.filteredActions.push(this.actions[e])},i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"_actions",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"_actionsTemplate",null),i([s.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([s.Input("file"),r("design:type",c.FsFile),r("design:paramtypes",[c.FsFile])],t.prototype,"_file",null),i([s.Output(),r("design:type",Object)],t.prototype,"remove",void 0),t=i([s.Component({selector:"fs-file-preview",template:n("./components/fs-file-preview/fs-file-preview.component.html"),styles:[n("./components/fs-file-preview/fs-file-preview.component.scss")]}),r("design:paramtypes",[])],t)}(p.FsFilePreviewsBaseComponent);t.FsFilePreviewComponent=f},"./components/fs-file-preview/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-preview/fs-file-preview.component.ts"))},"./components/fs-file-previews/fs-file-previews.component.html":function(e,t){e.exports='<fs-file-preview\n *ngFor="let file of files"\n [file]="file"\n [_actions]="actions"\n [_actionsTemplate]="actionsTemplate"\n [previewWidth]="previewWidth"\n [previewHeight]="previewHeight"\n (remove)="removeFile($event)"\n class="preview">\n</fs-file-preview>\n'},"./components/fs-file-previews/fs-file-previews.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-previews/fs-file-previews.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-previews/fs-file-previews.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./components/fs-file-preview-base/index.ts"),c=function(e){function t(){var t=e.call(this)||this;return t.previewWidth=150,t.previewHeight=150,t.queue=!0,t}return o(t,e),t.prototype.ngOnInit=function(){},t.prototype.removeFile=function(e){var t=this.files.indexOf(e);t>-1&&this.files.splice(t,1)},i([s.Input(),r("design:type",Object)],t.prototype,"files",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([s.HostBinding("class.queue"),r("design:type",Object)],t.prototype,"queue",void 0),t=i([s.Component({selector:"fs-file-previews",template:n("./components/fs-file-previews/fs-file-previews.component.html"),styles:[n("./components/fs-file-previews/fs-file-previews.component.scss")],encapsulation:s.ViewEncapsulation.None}),r("design:paramtypes",[])],t)}(a.FsFilePreviewsBaseComponent);t.FsFilePreviewsComponent=c},"./components/fs-file-previews/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-previews/fs-file-previews.component.ts"))},"./components/fs-file/fs-file.component.html":function(e,t){e.exports='<label #fileLabel>\n <ng-content></ng-content>\n</label>\n<input type="file"\n [hidden]="true"\n [disabled]="inputProcessor.disabled"\n [multiple]="inputProcessor.multiple"\n [attr.accept]="inputProcessor.accept"\n [attr.capture]="inputProcessor.capture"\n #fileInput>'},"./components/fs-file/fs-file.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./components/fs-file-drag-base/index.ts"),c=n("./classes/index.ts"),p=n("rxjs/operators"),l=n("rxjs/observable/of"),f=n("lodash"),u=n("./services/index.ts"),d=function(e){function t(t,n,o){var i=e.call(this,n)||this;i.el=n,i.inputProcessor=null,i.autoProcess=!1,i.processOptions={width:void 0,height:void 0,quality:1},i.inputProcessor=new c.InputProcessor(t,o);var r=new c.FileProcessor;return i.select=i.inputProcessor.select.pipe(p.switchMap(function(e){return i.inputProcessor.multiple&&!f.isArray(e)&&(e=[e]),i.autoProcess?r.process(e,i.processOptions):l.of(e)})),i}return o(t,e),Object.defineProperty(t.prototype,"multiple",{get:function(){return this.inputProcessor.multiple},set:function(e){this.inputProcessor.multiple="boolean"==typeof e?e:"true"===e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"api",{get:function(){return this.inputProcessor.api},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"capture",{get:function(){return this.inputProcessor.capture},set:function(e){this.inputProcessor.capture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"accept",{get:function(){return this.inputProcessor.accept||"*"},set:function(e){this.inputProcessor.accept=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.inputProcessor.disabled},set:function(e){this.inputProcessor.disabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{set:function(e){void 0!==e&&(this.processOptions.width=+e,this.autoProcess=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{set:function(e){void 0!==e&&(this.processOptions.height=+e,this.autoProcess=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageQuality",{set:function(e){var t=parseFloat(e);isNaN(t)||(this.processOptions.quality=t,this.autoProcess=!0)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.inputProcessor.registerInput(this.fileInput),this.inputProcessor.registerLabel(this.fileLabel),this.inputProcessor.registerDrop(this.el)},i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"multiple",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"capture",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"accept",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"disabled",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageWidth",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageHeight",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageQuality",null),i([s.Output("select"),r("design:type",s.EventEmitter)],t.prototype,"select",void 0),i([s.ViewChild("fileInput"),r("design:type",Object)],t.prototype,"fileInput",void 0),i([s.ViewChild("fileLabel"),r("design:type",Object)],t.prototype,"fileLabel",void 0),t=i([s.Component({selector:"fs-file",template:n("./components/fs-file/fs-file.component.html"),styles:[":host label { cursor: pointer }"]}),r("design:paramtypes",[u.CordovaService,s.ElementRef,s.NgZone])],t)}(a.FsFileDragBaseComponent);t.FsFileComponent=d},"./components/fs-file/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file/fs-file.component.ts"))},"./components/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./components/fs-file/index.ts")),o(n("./components/fs-file-previews/index.ts")),o(n("./components/fs-file-preview/index.ts")),o(n("./components/fs-file-picker/index.ts")),o(n("./components/fs-file-drag-base/index.ts")),o(n("./components/fs-file-preview-base/index.ts"))},"./directives/fs-file-preview-action.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=function(){function e(){this.index=null,this.click=new r.EventEmitter}return o([r.Input(),i("design:type",String)],e.prototype,"placement",void 0),o([r.Input(),i("design:type",String)],e.prototype,"tooltip",void 0),o([r.Input(),i("design:type",String)],e.prototype,"action",void 0),o([r.Input("for-types"),i("design:type",Object)],e.prototype,"forTypes",void 0),o([r.Output(),i("design:type",Object)],e.prototype,"click",void 0),e=o([r.Directive({selector:"[fs-file-preview-action]"})],e)}();t.FsFilePreviewActionDirective=s},"./directives/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./directives/fs-file-preview-action.directive.ts"))},"./fs-file.module.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),r=n("@angular/common"),s=n("@angular/material"),a=n("@firestitch/common"),c=n("./components/index.ts"),p=n("./directives/index.ts"),l=n("./services/index.ts"),f=n("./fs-file.providers.ts"),u=function(){function e(){}return t=e,e.forRoot=function(e){return void 0===e&&(e=null),{ngModule:t,providers:[{provide:f.FS_FILE_MODULE_CONFIG,useValue:e||{allowDownload:!0,allowRemove:!0}}]}},e=t=o([i.NgModule({imports:[r.CommonModule,a.FsCommonModule,s.MatIconModule,s.MatTooltipModule,s.MatProgressSpinnerModule,s.MatButtonModule],exports:[c.FsFileComponent,c.FsFilePreviewsComponent,c.FsFilePreviewComponent,p.FsFilePreviewActionDirective,c.FsFilePickerComponent],entryComponents:[],declarations:[c.FsFileComponent,c.FsFilePreviewsComponent,c.FsFilePreviewComponent,p.FsFilePreviewActionDirective,c.FsFileDragBaseComponent,c.FsFilePreviewsBaseComponent,c.FsFilePickerComponent],providers:[l.CordovaService]})],e);var t}();t.FsFileModule=u},"./fs-file.providers.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("@angular/core");t.FS_FILE_MODULE_CONFIG=new o.InjectionToken("fs-file.module-config")},"./helpers/create-blob.ts":function(e,t,n){"use strict";function o(e,t,n){var o=new Blob(e,{type:n});return o.name=t,o}Object.defineProperty(t,"__esModule",{value:!0}),t.createBlob=o},"./helpers/get-cordova-camera.ts":function(e,t,n){"use strict";function o(){return navigator.camera}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaCamera=o},"./helpers/get-cordova-capture.ts":function(e,t,n){"use strict";function o(){var e=navigator.device;return e?e.capture:null}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaCapture=o},"./helpers/get-cordova-resolve-local-file-system-url.ts":function(e,t,n){"use strict";function o(){return window.resolveLocalFileSystemURL}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaResolveLocalFileSystemURL=o},"./helpers/has-cordova-camera-support.ts":function(e,t,n){"use strict";function o(){return i.getCordovaCamera()&&i.getCordovaResolveLocalFileSystemURL()}Object.defineProperty(t,"__esModule",{value:!0});var i=n("./helpers/index.ts");t.hasCordovaCameraSupport=o},"./helpers/has-cordova-capture-support.ts":function(e,t,n){"use strict";function o(){return i.getCordovaCapture()&&i.getCordovaResolveLocalFileSystemURL()}Object.defineProperty(t,"__esModule",{value:!0});var i=n("./helpers/index.ts");t.hasCordovaCaptureSupport=o},"./helpers/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./helpers/scale-exif-image.ts")),o(n("./helpers/is-image-type.ts")),o(n("./helpers/get-cordova-camera.ts")),o(n("./helpers/get-cordova-capture.ts")),o(n("./helpers/create-blob.ts")),o(n("./helpers/get-cordova-resolve-local-file-system-url.ts")),o(n("./helpers/has-cordova-camera-support.ts")),o(n("./helpers/has-cordova-capture-support.ts"))},"./helpers/is-image-type.ts":function(e,t,n){"use strict";function o(e){return e.match(/^image\/(gif|jpe?g|pjpeg|png|svg\+xml|tiff|vnd\.microsoft\.icon|vnd\.wap\.wbmp|webp)/i)}Object.defineProperty(t,"__esModule",{value:!0}),t.isImageType=o},"./helpers/scale-exif-image.ts":function(e,t,n){"use strict";function o(e,t,n,o){void 0===n&&(n=null),void 0===o&&(o=null);var i=e.width,r=e.height;n&&n<i&&(i=n),o&&o<r&&(r=o);var s=document.createElement("canvas");s.width=i,s.height=r;var a=s.getContext("2d");switch(t){case 2:case 4:case 5:case 7:return a.scale(-1,1),a.drawImage(e,0,0,i,r,-i,0,i,r),s;default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleExifImage=o},"./index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./fs-file.module.ts")),o(n("./components/index.ts")),o(n("./classes/index.ts")),o(n("./directives/index.ts")),o(n("./models/index.ts"))},"./models/fs-file.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./helpers/index.ts"),i=function(){function e(e,t,n){if(this.progress=!1,this.exifInfo={},e instanceof File||e instanceof Blob)this.file=e;else{var i=t||e;if(!n){var r=i.match(/(jpe?g|png|gif|tiff?)$/i);r&&(n=r[1])}n&&(n="image/"+n);var s=o.createBlob([""],t,n);this.url=e,this.file=s}}return Object.defineProperty(e.prototype,"file",{get:function(){return this._file},set:function(e){this._file=e,this.size=e.size,this.name=e.name,this.type=e.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e;var t=String(e).split(".");t.length>1&&(this.extension=t[t.length-1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileOptions",{get:function(){return this._fileOptions},set:function(e){this._fileOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeImage",{get:function(){return o.isImageType(this.type)},enumerable:!0,configurable:!0}),e.prototype.parseInfo=function(e){this.imageWidth=e.width,this.imageHeight=e.height,this.exifInfo=e.exif},e.prototype.toObject=function(){return{name:this._name,type:this.type,size:this.size,progress:this.progress,extension:this.extension,typeImage:this.typeImage,imageWidth:this.imageWidth,imageHeight:this.imageHeight}},e}();t.FsFile=i},"./models/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./models/process-config.ts")),o(n("./models/fs-file.ts"))},"./models/process-config.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e={}),this.parseConfig(e)}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){void 0!==e&&(this._width=+e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){void 0!==e&&(this._height=+e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(e){var t=parseFloat(e);isNaN(t)||(this._quality=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this._format},set:function(e){["jpg","png"].indexOf(e)>-1&&(this._format=e)},enumerable:!0,configurable:!0}),e.prototype.parseConfig=function(e){this.width=e.width,this.height=e.height,this.quality=e.quality,this.format=e.format},e}();t.ProcessConfig=o},"./services/cordova.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=n("rxjs/Observable"),a=n("rxjs/observable/fromEvent"),c=function(){function e(){this.ready=null,this.deviceReady=a.fromEvent(document,"deviceready")}return e.prototype.onReady=function(e){this.isReady().subscribe(e)},e.prototype.isReady=function(){var e=this;return new s.Observable(function(t){if(window.cordova&&(e.ready=!0),e.ready)return t.next(),void t.complete();e.deviceReady.subscribe(function(){e.ready=!0,t.next(),t.complete()})})},e=o([r.Injectable(),i("design:paramtypes",[])],e)}();t.CordovaService=c},"./services/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./services/cordova.service.ts"))},"@angular/common":function(e,t){e.exports=require("@angular/common")},"@angular/core":function(e,t){e.exports=require("@angular/core")},"@angular/material":function(e,t){e.exports=require("@angular/material")},"@firestitch/common":function(e,t){e.exports=require("@firestitch/common")},fileapi:function(e,t){e.exports=require("fileapi")},"fileapi/plugins/FileAPI.exif.js":function(e,t){e.exports=require("fileapi/plugins/FileAPI.exif.js")},lodash:function(e,t){e.exports=require("lodash")},"rxjs/Observable":function(e,t){e.exports=require("rxjs/Observable")},"rxjs/add/observable/fromPromise":function(e,t){e.exports=require("rxjs/add/observable/fromPromise")},"rxjs/observable/fromEvent":function(e,t){e.exports=require("rxjs/observable/fromEvent")},"rxjs/observable/of":function(e,t){e.exports=require("rxjs/observable/of")},"rxjs/operators":function(e,t){e.exports=require("rxjs/operators")},"rxjs/operators/switchMap":function(e,t){e.exports=require("rxjs/operators/switchMap")}})}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("@firestitch/file",[],t):"object"==typeof exports?exports["@firestitch/file"]=t():e["@firestitch/file"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./index.ts")}({"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-picker/fs-file-picker.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,':host.dragover .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n}\n\n:host.dragover .select button {\n display: none;\n}\n\n:host.dragover .select .mat-icon {\n color: #07a8e6;\n}\n\n:host.dragover ::ng-deep .preview-container:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.select mat-icon {\n -webkit-transform: scale(1.8);\n transform: scale(1.8);\n color: #ddd;\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n',"",{version:3,sources:["C:/Projects/fs-file/src/components/fs-file-picker/C:/Projects/fs-file/src/components/fs-file-picker/C:/Projects/fs-file/src/components/fs-file-picker/src/components/fs-file-picker/fs-file-picker.component.scss","C:/Projects/fs-file/src/components/fs-file-picker/C:/Projects/fs-file/src/components/fs-file-picker/fs-file-picker.component.scss"],names:[],mappings:"AAAA;EAGM,2BAAA;EACA,eAAA;CCDL;;ADHD;EAOQ,cAAA;CCAP;;ADPD;EAWQ,eAAA;CCAP;;ADXD;EAiBU,YAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,mBAAA;EACA,QAAA;EACA,OAAA;EACA,2BAAA;EACA,oBAAA;EACA,aAAA;CCFT;;ADSD;EACE,eAAA;CCND;;ADSD;EACE,mBAAA;EACA,uBAAA;EACA,mBAAA;EACA,aAAA;EACA,cAAA;EACA,oBAAA;EACA,uBAAA;EACA,cAAA;EACA,yBAAA;MAAA,sBAAA;UAAA,wBAAA;EACA,6BAAA;EAAA,8BAAA;MAAA,2BAAA;UAAA,uBAAA;EACA,+BAAA;UAAA,uBAAA;CCND;;ADLD;EAeI,8BAAA;UAAA,sBAAA;EACA,YAAA;CCNH;;ADUD;EACE,gBAAA;EACA,eAAA;CCPD",file:"fs-file-picker.component.scss",sourcesContent:[':host {\n &.dragover {\n .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n\n button {\n display: none;\n }\n\n .mat-icon {\n color: #07a8e6;\n }\n }\n ::ng-deep {\n .preview-container {\n &:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n }\n }\n }\n }\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n justify-content: center;\n flex-direction: column;\n box-sizing: border-box;\n\n\n mat-icon {\n transform: scale(1.8);\n color: #ddd;\n }\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n.label {\n\n}\n',':host.dragover .select {\n border: 2px #07a8e6 dashed;\n color: #07a8e6;\n}\n\n:host.dragover .select button {\n display: none;\n}\n\n:host.dragover .select .mat-icon {\n color: #07a8e6;\n}\n\n:host.dragover ::ng-deep .preview-container:after {\n content: "";\n width: 98%;\n display: block;\n height: 98%;\n position: absolute;\n left: 0;\n top: 0;\n border: 2px #07a8e6 dashed;\n background: #07a8e6;\n opacity: 0.4;\n}\n\n.download {\n color: inherit;\n}\n\n.select {\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 3px;\n width: 150px;\n height: 150px;\n display: table-cell;\n vertical-align: middle;\n padding: 10px;\n justify-content: center;\n flex-direction: column;\n box-sizing: border-box;\n}\n\n.select mat-icon {\n transform: scale(1.8);\n color: #ddd;\n}\n\n.instruction {\n font-size: 12px;\n padding: 8px 0;\n}\n\n'],sourceRoot:""}])},"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-preview/fs-file-preview.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,".file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n@media only screen and (max-width: 767.98px) {\n .actions {\n display: block;\n }\n}\n\n@media only screen and (min-width: 768px) {\n .actions {\n display: none;\n background: rgba(0, 0, 0, .5);\n }\n}\n\n.actions .action {\n position: absolute;\n cursor: pointer;\n}\n\n.actions .action.top-left {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.top-right {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.bottom-left {\n bottom: 5%;\n left: 5%;\n}\n\n.actions .action.bottom-right {\n bottom: 5%;\n right: 5%;\n}\n\n.actions .action.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n}\n\n.actions .action.mat-mini-fab .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n}\n\n:host {\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n}\n\n:host:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n}\n\n:host:hover .has-actions .actions,\n:host:focus .has-actions .actions {\n display: block;\n}\n\n:host img {\n display: block;\n border-radius: 3px;\n -o-object-fit: cover;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n:host ::ng-deep .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n}\n\n:host ::ng-deep .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n\n","",{version:3,sources:["C:/Projects/fs-file/src/components/fs-file-preview/C:/Projects/fs-file/src/components/fs-file-preview/C:/Projects/fs-file/src/components/fs-file-preview/src/components/fs-file-preview/fs-file-preview.component.scss","C:/Projects/fs-file/src/components/fs-file-preview/C:/Projects/fs-file/src/components/fs-file-preview/fs-file-preview.component.scss","C:/Projects/fs-file/src/components/fs-file-preview/C:/Projects/fs-file/src/components/fs-file-preview/C:/Projects/fs-file/src/components/fs-file-preview/src/styles/_mixins.scss"],names:[],mappings:"AAEA;EACE,kBAAA;EACA,mBAAA;EACA,0BAAA;EACA,gBAAA;EACA,gBAAA;CCDD;;ADID;EACE,oBAAA;EACA,iBAAA;EACA,wBAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;CCDD;;ADID;EACE,iBAAA;CCDD;;ADID;EACE,mBAAA;EAWA,YAAA;EACA,aAAA;EACA,OAAA;EACA,QAAA;CCXD;;ACKC;EFTF;IAII,eAAA;GCKD;CACF;;ACDC;EFTF;IAQI,cAAA;IACA,8BAAA;GCOD;CACF;;ADjBD;EAmBI,mBAAA;EACA,gBAAA;CCEH;;ADtBD;EAuBM,QAAA;EACA,UAAA;CCGL;;AD3BD;EA4BM,QAAA;EACA,UAAA;CCGL;;ADhCD;EAiCM,WAAA;EACA,SAAA;CCGL;;ADrCD;EAsCM,WAAA;EACA,UAAA;CCGL;;AD1CD;EA2CM,WAAA;EACA,YAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iBAAA;EACA,6BAAA;CCGL;;ADpDD;EAoDQ,eAAA;EACA,6BAAA;CCIP;;ADED;EAEE,sBAAA;EACA,mBAAA;EACA,uBAAA;EACA,oBAAA;EACA,mBAAA;CCAD;;ADND;EASI,kBAAA;EACA,oBAAA;EACA,sBAAA;CCCH;;ADZD;;EAiBM,eAAA;CCAL;;ADjBD;EAsBI,eAAA;EACA,mBAAA;EACA,qBAAA;KAAA,kBAAA;EACA,YAAA;EACA,aAAA;CCDH;;ADKD;EAEI,WAAA;EACA,6BAAA;CCHH;;ADAD;EAOI,mBAAA;EACA,SAAA;EACA,UAAA;EACA,kBAAA;EACA,iBAAA;CCHH;;ADOD;EACE;IACI,eAAA;IACA,iBAAA;GCJH;CACF",file:"fs-file-preview.component.scss",sourcesContent:['@import "../../styles/mixins";\n\n.file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n\n @include apply-to(less-than, phone) {\n display: block;\n }\n\n @include apply-to(greater-than, phone) {\n display: none;\n background: rgba(0, 0, 0, 0.5);\n }\n\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n\n .action {\n\n position: absolute;\n cursor: pointer;\n\n &.top-left {\n top: 5%;\n right: 5%;\n }\n\n &.top-right {\n top: 5%;\n right: 5%;\n }\n\n &.bottom-left {\n bottom: 5%;\n left: 5%;\n }\n\n &.bottom-right {\n bottom: 5%;\n right: 5%;\n }\n\n &.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n\n .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n }\n }\n }\n}\n\n:host {\n\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n\n &:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n }\n\n &:hover .has-actions,\n &:focus .has-actions {\n .actions {\n display: block;\n }\n }\n\n img {\n display: block;\n border-radius: 3px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n}\n\n:host ::ng-deep {\n .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n }\n\n .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n }\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n',".file-ext {\n font-weight: bold;\n text-align: center;\n text-transform: uppercase;\n padding: 15px 0;\n font-size: 25px;\n}\n\n.file-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0 5px;\n font-size: 12px;\n text-align: center;\n}\n\n.preview-container {\n overflow: hidden;\n}\n\n.actions {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n\n@media only screen and (max-width: 767.98px) {\n .actions {\n display: block;\n }\n}\n\n@media only screen and (min-width: 768px) {\n .actions {\n display: none;\n background: rgba(0, 0, 0, 0.5);\n }\n}\n\n.actions .action {\n position: absolute;\n cursor: pointer;\n}\n\n.actions .action.top-left {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.top-right {\n top: 5%;\n right: 5%;\n}\n\n.actions .action.bottom-left {\n bottom: 5%;\n left: 5%;\n}\n\n.actions .action.bottom-right {\n bottom: 5%;\n right: 5%;\n}\n\n.actions .action.mat-mini-fab {\n width: 22%;\n height: 22%;\n min-width: 30px;\n min-height: 30px;\n max-width: 42px;\n max-height: 42px;\n line-height: 15px !important;\n}\n\n.actions .action.mat-mini-fab .mat-button-wrapper {\n padding: 4px 0;\n line-height: 15px !important;\n}\n\n:host {\n display: inline-block;\n position: relative;\n border: 1px #DDD solid;\n vertical-align: top;\n border-radius: 3px;\n}\n\n:host:hover .file-name {\n overflow: visible;\n white-space: normal;\n word-wrap: break-word;\n}\n\n:host:hover .has-actions .actions,\n:host:focus .has-actions .actions {\n display: block;\n}\n\n:host img {\n display: block;\n border-radius: 3px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n:host ::ng-deep .mat-button-wrapper {\n padding: 0;\n line-height: 15px !important;\n}\n\n:host ::ng-deep .spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -25%;\n margin-top: -25%;\n}\n\n@media only screen and (max-width: 550px) {\n .actions {\n display: block;\n background: none;\n }\n}\n\n",'@import "variables";\n\n\n@mixin apply-to($ltgt, $device) {\n $extrema: null;\n $boundary-target: null;\n $delta: null;\n\n @if $ltgt == less-than {\n $extrema: max;\n $delta: -1;\n } @else if $ltgt == greater-than {\n $extrema: min;\n $delta: +1;\n }\n\n @if $device == phone {\n @if $ltgt == less-than {\n $boundary-target: $phone-width-max;\n } @else if $ltgt == greater-than {\n $boundary-target: $tablet-width-min;\n }\n } @else if $device == tablet {\n @if $ltgt == less-than {\n $boundary-target: $tablet-width-min;\n } @else if $ltgt == greater-than {\n $boundary-target: $tablet-width-max;\n }\n } @else if $device == desktop {\n $boundary-target: $desktop-width-min;\n }\n\n @media only screen and (#{$extrema}-width: $boundary-target) {\n @content;\n }\n}\n\n@mixin phone {\n @media only screen and (max-width: #{$phone-width-max}) {\n @content;\n }\n}\n\n@mixin tablet {\n @media only screen and (min-width: #{$tablet-width-min}) and (max-width: #{$tablet-width-max}) {\n @content;\n }\n}\n\n@mixin desktop {\n @media only screen and (min-width: #{$desktop-width-min}) {\n @content;\n }\n}\n'],sourceRoot:""}])},"../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-previews/fs-file-previews.component.scss":function(e,t,n){t=e.exports=n("../node_modules/css-loader/lib/css-base.js")(!0),t.push([e.i,".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview {\n margin-right: 10px;\n}\n\nfs-file-preview:last-child {\n margin-right: 0;\n}\n\n","",{version:3,sources:["C:/Projects/fs-file/src/components/fs-file-previews/C:/Projects/fs-file/src/components/fs-file-previews/C:/Projects/fs-file/src/components/fs-file-previews/src/components/fs-file-previews/fs-file-previews.component.scss","C:/Projects/fs-file/src/components/fs-file-previews/C:/Projects/fs-file/src/components/fs-file-previews/fs-file-previews.component.scss"],names:[],mappings:"AAAA;EACE,mBAAA;EACA,eAAA;CCCD;;ADED;EACE,mBAAA;CCCD;;ADFD;EAII,gBAAA;CCEH",file:"fs-file-previews.component.scss",sourcesContent:[".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview { \n margin-right: 10px; \n\n &:last-child {\n margin-right: 0;\n }\n}",".queue {\n position: relative;\n display: block;\n}\n\nfs-file-preview {\n margin-right: 10px;\n}\n\nfs-file-preview:last-child {\n margin-right: 0;\n}\n\n"],sourceRoot:""}])},"../node_modules/css-loader/lib/css-base.js":function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=o(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([r]).join("\n")}return[n].join("\n")}function o(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=n(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&o[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},"./classes/file-processor.ts":function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function a(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}c((o=o.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){function n(e){return function(t){return o([e,t])}}function o(n){if(i)throw new TypeError("Generator is already executing.");for(;c;)try{if(i=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return c.label++,{value:n[1],done:!1};case 5:c.label++,r=n[1],n=[0];continue;case 7:n=c.ops.pop(),c.trys.pop();continue;default:if(s=c.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){c=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]<s[3])){c.label=n[1];break}if(6===n[0]&&c.label<s[1]){c.label=s[1],s=n;break}if(s&&c.label<s[2]){c.label=s[2],c.ops.push(n);break}s[2]&&c.ops.pop(),c.trys.pop();continue}n=t.call(e,c)}catch(e){n=[6,e],r=0}finally{i=s=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,r,s,a,c={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(t,"__esModule",{value:!0});var r=n("fileapi");n("fileapi/plugins/FileAPI.exif.js");var s=n("rxjs/Observable"),a=n("rxjs/operators/switchMap"),c=n("rxjs/observable/of");n("rxjs/add/observable/fromPromise");var p=n("./models/index.ts"),l=n("./helpers/index.ts"),f=function(){function e(){}return e.prototype.process=function(e,t){var n=this,o=!0,i=new p.ProcessConfig(t);Array.isArray(e)||(e=[e],o=!1);var r=[];return e.forEach(function(e){if(e.typeImage){var t=new Promise(function(t,o){n.applyTransforms(e,t,o,i)});r.push(t)}else r.push(e)}),s.Observable.fromPromise(Promise.all(r)).pipe(a.switchMap(function(e){return!o&&e[0]?c.of(e[0]):c.of(e)}))},e.prototype.getImageInfo=function(e){return new Promise(function(t,n){r.getInfo(e.file,function(e,o){e?n(e):t(o)})})},e.prototype.transformFile=function(e,t,n){return o(this,void 0,void 0,function(){var n=this;return i(this,function(o){return[2,new Promise(function(o,i){r.Image.transform(e.file,[t],!0,function(r,s){if(!r&&s[0]){var a=void 0;a=l.ScaleExifImage(s[0],e.exifInfo.Orientation),a.toBlob(function(t){e.file=l.createBlob([t],e.file.name,e.type),n.getImageInfo(e).then(function(t){e.parseInfo(t),o(e)}).catch(function(t){i({error:t,originFile:e})})},t.type,a.quality)}else i(r)})})]})})},e.prototype.applyTransforms=function(e,t,n,r){return o(this,void 0,void 0,function(){var o,s,a,c;return i(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getImageInfo(e)];case 1:return o=i.sent(),e.parseInfo(o),s=this.generateTransformParams(e,r),[4,this.transformFile(e,s,r)];case 2:return a=i.sent(),t(a),[3,4];case 3:return c=i.sent(),n(c),[3,4];case 4:return[2]}})})},e.prototype.generateTransformParams=function(e,t){var n={};return n.type=t.format?"image/"+t.format:e.type,n.maxWidth=t.width,n.maxHeight=t.height,void 0!==t.quality&&(n.quality=t.quality||1),n},e.prototype.alertImageProcessingError=function(e){alert("File "+e.name+" can't be processed as image. File was rejected")},e}();t.FileProcessor=f},"./classes/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./classes/file-processor.ts")),o(n("./classes/input-processor.ts"))},"./classes/input-processor.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("@angular/core"),i=n("fileapi"),r=n("./models/index.ts"),s=n("./helpers/index.ts"),a=function(){function e(e,t){var n=this;this.cordovaService=e,this.ngZone=t,this.cordova={camera:null,capture:null,resolveLocalFileSystemURL:null},this.multiple=!1,this.api=null,this.capture=null,this.select=new o.EventEmitter,this._accept="*",this._acceptableTypes=new Map,this._acceptableExts=new Set,e.isReady().subscribe(function(){n.cordova.camera=s.getCordovaCamera(),n.cordova.capture=s.getCordovaCapture(),n.cordova.resolveLocalFileSystemURL=s.getCordovaResolveLocalFileSystemURL()})}return Object.defineProperty(e.prototype,"accept",{get:function(){return this._accept},set:function(e){this._acceptableTypes.clear(),this._acceptableExts.clear(),this.parseAcceptTypes(e),this._accept=e.trim()},enumerable:!0,configurable:!0}),e.prototype.registerInput=function(e){var t=this;e&&(this.inputEl=e.nativeElement,i.event.on(this.inputEl,"change",function(e){var n=i.getFiles(e).filter(function(e){var n,o=e.name.split(".");return o&&Array.isArray(o)&&(n=o[o.length-1]),t.checkAcceptableTypes(e.type,n)});n&&n.length>0&&(t.inputEl.value=null,t.selectFiles(n))}))},e.prototype.registerDrop=function(e){var t=this;e&&(this.containerEl=e.nativeElement,i.event.on(this.containerEl,"drop",function(e){var n=i.getFiles(e).filter(function(e){var n,o=e.name.split(".");return o&&Array.isArray(o)&&(n=o[o.length-1]),t.checkAcceptableTypes(e.type,n)});n&&n.length>0&&(t.inputEl.value=null,t.selectFiles(n))}))},e.prototype.registerLabel=function(e){var t=this;e&&i.event.on(e.nativeElement,"click",function(){if("cordova"===t.api||!t.api){if(s.hasCordovaCameraSupport()){if("library"===t.capture)return t.selectCordovaCameraLibrary();if(t.isAcceptImage())return t.selectCordovaCameraPicture()}if(s.hasCordovaCaptureSupport()&&null!==t.capture&&t.isAcceptVideo())return t.selectCordovaCaptureVideo()}t.inputEl.click()})},e.prototype.cordovaCameraCleanup=function(){this.cordova.camera.cleanup()},e.prototype.selectCordovaCaptureImage=function(){var e=this;this.cordova.capture.captureImage(function(t){e.successCaptureFiles(t)},this.errorCaptureFiles,{limit:1})},e.prototype.selectCordovaCaptureVideo=function(){var e=this;this.cordova.capture.captureVideo(function(t){e.successCaptureFiles(t)},this.errorCaptureFiles,{limit:1})},e.prototype.successCaptureFiles=function(e){var t=this;e.forEach(function(e){t.getCordovaFile(e.fullPath).then(function(e){t.ngZone.run(function(){t.selectFiles([e])})}).catch(function(e){console.log(e)})})},e.prototype.errorCaptureFiles=function(e){console.log(e)},e.prototype.selectCordovaCameraLibrary=function(){return this.selectCordovaCamera(this.cordova.camera.PictureSourceType.PHOTOLIBRARY,this.cordova.camera.MediaType.ALLMEDIA)},e.prototype.selectCordovaCameraPicture=function(){return this.selectCordovaCamera(this.cordova.camera.PictureSourceType.CAMERA,this.cordova.camera.MediaType.PICTURE)},e.prototype.selectCordovaCamera=function(e,t){var n=this,o={destinationType:this.cordova.camera.DestinationType.FILE_URI,encodingType:this.cordova.camera.DestinationType.JPEG,sourceType:e,mediaType:t,quality:100,correctOrientation:!1};if(this.accept.length){var i=this.isAcceptVideo(),r=this.isAcceptImage();i&&!r?o.mediaType=this.cordova.camera.MediaType.VIDEO:r&&!i&&(o.mediaType=this.cordova.camera.MediaType.PICTURE)}this.cordova.camera.getPicture(function(e){n.getCordovaFile(e).then(function(e){n.ngZone.run(function(){n.selectFiles([e])}),n.cordovaCameraCleanup()}).catch(function(e){console.log(e),n.cordovaCameraCleanup()})},function(){n.cordovaCameraCleanup()},o)},e.prototype.getCordovaFile=function(e){var t=this;return e.match(/^file:/)||(e="file://".concat(e)),new Promise(function(n,o){t.cordova.resolveLocalFileSystemURL(e,function(e){e.file(function(e){var t=new FileReader;t.onloadend=function(t){for(var o=t.target.result.split("base64,").pop(),i=atob(o),r=i.length,a=new Uint8Array(r);r--;)a[r]=i.charCodeAt(r);var c=s.createBlob([a],e.name,e.type);n(c)},t.readAsDataURL(e)},function(e){o(e)})},function(e){o(e)})})},e.prototype.isAcceptVideo=function(){return this.accept.match(/video/i)},e.prototype.isAcceptImage=function(){return this.accept.match(/image/i)},e.prototype.selectFiles=function(e){e=e.map(function(e){return new r.FsFile(e)}),1===e.length&&(e=e[0]),this.select.emit(e)},e.prototype.checkAcceptableTypes=function(e,t){e=e.trim();var n=e.split("/"),o=n[0],i=n[1],r=this._acceptableTypes.get(o);return"*"===this.accept||!!r&&(r.has("*")||r.has(i))||this._acceptableExts.has("."+t)},e.prototype.parseAcceptTypes=function(e){var t=this;if("string"==typeof e||0!==e.length){e.split(",").map(function(e){return e.trim()}).forEach(function(e){var n=e.indexOf("/")>-1,o=0===e.indexOf(".");if(n){var i=e.split("/"),r=i[0],s=i[1];if(t._acceptableTypes.has(r)){var a=t._acceptableTypes.get(r);a.has(s)||a.add(s)}else{var c=new Set;t._acceptableTypes.set(r,c),c.add(s)}}o&&(t._acceptableExts.has(e)||t._acceptableExts.add(e))})}},e}();t.InputProcessor=a},"./components/fs-file-drag-base/fs-file-drag-base.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=function(){function e(e){this.el=e,this.fileOverTarget=!1}return e.prototype.onDragOverElement=function(e){this.el.nativeElement.contains(e.target)&&(this.fileOverTarget=!0)},e.prototype.onDrop=function(e){this.fileOverTarget&&(e.preventDefault(),e.stopPropagation(),this.fileOverTarget=!1)},e.prototype.onDragOver=function(e){this.fileOverTarget&&(e.preventDefault(),e.stopPropagation(),this.el.nativeElement.contains(e.target)||(this.fileOverTarget=!1))},o([r.HostBinding("class.dragover"),i("design:type",Object)],e.prototype,"fileOverTarget",void 0),o([r.HostListener("dragenter",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDragOverElement",null),o([r.HostListener("window:drop",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDrop",null),o([r.HostListener("window:dragover",["$event"]),i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"onDragOver",null),e=o([r.Component({selector:"fs-file-drag-base",template:""}),i("design:paramtypes",[r.ElementRef])],e)}();t.FsFileDragBaseComponent=s},"./components/fs-file-drag-base/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-drag-base/fs-file-drag-base.ts"))},"./components/fs-file-picker/fs-file-picker.component.html":function(e,t){e.exports='<div class="mat-form-field-label fs-form-field-label">\n <ng-content select="[fs-file-label]"></ng-content>\n</div>\n<fs-file-preview class="preview"\n *ngIf="_file; else preview"\n (remove)="removeFile($event)"\n [file]="_file"\n [showFilename]="showFilename"\n [previewWidth]="previewWidth"\n [previewHeight]="previewHeight">\n <ng-template fs-file-preview-action placement="top-right" action="remove" tooltip="Remove" *ngIf="allowRemove">\n <mat-icon>close</mat-icon>\n </ng-template>\n <ng-template fs-file-preview-action placement="bottom-right" tooltip="Reupload" *ngIf="allowReupload">\n <fs-file [accept]="accept"\n (select)="selectFile($event)"\n [imageWidth]="imageWidth"\n [imageHeight]="imageHeight"\n [imageQuality]="imageQuality">\n <mat-icon>cloud_upload</mat-icon>\n </fs-file>\n </ng-template>\n <ng-template fs-file-preview-action placement="bottom-left" action="download" tooltip="Download" *ngIf="allowDownload && _file.url">\n <a [href]="_file.url" target="_blank" class="download"><mat-icon>cloud_download</mat-icon></a>\n </ng-template>\n</fs-file-preview>\n\n<ng-template #preview>\n <fs-file (select)="selectFile($event)"\n [accept]="accept"\n [imageWidth]="imageWidth"\n [imageHeight]="imageHeight"\n [imageQuality]="imageQuality">\n <div class="select">\n <mat-icon>cloud_upload</mat-icon>\n <div class="instruction">{{instruction}}</div>\n <div class="mat-raised-button mat-primary">Upload</div>\n </div>\n </fs-file>\n</ng-template>\n\n'},"./components/fs-file-picker/fs-file-picker.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-picker/fs-file-picker.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-picker/fs-file-picker.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(n,o){t(n,o,e)}};Object.defineProperty(t,"__esModule",{value:!0});var a=n("@angular/core"),c=n("./components/fs-file-drag-base/index.ts"),p=n("./classes/index.ts"),l=n("./services/index.ts"),f=n("./fs-file.providers.ts"),u=function(e){function t(t,n,o,i){var r=e.call(this,t)||this;return r.el=t,r.moduleConfig=n,r.inputProcessor=null,r.instruction="Drag & Drop your file or use the button below",r.showFilename=!0,r.previewWidth=150,r.previewHeight=150,r.allowReupload=!0,r.select=new a.EventEmitter,r.remove=new a.EventEmitter,r.inputProcessor=new p.InputProcessor(o,i),r}return o(t,e),Object.defineProperty(t.prototype,"file",{set:function(e){this._file=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"accept",{get:function(){return this.inputProcessor.accept||"*"},set:function(e){this.inputProcessor.accept=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=e},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.moduleConfig&&(void 0===this.allowDownload&&(this.allowDownload=this.moduleConfig.allowDownload),void 0===this.allowRemove&&(this.allowRemove=this.moduleConfig.allowRemove))}, | ||
t.prototype.selectFile=function(e){this._file=e,this.select.emit(e)},t.prototype.removeFile=function(e){this._file=void 0,this.remove.emit(this._file)},i([a.Input(),r("design:type",Object)],t.prototype,"imageWidth",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"imageHeight",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"imageQuality",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"showFilename",void 0),i([a.Input("file"),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"file",null),i([a.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"accept",null),i([a.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"disabled",null),i([a.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowDownload",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowReupload",void 0),i([a.Input(),r("design:type",Object)],t.prototype,"allowRemove",void 0),i([a.Output(),r("design:type",Object)],t.prototype,"select",void 0),i([a.Output(),r("design:type",Object)],t.prototype,"remove",void 0),i([a.ViewChild("fileInput"),r("design:type",Object)],t.prototype,"fileInput",void 0),t=i([a.Component({selector:"fs-file-picker",template:n("./components/fs-file-picker/fs-file-picker.component.html"),styles:[n("./components/fs-file-picker/fs-file-picker.component.scss")]}),s(1,a.Optional()),s(1,a.Inject(f.FS_FILE_MODULE_CONFIG)),r("design:paramtypes",[a.ElementRef,Object,l.CordovaService,a.NgZone])],t)}(c.FsFileDragBaseComponent);t.FsFilePickerComponent=u},"./components/fs-file-picker/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-picker/fs-file-picker.component.ts"))},"./components/fs-file-preview-base/fs-file-preview-base.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=n("./directives/index.ts"),a=function(){function e(){this.actions=[],this.actionsTemplate=[]}return Object.defineProperty(e.prototype,"actionsParams",{set:function(e){var t=e.toArray().map(function(e,t){var n=Object.assign({},e);return n.index=t,n.forTypes&&!Array.isArray(n.forTypes)&&(n.forTypes=n.forTypes.split(",").map(function(e){return e.trim()})),n});(n=this.actions).push.apply(n,t);var n},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionsTemplateRefs",{set:function(e){(t=this.actionsTemplate).push.apply(t,e.toArray());var t},enumerable:!0,configurable:!0}),o([r.ContentChildren(s.FsFilePreviewActionDirective),i("design:type",r.QueryList),i("design:paramtypes",[r.QueryList])],e.prototype,"actionsParams",null),o([r.ContentChildren(s.FsFilePreviewActionDirective,{read:r.TemplateRef}),i("design:type",r.QueryList),i("design:paramtypes",[r.QueryList])],e.prototype,"actionsTemplateRefs",null),e=o([r.Component({selector:"fs-file-previews-base",template:""}),i("design:paramtypes",[])],e)}();t.FsFilePreviewsBaseComponent=a},"./components/fs-file-preview-base/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-preview-base/fs-file-preview-base.ts"))},"./components/fs-file-preview/fs-file-preview.component.html":function(e,t){e.exports='<div [style.width.px]="previewWidth" [style.height.px]="previewHeight" class="preview-container" [ngClass]="{ \'has-actions\': !!actions.length }">\n\n \x3c!-- Image container --\x3e\n <ng-container *ngIf="file.typeImage; else nonImage">\n <img [src]="preview" *ngIf="preview">\n <mat-spinner class="spinner" *ngIf="file.progress" [diameter]="previewWidth/2"></mat-spinner>\n </ng-container>\n\n \x3c!-- Non image container --\x3e\n <ng-template #nonImage>\n <div class="file-ext">{{file.extension}}</div>\n <div class="file-name" [matTooltip]="file.name" *ngIf="showFilename">{{file.name}}</div>\n <mat-spinner class="spinner" *ngIf="file.progress" [diameter]="previewWidth/2"></mat-spinner>\n </ng-template>\n\n \x3c!-- Actions --\x3e\n <div class="actions">\n \x3c!--\n Used label instead of button because FireFox doesn\'t work properly with click event on button.\n If we have action with <input type="file"> inside button\n --\x3e\n <label class="action mat-mini-fab mat-primary"\n *ngFor="let action of filteredActions"\n [ngClass]="getActionClasses(action)"\n [matTooltip]="action.tooltip"\n (click)="callAction(action)">\n <span class="mat-button-wrapper">\n <ng-template [ngTemplateOutlet]="actionsTemplate[action.index]"></ng-template>\n </span>\n </label>\n </div>\n</div>\n'},"./components/fs-file-preview/fs-file-preview.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-preview/fs-file-preview.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-preview/fs-file-preview.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("fileapi"),c=n("./models/index.ts"),p=n("./components/fs-file-preview-base/index.ts"),l=n("./helpers/index.ts"),f=function(e){function t(){var t=e.call(this)||this;return t.showFilename=!0,t.previewWidth=150,t.previewHeight=150,t.remove=new s.EventEmitter,t.filteredActions=[],t}return o(t,e),Object.defineProperty(t.prototype,"_actions",{set:function(e){(t=this.actions).push.apply(t,e);var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_actionsTemplate",{set:function(e){(t=this.actionsTemplate).push.apply(t,e);var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_file",{set:function(e){this.file=e,this.generateFilePreview(e)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.cleanActions()},t.prototype.getActionClasses=function(e){return e.placement?[e.placement]:[]},t.prototype.callAction=function(e){e.click&&e.click.emit(this.file),"remove"==e.action&&this.remove.emit(this.file)},t.prototype.generateFilePreview=function(e){var t=this;if(e.url)return void(this.preview=e.url);this.file.typeImage&&(e.progress=!0,a.Image.transform(e.file,[{width:this.previewWidth,height:this.previewHeight,preview:!0}],!0,function(n,o){if(!n&&o[0]){var i=l.ScaleExifImage(o[0],e.exifInfo.Orientation,t.previewWidth,t.previewHeight);t.preview=i.toDataURL(e.type),e.progress=!1}else console.log("FsFilePreview: Image preview error for file "+e.name),e.progress=!1}))},t.prototype.cleanActions=function(){for(var e in this.actions)if(this.actions.hasOwnProperty(e))if(this.actions[e].forTypes)for(var t=this.file.type.split("/"),n=t[0],o=t[1],i=this.actions[e].forTypes,r=0;r<i.length;r++){var s=i[r].split("/"),a=s[0],c=s[1],p=a===n&&(c===o||"*"===c);if(p){this.filteredActions.push(this.actions[e]);break}}else this.filteredActions.push(this.actions[e])},i([s.Input(),r("design:type",Object)],t.prototype,"showFilename",void 0),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"_actions",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"_actionsTemplate",null),i([s.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([s.Input("file"),r("design:type",c.FsFile),r("design:paramtypes",[c.FsFile])],t.prototype,"_file",null),i([s.Output(),r("design:type",Object)],t.prototype,"remove",void 0),t=i([s.Component({selector:"fs-file-preview",template:n("./components/fs-file-preview/fs-file-preview.component.html"),styles:[n("./components/fs-file-preview/fs-file-preview.component.scss")]}),r("design:paramtypes",[])],t)}(p.FsFilePreviewsBaseComponent);t.FsFilePreviewComponent=f},"./components/fs-file-preview/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-preview/fs-file-preview.component.ts"))},"./components/fs-file-previews/fs-file-previews.component.html":function(e,t){e.exports='<fs-file-preview\n *ngFor="let file of files"\n [file]="file"\n [_actions]="actions"\n [_actionsTemplate]="actionsTemplate"\n [previewWidth]="previewWidth"\n [previewHeight]="previewHeight"\n (remove)="removeFile($event)"\n class="preview">\n</fs-file-preview>\n'},"./components/fs-file-previews/fs-file-previews.component.scss":function(e,t,n){var o=n("../node_modules/css-loader/index.js??ref--3-1!../node_modules/postcss-loader/lib/index.js??ref--3-2!../node_modules/resolve-url-loader/index.js??ref--3-3!../node_modules/sass-loader/lib/loader.js??ref--3-4!./components/fs-file-previews/fs-file-previews.component.scss");e.exports="string"==typeof o?o:o.toString()},"./components/fs-file-previews/fs-file-previews.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./components/fs-file-preview-base/index.ts"),c=function(e){function t(){var t=e.call(this)||this;return t.previewWidth=150,t.previewHeight=150,t.queue=!0,t}return o(t,e),t.prototype.ngOnInit=function(){},t.prototype.removeFile=function(e){var t=this.files.indexOf(e);t>-1&&this.files.splice(t,1)},i([s.Input(),r("design:type",Object)],t.prototype,"files",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewWidth",void 0),i([s.Input(),r("design:type",Object)],t.prototype,"previewHeight",void 0),i([s.HostBinding("class.queue"),r("design:type",Object)],t.prototype,"queue",void 0),t=i([s.Component({selector:"fs-file-previews",template:n("./components/fs-file-previews/fs-file-previews.component.html"),styles:[n("./components/fs-file-previews/fs-file-previews.component.scss")],encapsulation:s.ViewEncapsulation.None}),r("design:paramtypes",[])],t)}(a.FsFilePreviewsBaseComponent);t.FsFilePreviewsComponent=c},"./components/fs-file-previews/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file-previews/fs-file-previews.component.ts"))},"./components/fs-file/fs-file.component.html":function(e,t){e.exports='<label #fileLabel>\n <ng-content></ng-content>\n</label>\n<input type="file"\n [hidden]="true"\n [disabled]="inputProcessor.disabled"\n [multiple]="inputProcessor.multiple"\n [attr.accept]="inputProcessor.accept"\n [attr.capture]="inputProcessor.capture"\n #fileInput>'},"./components/fs-file/fs-file.component.ts":function(e,t,n){"use strict";var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var s=n("@angular/core"),a=n("./components/fs-file-drag-base/index.ts"),c=n("./classes/index.ts"),p=n("rxjs/operators"),l=n("rxjs/observable/of"),f=n("lodash"),u=n("./services/index.ts"),d=function(e){function t(t,n,o){var i=e.call(this,n)||this;i.el=n,i.inputProcessor=null,i.autoProcess=!1,i.processOptions={width:void 0,height:void 0,quality:1},i.inputProcessor=new c.InputProcessor(t,o);var r=new c.FileProcessor;return i.select=i.inputProcessor.select.pipe(p.switchMap(function(e){return i.inputProcessor.multiple&&!f.isArray(e)&&(e=[e]),i.autoProcess?r.process(e,i.processOptions):l.of(e)})),i}return o(t,e),Object.defineProperty(t.prototype,"multiple",{get:function(){return this.inputProcessor.multiple},set:function(e){this.inputProcessor.multiple="boolean"==typeof e?e:"true"===e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"api",{get:function(){return this.inputProcessor.api},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"capture",{get:function(){return this.inputProcessor.capture},set:function(e){this.inputProcessor.capture=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"accept",{get:function(){return this.inputProcessor.accept||"*"},set:function(e){this.inputProcessor.accept=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.inputProcessor.disabled},set:function(e){this.inputProcessor.disabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{set:function(e){void 0!==e&&(this.processOptions.width=+e,this.autoProcess=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{set:function(e){void 0!==e&&(this.processOptions.height=+e,this.autoProcess=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageQuality",{set:function(e){var t=parseFloat(e);isNaN(t)||(this.processOptions.quality=t,this.autoProcess=!0)},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){this.inputProcessor.registerInput(this.fileInput),this.inputProcessor.registerLabel(this.fileLabel),this.inputProcessor.registerDrop(this.el)},i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"multiple",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"capture",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"accept",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"disabled",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageWidth",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageHeight",null),i([s.Input(),r("design:type",Object),r("design:paramtypes",[Object])],t.prototype,"imageQuality",null),i([s.Output("select"),r("design:type",s.EventEmitter)],t.prototype,"select",void 0),i([s.ViewChild("fileInput"),r("design:type",Object)],t.prototype,"fileInput",void 0),i([s.ViewChild("fileLabel"),r("design:type",Object)],t.prototype,"fileLabel",void 0),t=i([s.Component({selector:"fs-file",template:n("./components/fs-file/fs-file.component.html"),styles:[":host label { cursor: pointer }"]}),r("design:paramtypes",[u.CordovaService,s.ElementRef,s.NgZone])],t)}(a.FsFileDragBaseComponent);t.FsFileComponent=d},"./components/fs-file/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./components/fs-file/fs-file.component.ts"))},"./components/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./components/fs-file/index.ts")),o(n("./components/fs-file-previews/index.ts")),o(n("./components/fs-file-preview/index.ts")),o(n("./components/fs-file-picker/index.ts")),o(n("./components/fs-file-drag-base/index.ts")),o(n("./components/fs-file-preview-base/index.ts"))},"./directives/fs-file-preview-action.directive.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=function(){function e(){this.index=null,this.click=new r.EventEmitter}return o([r.Input(),i("design:type",String)],e.prototype,"placement",void 0),o([r.Input(),i("design:type",String)],e.prototype,"tooltip",void 0),o([r.Input(),i("design:type",String)],e.prototype,"action",void 0),o([r.Input("for-types"),i("design:type",Object)],e.prototype,"forTypes",void 0),o([r.Output(),i("design:type",Object)],e.prototype,"click",void 0),e=o([r.Directive({selector:"[fs-file-preview-action]"})],e)}();t.FsFilePreviewActionDirective=s},"./directives/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./directives/fs-file-preview-action.directive.ts"))},"./fs-file.module.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};Object.defineProperty(t,"__esModule",{value:!0});var i=n("@angular/core"),r=n("@angular/common"),s=n("@angular/material"),a=n("@firestitch/common"),c=n("./components/index.ts"),p=n("./directives/index.ts"),l=n("./services/index.ts"),f=n("./fs-file.providers.ts"),u=function(){function e(){}return t=e,e.forRoot=function(e){return void 0===e&&(e=null),{ngModule:t,providers:[{provide:f.FS_FILE_MODULE_CONFIG,useValue:e||{allowDownload:!0,allowRemove:!0}}]}},e=t=o([i.NgModule({imports:[r.CommonModule,a.FsCommonModule,s.MatIconModule,s.MatTooltipModule,s.MatProgressSpinnerModule,s.MatButtonModule],exports:[c.FsFileComponent,c.FsFilePreviewsComponent,c.FsFilePreviewComponent,p.FsFilePreviewActionDirective,c.FsFilePickerComponent],entryComponents:[],declarations:[c.FsFileComponent,c.FsFilePreviewsComponent,c.FsFilePreviewComponent,p.FsFilePreviewActionDirective,c.FsFileDragBaseComponent,c.FsFilePreviewsBaseComponent,c.FsFilePickerComponent],providers:[l.CordovaService]})],e);var t}();t.FsFileModule=u},"./fs-file.providers.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("@angular/core");t.FS_FILE_MODULE_CONFIG=new o.InjectionToken("fs-file.module-config")},"./helpers/create-blob.ts":function(e,t,n){"use strict";function o(e,t,n){var o=new Blob(e,{type:n});return o.name=t,o}Object.defineProperty(t,"__esModule",{value:!0}),t.createBlob=o},"./helpers/get-cordova-camera.ts":function(e,t,n){"use strict";function o(){return navigator.camera}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaCamera=o},"./helpers/get-cordova-capture.ts":function(e,t,n){"use strict";function o(){var e=navigator.device;return e?e.capture:null}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaCapture=o},"./helpers/get-cordova-resolve-local-file-system-url.ts":function(e,t,n){"use strict";function o(){return window.resolveLocalFileSystemURL}Object.defineProperty(t,"__esModule",{value:!0}),t.getCordovaResolveLocalFileSystemURL=o},"./helpers/has-cordova-camera-support.ts":function(e,t,n){"use strict";function o(){return i.getCordovaCamera()&&i.getCordovaResolveLocalFileSystemURL()}Object.defineProperty(t,"__esModule",{value:!0});var i=n("./helpers/index.ts");t.hasCordovaCameraSupport=o},"./helpers/has-cordova-capture-support.ts":function(e,t,n){"use strict";function o(){return i.getCordovaCapture()&&i.getCordovaResolveLocalFileSystemURL()}Object.defineProperty(t,"__esModule",{value:!0});var i=n("./helpers/index.ts");t.hasCordovaCaptureSupport=o},"./helpers/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./helpers/scale-exif-image.ts")),o(n("./helpers/is-image-type.ts")),o(n("./helpers/get-cordova-camera.ts")),o(n("./helpers/get-cordova-capture.ts")),o(n("./helpers/create-blob.ts")),o(n("./helpers/get-cordova-resolve-local-file-system-url.ts")),o(n("./helpers/has-cordova-camera-support.ts")),o(n("./helpers/has-cordova-capture-support.ts"))},"./helpers/is-image-type.ts":function(e,t,n){"use strict";function o(e){return e.match(/^image\/(gif|jpe?g|pjpeg|png|svg\+xml|tiff|vnd\.microsoft\.icon|vnd\.wap\.wbmp|webp)/i)}Object.defineProperty(t,"__esModule",{value:!0}),t.isImageType=o},"./helpers/scale-exif-image.ts":function(e,t,n){"use strict";function o(e,t,n,o){void 0===n&&(n=null),void 0===o&&(o=null);var i=e.width,r=e.height;n&&n<i&&(i=n),o&&o<r&&(r=o);var s=document.createElement("canvas");s.width=i,s.height=r;var a=s.getContext("2d");switch(t){case 2:case 4:case 5:case 7:return a.scale(-1,1),a.drawImage(e,0,0,i,r,-i,0,i,r),s;default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleExifImage=o},"./index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./fs-file.module.ts")),o(n("./components/index.ts")),o(n("./classes/index.ts")),o(n("./directives/index.ts")),o(n("./models/index.ts"))},"./models/fs-file.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("./helpers/index.ts"),i=function(){function e(e,t){if(this.progress=!1,this.exifInfo={},e instanceof File||e instanceof Blob)this.file=e;else{var n=t||e,i="";if(n){var r=n.toLowerCase().match(/([^\.]+)$/),s=r?r[1]:"";i=(s.match(/(jpe?g|png|gif|tiff?|bmp)/)?"image":"application")+"/"+s}var a=o.createBlob([""],t,i);this.url=e,this.file=a}}return Object.defineProperty(e.prototype,"file",{get:function(){return this._file},set:function(e){this._file=e,this.size=e.size,this.name=e.name,this.type=e.type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e;var t=String(e).split(".");t.length>1&&(this.extension=t[t.length-1])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fileOptions",{get:function(){return this._fileOptions},set:function(e){this._fileOptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeImage",{get:function(){return o.isImageType(this.type)},enumerable:!0,configurable:!0}),e.prototype.parseInfo=function(e){this.imageWidth=e.width,this.imageHeight=e.height,this.exifInfo=e.exif},e.prototype.toObject=function(){return{name:this._name,type:this.type,size:this.size,progress:this.progress,extension:this.extension,typeImage:this.typeImage,imageWidth:this.imageWidth,imageHeight:this.imageHeight}},e}();t.FsFile=i},"./models/index.ts":function(e,t,n){"use strict";function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n("./models/process-config.ts")),o(n("./models/fs-file.ts"))},"./models/process-config.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e={}),this.parseConfig(e)}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(e){void 0!==e&&(this._width=+e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){void 0!==e&&(this._height=+e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(e){var t=parseFloat(e);isNaN(t)||(this._quality=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return this._format},set:function(e){["jpg","png"].indexOf(e)>-1&&(this._format=e)},enumerable:!0,configurable:!0}),e.prototype.parseConfig=function(e){this.width=e.width,this.height=e.height,this.quality=e.quality,this.format=e.format},e}();t.ProcessConfig=o},"./services/cordova.service.ts":function(e,t,n){"use strict";var o=this&&this.__decorate||function(e,t,n,o){var i,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,n,s):i(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var r=n("@angular/core"),s=n("rxjs/Observable"),a=n("rxjs/observable/fromEvent"),c=function(){function e(){this.ready=null,this.deviceReady=a.fromEvent(document,"deviceready")}return e.prototype.onReady=function(e){this.isReady().subscribe(e)},e.prototype.isReady=function(){var e=this;return new s.Observable(function(t){if(window.cordova&&(e.ready=!0),e.ready)return t.next(),void t.complete();e.deviceReady.subscribe(function(){e.ready=!0,t.next(),t.complete()})})},e=o([r.Injectable(),i("design:paramtypes",[])],e)}();t.CordovaService=c},"./services/index.ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n("./services/cordova.service.ts"))},"@angular/common":function(e,t){e.exports=require("@angular/common")},"@angular/core":function(e,t){e.exports=require("@angular/core")},"@angular/material":function(e,t){e.exports=require("@angular/material")},"@firestitch/common":function(e,t){e.exports=require("@firestitch/common")},fileapi:function(e,t){e.exports=require("fileapi")},"fileapi/plugins/FileAPI.exif.js":function(e,t){e.exports=require("fileapi/plugins/FileAPI.exif.js")},lodash:function(e,t){e.exports=require("lodash")},"rxjs/Observable":function(e,t){e.exports=require("rxjs/Observable")},"rxjs/add/observable/fromPromise":function(e,t){e.exports=require("rxjs/add/observable/fromPromise")},"rxjs/observable/fromEvent":function(e,t){e.exports=require("rxjs/observable/fromEvent")},"rxjs/observable/of":function(e,t){e.exports=require("rxjs/observable/of")},"rxjs/operators":function(e,t){e.exports=require("rxjs/operators")},"rxjs/operators/switchMap":function(e,t){e.exports=require("rxjs/operators/switchMap")}})}); |
@@ -0,0 +0,0 @@ export interface FsFileConfig { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=file-config.interface.js.map |
export * from './file-config.interface'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=index.js.map |
@@ -0,0 +0,0 @@ export interface FsFileModuleConfig { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=module-config.interface.js.map |
@@ -15,3 +15,3 @@ import { FsFileConfig } from '../interfaces'; | ||
private _fileOptions; | ||
constructor(obj?: any, name?: string, type?: string); | ||
constructor(obj?: any, filename?: string); | ||
file: any; | ||
@@ -18,0 +18,0 @@ name: string; |
@@ -5,3 +5,3 @@ "use strict"; | ||
var FsFile = (function () { | ||
function FsFile(obj, name, type) { | ||
function FsFile(obj, filename) { | ||
this.progress = false; | ||
@@ -13,13 +13,11 @@ this.exifInfo = {}; | ||
else { | ||
var filename = name || obj; | ||
if (!type) { | ||
var match = filename.match(/(jpe?g|png|gif|tiff?)$/i); | ||
if (match) { | ||
type = match[1]; | ||
} | ||
var name_1 = filename || obj; | ||
var type = ''; | ||
if (name_1) { | ||
var match = name_1.toLowerCase().match(/([^\.]+)$/); | ||
var ext = match ? match[1] : ''; | ||
var mime = ext.match(/(jpe?g|png|gif|tiff?|bmp)/) ? 'image' : 'application'; | ||
type = mime + '/' + ext; | ||
} | ||
if (type) { | ||
type = 'image/' + type; | ||
} | ||
var file = helpers_1.createBlob([''], name, type); | ||
var file = helpers_1.createBlob([''], filename, type); | ||
this.url = obj; | ||
@@ -26,0 +24,0 @@ this.file = file; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFile":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"parseInfo":[{"__symbolic":"method"}],"toObject":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"FsFile":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"string"}]}],"parseInfo":[{"__symbolic":"method"}],"toObject":[{"__symbolic":"method"}]}}}}] |
export * from './process-config'; | ||
export * from './fs-file'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { FsFileConfig } from '../interfaces'; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "@firestitch/file", | ||
"version": "0.3.30", | ||
"version": "0.3.31", | ||
"repository": { | ||
@@ -28,3 +28,3 @@ "type": "git", | ||
"devDependencies": { | ||
"@angular/animations": ">=5.0.0", | ||
"@angular/animations": "^5.0.0", | ||
"@angular/cdk": "^5.0.0", | ||
@@ -45,3 +45,3 @@ "@angular/common": "^5.1.1", | ||
"@firestitch/common": "^0.1.26", | ||
"@firestitch/example": "^0.2.21", | ||
"@firestitch/example": "^0.3.0", | ||
"@firestitch/iframe": "^0.1.5", | ||
@@ -117,8 +117,8 @@ "@firestitch/message": "^0.1.19", | ||
"@firestitch/common": ">=0.1.26", | ||
"@firestitch/app": ">=0.1.2", | ||
"rxjs": ">=5.1.0", | ||
"fileapi": ">=2.0.25", | ||
"lodash": ">=4.17.5", | ||
"@firestitch/app": ">=0.1.2" | ||
"lodash": ">=4.17.5" | ||
}, | ||
"dependencies": {} | ||
} |
@@ -0,0 +0,0 @@ import { Observable } from 'rxjs/Observable'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './cordova.service'; |
@@ -0,0 +0,0 @@ "use strict"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
437343
4477