File "FileManager-Upload.js"
Full Path: /home/attunedd/public_html/byp/wp-content/plugins/wpide/dist/js/chunks/FileManager/FileManager-Upload.js
File size: 20.81 KB
MIME-type: text/plain
Charset: utf-8
(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[320],{53831:e=>{!function(){"use strict";var t=function(e){if(!(this instanceof t))return new t(e);if(this.version=1,this.support=!("undefined"==typeof File||"undefined"==typeof Blob||"undefined"==typeof FileList||!Blob.prototype.webkitSlice&&!Blob.prototype.mozSlice&&!Blob.prototype.slice),!this.support)return!1;var r=this;r.files=[],r.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,fileParameterName:"file",chunkNumberParameterName:"resumableChunkNumber",chunkSizeParameterName:"resumableChunkSize",currentChunkSizeParameterName:"resumableCurrentChunkSize",totalSizeParameterName:"resumableTotalSize",typeParameterName:"resumableType",identifierParameterName:"resumableIdentifier",fileNameParameterName:"resumableFilename",relativePathParameterName:"resumableRelativePath",totalChunksParameterName:"resumableTotalChunks",throttleProgressCallbacks:.5,query:{},headers:{},preprocess:null,method:"multipart",uploadMethod:"POST",testMethod:"GET",prioritizeFirstAndLastChunk:!1,target:"/",testTarget:null,parameterNamespace:"",testChunks:!0,generateUniqueIdentifier:null,getTarget:null,maxChunkRetries:100,chunkRetryInterval:void 0,permanentErrors:[400,404,415,500,501],maxFiles:void 0,withCredentials:!1,xhrTimeout:0,clearInput:!0,chunkFormat:"blob",setChunkTypeFromFile:!1,maxFilesErrorCallback:function(e,t){var i=r.getOpt("maxFiles");alert("Please upload no more than "+i+" file"+(1===i?"":"s")+" at a time.")},minFileSize:1,minFileSizeErrorCallback:function(e,t){alert(e.fileName||e.name+" is too small, please upload files larger than "+i.formatSize(r.getOpt("minFileSize"))+".")},maxFileSize:void 0,maxFileSizeErrorCallback:function(e,t){alert(e.fileName||e.name+" is too large, please upload files less than "+i.formatSize(r.getOpt("maxFileSize"))+".")},fileType:[],fileTypeErrorCallback:function(e,t){alert(e.fileName||e.name+" has type not allowed, please upload files of type "+r.getOpt("fileType")+".")}},r.opts=e||{},r.getOpt=function(e){var r=this;if(e instanceof Array){var n={};return i.each(e,(function(e){n[e]=r.getOpt(e)})),n}if(r instanceof f){if(void 0!==r.opts[e])return r.opts[e];r=r.fileObj}if(r instanceof c){if(void 0!==r.opts[e])return r.opts[e];r=r.resumableObj}if(r instanceof t)return void 0!==r.opts[e]?r.opts[e]:r.defaults[e]},r.events=[],r.on=function(e,t){r.events.push(e.toLowerCase(),t)},r.fire=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);var i=e[0].toLowerCase();for(t=0;t<=r.events.length;t+=2)r.events[t]==i&&r.events[t+1].apply(r,e.slice(1)),"catchall"==r.events[t]&&r.events[t+1].apply(null,e);"fileerror"==i&&r.fire("error",e[2],e[1]),"fileprogress"==i&&r.fire("progress")};var i={stopEvent:function(e){e.stopPropagation(),e.preventDefault()},each:function(e,t){if(void 0!==e.length){for(var r=0;r<e.length;r++)if(!1===t(e[r]))return}else for(r in e)if(!1===t(r,e[r]))return},generateUniqueIdentifier:function(e,t){var i=r.getOpt("generateUniqueIdentifier");if("function"==typeof i)return i(e,t);var n=e.webkitRelativePath||e.fileName||e.name;return e.size+"-"+n.replace(/[^0-9a-zA-Z_-]/gim,"")},contains:function(e,t){var r=!1;return i.each(e,(function(e){return e!=t||(r=!0,!1)})),r},formatSize:function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(0)+" KB":e<1073741824?(e/1024/1024).toFixed(1)+" MB":(e/1024/1024/1024).toFixed(1)+" GB"},getTarget:function(e,t){var i=r.getOpt("target");if("test"===e&&r.getOpt("testTarget")&&(i="/"===r.getOpt("testTarget")?r.getOpt("target"):r.getOpt("testTarget")),"function"==typeof i)return i(t);var n=i.indexOf("?")<0?"?":"&";return i+n+t.join("&")}},n=function(e){i.stopEvent(e),e.dataTransfer&&e.dataTransfer.items?l(e.dataTransfer.items,e):e.dataTransfer&&e.dataTransfer.files&&l(e.dataTransfer.files,e)},a=function(e){e.preventDefault()};function s(e,t,r,i){var n;return e.isFile?e.file((function(e){e.relativePath=t+e.name,r.push(e),i()})):(e.isDirectory?n=e:e instanceof File&&r.push(e),"function"==typeof e.webkitGetAsEntry&&(n=e.webkitGetAsEntry()),n&&n.isDirectory?function(e,t,r,i){e.createReader().readEntries((function(e){if(!e.length)return i();o(e.map((function(e){return s.bind(null,e,t,r)})),i)}))}(n,t+n.name+"/",r,i):("function"==typeof e.getAsFile&&(e=e.getAsFile())instanceof File&&(e.relativePath=t+e.name,r.push(e)),void i()))}function o(e,t){if(!e||0===e.length)return t();e[0]((function(){o(e.slice(1),t)}))}function l(e,t){if(e.length){r.fire("beforeAdd");var i=[];o(Array.prototype.map.call(e,(function(e){return s.bind(null,e,"",i)})),(function(){i.length&&u(i,t)}))}}var u=function(e,t){var n=0,a=r.getOpt(["maxFiles","minFileSize","maxFileSize","maxFilesErrorCallback","minFileSizeErrorCallback","maxFileSizeErrorCallback","fileType","fileTypeErrorCallback"]);if(void 0!==a.maxFiles&&a.maxFiles<e.length+r.files.length){if(1!==a.maxFiles||1!==r.files.length||1!==e.length)return a.maxFilesErrorCallback(e,n++),!1;r.removeFile(r.files[0])}var s=[],o=[],l=e.length,u=function(){if(! --l){if(!s.length&&!o.length)return;window.setTimeout((function(){r.fire("filesAdded",s,o)}),0)}};i.each(e,(function(e){var l=e.name;if(a.fileType.length>0){var f=!1;for(var p in a.fileType){var d="."+a.fileType[p];if(-1!==l.toLowerCase().indexOf(d.toLowerCase(),l.length-d.length)){f=!0;break}}if(!f)return a.fileTypeErrorCallback(e,n++),!1}if(void 0!==a.minFileSize&&e.size<a.minFileSize)return a.minFileSizeErrorCallback(e,n++),!1;if(void 0!==a.maxFileSize&&e.size>a.maxFileSize)return a.maxFileSizeErrorCallback(e,n++),!1;function h(i){r.getFromUniqueIdentifier(i)?o.push(e):function(){e.uniqueIdentifier=i;var n=new c(r,e,i);r.files.push(n),s.push(n),n.container=void 0!==t?t.srcElement:null,window.setTimeout((function(){r.fire("fileAdded",n,t)}),0)}(),u()}var m=i.generateUniqueIdentifier(e,t);m&&"function"==typeof m.then?m.then((function(e){h(e)}),(function(){u()})):h(m)}))};function c(e,t,r){var n=this;n.opts={},n.getOpt=e.getOpt,n._prevProgress=0,n.resumableObj=e,n.file=t,n.fileName=t.fileName||t.name,n.size=t.size,n.relativePath=t.relativePath||t.webkitRelativePath||n.fileName,n.uniqueIdentifier=r,n._pause=!1,n.container="";var a=void 0!==r,s=function(e,t){switch(e){case"progress":n.resumableObj.fire("fileProgress",n,t);break;case"error":n.abort(),a=!0,n.chunks=[],n.resumableObj.fire("fileError",n,t);break;case"success":if(a)return;n.resumableObj.fire("fileProgress",n),n.isComplete()&&n.resumableObj.fire("fileSuccess",n,t);break;case"retry":n.resumableObj.fire("fileRetry",n)}};return n.chunks=[],n.abort=function(){var e=0;i.each(n.chunks,(function(t){"uploading"==t.status()&&(t.abort(),e++)})),e>0&&n.resumableObj.fire("fileProgress",n)},n.cancel=function(){var e=n.chunks;n.chunks=[],i.each(e,(function(e){"uploading"==e.status()&&(e.abort(),n.resumableObj.uploadNextChunk())})),n.resumableObj.removeFile(n),n.resumableObj.fire("fileProgress",n)},n.retry=function(){n.bootstrap();var e=!1;n.resumableObj.on("chunkingComplete",(function(){e||n.resumableObj.upload(),e=!0}))},n.bootstrap=function(){n.abort(),a=!1,n.chunks=[],n._prevProgress=0;for(var e=n.getOpt("forceChunkSize")?Math.ceil:Math.floor,t=Math.max(e(n.file.size/n.getOpt("chunkSize")),1),r=0;r<t;r++)!function(e){window.setTimeout((function(){n.chunks.push(new f(n.resumableObj,n,e,s)),n.resumableObj.fire("chunkingProgress",n,e/t)}),0)}(r);window.setTimeout((function(){n.resumableObj.fire("chunkingComplete",n)}),0)},n.progress=function(){if(a)return 1;var e=0,t=!1;return i.each(n.chunks,(function(r){"error"==r.status()&&(t=!0),e+=r.progress(!0)})),e=t||e>.99999?1:e,e=Math.max(n._prevProgress,e),n._prevProgress=e,e},n.isUploading=function(){var e=!1;return i.each(n.chunks,(function(t){if("uploading"==t.status())return e=!0,!1})),e},n.isComplete=function(){var e=!1;return i.each(n.chunks,(function(t){var r=t.status();if("pending"==r||"uploading"==r||1===t.preprocessState)return e=!0,!1})),!e},n.pause=function(e){n._pause=void 0===e?!n._pause:e},n.isPaused=function(){return n._pause},n.resumableObj.fire("chunkingStart",n),n.bootstrap(),this}function f(e,t,r,n){var a=this;a.opts={},a.getOpt=e.getOpt,a.resumableObj=e,a.fileObj=t,a.fileObjSize=t.size,a.fileObjType=t.file.type,a.offset=r,a.callback=n,a.lastProgressCallback=new Date,a.tested=!1,a.retries=0,a.pendingRetry=!1,a.preprocessState=0;var s=a.getOpt("chunkSize");return a.loaded=0,a.startByte=a.offset*s,a.endByte=Math.min(a.fileObjSize,(a.offset+1)*s),a.fileObjSize-a.endByte<s&&!a.getOpt("forceChunkSize")&&(a.endByte=a.fileObjSize),a.xhr=null,a.test=function(){a.xhr=new XMLHttpRequest;var e=function(e){a.tested=!0;var t=a.status();"success"==t?(a.callback(t,a.message()),a.resumableObj.uploadNextChunk()):a.send()};a.xhr.addEventListener("load",e,!1),a.xhr.addEventListener("error",e,!1),a.xhr.addEventListener("timeout",e,!1);var t=[],r=a.getOpt("parameterNamespace"),n=a.getOpt("query");"function"==typeof n&&(n=n(a.fileObj,a)),i.each(n,(function(e,i){t.push([encodeURIComponent(r+e),encodeURIComponent(i)].join("="))})),t=t.concat([["chunkNumberParameterName",a.offset+1],["chunkSizeParameterName",a.getOpt("chunkSize")],["currentChunkSizeParameterName",a.endByte-a.startByte],["totalSizeParameterName",a.fileObjSize],["typeParameterName",a.fileObjType],["identifierParameterName",a.fileObj.uniqueIdentifier],["fileNameParameterName",a.fileObj.fileName],["relativePathParameterName",a.fileObj.relativePath],["totalChunksParameterName",a.fileObj.chunks.length]].filter((function(e){return a.getOpt(e[0])})).map((function(e){return[r+a.getOpt(e[0]),encodeURIComponent(e[1])].join("=")}))),a.xhr.open(a.getOpt("testMethod"),i.getTarget("test",t)),a.xhr.timeout=a.getOpt("xhrTimeout"),a.xhr.withCredentials=a.getOpt("withCredentials");var s=a.getOpt("headers");"function"==typeof s&&(s=s(a.fileObj,a)),i.each(s,(function(e,t){a.xhr.setRequestHeader(e,t)})),a.xhr.send(null)},a.preprocessFinished=function(){a.preprocessState=2,a.send()},a.send=function(){var e=a.getOpt("preprocess");if("function"==typeof e)switch(a.preprocessState){case 0:return a.preprocessState=1,void e(a);case 1:return}if(!a.getOpt("testChunks")||a.tested){a.xhr=new XMLHttpRequest,a.xhr.upload.addEventListener("progress",(function(e){new Date-a.lastProgressCallback>1e3*a.getOpt("throttleProgressCallbacks")&&(a.callback("progress"),a.lastProgressCallback=new Date),a.loaded=e.loaded||0}),!1),a.loaded=0,a.pendingRetry=!1,a.callback("progress");var t=function(e){var t=a.status();if("success"==t||"error"==t)a.callback(t,a.message()),a.resumableObj.uploadNextChunk();else{a.callback("retry",a.message()),a.abort(),a.retries++;var r=a.getOpt("chunkRetryInterval");void 0!==r?(a.pendingRetry=!0,setTimeout(a.send,r)):a.send()}};a.xhr.addEventListener("load",t,!1),a.xhr.addEventListener("error",t,!1),a.xhr.addEventListener("timeout",t,!1);var r=[["chunkNumberParameterName",a.offset+1],["chunkSizeParameterName",a.getOpt("chunkSize")],["currentChunkSizeParameterName",a.endByte-a.startByte],["totalSizeParameterName",a.fileObjSize],["typeParameterName",a.fileObjType],["identifierParameterName",a.fileObj.uniqueIdentifier],["fileNameParameterName",a.fileObj.fileName],["relativePathParameterName",a.fileObj.relativePath],["totalChunksParameterName",a.fileObj.chunks.length]].filter((function(e){return a.getOpt(e[0])})).reduce((function(e,t){return e[a.getOpt(t[0])]=t[1],e}),{}),n=a.getOpt("query");"function"==typeof n&&(n=n(a.fileObj,a)),i.each(n,(function(e,t){r[e]=t}));var s=a.fileObj.file.slice?"slice":a.fileObj.file.mozSlice?"mozSlice":a.fileObj.file.webkitSlice?"webkitSlice":"slice",o=a.fileObj.file[s](a.startByte,a.endByte,a.getOpt("setChunkTypeFromFile")?a.fileObj.file.type:""),l=null,u=[],c=a.getOpt("parameterNamespace");if("octet"===a.getOpt("method"))l=o,i.each(r,(function(e,t){u.push([encodeURIComponent(c+e),encodeURIComponent(t)].join("="))}));else if(l=new FormData,i.each(r,(function(e,t){l.append(c+e,t),u.push([encodeURIComponent(c+e),encodeURIComponent(t)].join("="))})),"blob"==a.getOpt("chunkFormat"))l.append(c+a.getOpt("fileParameterName"),o,a.fileObj.fileName);else if("base64"==a.getOpt("chunkFormat")){var f=new FileReader;f.onload=function(e){l.append(c+a.getOpt("fileParameterName"),f.result),a.xhr.send(l)},f.readAsDataURL(o)}var p=i.getTarget("upload",u),d=a.getOpt("uploadMethod");a.xhr.open(d,p),"octet"===a.getOpt("method")&&a.xhr.setRequestHeader("Content-Type","application/octet-stream"),a.xhr.timeout=a.getOpt("xhrTimeout"),a.xhr.withCredentials=a.getOpt("withCredentials");var h=a.getOpt("headers");"function"==typeof h&&(h=h(a.fileObj,a)),i.each(h,(function(e,t){a.xhr.setRequestHeader(e,t)})),"blob"==a.getOpt("chunkFormat")&&a.xhr.send(l)}else a.test()},a.abort=function(){a.xhr&&a.xhr.abort(),a.xhr=null},a.status=function(){return a.pendingRetry?"uploading":a.xhr?a.xhr.readyState<4?"uploading":200==a.xhr.status||201==a.xhr.status?"success":i.contains(a.getOpt("permanentErrors"),a.xhr.status)||a.retries>=a.getOpt("maxChunkRetries")?"error":(a.abort(),"pending"):"pending"},a.message=function(){return a.xhr?a.xhr.responseText:""},a.progress=function(e){void 0===e&&(e=!1);var t=e?(a.endByte-a.startByte)/a.fileObjSize:1;if(a.pendingRetry)return 0;switch(a.xhr&&a.xhr.status||(t*=.95),a.status()){case"success":case"error":return 1*t;case"pending":return 0*t;default:return a.loaded/(a.endByte-a.startByte)*t}},this}return r.uploadNextChunk=function(){var e=!1;if(r.getOpt("prioritizeFirstAndLastChunk")&&(i.each(r.files,(function(t){return t.chunks.length&&"pending"==t.chunks[0].status()&&0===t.chunks[0].preprocessState?(t.chunks[0].send(),e=!0,!1):t.chunks.length>1&&"pending"==t.chunks[t.chunks.length-1].status()&&0===t.chunks[t.chunks.length-1].preprocessState?(t.chunks[t.chunks.length-1].send(),e=!0,!1):void 0})),e))return!0;if(i.each(r.files,(function(t){if(!1===t.isPaused()&&i.each(t.chunks,(function(t){if("pending"==t.status()&&0===t.preprocessState)return t.send(),e=!0,!1})),e)return!1})),e)return!0;var t=!1;return i.each(r.files,(function(e){if(!e.isComplete())return t=!0,!1})),t||r.fire("complete"),!1},r.assignBrowse=function(e,t){void 0===e.length&&(e=[e]),i.each(e,(function(e){var i;"INPUT"===e.tagName&&"file"===e.type?i=e:((i=document.createElement("input")).setAttribute("type","file"),i.style.display="none",e.addEventListener("click",(function(){i.style.opacity=0,i.style.display="block",i.focus(),i.click(),i.style.display="none"}),!1),e.appendChild(i));var n=r.getOpt("maxFiles");void 0===n||1!=n?i.setAttribute("multiple","multiple"):i.removeAttribute("multiple"),t?i.setAttribute("webkitdirectory","webkitdirectory"):i.removeAttribute("webkitdirectory");var a=r.getOpt("fileType");void 0!==a&&a.length>=1?i.setAttribute("accept",a.map((function(e){return"."+e})).join(",")):i.removeAttribute("accept"),i.addEventListener("change",(function(e){u(e.target.files,e),r.getOpt("clearInput")&&(e.target.value="")}),!1)}))},r.assignDrop=function(e){void 0===e.length&&(e=[e]),i.each(e,(function(e){e.addEventListener("dragover",a,!1),e.addEventListener("dragenter",a,!1),e.addEventListener("drop",n,!1)}))},r.unAssignDrop=function(e){void 0===e.length&&(e=[e]),i.each(e,(function(e){e.removeEventListener("dragover",a),e.removeEventListener("dragenter",a),e.removeEventListener("drop",n)}))},r.isUploading=function(){var e=!1;return i.each(r.files,(function(t){if(t.isUploading())return e=!0,!1})),e},r.upload=function(){if(!r.isUploading()){r.fire("uploadStart");for(var e=1;e<=r.getOpt("simultaneousUploads");e++)r.uploadNextChunk()}},r.pause=function(){i.each(r.files,(function(e){e.abort()})),r.fire("pause")},r.cancel=function(){r.fire("beforeCancel");for(var e=r.files.length-1;e>=0;e--)r.files[e].cancel();r.fire("cancel")},r.progress=function(){var e=0,t=0;return i.each(r.files,(function(r){e+=r.progress()*r.size,t+=r.size})),t>0?e/t:0},r.addFile=function(e,t){u([e],t)},r.addFiles=function(e,t){u(e,t)},r.removeFile=function(e){for(var t=r.files.length-1;t>=0;t--)r.files[t]===e&&r.files.splice(t,1)},r.getFromUniqueIdentifier=function(e){var t=!1;return i.each(r.files,(function(r){r.uniqueIdentifier==e&&(t=r)})),t},r.getSize=function(){var e=0;return i.each(r.files,(function(t){e+=t.size})),e},r.handleDropEvent=function(e){n(e)},r.handleChangeEvent=function(e){u(e.target.files,e),e.target.value=""},r.updateQuery=function(e){r.opts.query=e},this};e.exports=t}()},55248:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});r(7996),r(53290),r(43146),r(35545),r(83090),r(90203),r(13902),r(46636),r(7422);var i=r(53831),n=r.n(i),a=r(71199),s=r(51892),o=r(27397),l=r(2332);const u={name:"Upload",props:["files","dropZone"],data:function(){return{resumable:{},visible:!1,paused:!1,progressVisible:!1}},computed:{activeUploads:function(){return this.resumable.files.length>0&&this.resumable.progress()<1},progress:function(){return this.resumable.getSize()>0?Math.round(100*this.resumable.progress()):0},percent:function(){return(this.progress||0)+"%"},total:function(){return this.formatBytes(this.resumable.getSize())}},watch:{files:function(e){var t=this;e.forEach((function(e){t.resumable.addFile(e)}))}},mounted:function(){var e=this;if(this.resumable=new(n())({target:s.default.config.baseURL+"/upload",headers:{"x-csrf-token":l.Z.defaults.headers.common["x-csrf-token"]},withCredentials:!0,simultaneousUploads:this.getConfig("file.upload_simultaneous"),minFileSize:0,chunkSize:this.getConfig("file.upload_chunk_size"),maxFileSize:this.getConfig("file.upload_max_size"),maxFileSizeErrorCallback:function(t){e.$bvToast.toast((0,a.gB)((0,a.__)("%s is too large, please upload files less than %s","wpide"),t.name,e.formatBytes(e.$store.state.config.file.upload_max_size)),{title:(0,a.__)("Error","wpide"),variant:"danger",toaster:"b-toaster-bottom-right",appendToast:!0})}}),this.resumable.support){var t=document.getElementById("dropzone");t&&(this.resumable.assignDrop(t),this.resumable.on("fileAdded",(function(t){e.visible=!0,e.progressVisible=!0,void 0===t.relativePath||null===t.relativePath||t.relativePath==t.fileName?t.relativePath=e.$store.state.cwd.location:t.relativePath=[e.$store.state.cwd.location,t.relativePath].join("/").replace("//","/").replace(t.fileName,"").replace(/\/$/,""),e.paused||e.resumable.upload()})),this.resumable.on("fileSuccess",(function(t){t.file.uploadingError=!1,e.$forceUpdate(),e.can("read")&&o.Z.getDir({to:""}).then((function(t){e.$store.commit("setCwd",{content:t.files,location:t.location})}))})),this.resumable.on("fileError",(function(e){e.file.uploadingError=!0})))}else this.$bvToast.toast((0,a.__)("Browser not supported.","wpide"),{title:(0,a.__)("Error","wpide"),variant:"danger",noAutoHide:!0,toaster:"b-toaster-bottom-right",appendToast:!0})},beforeDestroy:function(){this.resumable.cancel()},methods:{closeWindow:function(){var e=this;this.activeUploads?this.showModalConfirm((0,a.__)("Confirm","wpide"),(function(){e.resumable.cancel(),e.visible=!1})):(this.visible=!1,this.resumable.cancel())},toggleWindow:function(){this.progressVisible=!this.progressVisible},togglePause:function(){this.paused?(this.resumable.upload(),this.paused=!1):(this.resumable.pause(),this.paused=!0)}}};const c=(0,r(9970).Z)(u,(function(){var e=this,t=e._self._c;return t("div",[e.visible&&0==e.dropZone?t("div",{staticClass:"progress-box"},[t("div",{staticClass:"box-header"},[t("div",{staticClass:"d-flex justify-content-between align-center"},[t("div",{staticClass:"d-flex text-primary"},[e.activeUploads&&!e.paused?t("span",{staticClass:"mr-1",domProps:{textContent:e._s(e.sprintf(e.__("Uploading files %s of %s","wpide"),e.percent,e.total))}}):e._e(),e.activeUploads&&e.paused?t("span",{domProps:{textContent:e._s(e.__("Upload paused.","wpide"))}}):e._e(),e.activeUploads?e._e():t("span",{domProps:{textContent:e._s(e.__("Upload done!","wpide"))}})]),t("div",{staticClass:"d-flex"},[e.activeUploads?t("a",{staticClass:"progress-icon",on:{click:function(t){return e.togglePause()}}},[t("em",{staticClass:"ni icon",class:e.paused?"ni-play-circle":"ni-pause-circle"})]):e._e(),t("a",{staticClass:"progress-icon",on:{click:function(t){return e.toggleWindow()}}},[t("em",{staticClass:"ni icon",class:{"ni-chevron-down":e.progressVisible,"ni-chevron-up":!e.progressVisible}})]),t("a",{staticClass:"progress-icon",on:{click:function(t){return e.closeWindow()}}},[t("em",{staticClass:"ni icon ni-cross"})])])])]),e.progressVisible?t("div",{staticClass:"box-body"},[t("div",{staticClass:"progress-items list-group"},e._l(e.resumable.files.slice().reverse(),(function(r,i){return t("div",{key:i,staticClass:"list-group-item"},[t("div",{staticClass:"d-flex flex-column justify-content-between"},[t("div",[e._v(e._s("/"!=r.relativePath?r.relativePath:"")+"/"+e._s(r.fileName))]),t("div",{staticClass:"d-flex justify-content-between mt-1"},[t("b-progress",{class:[r.file.uploadingError?"is-danger":"is-primary","progress is-large"],attrs:{value:r.size>0?100*r.progress():100,max:"100",animated:""}}),!r.isUploading()&&r.file.uploadingError?t("a",{staticClass:"progress-icon",on:{click:function(e){return r.retry()}}},[t("em",{staticClass:"icon ni ni-redo text-danger"})]):e._e(),r.isUploading()?t("a",{staticClass:"progress-icon",on:{click:function(e){return r.cancel()}}},[t("em",{staticClass:"icon ni",class:r.isComplete()?"ni-check":"ni-cross"})]):e._e()],1)])])})),0)]):e._e()]):e._e()])}),[],!1,null,"520093ae",null).exports}}]);