sogo/UI/WebServerResources/js/vendor/angular-file-upload.min.js
2017-12-25 01:32:34 -05:00

2 lines
22 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["angular-file-upload"]=t():e["angular-file-upload"]=t()}(this,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}return o.m=e,o.c=t,o.p="",o(0)}([function(e,t,o){"use strict";var n=y(o(1)),r=y(o(2)),i=y(o(3)),s=y(o(4)),a=y(o(5)),l=y(o(6)),u=y(o(7)),p=y(o(8)),c=y(o(9)),f=y(o(10)),d=y(o(11)),h=y(o(12)),v=y(o(13));function y(e){return e&&e.__esModule?e:{default:e}}angular.module(n.default.name,[]).value("fileUploaderOptions",r.default).factory("FileUploader",i.default).factory("FileLikeObject",s.default).factory("FileItem",a.default).factory("FileDirective",l.default).factory("FileSelect",u.default).factory("FileDrop",c.default).factory("FileOver",f.default).factory("Pipeline",p.default).directive("nvFileSelect",d.default).directive("nvFileDrop",h.default).directive("nvFileOver",v.default).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","Pipeline",function(e,t,o,n,r,i,s,a){e.FileLikeObject=t,e.FileItem=o,e.FileDirective=n,e.FileSelect=r,e.FileDrop=i,e.FileOver=s,e.Pipeline=a}])},function(e,t){e.exports={name:"angularFileUpload"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1,disableMultipart:!1}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var o=[],n=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!t||o.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=m;var r,i=o(1);r=i,r&&r.__esModule;var s=angular,a=s.bind,l=s.copy,u=s.extend,p=s.forEach,c=s.isObject,f=s.isNumber,d=s.isDefined,h=s.isArray,v=s.isUndefined,y=s.element;function m(e,t,o,r,i,s,m,_){var g=r.File,b=r.FormData,F=function(){function r(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var o=l(e);u(this,o,t,{isUploading:!1,_nextIndex:0,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return r.prototype.addToQueue=function(e,t,o){var r=this,i=this.isArrayLikeObject(e)?Array.prototype.slice.call(e):[e],a=this._getFilters(o),l=this.queue.length,u=[],p=function(){r.queue.length!==l&&(r._onAfterAddingAll(u),r.progress=r._getTotalProgress()),r._render(),r.autoUpload&&r.uploadAll()};!function e(){var o=i.shift();if(v(o))return p();var l=r.isFile(o)?o:new s(o),c=r._convertFiltersToPipes(a),f=new _(c);f.onThrown=function(t){var o=t.pipe.originalFilter,i=n(t.args,2),s=i[0],a=i[1];r._onWhenAddingFileFailed(s,o,a),e()},f.onSuccessful=function(t,o){var n=new m(r,t,o);u.push(n),r.queue.push(n),r._onAfterAddingFile(n),e()},f.exec(l,t)}()},r.prototype.removeFromQueue=function(e){var t=this.getIndexOfItem(e),o=this.queue[t];o.isUploading&&o.cancel(),this.queue.splice(t,1),o._destroy(),this.progress=this._getTotalProgress()},r.prototype.clearQueue=function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0},r.prototype.uploadItem=function(e){var t=this.getIndexOfItem(e),o=this.queue[t],n=this.isHTML5?"_xhrTransport":"_iframeTransport";o._prepareToUploading(),this.isUploading||(this._onBeforeUploadItem(o),o.isCancel||(o.isUploading=!0,this.isUploading=!0,this[n](o),this._render()))},r.prototype.cancelItem=function(e){var t=this,o=this.getIndexOfItem(e),n=this.queue[o],r=this.isHTML5?"_xhr":"_form";n&&(n.isCancel=!0,n.isUploading?n[r].abort():function(){var e=[void 0,0,{}];i(function(){t._onCancelItem.apply(t,[n].concat(e)),t._onCompleteItem.apply(t,[n].concat(e))})}())},r.prototype.uploadAll=function(){var e=this.getNotUploadedItems().filter(function(e){return!e.isUploading});e.length&&(p(e,function(e){return e._prepareToUploading()}),e[0].upload())},r.prototype.cancelAll=function(){var e=this.getNotUploadedItems();p(e,function(e){return e.cancel()})},r.prototype.isFile=function(e){return this.constructor.isFile(e)},r.prototype.isFileLikeObject=function(e){return this.constructor.isFileLikeObject(e)},r.prototype.isArrayLikeObject=function(e){return this.constructor.isArrayLikeObject(e)},r.prototype.getIndexOfItem=function(e){return f(e)?e:this.queue.indexOf(e)},r.prototype.getNotUploadedItems=function(){return this.queue.filter(function(e){return!e.isUploaded})},r.prototype.getReadyItems=function(){return this.queue.filter(function(e){return e.isReady&&!e.isUploading}).sort(function(e,t){return e.index-t.index})},r.prototype.destroy=function(){var e=this;p(this._directives,function(t){p(e._directives[t],function(e){e.destroy()})})},r.prototype.onAfterAddingAll=function(e){},r.prototype.onAfterAddingFile=function(e){},r.prototype.onWhenAddingFileFailed=function(e,t,o){},r.prototype.onBeforeUploadItem=function(e){},r.prototype.onProgressItem=function(e,t){},r.prototype.onProgressAll=function(e){},r.prototype.onSuccessItem=function(e,t,o,n){},r.prototype.onErrorItem=function(e,t,o,n){},r.prototype.onCancelItem=function(e,t,o,n){},r.prototype.onCompleteItem=function(e,t,o,n){},r.prototype.onCompleteAll=function(){},r.prototype._getTotalProgress=function(e){if(this.removeAfterUpload)return e||0;var t=this.getNotUploadedItems().length,o=t?this.queue.length-t:this.queue.length,n=100/this.queue.length,r=(e||0)*n/100;return Math.round(o*n+r)},r.prototype._getFilters=function(e){if(!e)return this.filters;if(h(e))return e;var t=e.match(/[^\s,]+/g);return this.filters.filter(function(e){return-1!==t.indexOf(e.name)})},r.prototype._convertFiltersToPipes=function(e){var t=this;return e.map(function(e){var o=a(t,e.fn);return o.isAsync=3===e.fn.length,o.originalFilter=e,o})},r.prototype._render=function(){t.$$phase||t.$apply()},r.prototype._folderFilter=function(e){return!(!e.size&&!e.type)},r.prototype._queueLimitFilter=function(){return this.queue.length<this.queueLimit},r.prototype._isSuccessCode=function(e){return e>=200&&e<300||304===e},r.prototype._transformResponse=function(e,t){var n=this._headersGetter(t);return p(o.defaults.transformResponse,function(t){e=t(e,n)}),e},r.prototype._parseHeaders=function(e){var t,o,n,r={};return e?(p(e.split("\n"),function(e){n=e.indexOf(":"),t=e.slice(0,n).trim().toLowerCase(),o=e.slice(n+1).trim(),t&&(r[t]=r[t]?r[t]+", "+o:o)}),r):r},r.prototype._headersGetter=function(e){return function(t){return t?e[t.toLowerCase()]||null:e}},r.prototype._xhrTransport=function(e){var t,o=this,n=e._xhr=new XMLHttpRequest;if(e.disableMultipart?t=e._file:(t=new b,p(e.formData,function(e){p(e,function(e,o){t.append(o,e)})}),t.append(e.alias,e._file,e.file.name)),"number"!=typeof e._file.size)throw new TypeError("The file specified is no longer valid");n.upload.onprogress=function(t){var n=Math.round(t.lengthComputable?100*t.loaded/t.total:0);o._onProgressItem(e,n)},n.onload=function(){var t=o._parseHeaders(n.getAllResponseHeaders()),r=o._transformResponse(n.response,t),i=o._isSuccessCode(n.status)?"Success":"Error";o["_on"+i+"Item"](e,r,n.status,t),o._onCompleteItem(e,r,n.status,t)},n.onerror=function(){var t=o._parseHeaders(n.getAllResponseHeaders()),r=o._transformResponse(n.response,t);o._onErrorItem(e,r,n.status,t),o._onCompleteItem(e,r,n.status,t)},n.onabort=function(){var t=o._parseHeaders(n.getAllResponseHeaders()),r=o._transformResponse(n.response,t);o._onCancelItem(e,r,n.status,t),o._onCompleteItem(e,r,n.status,t)},n.open(e.method,e.url,!0),n.withCredentials=e.withCredentials,p(e.headers,function(e,t){n.setRequestHeader(t,e)}),n.send(t)},r.prototype._iframeTransport=function(e){var t=this,o=y('<form style="display: none;" />'),n=y('<iframe name="iframeTransport'+Date.now()+'">'),r=e._input;e._form&&e._form.replaceWith(r),e._form=o,r.prop("name",e.alias),p(e.formData,function(e){p(e,function(e,t){var n=y('<input type="hidden" name="'+t+'" />');n.val(e),o.append(n)})}),o.prop({action:e.url,method:"POST",target:n.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),n.bind("load",function(){var o="",r=200;try{o=n[0].contentDocument.body.innerHTML}catch(e){r=500}var i={response:o,status:r,dummy:!0},s={},a=t._transformResponse(i.response,s);t._onSuccessItem(e,a,i.status,s),t._onCompleteItem(e,a,i.status,s)}),o.abort=function(){var i=0,s={};n.unbind("load").prop("src","javascript:false;"),o.replaceWith(r),t._onCancelItem(e,void 0,i,s),t._onCompleteItem(e,void 0,i,s)},r.after(o),o.append(r).append(n),o[0].submit()},r.prototype._onWhenAddingFileFailed=function(e,t,o){this.onWhenAddingFileFailed(e,t,o)},r.prototype._onAfterAddingFile=function(e){this.onAfterAddingFile(e)},r.prototype._onAfterAddingAll=function(e){this.onAfterAddingAll(e)},r.prototype._onBeforeUploadItem=function(e){e._onBeforeUpload(),this.onBeforeUploadItem(e)},r.prototype._onProgressItem=function(e,t){var o=this._getTotalProgress(t);this.progress=o,e._onProgress(t),this.onProgressItem(e,t),this.onProgressAll(o),this._render()},r.prototype._onSuccessItem=function(e,t,o,n){e._onSuccess(t,o,n),this.onSuccessItem(e,t,o,n)},r.prototype._onErrorItem=function(e,t,o,n){e._onError(t,o,n),this.onErrorItem(e,t,o,n)},r.prototype._onCancelItem=function(e,t,o,n){e._onCancel(t,o,n),this.onCancelItem(e,t,o,n)},r.prototype._onCompleteItem=function(e,t,o,n){e._onComplete(t,o,n),this.onCompleteItem(e,t,o,n);var r=this.getReadyItems()[0];this.isUploading=!1,d(r)?r.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render())},r.isFile=function(e){return g&&e instanceof g},r.isFileLikeObject=function(e){return e instanceof s},r.isArrayLikeObject=function(e){return c(e)&&"length"in e},r.inherit=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.super_=t},r}();return F.prototype.isHTML5=!(!g||!b),F.isHTML5=F.prototype.isHTML5,F}m.$inject=["fileUploaderOptions","$rootScope","$http","$window","$timeout","FileLikeObject","FileItem","Pipeline"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var o=a(t),n=o?t.value:t,r=l(n)?"FakePath":"Object",i="_createFrom"+r;this[i](n)}return e.prototype._createFromFakePath=function(e){this.lastModifiedDate=null,this.size=null,this.type="like/"+e.slice(e.lastIndexOf(".")+1).toLowerCase(),this.name=e.slice(e.lastIndexOf("/")+e.lastIndexOf("\\")+2)},e.prototype._createFromObject=function(e){this.lastModifiedDate=s(e.lastModifiedDate),this.size=e.size,this.type=e.type,this.name=e.name},e}()};var n,r=o(1);n=r,n&&n.__esModule;var i=angular,s=i.copy,a=i.isElement,l=i.isString},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var n,r=o(1);n=r,n&&n.__esModule;var i=angular,s=i.copy,a=i.extend,l=i.element,u=i.isElement;function p(e,t){return function(){function o(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var i=u(n),p=i?l(n):null,c=i?null:n;a(this,{url:e.url,alias:e.alias,headers:s(e.headers),formData:s(e.formData),removeAfterUpload:e.removeAfterUpload,withCredentials:e.withCredentials,disableMultipart:e.disableMultipart,method:e.method},r,{uploader:e,file:new t(n),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:c,_input:p}),p&&this._replaceNode(p)}return o.prototype.upload=function(){try{this.uploader.uploadItem(this)}catch(t){var e=t.name+":"+t.message;this.uploader._onCompleteItem(this,e,t.code,[]),this.uploader._onErrorItem(this,e,t.code,[])}},o.prototype.cancel=function(){this.uploader.cancelItem(this)},o.prototype.remove=function(){this.uploader.removeFromQueue(this)},o.prototype.onBeforeUpload=function(){},o.prototype.onProgress=function(e){},o.prototype.onSuccess=function(e,t,o){},o.prototype.onError=function(e,t,o){},o.prototype.onCancel=function(e,t,o){},o.prototype.onComplete=function(e,t,o){},o.prototype._onBeforeUpload=function(){this.isReady=!0,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()},o.prototype._onProgress=function(e){this.progress=e,this.onProgress(e)},o.prototype._onSuccess=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(e,t,o)},o.prototype._onError=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(e,t,o)},o.prototype._onCancel=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(e,t,o)},o.prototype._onComplete=function(e,t,o){this.onComplete(e,t,o),this.removeAfterUpload&&this.remove()},o.prototype._destroy=function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input},o.prototype._prepareToUploading=function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0},o.prototype._replaceNode=function(t){var o=e(t.clone())(t.scope());o.prop("value",null),t.css("display","none"),t.after(o)},o}()}p.$inject=["$compile","FileLikeObject"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,t),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return e.prototype.bind=function(){for(var e in this.events){var t=this.events[e];this.element.bind(e,this[t])}},e.prototype.unbind=function(){for(var e in this.events)this.element.unbind(e,this.events[e])},e.prototype.destroy=function(){var e=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(e,1),this.unbind()},e.prototype._saveLinks=function(){for(var e in this.events){var t=this.events[e];this[t]=this[t].bind(this)}},e}();return e.prototype.events={},e};var n,r=o(1);n=r,n&&n.__esModule;var i=angular.extend},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n,r=o(1);n=r,n&&n.__esModule;var i=angular.extend;function s(e,t){return function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,t);function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n=i(e,{events:{$destroy:"destroy",change:"onChange"},prop:"select"}),r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,n));return r.uploader.isHTML5||r.element.removeAttr("multiple"),r.element.prop("value",null),r}return o.prototype.getOptions=function(){},o.prototype.getFilters=function(){},o.prototype.isEmptyAfterSelection=function(){return!!this.element.attr("multiple")},o.prototype.onChange=function(){var t=this.uploader.isHTML5?this.element[0].files:this.element[0],o=this.getOptions(),n=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(t,o,n),this.isEmptyAfterSelection()&&(this.element.prop("value",null),this.element.replaceWith(e(this.element.clone())(this.scope)))},o}(t)}s.$inject=["$compile","FileDirective"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;function o(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}var n=angular,r=n.bind,i=n.isUndefined;function s(e){return function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.pipes=e}return t.prototype.next=function(t){var n=this.pipes.shift();if(i(n))this.onSuccessful.apply(this,o(t));else{var s=new Error("The filter has not passed");if(s.pipe=n,s.args=t,n.isAsync){var a=e.defer(),l=r(this,this.next,t),u=r(this,this.onThrown,s);a.promise.then(l,u),n.apply(void 0,o(t).concat([a]))}else{Boolean(n.apply(void 0,o(t)))?this.next(t):this.onThrown(s)}}},t.prototype.exec=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];this.next(t)},t.prototype.onThrown=function(e){},t.prototype.onSuccessful=function(){},t}()}s.$inject=["$q"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n,r=o(1);n=r,n&&n.__esModule;var i=angular,s=i.extend,a=i.forEach;function l(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=s(o,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n))}return t.prototype.getOptions=function(){},t.prototype.getFilters=function(){},t.prototype.onDrop=function(e){var t=this._getTransfer(e);if(t){var o=this.getOptions(),n=this.getFilters();this._preventAndStop(e),a(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(t.files,o,n)}},t.prototype.onDragOver=function(e){var t=this._getTransfer(e);this._haveFiles(t.types)&&(t.dropEffect="copy",this._preventAndStop(e),a(this.uploader._directives.over,this._addOverClass,this))},t.prototype.onDragLeave=function(e){e.currentTarget!==this.element[0]&&(this._preventAndStop(e),a(this.uploader._directives.over,this._removeOverClass,this))},t.prototype._getTransfer=function(e){return e.dataTransfer?e.dataTransfer:e.originalEvent.dataTransfer},t.prototype._preventAndStop=function(e){e.preventDefault(),e.stopPropagation()},t.prototype._haveFiles=function(e){return!!e&&(e.indexOf?-1!==e.indexOf("Files"):!!e.contains&&e.contains("Files"))},t.prototype._addOverClass=function(e){e.addOverClass()},t.prototype._removeOverClass=function(e){e.removeOverClass()},t}(e)}l.$inject=["FileDirective"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n,r=o(1);n=r,n&&n.__esModule;var i=angular.extend;function s(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e);function t(o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=i(o,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n))}return t.prototype.addOverClass=function(){this.element.addClass(this.getOverClass())},t.prototype.removeOverClass=function(){this.element.removeClass(this.getOverClass())},t.prototype.getOverClass=function(){return this.overClass},t}(e)}s.$inject=["FileDirective"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);n=r,n&&n.__esModule;function i(e,t,o){return{link:function(n,r,i){var s=n.$eval(i.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');var a=new o({uploader:s,element:r,scope:n});a.getOptions=e(i.options).bind(a,n),a.getFilters=function(){return i.filters}}}}i.$inject=["$parse","FileUploader","FileSelect"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);n=r,n&&n.__esModule;function i(e,t,o){return{link:function(n,r,i){var s=n.$eval(i.uploader);if(!(s instanceof t))throw new TypeError('"Uploader" must be an instance of FileUploader');if(s.isHTML5){var a=new o({uploader:s,element:r});a.getOptions=e(i.options).bind(a,n),a.getFilters=function(){return i.filters}}}}}i.$inject=["$parse","FileUploader","FileDrop"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);n=r,n&&n.__esModule;function i(e,t){return{link:function(o,n,r){var i=o.$eval(r.uploader);if(!(i instanceof e))throw new TypeError('"Uploader" must be an instance of FileUploader');var s=new t({uploader:i,element:n});s.getOverClass=function(){return r.overClass||s.overClass}}}}i.$inject=["FileUploader","FileOver"]}])}),function(){"use strict";angular.module("angularFileUpload").decorator("FileUploader",e).decorator("FileDrop",t),e.$inject=["$delegate","$cookies"];function e(e,t){return e.prototype.onBeforeUploadItem=function(e){var o=t.get("XSRF-TOKEN");o&&(e.headers={"X-XSRF-TOKEN":o})},e}t.$inject=["$delegate","$timeout"];function t(e,t){return e.prototype.onDragOver=function(e){var o=this._getTransfer(e);this._haveFiles(o.types)&&(o.dropEffect="copy",this._preventAndStop(e),angular.forEach(this.uploader._directives.over,this._addOverClass,this),t.cancel(this.onDragLeaveTimer))},e.prototype.onDragLeave=function(e){var o=this;t.cancel(this.onDragLeaveTimer),this.onDragLeaveTimer=t(function(){o._preventAndStop(e),angular.forEach(o.uploader._directives.over,o._removeOverClass,o)},50)},e}}();
//# sourceMappingURL=angular-file-upload.min.js.map