{"version":3,"sources":["kendo.upload.js"],"names":["f","define","$","undefined","getFileName","input","map","inputFiles","file","name","join","$input","files","getAllFileInfo","stripPath","value","extension","getFileExtension","size","rawFiles","getFileInfo","rawFile","fileName","kendo","htmlEncode","fileSize","matches","match","rFileExtension","slashIndex","lastIndexOf","substr","assignGuidToFiles","unique","uid","guid","validateFiles","validationInfo","i","allowedExtensions","parseAllowedExtensions","maxFileSize","minFileSize","length","validateFileExtension","validateFileSize","extensions","ext","parsedExt","substring","toLowerCase","indexOf","validationErrors","inArray","INVALIDFILEEXTENSION","push","INVALIDMINFILESIZE","INVALIDMAXFILESIZE","getTotalFilesSizeMessage","totalSize","toFixed","shouldRemoveFileEntry","upload","multiple","wrapper","removeUploadedFile","fileEntry","data","shouldSendRemoveRequest","fileNames","_supportsRemove","_removeFileEntry","_submitRemove","textStatus","xhr","prevented","trigger","SUCCESS","operation","response","XMLHttpRequest","ERROR","logToConsole","responseText","tryParseJSON","onSuccess","onError","success","json","parseJSON","normalizeJSON","e","stopEvent","stopPropagation","preventDefault","bindDragEventWrappers","element","namespace","onDragEnter","onDragLeave","hideInterval","lastDrag","on","Date","setInterval","sinceLastDrag","clearInterval","isFileUploadStarted","is","getFileEntry","target","closest","iframeUploadModule","formDataUploadModule","window","Widget","ui","antiForgeryTokens","NS","SELECT","UPLOAD","COMPLETE","CANCEL","PROGRESS","REMOVE","VALIDATIONERRORS","PROGRESSHIDEDELAY","PROGRESSHIDEDURATION","headerStatusIcon","loading","warning","Upload","extend","init","options","activeInput","ns","initialFiles","that","this","fn","call","localization","_wrapInput","_activeInput","toggle","enabled","_ns","proxy","_onParentFormSubmit","_onParentFormReset","async","saveUrl","_module","_supportsFormData","_async","_renderInitialFiles","syncUploadModule","_supportsDrop","dropZone","_setupCustomDropZone","_setupDropZone","_onFileAction","_onClearSelected","_onUploadSelected","val","_onInputChange","events","showFileList","template","removeVerb","autoUpload","withCredentials","accept","select","cancel","retry","remove","clearSelectedFiles","uploadSelectedFiles","dropFilesHere","statusUploading","statusUploaded","statusWarning","statusFailed","headerStatusUploading","headerStatusUploaded","invalidMaxFileSize","invalidMinFileSize","invalidFileExtension","validation","setOptions","attr","_supportsMultiple","enable","disable","toggleClass","prop","destroy","customDropZone","document","add","off","onSaveSelected","getFiles","filesData","j","allFiles","listItems","find","clearAllFiles","each","index","_removeFileByDomElement","removeAllFiles","removeFileByUid","_removeFileByUid","clearFileByUid","clearFile","callback","_removeFile","removeFile","fileData","hasClass","onCancel","onRemove","_hideHeaderUploadstatus","_updateHeaderUploadStatus","_addInput","sourceInput","nodeType","clone","insertAfter","hide","removeAttr","focus","parent","addClass","removeClass","_onInputKeyDown","firstButton","keyCode","keys","TAB","_inputFiles","_isAsyncNonBatch","onSelect","_onDrop","dt","originalEvent","dataTransfer","droppedFiles","splice","_filesContainValidationErrors","hasErrors","batch","currentFile","idx","_enqueueFile","prepend","_fileAction","_prepareTemplateData","templateData","_prepareDefaultSingleFileEntryTemplate","errors","_prepareDefaultMultipleFileEntriesTemplate","filesHaveValidationErrors","totalFileSize","sort","a","b","existingFileEntries","removeEventArgs","fileUid","fileList","appendTo","angular","elements","width","allCompletedFiles","allInvalidFiles","_hideUploadButton","fileElement","actionKey","classDictionary","iconsClassDictionary","hasOwnProperty","_clearFileAction","append","show","_renderAction","_fileState","stateKey","states","uploading","text","uploaded","failed","currentState","actionClass","actionText","iconClass","empty","button","icon","hasValidationErrors","eventArgs","_checkAllComplete","finish","onRetry","_onFileProgress","percentComplete","progressPct","_onUploadSuccess","_setUploadErrorState","_hideUploadProgress","_onUploadError","uploadPercentage","delay","fadeOut","css","_showUploadButton","uploadButton","clearButton","_showHeaderUploadStatus","isUploading","headerUploadStatus","after","failedUploads","headerUploadStatusIcon","currentlyUploading","not","currentlyInvalid","html","onAbort","setTimeout","FormData","windows","_userAgent","support","browser","opera","safari","userAgent","isChrome","test","isSafari","isWindowsSafari","navigator","wrap","_bindDocumentDragEventWrappers","removeUrl","removeField","params","jQuery","ajax","type","dataType","dataFilter","url","traditional","error","xhrFields","prototype","filesContainErrors","relatedInput","iframes","_frameId","prepareUpload","performUpload","iframe","form","saveField","createFrame","registerFrame","createForm","frame","key","dataInput","cleanupFrame","unregisterFrame","body","prependTo","one","onIframeLoad","submit","module","started","contents","ex","processResponse","fakeXHR","jsonResult","statusText","status","stopFrameSubmit","id","action","stop","execCommand","grep","sourceElement","fileEntries","enqueueFiles","filesLength","formData","createFormData","createXHR","removeFileEntry","populateFormData","postFormData","stopUploadRequest","addEventListener","onRequestSuccess","onRequestError","onRequestProgress","open","setRequestHeader","send","raiseError","cleanupFileEntry","uploadComplete","Math","round","loaded","total","abort","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,gBAAiB,cAAeD,IACzC,WAy3CE,MAj3CC,UAAUE,EAAGC,GAgrCV,QAASC,GAAYC,GACjB,MAAOH,GAAEI,IAAIC,EAAWF,GAAQ,SAAUG,GACtC,MAAOA,GAAKC,OACbC,KAAK,MAEZ,QAASH,GAAWI,GAChB,GAAIN,GAAQM,EAAO,EACnB,OAAIN,GAAMO,MACCC,EAAeR,EAAMO,SAGpBH,KAAMK,EAAUT,EAAMU,OACtBC,UAAWC,EAAiBZ,EAAMU,OAClCG,KAAM,OAItB,QAASL,GAAeM,GACpB,MAAOjB,GAAEI,IAAIa,EAAU,SAAUX,GAC7B,MAAOY,GAAYZ,KAG3B,QAASY,GAAYC,GACjB,GAAIC,GAAWD,EAAQZ,MAAQY,EAAQC,QACvC,QACIb,KAAMc,EAAMC,WAAWF,GACvBN,UAAWC,EAAiBK,GAC5BJ,KAA6B,gBAAhBG,GAAQH,KAAmBG,EAAQH,KAAOG,EAAQI,SAC/DJ,QAASA,GAGjB,QAASJ,GAAiBK,GACtB,GAAII,GAAUJ,EAASK,MAAMC,EAC7B,OAAOF,GAAUA,EAAQ,GAAK,GAElC,QAASZ,GAAUL,GACf,GAAIoB,GAAapB,EAAKqB,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\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.upload', ['kendo.core'], f);\n}(function () {\n var __meta__ = {\n id: 'upload',\n name: 'Upload',\n category: 'web',\n description: 'The Upload widget uses progressive enhancement to deliver the best possible uploading experience to users.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, antiForgeryTokens = kendo.antiForgeryTokens, logToConsole = kendo.logToConsole, rFileExtension = /\\.([^\\.]+)$/, NS = '.kendoUpload', SELECT = 'select', UPLOAD = 'upload', SUCCESS = 'success', ERROR = 'error', COMPLETE = 'complete', CANCEL = 'cancel', PROGRESS = 'progress', REMOVE = 'remove', VALIDATIONERRORS = 'validationErrors', INVALIDMAXFILESIZE = 'invalidMaxFileSize', INVALIDMINFILESIZE = 'invalidMinFileSize', INVALIDFILEEXTENSION = 'invalidFileExtension', PROGRESSHIDEDELAY = 1000, PROGRESSHIDEDURATION = 2000;\n var headerStatusIcon = {\n loading: 'k-i-loading',\n warning: 'k-i-warning',\n success: 'k-i-tick'\n };\n var Upload = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that.name = element.name;\n that.multiple = that.options.multiple;\n that.localization = that.options.localization;\n var activeInput = that.element;\n that.wrapper = activeInput.closest('.k-upload');\n if (that.wrapper.length === 0) {\n that.wrapper = that._wrapInput(activeInput);\n }\n that._activeInput(activeInput);\n that.toggle(that.options.enabled);\n var ns = that._ns = NS + '-' + kendo.guid();\n activeInput.closest('form').on('submit' + ns, $.proxy(that._onParentFormSubmit, that)).on('reset' + ns, $.proxy(that._onParentFormReset, that));\n if (that.options.async.saveUrl) {\n that._module = that._supportsFormData() ? new formDataUploadModule(that) : new iframeUploadModule(that);\n that._async = true;\n var initialFiles = that.options.files;\n if (initialFiles.length > 0) {\n that._renderInitialFiles(initialFiles);\n }\n } else {\n that._module = new syncUploadModule(that);\n }\n if (that._supportsDrop()) {\n if (that.options.dropZone !== '') {\n that._setupCustomDropZone();\n } else {\n that._setupDropZone();\n }\n }\n that.wrapper.on('click', '.k-upload-action', $.proxy(that._onFileAction, that)).on('click', '.k-clear-selected', $.proxy(that._onClearSelected, that)).on('click', '.k-upload-selected', $.proxy(that._onUploadSelected, that));\n if (that.element.val()) {\n that._onInputChange({ target: that.element });\n }\n },\n events: [\n SELECT,\n UPLOAD,\n SUCCESS,\n ERROR,\n COMPLETE,\n CANCEL,\n PROGRESS,\n REMOVE\n ],\n options: {\n name: 'Upload',\n enabled: true,\n multiple: true,\n showFileList: true,\n template: '',\n files: [],\n async: {\n removeVerb: 'POST',\n autoUpload: true,\n withCredentials: true,\n accept: '*/*; q=0.5, application/json'\n },\n localization: {\n 'select': 'Select files...',\n 'cancel': 'Cancel',\n 'retry': 'Retry',\n 'remove': 'Remove',\n 'clearSelectedFiles': 'Clear',\n 'uploadSelectedFiles': 'Upload',\n 'dropFilesHere': 'drop files here to upload',\n 'statusUploading': 'uploading',\n 'statusUploaded': 'uploaded',\n 'statusWarning': 'warning',\n 'statusFailed': 'failed',\n 'headerStatusUploading': 'Uploading...',\n 'headerStatusUploaded': 'Done',\n 'invalidMaxFileSize': 'File size too large.',\n 'invalidMinFileSize': 'File size too small.',\n 'invalidFileExtension': 'File type not allowed.'\n },\n validation: {\n allowedExtensions: [],\n maxFileSize: 0,\n minFileSize: 0\n },\n dropZone: ''\n },\n setOptions: function (options) {\n var that = this, activeInput = that.element;\n Widget.fn.setOptions.call(that, options);\n that.multiple = that.options.multiple;\n activeInput.attr('multiple', that._supportsMultiple() ? that.multiple : false);\n that.toggle(that.options.enabled);\n },\n enable: function (enable) {\n enable = typeof enable === 'undefined' ? true : enable;\n this.toggle(enable);\n },\n disable: function () {\n this.toggle(false);\n },\n toggle: function (enable) {\n enable = typeof enable === 'undefined' ? enable : !enable;\n this.wrapper.toggleClass('k-state-disabled', enable);\n this.element.prop('disabled', enable);\n },\n destroy: function () {\n var that = this;\n var customDropZone = $(that.options.dropZone);\n $(document).add($('.k-dropzone', that.wrapper)).add(that.wrapper.closest('form')).off(that._ns);\n if (customDropZone.length > 0) {\n customDropZone.off(that._ns);\n }\n $(that.element).off(NS);\n Widget.fn.destroy.call(that);\n },\n upload: function () {\n var that = this;\n that._module.onSaveSelected();\n },\n getFiles: function () {\n var that = this;\n var filesData;\n var allFiles = [];\n var listItems = that.wrapper.find('.k-file');\n for (var i = 0; i < listItems.length; i++) {\n filesData = $(listItems[i]).data('fileNames');\n if (filesData) {\n for (var j = 0; j < filesData.length; j++) {\n allFiles.push(filesData[j]);\n }\n }\n }\n return allFiles;\n },\n clearAllFiles: function () {\n var that = this;\n var files = that.wrapper.find('.k-file');\n files.each(function (index, file) {\n that._removeFileByDomElement(file, false);\n });\n },\n removeAllFiles: function () {\n var that = this;\n var files = that.wrapper.find('.k-file');\n files.each(function (index, file) {\n that._removeFileByDomElement(file, true);\n });\n },\n removeFileByUid: function (uid) {\n this._removeFileByUid(uid, true);\n },\n clearFileByUid: function (uid) {\n this._removeFileByUid(uid, false);\n },\n _removeFileByUid: function (uid, shouldSendRemoveRequest) {\n var that = this;\n var fileEntry;\n if (typeof uid !== 'string') {\n return;\n }\n fileEntry = $('.k-file[' + kendo.attr('uid') + '=\"' + uid + '\"]', that.wrapper);\n if (fileEntry.length > 0) {\n that._removeFileByDomElement(fileEntry, shouldSendRemoveRequest);\n }\n },\n clearFile: function (callback) {\n this._removeFile(callback, false);\n },\n removeFile: function (callback) {\n this._removeFile(callback, true);\n },\n _removeFile: function (callback, shouldSendRemoveRequest) {\n var that = this;\n var files = that.wrapper.find('.k-file');\n var fileData;\n if (typeof callback === 'function') {\n files.each(function (index, file) {\n fileData = $(file).data('fileNames');\n if (callback(fileData)) {\n that._removeFileByDomElement(file, shouldSendRemoveRequest);\n }\n });\n }\n },\n _removeFileByDomElement: function (fileEntry, shouldSendRemoveRequest) {\n var that = this;\n var fileData = { target: $(fileEntry, that.wrapper) };\n var allFiles;\n if (that.options.async.saveUrl) {\n if ($(fileEntry).hasClass('k-file-progress')) {\n that._module.onCancel(fileData);\n } else {\n that._module.onRemove(fileData, {}, shouldSendRemoveRequest);\n }\n allFiles = $('.k-file', that.wrapper);\n if (allFiles.length === 0) {\n that._hideHeaderUploadstatus();\n } else {\n that._updateHeaderUploadStatus();\n }\n } else {\n that._module.onRemove(fileData, {}, shouldSendRemoveRequest);\n }\n },\n _addInput: function (sourceInput) {\n if (!sourceInput[0].nodeType) {\n return;\n }\n var that = this, input = sourceInput.clone().val('');\n input.insertAfter(that.element).data('kendoUpload', that);\n $(that.element).hide().attr('tabindex', '-1').removeAttr('id').off(NS);\n that._activeInput(input);\n that.element.focus();\n },\n _activeInput: function (input) {\n var that = this, wrapper = that.wrapper;\n that.element = input;\n input.attr('multiple', that._supportsMultiple() ? that.multiple : false).attr('autocomplete', 'off').on('click' + NS, function (e) {\n if (wrapper.hasClass('k-state-disabled')) {\n e.preventDefault();\n }\n }).on('focus' + NS, function () {\n $(this).parent().addClass('k-state-focused');\n }).on('blur' + NS, function () {\n $(this).parent().removeClass('k-state-focused');\n }).on('change' + NS, $.proxy(that._onInputChange, that)).on('keydown' + NS, $.proxy(that._onInputKeyDown, that));\n },\n _onInputKeyDown: function (e) {\n var that = this;\n var firstButton = that.wrapper.find('.k-upload-action:visible:first');\n if (e.keyCode === kendo.keys.TAB && firstButton.length > 0) {\n e.preventDefault();\n firstButton.focus();\n }\n },\n _onInputChange: function (e) {\n var that = this;\n var input = $(e.target);\n var files = assignGuidToFiles(that._inputFiles(input), that._isAsyncNonBatch());\n validateFiles(files, that.options.validation);\n var prevented = that.trigger(SELECT, { files: files });\n if (prevented) {\n that._addInput(input);\n input.remove();\n } else {\n that._module.onSelect({ target: input }, files);\n }\n },\n _onDrop: function (e) {\n var dt = e.originalEvent.dataTransfer;\n var that = this;\n var droppedFiles = dt.files;\n var files = assignGuidToFiles(getAllFileInfo(droppedFiles), that._isAsyncNonBatch());\n stopEvent(e);\n if (droppedFiles.length > 0 && !that.wrapper.hasClass('k-state-disabled')) {\n if (!that.multiple && files.length > 1) {\n files.splice(1, files.length - 1);\n }\n validateFiles(files, that.options.validation);\n var prevented = that.trigger(SELECT, { files: files });\n if (!prevented) {\n that._module.onSelect({ target: $('.k-dropzone', that.wrapper) }, files);\n }\n }\n },\n _filesContainValidationErrors: function (files) {\n var hasErrors = false;\n $(files).each(function (index, file) {\n if (file[VALIDATIONERRORS] && file[VALIDATIONERRORS].length > 0) {\n hasErrors = true;\n return false;\n }\n });\n return hasErrors;\n },\n _isAsyncNonBatch: function () {\n return this._async && !this.options.async.batch || false;\n },\n _renderInitialFiles: function (files) {\n var that = this;\n var idx = 0;\n files = assignGuidToFiles(files, true);\n for (idx = 0; idx < files.length; idx++) {\n var currentFile = files[idx];\n var fileEntry = that._enqueueFile(currentFile.name, { fileNames: [currentFile] });\n fileEntry.addClass('k-file-success').data('files', [files[idx]]);\n if (!that.options.template) {\n $('.k-upload-status', fileEntry).prepend('100%');\n }\n if (that._supportsRemove()) {\n that._fileAction(fileEntry, REMOVE);\n }\n }\n },\n _prepareTemplateData: function (name, data) {\n var filesData = data.fileNames, templateData = {}, totalSize = 0, idx = 0;\n for (idx = 0; idx < filesData.length; idx++) {\n totalSize += filesData[idx].size;\n }\n templateData.name = name;\n templateData.size = totalSize;\n templateData.files = data.fileNames;\n return templateData;\n },\n _prepareDefaultSingleFileEntryTemplate: function (data) {\n var that = this;\n var file = data.fileNames[0];\n var fileSize = getTotalFilesSizeMessage(data.fileNames);\n var errors = file[VALIDATIONERRORS];\n var template = '';\n if (errors && errors.length > 0) {\n template += '