diff --git a/dist/vue-upload-component.js b/dist/vue-upload-component.js index d9dd79a..0c25740 100644 --- a/dist/vue-upload-component.js +++ b/dist/vue-upload-component.js @@ -1,7 +1,7 @@ /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme -Version: 3.1.15 +Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter diff --git a/dist/vue-upload-component.min.js b/dist/vue-upload-component.min.js index 12cdee9..8e31c6f 100644 --- a/dist/vue-upload-component.min.js +++ b/dist/vue-upload-component.min.js @@ -1,7 +1,7 @@ /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme -Version: 3.1.15 +Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter @@ -10,7 +10,7 @@ Description: Vue.js file upload component, Multi-file upload, Upload directory, /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme - Version: 3.1.15 + Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter diff --git a/dist/vue-upload-component.min.js.map b/dist/vue-upload-component.min.js.map index 59acda6..805a390 100644 --- a/dist/vue-upload-component.min.js.map +++ b/dist/vue-upload-component.min.js.map @@ -1 +1 @@ -{"version":3,"file":"vue-upload-component.min.js","sources":["vue-upload-component.js"],"sourcesContent":["/*!\n Name: vue-upload-component \nComponent URI: https://github.com/lian-yue/vue-upload-component#readme \nVersion: 3.1.15 \nAuthor: LianYue \nLicense: Apache-2.0 \nDescription: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter \n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :\n typeof define === 'function' && define.amd ? define(['vue'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.VueUploadComponent = factory(global.Vue));\n})(this, (function (vue) { 'use strict';\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _ownKeys(Object(source), !0).forEach(function (key) { _defineProperty2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : _ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n /**\n * Creates a XHR request\n *\n * @param {Object} options\n */\n\n\n var createRequest = function createRequest(options) {\n var xhr = new XMLHttpRequest();\n xhr.open(options.method || 'GET', options.url);\n xhr.responseType = 'json';\n\n if (options.headers) {\n Object.keys(options.headers).forEach(function (key) {\n xhr.setRequestHeader(key, options.headers[key]);\n });\n }\n\n return xhr;\n };\n /**\n * Sends a XHR request with certain body\n *\n * @param {XMLHttpRequest} xhr\n * @param {Object} body\n */\n\n\n var sendRequest = function sendRequest(xhr, body) {\n return new Promise(function (resolve, reject) {\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response;\n\n try {\n response = JSON.parse(xhr.response);\n } catch (err) {\n response = xhr.response;\n }\n\n resolve(response);\n } else {\n reject(xhr.response);\n }\n };\n\n xhr.onerror = function () {\n return reject(xhr.response);\n };\n\n xhr.send(JSON.stringify(body));\n });\n };\n /**\n * Sends a XHR request with certain form data\n *\n * @param {XMLHttpRequest} xhr\n * @param {Object} data\n */\n\n\n var sendFormRequest = function sendFormRequest(xhr, data) {\n var body = new FormData();\n\n for (var name in data) {\n body.append(name, data[name]);\n }\n\n return new Promise(function (resolve, reject) {\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response;\n\n try {\n response = JSON.parse(xhr.response);\n } catch (err) {\n response = xhr.response;\n }\n\n resolve(response);\n } else {\n reject(xhr.response);\n }\n };\n\n xhr.onerror = function () {\n return reject(xhr.response);\n };\n\n xhr.send(body);\n });\n };\n /**\n * Creates and sends XHR request\n *\n * @param {Object} options\n *\n * @returns Promise\n */\n\n\n function request(options) {\n var xhr = createRequest(options);\n return sendRequest(xhr, options.body);\n }\n\n var ChunkUploadHandler = /*#__PURE__*/function () {\n /**\n * Constructor\n *\n * @param {File} file\n * @param {Object} options\n */\n function ChunkUploadHandler(file, options) {\n _classCallCheck(this, ChunkUploadHandler);\n\n this.file = file;\n this.options = options;\n this.chunks = [];\n this.sessionId = null;\n this.chunkSize = null;\n this.speedInterval = null;\n }\n /**\n * Gets the max retries from options\n */\n\n\n _createClass(ChunkUploadHandler, [{\n key: \"maxRetries\",\n get: function get() {\n return parseInt(this.options.maxRetries, 10);\n }\n /**\n * Gets the max number of active chunks being uploaded at once from options\n */\n\n }, {\n key: \"maxActiveChunks\",\n get: function get() {\n return parseInt(this.options.maxActive, 10);\n }\n /**\n * Gets the file type\n */\n\n }, {\n key: \"fileType\",\n get: function get() {\n return this.file.type;\n }\n /**\n * Gets the file size\n */\n\n }, {\n key: \"fileSize\",\n get: function get() {\n return this.file.size;\n }\n /**\n * Gets the file name\n */\n\n }, {\n key: \"fileName\",\n get: function get() {\n return this.file.name;\n }\n /**\n * Gets action (url) to upload the file\n */\n\n }, {\n key: \"action\",\n get: function get() {\n return this.options.action || null;\n }\n /**\n * Gets the body to be merged when sending the request in start phase\n */\n\n }, {\n key: \"startBody\",\n get: function get() {\n return this.options.startBody || {};\n }\n /**\n * Gets the body to be merged when sending the request in upload phase\n */\n\n }, {\n key: \"uploadBody\",\n get: function get() {\n return this.options.uploadBody || {};\n }\n /**\n * Gets the body to be merged when sending the request in finish phase\n */\n\n }, {\n key: \"finishBody\",\n get: function get() {\n return this.options.finishBody || {};\n }\n /**\n * Gets the headers of the requests from options\n */\n\n }, {\n key: \"headers\",\n get: function get() {\n return this.options.headers || {};\n }\n /**\n * Whether it's ready to upload files or not\n */\n\n }, {\n key: \"readyToUpload\",\n get: function get() {\n return !!this.chunks;\n }\n /**\n * Gets the progress of the chunk upload\n * - Gets all the completed chunks\n * - Gets the progress of all the chunks that are being uploaded\n */\n\n }, {\n key: \"progress\",\n get: function get() {\n var _this = this;\n\n var completedProgress = this.chunksUploaded.length / this.chunks.length * 100;\n var uploadingProgress = this.chunksUploading.reduce(function (progress, chunk) {\n return progress + (chunk.progress | 0) / _this.chunks.length;\n }, 0);\n return Math.min(completedProgress + uploadingProgress, 100);\n }\n /**\n * Gets all the chunks that are pending to be uploaded\n */\n\n }, {\n key: \"chunksToUpload\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !chunk.active && !chunk.uploaded;\n });\n }\n /**\n * Whether there are chunks to upload or not\n */\n\n }, {\n key: \"hasChunksToUpload\",\n get: function get() {\n return this.chunksToUpload.length > 0;\n }\n /**\n * Gets all the chunks that are uploading\n */\n\n }, {\n key: \"chunksUploading\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !!chunk.xhr && !!chunk.active;\n });\n }\n /**\n * Gets all the chunks that have finished uploading\n */\n\n }, {\n key: \"chunksUploaded\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !!chunk.uploaded;\n });\n }\n /**\n * Creates all the chunks in the initial state\n */\n\n }, {\n key: \"createChunks\",\n value: function createChunks() {\n this.chunks = [];\n var start = 0;\n var end = this.chunkSize;\n\n while (start < this.fileSize) {\n this.chunks.push({\n blob: this.file.file.slice(start, end),\n startOffset: start,\n active: false,\n retries: this.maxRetries\n });\n start = end;\n end = start + this.chunkSize;\n }\n }\n /**\n * Updates the progress of the file with the handler's progress\n */\n\n }, {\n key: \"updateFileProgress\",\n value: function updateFileProgress() {\n this.file.progress = this.progress;\n }\n /**\n * Paues the upload process\n * - Stops all active requests\n * - Sets the file not active\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n this.file.active = false;\n this.stopChunks();\n }\n /**\n * Stops all the current chunks\n */\n\n }, {\n key: \"stopChunks\",\n value: function stopChunks() {\n this.chunksUploading.forEach(function (chunk) {\n chunk.xhr.abort();\n chunk.active = false;\n });\n this.stopSpeedCalc();\n }\n /**\n * Resumes the file upload\n * - Sets the file active\n * - Starts the following chunks\n */\n\n }, {\n key: \"resume\",\n value: function resume() {\n this.file.active = true;\n this.startChunking();\n }\n /**\n * Starts the file upload\n *\n * @returns Promise\n * - resolve The file was uploaded\n * - reject The file upload failed\n */\n\n }, {\n key: \"upload\",\n value: function upload() {\n var _this2 = this;\n\n this.promise = new Promise(function (resolve, reject) {\n _this2.resolve = resolve;\n _this2.reject = reject;\n });\n this.start();\n return this.promise;\n }\n /**\n * Start phase\n * Sends a request to the backend to initialise the chunks\n */\n\n }, {\n key: \"start\",\n value: function start() {\n var _this3 = this;\n\n request({\n method: 'POST',\n headers: _objectSpread2(_objectSpread2({}, this.headers), {}, {\n 'Content-Type': 'application/json'\n }),\n url: this.action,\n body: Object.assign(this.startBody, {\n phase: 'start',\n mime_type: this.fileType,\n size: this.fileSize,\n name: this.fileName\n })\n }).then(function (res) {\n if (res.status !== 'success') {\n _this3.file.response = res;\n return _this3.reject('server');\n }\n\n _this3.sessionId = res.data.session_id;\n _this3.chunkSize = res.data.end_offset;\n\n _this3.createChunks();\n\n _this3.startChunking();\n }).catch(function (res) {\n _this3.file.response = res;\n\n _this3.reject('server');\n });\n }\n /**\n * Starts to upload chunks\n */\n\n }, {\n key: \"startChunking\",\n value: function startChunking() {\n for (var i = 0; i < this.maxActiveChunks; i++) {\n this.uploadNextChunk();\n }\n\n this.startSpeedCalc();\n }\n /**\n * Uploads the next chunk\n * - Won't do anything if the process is paused\n * - Will start finish phase if there are no more chunks to upload\n */\n\n }, {\n key: \"uploadNextChunk\",\n value: function uploadNextChunk() {\n if (this.file.active) {\n if (this.hasChunksToUpload) {\n return this.uploadChunk(this.chunksToUpload[0]);\n }\n\n if (this.chunksUploading.length === 0) {\n return this.finish();\n }\n }\n }\n /**\n * Uploads a chunk\n * - Sends the chunk to the backend\n * - Sets the chunk as uploaded if everything went well\n * - Decreases the number of retries if anything went wrong\n * - Fails if there are no more retries\n *\n * @param {Object} chunk\n */\n\n }, {\n key: \"uploadChunk\",\n value: function uploadChunk(chunk) {\n var _this4 = this;\n\n chunk.progress = 0;\n chunk.active = true;\n this.updateFileProgress();\n chunk.xhr = createRequest({\n method: 'POST',\n headers: this.headers,\n url: this.action\n });\n chunk.xhr.upload.addEventListener('progress', function (evt) {\n if (evt.lengthComputable) {\n chunk.progress = Math.round(evt.loaded / evt.total * 100);\n }\n }, false);\n sendFormRequest(chunk.xhr, Object.assign(this.uploadBody, {\n phase: 'upload',\n session_id: this.sessionId,\n start_offset: chunk.startOffset,\n chunk: chunk.blob\n })).then(function (res) {\n chunk.active = false;\n\n if (res.status === 'success') {\n chunk.uploaded = true;\n } else {\n if (chunk.retries-- <= 0) {\n _this4.stopChunks();\n\n return _this4.reject('upload');\n }\n }\n\n _this4.uploadNextChunk();\n }).catch(function () {\n chunk.active = false;\n\n if (chunk.retries-- <= 0) {\n _this4.stopChunks();\n\n return _this4.reject('upload');\n }\n\n _this4.uploadNextChunk();\n });\n }\n /**\n * Finish phase\n * Sends a request to the backend to finish the process\n */\n\n }, {\n key: \"finish\",\n value: function finish() {\n var _this5 = this;\n\n this.updateFileProgress();\n this.stopSpeedCalc();\n request({\n method: 'POST',\n headers: _objectSpread2(_objectSpread2({}, this.headers), {}, {\n 'Content-Type': 'application/json'\n }),\n url: this.action,\n body: Object.assign(this.finishBody, {\n phase: 'finish',\n session_id: this.sessionId\n })\n }).then(function (res) {\n _this5.file.response = res;\n\n if (res.status !== 'success') {\n return _this5.reject('server');\n }\n\n _this5.resolve(res);\n }).catch(function (res) {\n _this5.file.response = res;\n\n _this5.reject('server');\n });\n }\n /**\n * Sets an interval to calculate and\n * set upload speed every 3 seconds\n */\n\n }, {\n key: \"startSpeedCalc\",\n value: function startSpeedCalc() {\n var _this6 = this;\n\n this.file.speed = 0;\n var lastUploadedBytes = 0;\n\n if (!this.speedInterval) {\n this.speedInterval = window.setInterval(function () {\n var uploadedBytes = _this6.progress / 100 * _this6.fileSize;\n _this6.file.speed = uploadedBytes - lastUploadedBytes;\n lastUploadedBytes = uploadedBytes;\n }, 1000);\n }\n }\n /**\n * Removes the upload speed interval\n */\n\n }, {\n key: \"stopSpeedCalc\",\n value: function stopSpeedCalc() {\n this.speedInterval && window.clearInterval(this.speedInterval);\n this.speedInterval = null;\n this.file.speed = 0;\n }\n }]);\n\n return ChunkUploadHandler;\n }();\n\n var CHUNK_DEFAULT_OPTIONS = {\n headers: {},\n action: '',\n minSize: 1048576,\n maxActive: 3,\n maxRetries: 5,\n handler: ChunkUploadHandler\n };\n var script = vue.defineComponent({\n compatConfig: {\n MODE: 3\n },\n props: {\n inputId: {\n type: String\n },\n name: {\n type: String,\n default: 'file'\n },\n accept: {\n type: String\n },\n capture: {},\n disabled: {\n default: false\n },\n multiple: {\n type: Boolean,\n default: false\n },\n maximum: {\n type: Number\n },\n addIndex: {\n type: [Boolean, Number]\n },\n directory: {\n type: Boolean\n },\n createDirectory: {\n type: Boolean,\n default: false\n },\n postAction: {\n type: String\n },\n putAction: {\n type: String\n },\n customAction: {\n type: Function\n },\n headers: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n data: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n timeout: {\n type: Number,\n default: 0\n },\n drop: {\n type: [Boolean, String, HTMLElement],\n default: function _default() {\n return false;\n }\n },\n dropDirectory: {\n type: Boolean,\n default: true\n },\n size: {\n type: Number,\n default: 0\n },\n extensions: {\n type: [RegExp, String, Array],\n default: function _default() {\n return [];\n }\n },\n modelValue: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n thread: {\n type: Number,\n default: 1\n },\n // Chunk upload enabled\n chunkEnabled: {\n type: Boolean,\n default: false\n },\n // Chunk upload properties\n chunk: {\n type: Object,\n default: function _default() {\n return CHUNK_DEFAULT_OPTIONS;\n }\n }\n },\n emits: ['update:modelValue', 'input-filter', 'input-file'],\n data: function data() {\n return {\n files: this.modelValue,\n features: {\n html5: true,\n directory: false,\n drop: false\n },\n active: false,\n dropActive: false,\n dropElementActive: false,\n uploading: 0,\n destroy: false,\n maps: {},\n dropElement: null,\n dropTimeout: null,\n reload: false\n };\n },\n\n /**\r\n * mounted\r\n * @return {[type]} [description]\r\n */\n mounted: function mounted() {\n var _this7 = this;\n\n var input = document.createElement('input');\n input.type = 'file';\n input.multiple = true; // html5 特征\n\n if (window.FormData && input.files) {\n // 上传目录特征\n // @ts-ignore\n if (typeof input.webkitdirectory === 'boolean' || typeof input.directory === 'boolean') {\n this.features.directory = true;\n } // 拖拽特征. 要兼容 relatedTarget\n\n\n if (this.features.html5 && typeof input.ondrop !== 'undefined' && this.isRelatedTargetSupported()) {\n this.features.drop = true;\n }\n } else {\n this.features.html5 = false;\n } // files 定位缓存\n\n\n this.maps = {};\n\n if (this.files) {\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n this.maps[file.id] = file;\n }\n } // @ts-ignore\n\n\n this.$nextTick(function () {\n // 更新下父级\n if (_this7.$parent) {\n _this7.$parent.$forceUpdate(); // 拖拽渲染\n\n\n _this7.$parent.$nextTick(function () {\n _this7.watchDrop(_this7.drop);\n });\n } else {\n // 拖拽渲染\n _this7.watchDrop(_this7.drop);\n }\n });\n },\n\n /**\r\n * beforeUnmount\r\n * @return {[type]} [description]\r\n */\n beforeUnmount: function beforeUnmount() {\n // 已销毁\n this.destroy = true; // 设置成不激活\n\n this.active = false; // 销毁拖拽事件\n\n this.watchDrop(false); // 销毁不激活\n\n this.watchActive(false);\n },\n computed: {\n /**\r\n * uploading 正在上传的线程\r\n * @return {[type]} [description]\r\n */\n\n /**\r\n * uploaded 文件列表是否全部已上传\r\n * @return {[type]} [description]\r\n */\n uploaded: function uploaded() {\n var file;\n\n for (var i = 0; i < this.files.length; i++) {\n file = this.files[i];\n\n if (file.fileObject && !file.error && !file.success) {\n return false;\n }\n }\n\n return true;\n },\n chunkOptions: function chunkOptions() {\n return Object.assign(CHUNK_DEFAULT_OPTIONS, this.chunk);\n },\n className: function className() {\n return ['file-uploads', this.features.html5 ? 'file-uploads-html5' : 'file-uploads-html4', this.features.directory && this.directory ? 'file-uploads-directory' : undefined, this.features.drop && this.drop ? 'file-uploads-drop' : undefined, this.disabled ? 'file-uploads-disabled' : undefined];\n },\n forId: function forId() {\n return this.inputId || this.name;\n },\n iMaximum: function iMaximum() {\n if (this.maximum === undefined) {\n return this.multiple ? 0 : 1;\n }\n\n return this.maximum;\n },\n iExtensions: function iExtensions() {\n if (!this.extensions) {\n return;\n }\n\n if (this.extensions instanceof RegExp) {\n return this.extensions;\n }\n\n if (!this.extensions.length) {\n return;\n }\n\n var exts = [];\n\n if (typeof this.extensions === 'string') {\n exts = this.extensions.split(',');\n } else {\n exts = this.extensions;\n }\n\n exts = exts.map(function (value) {\n return value.trim();\n }).filter(function (value) {\n return value;\n });\n return new RegExp('\\\\.(' + exts.join('|').replace(/\\./g, '\\\\.') + ')$', 'i');\n },\n iDirectory: function iDirectory() {\n if (this.directory && this.features.directory) {\n return true;\n }\n\n return undefined;\n }\n },\n watch: {\n active: function active(_active) {\n this.watchActive(_active);\n },\n dropActive: function dropActive(value) {\n this.watchDropActive(value);\n\n if (this.$parent) {\n this.$parent.$forceUpdate();\n }\n },\n drop: function drop(value) {\n this.watchDrop(value);\n },\n modelValue: function modelValue(files) {\n if (this.files === files) {\n return;\n }\n\n this.files = files;\n var oldMaps = this.maps; // 重写 maps 缓存\n\n this.maps = {};\n\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n this.maps[file.id] = file;\n } // add, update\n\n\n for (var key in this.maps) {\n var newFile = this.maps[key];\n var oldFile = oldMaps[key];\n\n if (newFile !== oldFile) {\n this.emitFile(newFile, oldFile);\n }\n } // delete\n\n\n for (var _key in oldMaps) {\n if (!this.maps[_key]) {\n this.emitFile(undefined, oldMaps[_key]);\n }\n }\n }\n },\n methods: {\n newId: function newId() {\n return Math.random().toString(36).substr(2);\n },\n // 清空\n clear: function clear() {\n if (this.files.length) {\n var files = this.files;\n this.files = []; // 定位\n\n this.maps = {}; // 事件\n\n this.emitInput();\n\n for (var i = 0; i < files.length; i++) {\n this.emitFile(undefined, files[i]);\n }\n }\n\n return true;\n },\n // 选择\n get: function get(id) {\n if (!id) {\n return false;\n }\n\n if (_typeof(id) === 'object') {\n return this.maps[id.id || ''] || false;\n }\n\n return this.maps[id] || false;\n },\n // 添加\n add: function add(_files, index) {\n // 不是数组整理成数组\n var files;\n\n if (_files instanceof Array) {\n files = _files;\n } else {\n files = [_files];\n }\n\n if (index === undefined) {\n // eslint-disable-next-line\n index = this.addIndex;\n } // 遍历规范对象\n\n\n var addFiles = [];\n\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n\n if (this.features.html5 && file instanceof Blob) {\n file = {\n id: '',\n file: file,\n size: file.size,\n // @ts-ignore\n name: file.webkitRelativePath || file.relativePath || file.name || 'unknown',\n type: file.type\n };\n }\n\n file = file;\n var fileObject = false;\n if (file.fileObject === false) ;else if (file.fileObject) {\n fileObject = true;\n } else if (typeof Element !== 'undefined' && file.el instanceof HTMLInputElement) {\n fileObject = true;\n } else if (typeof Blob !== 'undefined' && file.file instanceof Blob) {\n fileObject = true;\n }\n\n if (fileObject) {\n file = _objectSpread(_objectSpread({\n fileObject: true,\n size: -1,\n name: 'Filename',\n type: '',\n active: false,\n error: '',\n success: false,\n putAction: this.putAction,\n postAction: this.postAction,\n timeout: this.timeout\n }, file), {}, {\n response: {},\n progress: '0.00',\n speed: 0 // 只读\n // file: undefined,\n // xhr: undefined,\n // el: undefined,\n // iframe: undefined,\n\n });\n file.data = _objectSpread(_objectSpread({}, this.data), file.data ? file.data : {});\n file.headers = _objectSpread(_objectSpread({}, this.headers), file.headers ? file.headers : {});\n } // 必须包含 id\n\n\n if (!file.id) {\n file.id = this.newId();\n }\n\n if (this.emitFilter(file, undefined)) {\n continue;\n } // 最大数量限制\n\n\n if (this.iMaximum > 1 && addFiles.length + this.files.length >= this.iMaximum) {\n break;\n }\n\n addFiles.push(file); // 最大数量限制\n\n if (this.iMaximum === 1) {\n break;\n }\n } // 没有文件\n\n\n if (!addFiles.length) {\n return;\n } // 如果是 1 清空\n\n\n if (this.iMaximum === 1) {\n this.clear();\n } // 添加进去 files\n\n\n var newFiles;\n\n if (index === true || index === 0) {\n newFiles = addFiles.concat(this.files);\n } else if (index) {\n var _newFiles;\n\n newFiles = this.files.concat([]);\n\n (_newFiles = newFiles).splice.apply(_newFiles, [index, 0].concat(_toConsumableArray(addFiles)));\n } else {\n newFiles = this.files.concat(addFiles);\n }\n\n this.files = newFiles; // 读取代理后的数据\n\n var index2 = 0;\n\n if (index === true || index === 0) {\n index2 = 0;\n } else if (index) {\n if (index >= 0) {\n if (index + addFiles.length > this.files.length) {\n index2 = this.files.length - addFiles.length;\n } else {\n index2 = index;\n }\n } else {\n index2 = this.files.length - addFiles.length + index;\n\n if (index2 < 0) {\n index2 = 0;\n }\n }\n } else {\n index2 = this.files.length - addFiles.length;\n }\n\n addFiles = this.files.slice(index2, index2 + addFiles.length); // 定位\n\n for (var _i = 0; _i < addFiles.length; _i++) {\n var _file = addFiles[_i];\n this.maps[_file.id] = _file;\n } // 事件\n\n\n this.emitInput();\n\n for (var _i2 = 0; _i2 < addFiles.length; _i2++) {\n this.emitFile(addFiles[_i2], undefined);\n }\n\n return _files instanceof Array ? addFiles : addFiles[0];\n },\n // 添加表单文件\n addInputFile: function addInputFile(el) {\n var _this8 = this;\n\n var files = [];\n this.iMaximum; // @ts-ignore\n\n var entrys = el.webkitEntries || el.entries || undefined;\n\n if (entrys !== null && entrys !== void 0 && entrys.length) {\n return this.getFileSystemEntry(entrys).then(function (files) {\n return _this8.add(files);\n });\n }\n\n if (el.files) {\n for (var i = 0; i < el.files.length; i++) {\n var file = el.files[i];\n files.push({\n id: '',\n size: file.size,\n // @ts-ignore\n name: file.webkitRelativePath || file.relativePath || file.name,\n type: file.type,\n file: file\n });\n }\n } else {\n var names = el.value.replace(/\\\\/g, '/').split('/');\n\n if (!names || !names.length) {\n names = [el.value];\n } // @ts-ignore\n\n\n delete el.__vuex__;\n files.push({\n id: '',\n name: names[names.length - 1],\n el: el\n });\n }\n\n return Promise.resolve(this.add(files));\n },\n // 添加 DataTransfer\n addDataTransfer: function addDataTransfer(dataTransfer) {\n var _dataTransfer$items,\n _this9 = this;\n\n // dataTransfer.items 支持\n if (dataTransfer !== null && dataTransfer !== void 0 && (_dataTransfer$items = dataTransfer.items) !== null && _dataTransfer$items !== void 0 && _dataTransfer$items.length) {\n var entrys = []; // 遍历出所有 dataTransferVueUploadItem\n\n for (var i = 0; i < dataTransfer.items.length; i++) {\n var dataTransferTtem = dataTransfer.items[i];\n var entry = void 0; // @ts-ignore\n\n if (dataTransferTtem.getAsEntry) {\n // @ts-ignore\n entry = dataTransferTtem.getAsEntry() || dataTransferTtem.getAsFile();\n } else if (dataTransferTtem.webkitGetAsEntry) {\n entry = dataTransferTtem.webkitGetAsEntry() || dataTransferTtem.getAsFile();\n } else {\n entry = dataTransferTtem.getAsFile();\n }\n\n if (entry) {\n entrys.push(entry);\n }\n }\n\n return this.getFileSystemEntry(entrys).then(function (files) {\n return _this9.add(files);\n });\n } // dataTransfer.files 支持\n\n\n var maximumValue = this.iMaximum;\n var files = [];\n\n if (dataTransfer.files.length) {\n for (var _i3 = 0; _i3 < dataTransfer.files.length; _i3++) {\n files.push(dataTransfer.files[_i3]);\n\n if (maximumValue > 0 && files.length >= maximumValue) {\n break;\n }\n }\n\n return Promise.resolve(this.add(files));\n }\n\n return Promise.resolve([]);\n },\n // 获得 entrys \n getFileSystemEntry: function getFileSystemEntry(entry) {\n var _this10 = this;\n\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n // getFileSystemEntry(entry: any, path = ''): Promise {\n return new Promise(function (resolve) {\n var maximumValue = _this10.iMaximum;\n\n if (!entry) {\n resolve([]);\n return;\n }\n\n if (entry instanceof Array) {\n // 多个\n var uploadFiles = [];\n\n var forEach = function forEach(i) {\n var v = entry[i];\n\n if (!v || maximumValue > 0 && uploadFiles.length >= maximumValue) {\n return resolve(uploadFiles);\n }\n\n _this10.getFileSystemEntry(v, path).then(function (results) {\n uploadFiles.push.apply(uploadFiles, _toConsumableArray(results));\n forEach(i + 1);\n });\n };\n\n forEach(0);\n return;\n }\n\n if (entry instanceof Blob) {\n resolve([{\n id: '',\n size: entry.size,\n // @ts-ignore\n name: path + entry.name,\n type: entry.type,\n file: entry\n }]);\n return;\n }\n\n if (entry.isFile) {\n var fileEntry = entry;\n fileEntry.file(function (file) {\n resolve([{\n id: '',\n size: file.size,\n name: path + file.name,\n type: file.type,\n file: file\n }]);\n });\n return;\n }\n\n if (entry.isDirectory && _this10.dropDirectory) {\n var directoryEntry = entry;\n var _uploadFiles = []; // 目录也要添加到文件列表\n\n if (_this10.createDirectory) {\n _uploadFiles.push({\n id: '',\n name: path + directoryEntry.name,\n size: 0,\n type: 'text/directory',\n file: new File([], path + directoryEntry.name, {\n type: 'text/directory'\n })\n });\n }\n\n var dirReader = directoryEntry.createReader();\n\n var readEntries = function readEntries() {\n dirReader.readEntries(function (entries) {\n var forEach = function forEach(i) {\n if (!entries[i] && i === 0 || maximumValue > 0 && _uploadFiles.length >= maximumValue) {\n return resolve(_uploadFiles);\n }\n\n if (!entries[i]) {\n return readEntries();\n }\n\n _this10.getFileSystemEntry(entries[i], path + directoryEntry.name + '/').then(function (results) {\n _uploadFiles.push.apply(_uploadFiles, _toConsumableArray(results));\n\n forEach(i + 1);\n });\n };\n\n forEach(0);\n });\n };\n\n readEntries();\n return;\n }\n\n resolve([]);\n });\n },\n // 替换\n replace: function replace(id1, id2) {\n var file1 = this.get(id1);\n var file2 = this.get(id2);\n\n if (!file1 || !file2 || file1 === file2) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index1 = files.indexOf(file1);\n var index2 = files.indexOf(file2);\n\n if (index1 === -1 || index2 === -1) {\n return false;\n }\n\n files[index1] = file2;\n files[index2] = file1;\n this.files = files;\n this.emitInput();\n return true;\n },\n // 移除\n remove: function remove(id) {\n var file = this.get(id);\n\n if (file) {\n if (this.emitFilter(undefined, file)) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index = files.indexOf(file);\n\n if (index === -1) {\n console.error('remove', file);\n return false;\n }\n\n files.splice(index, 1);\n this.files = files; // 定位\n\n delete this.maps[file.id]; // 事件\n\n this.emitInput();\n this.emitFile(undefined, file);\n }\n\n return file;\n },\n // 更新\n update: function update(id, data) {\n var file = this.get(id);\n\n if (file) {\n var newFile = _objectSpread(_objectSpread({}, file), data); // 停用必须加上错误\n\n\n if (file.fileObject && file.active && !newFile.active && !newFile.error && !newFile.success) {\n newFile.error = 'abort';\n }\n\n if (this.emitFilter(newFile, file)) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index = files.indexOf(file);\n\n if (index === -1) {\n console.error('update', file);\n return false;\n }\n\n files.splice(index, 1, newFile);\n this.files = files;\n newFile = this.files[index]; // 删除 旧定位 写入 新定位 (已便支持修改id)\n\n delete this.maps[file.id];\n this.maps[newFile.id] = newFile; // 事件\n\n this.emitInput();\n this.emitFile(newFile, file);\n return newFile;\n }\n\n return false;\n },\n // 预处理 事件 过滤器\n emitFilter: function emitFilter(newFile, oldFile) {\n var isPrevent = false;\n this.$emit('input-filter', newFile, oldFile, function () {\n var prevent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n isPrevent = prevent;\n return isPrevent;\n });\n return isPrevent;\n },\n // 处理后 事件 分发\n emitFile: function emitFile(newFile, oldFile) {\n var _newFile,\n _this11 = this;\n\n this.$emit('input-file', newFile, oldFile);\n\n if ((_newFile = newFile) !== null && _newFile !== void 0 && _newFile.fileObject && newFile.active && (!oldFile || !oldFile.active)) {\n this.uploading++; // 激活\n // @ts-ignore\n\n this.$nextTick(function () {\n setTimeout(function () {\n newFile && _this11.upload(newFile).then(function () {\n var _newFile2;\n\n if (newFile) {\n // eslint-disable-next-line\n newFile = _this11.get(newFile) || undefined;\n }\n\n if ((_newFile2 = newFile) !== null && _newFile2 !== void 0 && _newFile2.fileObject) {\n _this11.update(newFile, {\n active: false,\n success: !newFile.error\n });\n }\n }).catch(function (e) {\n newFile && _this11.update(newFile, {\n active: false,\n success: false,\n error: e.code || e.error || e.message || e\n });\n });\n }, Math.ceil(Math.random() * 50 + 50));\n });\n } else if ((!newFile || !newFile.fileObject || !newFile.active) && oldFile && oldFile.fileObject && oldFile.active) {\n // 停止\n this.uploading--;\n } // 自动延续激活\n // @ts-ignore\n\n\n if (this.active && (Boolean(newFile) !== Boolean(oldFile) || newFile.active !== oldFile.active)) {\n this.watchActive(true);\n }\n },\n emitInput: function emitInput() {\n this.$emit('update:modelValue', this.files);\n },\n // 上传\n upload: function upload(id) {\n var file = this.get(id); // 被删除\n\n if (!file) {\n return Promise.reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return Promise.reject(new Error('file_object'));\n } // 有错误直接响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return Promise.reject(file.error);\n }\n\n return Promise.reject(new Error(file.error));\n } // 已完成直接响应\n\n\n if (file.success) {\n return Promise.resolve(file);\n } // 后缀\n\n\n if (file.name && this.iExtensions && file.type !== \"text/directory\") {\n if (file.name.search(this.iExtensions) === -1) {\n return Promise.reject(new Error('extension'));\n }\n } // 大小\n\n\n if (this.size > 0 && file.size !== undefined && file.size >= 0 && file.size > this.size && file.type !== \"text/directory\") {\n return Promise.reject(new Error('size'));\n }\n\n if (this.customAction) {\n return this.customAction(file, this);\n }\n\n if (this.features.html5) {\n if (this.shouldUseChunkUpload(file)) {\n return this.uploadChunk(file);\n }\n\n if (file.putAction) {\n return this.uploadPut(file);\n }\n\n if (file.postAction) {\n return this.uploadHtml5(file);\n }\n }\n\n if (file.postAction) {\n return this.uploadHtml4(file);\n }\n\n return Promise.reject(new Error('No action configured'));\n },\n\n /**\r\n * Whether this file should be uploaded using chunk upload or not\r\n *\r\n * @param Object file\r\n */\n shouldUseChunkUpload: function shouldUseChunkUpload(file) {\n return this.chunkEnabled && !!this.chunkOptions.handler && file.size && file.size > this.chunkOptions.minSize;\n },\n\n /**\r\n * Upload a file using Chunk method\r\n *\r\n * @param File file\r\n */\n uploadChunk: function uploadChunk(file) {\n var HandlerClass = this.chunkOptions.handler;\n file.chunk = new HandlerClass(file, this.chunkOptions);\n return file.chunk.upload().then(function (res) {\n return file;\n });\n },\n uploadPut: function uploadPut(file) {\n var querys = [];\n var value;\n\n for (var key in file.data) {\n value = file.data[key];\n\n if (value !== null && value !== undefined) {\n querys.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n }\n\n var putAction = file.putAction || '';\n var queryString = querys.length ? (putAction.indexOf('?') === -1 ? '?' : '&') + querys.join('&') : '';\n var xhr = new XMLHttpRequest();\n xhr.open('PUT', putAction + queryString);\n return this.uploadXhr(xhr, file, file.file);\n },\n uploadHtml5: function uploadHtml5(file) {\n var form = new window.FormData();\n var value;\n\n for (var key in file.data) {\n value = file.data[key];\n\n if (value && _typeof(value) === 'object' && typeof value.toString !== 'function') {\n if (value instanceof File) {\n form.append(key, value, value.name);\n } else {\n form.append(key, JSON.stringify(value));\n }\n } else if (value !== null && value !== undefined) {\n form.append(key, value);\n }\n } // Moved file.name as the first option to set the filename of the uploaded file, since file.name\n // contains the full (relative) path of the file not just the filename as in file.file.filename\n // @ts-ignore\n\n\n form.append(this.name, file.file, file.name || file.file.name || file.file.filename);\n var xhr = new XMLHttpRequest();\n xhr.open('POST', file.postAction || '');\n return this.uploadXhr(xhr, file, form);\n },\n uploadXhr: function uploadXhr(xhr, ufile, body) {\n var _this12 = this;\n\n var file = ufile;\n var speedTime = 0;\n var speedLoaded = 0; // 进度条\n\n xhr.upload.onprogress = function (e) {\n // 还未开始上传 已删除 未激活\n if (!file) {\n return;\n }\n\n file = _this12.get(file);\n\n if (!e.lengthComputable || !file || !file.fileObject || !file.active) {\n return;\n } // 进度 速度 每秒更新一次\n\n\n var speedTime2 = Math.round(Date.now() / 1000);\n\n if (speedTime2 === speedTime) {\n return;\n }\n\n speedTime = speedTime2;\n file = _this12.update(file, {\n progress: (e.loaded / e.total * 100).toFixed(2),\n speed: e.loaded - speedLoaded\n });\n speedLoaded = e.loaded;\n }; // 检查激活状态\n\n\n var interval = window.setInterval(function () {\n if (file) {\n if (file = _this12.get(file)) {\n var _file2;\n\n if ((_file2 = file) !== null && _file2 !== void 0 && _file2.fileObject && !file.success && !file.error && file.active) {\n return;\n }\n }\n }\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n }\n\n try {\n xhr.abort();\n xhr.timeout = 1;\n } catch (e) {}\n }, 100);\n return new Promise(function (resolve, reject) {\n if (!file) {\n reject(new Error('not_exists'));\n return;\n }\n\n var complete;\n\n var fn = function fn(e) {\n // 已经处理过了\n if (complete) {\n return;\n }\n\n complete = true;\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n }\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n file = _this12.get(file); // 不存在直接响应\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return reject(new Error('file_object'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 未激活\n\n\n if (!file.active) {\n return reject(new Error('abort'));\n } // 已完成 直接相应\n\n\n if (file.success) {\n return resolve(file);\n }\n\n var data = {};\n\n switch (e.type) {\n case 'timeout':\n case 'abort':\n data.error = e.type;\n break;\n\n case 'error':\n if (!xhr.status) {\n data.error = 'network';\n } else if (xhr.status >= 500) {\n data.error = 'server';\n } else if (xhr.status >= 400) {\n data.error = 'denied';\n }\n\n break;\n\n default:\n if (xhr.status >= 500) {\n data.error = 'server';\n } else if (xhr.status >= 400) {\n data.error = 'denied';\n } else {\n data.progress = '100.00';\n }\n\n }\n\n if (xhr.responseText) {\n var contentType = xhr.getResponseHeader('Content-Type');\n\n if (contentType && contentType.indexOf('/json') !== -1) {\n data.response = JSON.parse(xhr.responseText);\n } else {\n data.response = xhr.responseText;\n }\n } // 更新\n // @ts-ignore\n\n\n file = _this12.update(file, data);\n\n if (!file) {\n return reject(new Error('abort'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 响应\n\n\n return resolve(file);\n }; // 事件\n\n\n xhr.onload = fn;\n xhr.onerror = fn;\n xhr.onabort = fn;\n xhr.ontimeout = fn; // 超时\n\n if (file.timeout) {\n xhr.timeout = file.timeout;\n } // headers\n\n\n for (var key in file.headers) {\n xhr.setRequestHeader(key, file.headers[key]);\n } // 更新 xhr\n // @ts-ignore\n\n\n file = _this12.update(file, {\n xhr: xhr\n }); // 开始上传\n\n file && xhr.send(body);\n });\n },\n uploadHtml4: function uploadHtml4(ufile) {\n var _this13 = this;\n\n var file = ufile;\n\n if (!file) {\n return Promise.reject(new Error('not_exists'));\n }\n\n var onKeydown = function onKeydown(e) {\n if (e.keyCode === 27) {\n e.preventDefault();\n }\n };\n\n var iframe = document.createElement('iframe');\n iframe.id = 'upload-iframe-' + file.id;\n iframe.name = 'upload-iframe-' + file.id;\n iframe.src = 'about:blank';\n iframe.setAttribute('style', 'width:1px;height:1px;top:-999em;position:absolute; margin-top:-999em;');\n var form = document.createElement('form');\n form.setAttribute('action', file.postAction || '');\n form.name = 'upload-form-' + file.id;\n form.setAttribute('method', 'POST');\n form.setAttribute('target', 'upload-iframe-' + file.id);\n form.setAttribute('enctype', 'multipart/form-data');\n\n for (var key in file.data) {\n var value = file.data[key];\n\n if (value && _typeof(value) === 'object' && typeof value.toString !== 'function') {\n value = JSON.stringify(value);\n }\n\n if (value !== null && value !== undefined) {\n var el = document.createElement('input');\n el.type = 'hidden';\n el.name = key;\n el.value = value;\n form.appendChild(el);\n }\n }\n\n form.appendChild(file.el);\n document.body.appendChild(iframe).appendChild(form);\n\n var getResponseData = function getResponseData() {\n var _doc;\n\n var doc;\n\n try {\n if (iframe.contentWindow) {\n doc = iframe.contentWindow.document;\n }\n } catch (err) {}\n\n if (!doc) {\n try {\n // @ts-ignore\n doc = iframe.contentDocument ? iframe.contentDocument : iframe.document;\n } catch (err) {\n // @ts-ignore\n doc = iframe.document;\n }\n } // @ts-ignore\n\n\n if ((_doc = doc) !== null && _doc !== void 0 && _doc.body) {\n return doc.body.innerHTML;\n }\n\n return null;\n };\n\n return new Promise(function (resolve, reject) {\n setTimeout(function () {\n if (!file) {\n reject(new Error('not_exists'));\n return;\n }\n\n file = _this13.update(file, {\n iframe: iframe\n }); // 不存在\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 定时检查\n\n\n var interval = window.setInterval(function () {\n if (file) {\n if (file = _this13.get(file)) {\n if (file.fileObject && !file.success && !file.error && file.active) {\n return;\n }\n }\n }\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n } // @ts-ignore\n\n\n iframe.onabort({\n type: file ? 'abort' : 'not_exists'\n });\n }, 100);\n var complete;\n\n var fn = function fn(e) {\n var _file3;\n\n // 已经处理过了\n if (complete) {\n return;\n }\n\n complete = true;\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n } // 关闭 esc 事件\n\n\n document.body.removeEventListener('keydown', onKeydown);\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n file = _this13.get(file); // 不存在直接响应\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return reject(new Error('file_object'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 未激活\n\n\n if (!file.active) {\n return reject(new Error('abort'));\n } // 已完成 直接相应\n\n\n if (file.success) {\n return resolve(file);\n }\n\n var response = getResponseData();\n var data = {};\n\n if (typeof e === 'string') {\n return reject(new Error(e));\n }\n\n switch (e.type) {\n case 'abort':\n data.error = 'abort';\n break;\n\n case 'error':\n if (file.error) {\n data.error = file.error;\n } else if (response === null) {\n data.error = 'network';\n } else {\n data.error = 'denied';\n }\n\n break;\n\n default:\n if (file.error) {\n data.error = file.error;\n } else if (response === null) {\n data.error = 'network';\n } else {\n data.progress = '100.00';\n }\n\n }\n\n if (response !== null) {\n if (response && response.substr(0, 1) === '{' && response.substr(response.length - 1, 1) === '}') {\n try {\n response = JSON.parse(response);\n } catch (err) {}\n }\n\n data.response = response;\n } // 更新\n\n\n file = _this13.update(file, data);\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n if ((_file3 = file) !== null && _file3 !== void 0 && _file3.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 响应\n\n\n return resolve(file);\n }; // 添加事件\n\n\n iframe.onload = fn;\n iframe.onerror = fn;\n iframe.onabort = fn; // 禁止 esc 键\n\n document.body.addEventListener('keydown', onKeydown); // 提交\n\n form.submit();\n }, 50);\n }).then(function (res) {\n var _iframe$parentNode;\n\n iframe === null || iframe === void 0 ? void 0 : (_iframe$parentNode = iframe.parentNode) === null || _iframe$parentNode === void 0 ? void 0 : _iframe$parentNode.removeChild(iframe);\n return res;\n }).catch(function (res) {\n var _iframe$parentNode2;\n\n iframe === null || iframe === void 0 ? void 0 : (_iframe$parentNode2 = iframe.parentNode) === null || _iframe$parentNode2 === void 0 ? void 0 : _iframe$parentNode2.removeChild(iframe);\n return res;\n });\n },\n watchActive: function watchActive(active) {\n var file;\n var index = 0;\n\n while (file = this.files[index]) {\n index++;\n if (!file.fileObject) ;else if (active && !this.destroy) {\n if (this.uploading >= this.thread || this.uploading && !this.features.html5) {\n break;\n }\n\n if (!file.active && !file.error && !file.success) {\n this.update(file, {\n active: true\n });\n }\n } else {\n if (file.active) {\n this.update(file, {\n active: false\n });\n }\n }\n }\n\n if (this.uploading === 0) {\n this.active = false;\n }\n },\n watchDrop: function watchDrop(newDrop) {\n var oldDrop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n if (!this.features.drop) {\n return;\n }\n\n if (newDrop === oldDrop) {\n return;\n } // 移除挂载\n\n\n if (this.dropElement) {\n try {\n document.removeEventListener('dragenter', this.onDocumentDragenter, false);\n document.removeEventListener('dragleave', this.onDocumentDragleave, false);\n document.removeEventListener('dragover', this.onDocumentDragover, false);\n document.removeEventListener('drop', this.onDocumentDrop, false);\n this.dropElement.removeEventListener('dragenter', this.onDragenter, false);\n this.dropElement.removeEventListener('dragleave', this.onDragleave, false);\n this.dropElement.removeEventListener('dragover', this.onDragover, false);\n this.dropElement.removeEventListener('drop', this.onDrop, false);\n } catch (e) {}\n }\n\n var el = null;\n if (!newDrop) ;else if (typeof newDrop === 'string') {\n // @ts-ignore\n el = document.querySelector(newDrop) || this.$root.$el.querySelector(newDrop);\n } else if (newDrop === true) {\n var _el;\n\n // @ts-ignore\n el = this.$parent.$el;\n\n if (!el || ((_el = el) === null || _el === void 0 ? void 0 : _el.nodeType) === 8) {\n var _el2;\n\n // @ts-ignore\n el = this.$root.$el;\n\n if (!el || ((_el2 = el) === null || _el2 === void 0 ? void 0 : _el2.nodeType) === 8) {\n el = document.body;\n }\n }\n } else {\n el = newDrop;\n }\n this.dropElement = el;\n\n if (this.dropElement) {\n document.addEventListener('dragenter', this.onDocumentDragenter, false);\n document.addEventListener('dragleave', this.onDocumentDragleave, false);\n document.addEventListener('dragover', this.onDocumentDragover, false);\n document.addEventListener('drop', this.onDocumentDrop, false);\n this.dropElement.addEventListener('dragenter', this.onDragenter, false);\n this.dropElement.addEventListener('dragleave', this.onDragleave, false);\n this.dropElement.addEventListener('dragover', this.onDragover, false);\n this.dropElement.addEventListener('drop', this.onDrop, false);\n }\n },\n watchDropActive: function watchDropActive(newDropActive, oldDropActive) {\n if (newDropActive === oldDropActive) {\n return;\n } // 设置 dropElementActive false\n\n\n if (!newDropActive && this.dropElementActive) {\n this.dropElementActive = false;\n }\n\n if (this.dropTimeout) {\n clearTimeout(this.dropTimeout);\n this.dropTimeout = null;\n }\n\n if (newDropActive) {\n // @ts-ignore\n this.dropTimeout = setTimeout(this.onDocumentDrop, 1000);\n }\n },\n onDocumentDragenter: function onDocumentDragenter(e) {\n var _dt$files, _dt$types;\n\n if (this.dropActive) {\n return;\n }\n\n if (!e.dataTransfer) {\n return;\n }\n\n var dt = e.dataTransfer;\n\n if (dt !== null && dt !== void 0 && (_dt$files = dt.files) !== null && _dt$files !== void 0 && _dt$files.length) {\n this.dropActive = true;\n } else if (!dt.types) {\n this.dropActive = true;\n } else if (dt.types.indexOf && dt.types.indexOf('Files') !== -1) {\n this.dropActive = true; // @ts-ignore\n } else if ((_dt$types = dt.types) !== null && _dt$types !== void 0 && _dt$types.contains && dt.types.contains('Files')) {\n this.dropActive = true;\n }\n\n if (this.dropActive) {\n this.watchDropActive(true);\n }\n },\n onDocumentDragleave: function onDocumentDragleave(e) {\n if (!this.dropActive) {\n return;\n } // @ts-ignore\n\n\n if (e.target === e.explicitOriginalTarget || !e.fromElement && (e.clientX <= 0 || e.clientY <= 0 || e.clientX >= window.innerWidth || e.clientY >= window.innerHeight)) {\n this.dropActive = false;\n this.watchDropActive(false);\n }\n },\n onDocumentDragover: function onDocumentDragover() {\n this.watchDropActive(true);\n },\n onDocumentDrop: function onDocumentDrop() {\n this.dropActive = false;\n this.watchDropActive(false);\n },\n onDragenter: function onDragenter(e) {\n if (!this.dropActive || this.dropElementActive) {\n return;\n }\n\n this.dropElementActive = true;\n },\n onDragleave: function onDragleave(e) {\n var _this$dropElement;\n\n if (!this.dropElementActive) {\n return;\n }\n\n var related = e.relatedTarget;\n\n if (!related) {\n this.dropElementActive = false;\n } else if ((_this$dropElement = this.dropElement) !== null && _this$dropElement !== void 0 && _this$dropElement.contains) {\n if (!this.dropElement.contains(related)) {\n this.dropElementActive = false;\n }\n } else {\n var child = related;\n\n while (child) {\n if (child === this.dropElement) {\n break;\n } // @ts-ignore\n\n\n child = child.parentNode;\n }\n\n if (child !== this.dropElement) {\n this.dropElementActive = false;\n }\n }\n },\n onDragover: function onDragover(e) {\n e.preventDefault();\n },\n onDrop: function onDrop(e) {\n e.preventDefault();\n e.dataTransfer && this.addDataTransfer(e.dataTransfer);\n },\n inputOnChange: async function inputOnChange(e) {\n var _this14 = this;\n\n if (!(e.target instanceof HTMLInputElement)) {\n return Promise.reject(new Error(\"not HTMLInputElement\"));\n }\n\n e.target;\n\n var reinput = function reinput(res) {\n _this14.reload = true; // @ts-ignore\n\n _this14.$nextTick(function () {\n _this14.reload = false;\n });\n\n return res;\n };\n\n return this.addInputFile(e.target).then(reinput).catch(reinput);\n },\n isRelatedTargetSupported: function isRelatedTargetSupported() {\n try {\n // 创建一个模拟的 MouseEvent\n var event = new MouseEvent('mouseout', {\n relatedTarget: document.body\n });\n return 'relatedTarget' in event; // 检查 `relatedTarget` 属性是否存在\n } catch (e) {\n // 如果 MouseEvent 不受支持,或者无法设置 relatedTarget\n return false;\n }\n }\n }\n });\n var _hoisted_1 = [\"for\"];\n var _hoisted_2 = [\"name\", \"id\", \"accept\", \"capture\", \"disabled\", \"webkitdirectory\", \"allowdirs\", \"directory\", \"multiple\"];\n\n function render(_ctx, _cache, $props, $setup, $data, $options) {\n return vue.openBlock(), vue.createElementBlock(\"span\", {\n class: vue.normalizeClass(_ctx.className)\n }, [vue.renderSlot(_ctx.$slots, \"default\"), vue.createElementVNode(\"label\", {\n for: _ctx.forId\n }, null, 8, _hoisted_1), !_ctx.reload ? (vue.openBlock(), vue.createElementBlock(\"input\", {\n key: 0,\n ref: \"input\",\n type: \"file\",\n name: _ctx.name,\n id: _ctx.forId,\n accept: _ctx.accept,\n capture: _ctx.capture,\n disabled: _ctx.disabled,\n webkitdirectory: _ctx.iDirectory,\n allowdirs: _ctx.iDirectory,\n directory: _ctx.iDirectory,\n multiple: _ctx.multiple && _ctx.features.html5,\n onChange: _cache[0] || (_cache[0] = function () {\n return _ctx.inputOnChange && _ctx.inputOnChange.apply(_ctx, arguments);\n })\n }, null, 40, _hoisted_2)) : vue.createCommentVNode(\"\", true)], 2);\n }\n\n function styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n }\n\n var css_248z = \"\\n.file-uploads {\\n overflow: hidden;\\n position: relative;\\n text-align: center;\\n display: inline-block;\\n}\\n.file-uploads.file-uploads-html4 input,\\n.file-uploads.file-uploads-html5 label {\\n /* background fix ie click */\\n background: #fff;\\n opacity: 0;\\n font-size: 20em;\\n z-index: 1;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n}\\n.file-uploads.file-uploads-html5 input,\\n.file-uploads.file-uploads-html4 label {\\n /* background fix ie click */\\n position: absolute;\\n background: rgba(255, 255, 255, 0);\\n overflow: hidden;\\n position: fixed;\\n width: 1px;\\n height: 1px;\\n z-index: -1;\\n opacity: 0;\\n}\\n\";\n styleInject(css_248z);\n script.render = render;\n\n return script;\n\n}));\n//# sourceMappingURL=vue-upload-component.js.map\n"],"names":["module","vue","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","_ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","_typeof","ownKeys","_objectSpread2","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","createRequest","options","xhr","XMLHttpRequest","open","method","url","responseType","headers","setRequestHeader","sendRequest","body","Promise","resolve","reject","onload","status","response","JSON","parse","err","onerror","send","stringify","sendFormRequest","data","FormData","append","request","CHUNK_DEFAULT_OPTIONS","action","minSize","maxActive","maxRetries","handler","ChunkUploadHandler","file","this","chunks","sessionId","chunkSize","speedInterval","get","parseInt","type","size","startBody","uploadBody","finishBody","_this","completedProgress","chunksUploaded","uploadingProgress","chunksUploading","reduce","progress","chunk","Math","min","active","uploaded","chunksToUpload","start","end","fileSize","blob","startOffset","retries","stopChunks","abort","stopSpeedCalc","startChunking","_this2","promise","_this3","assign","phase","mime_type","fileType","fileName","then","res","session_id","end_offset","createChunks","catch","maxActiveChunks","uploadNextChunk","startSpeedCalc","hasChunksToUpload","uploadChunk","finish","_this4","updateFileProgress","upload","addEventListener","evt","lengthComputable","round","loaded","total","start_offset","_this5","_this6","speed","lastUploadedBytes","window","setInterval","uploadedBytes","clearInterval","script","defineComponent","compatConfig","MODE","inputId","String","default","accept","capture","disabled","multiple","Boolean","maximum","Number","addIndex","directory","createDirectory","postAction","putAction","customAction","Function","timeout","drop","HTMLElement","dropDirectory","extensions","RegExp","modelValue","thread","chunkEnabled","emits","files","features","html5","dropActive","dropElementActive","uploading","destroy","maps","dropElement","dropTimeout","reload","mounted","_this7","input","document","createElement","webkitdirectory","ondrop","isRelatedTargetSupported","id","$nextTick","$parent","$forceUpdate","watchDrop","beforeUnmount","watchActive","computed","fileObject","error","success","chunkOptions","className","undefined","forId","iMaximum","iExtensions","exts","split","map","trim","join","replace","iDirectory","watch","_active","watchDropActive","oldMaps","newFile","oldFile","emitFile","_key","methods","newId","random","substr","clear","emitInput","add","_files","index","addFiles","Blob","webkitRelativePath","relativePath","Element","el","HTMLInputElement","emitFilter","newFiles","concat","_newFiles","splice","index2","_i","_file","_i2","addInputFile","_this8","entrys","webkitEntries","entries","getFileSystemEntry","names","__vuex__","addDataTransfer","dataTransfer","_dataTransfer$items","_this9","items","dataTransferTtem","entry","getAsEntry","getAsFile","webkitGetAsEntry","maximumValue","_i3","_this10","path","uploadFiles","v","results","isFile","isDirectory","directoryEntry","_uploadFiles","File","dirReader","createReader","readEntries","id1","id2","file1","file2","index1","indexOf","remove","console","update","isPrevent","$emit","_newFile","_this11","setTimeout","_newFile2","e","code","message","ceil","Error","search","shouldUseChunkUpload","uploadPut","uploadHtml5","uploadHtml4","HandlerClass","querys","encodeURIComponent","queryString","uploadXhr","form","filename","ufile","_this12","speedTime","speedLoaded","onprogress","speedTime2","Date","now","toFixed","interval","_file2","complete","fn","responseText","contentType","getResponseHeader","onabort","ontimeout","_this13","onKeydown","keyCode","preventDefault","iframe","src","setAttribute","appendChild","getResponseData","_doc","doc","contentWindow","contentDocument","innerHTML","_file3","removeEventListener","submit","_iframe$parentNode","parentNode","removeChild","_iframe$parentNode2","newDrop","oldDrop","onDocumentDragenter","onDocumentDragleave","onDocumentDragover","onDocumentDrop","onDragenter","onDragleave","onDragover","onDrop","querySelector","$root","$el","_el","_el2","nodeType","newDropActive","oldDropActive","clearTimeout","_dt$files","_dt$types","dt","types","contains","explicitOriginalTarget","fromElement","clientX","clientY","innerWidth","innerHeight","_this$dropElement","related","relatedTarget","child","inputOnChange","async","_this14","reinput","MouseEvent","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","class","normalizeClass","renderSlot","$slots","createElementVNode","for","createCommentVNode","ref","allowdirs","onChange","styleInject","css","insertAt","head","getElementsByTagName","style","firstChild","insertBefore","styleSheet","cssText","createTextNode","factory","require$$0"],"mappings":";;;;;;;;;;;;;;;;;qBASiEA,mBAG7CC,GAElB,SAASC,EAAmBC,GAAO,OAAOC,EAAmBD,IAAQE,EAAiBF,IAAQG,EAA4BH,IAAQI,IAElI,SAASA,IAAuB,MAAM,IAAIC,UAAU,wIAEpD,SAASF,EAA4BG,EAAGC,GAAU,GAAKD,EAAL,CAAgB,GAAiB,iBAANA,EAAgB,OAAOE,EAAkBF,EAAGC,GAAS,IAAIE,EAAIC,OAAOC,UAAUC,SAASC,KAAKP,GAAGQ,MAAM,GAAI,GAAiE,MAAnD,WAANL,GAAkBH,EAAES,cAAaN,EAAIH,EAAES,YAAYC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D,GAA2B,oBAAbnO,SAAnB,CAIA,IAAIqO,EAAOrO,SAASqO,MAAQrO,SAASsO,qBAAqB,QAAQ,GAC9DC,EAAQvO,SAASC,cAAc,SACnCsO,EAAMtV,KAAO,WAEI,QAAbmV,GACEC,EAAKG,WACPH,EAAKI,aAAaF,EAAOF,EAAKG,YAKhCH,EAAK7E,YAAY+E,GAGfA,EAAMG,WACRH,EAAMG,WAAWC,QAAUR,EAE3BI,EAAM/E,YAAYxJ,SAAS4O,eAAeT,KAQ9C,OAHAD,EADe,6rBAEf/Q,EAAO4P,OAASA,EAET5P,EA31EyE0R,CAAQC"} \ No newline at end of file +{"version":3,"file":"vue-upload-component.min.js","sources":["vue-upload-component.js"],"sourcesContent":["/*!\n Name: vue-upload-component \nComponent URI: https://github.com/lian-yue/vue-upload-component#readme \nVersion: 3.1.16 \nAuthor: LianYue \nLicense: Apache-2.0 \nDescription: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter \n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :\n typeof define === 'function' && define.amd ? define(['vue'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.VueUploadComponent = factory(global.Vue));\n})(this, (function (vue) { 'use strict';\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function _ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _ownKeys(Object(source), !0).forEach(function (key) { _defineProperty2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : _ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n /**\n * Creates a XHR request\n *\n * @param {Object} options\n */\n\n\n var createRequest = function createRequest(options) {\n var xhr = new XMLHttpRequest();\n xhr.open(options.method || 'GET', options.url);\n xhr.responseType = 'json';\n\n if (options.headers) {\n Object.keys(options.headers).forEach(function (key) {\n xhr.setRequestHeader(key, options.headers[key]);\n });\n }\n\n return xhr;\n };\n /**\n * Sends a XHR request with certain body\n *\n * @param {XMLHttpRequest} xhr\n * @param {Object} body\n */\n\n\n var sendRequest = function sendRequest(xhr, body) {\n return new Promise(function (resolve, reject) {\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response;\n\n try {\n response = JSON.parse(xhr.response);\n } catch (err) {\n response = xhr.response;\n }\n\n resolve(response);\n } else {\n reject(xhr.response);\n }\n };\n\n xhr.onerror = function () {\n return reject(xhr.response);\n };\n\n xhr.send(JSON.stringify(body));\n });\n };\n /**\n * Sends a XHR request with certain form data\n *\n * @param {XMLHttpRequest} xhr\n * @param {Object} data\n */\n\n\n var sendFormRequest = function sendFormRequest(xhr, data) {\n var body = new FormData();\n\n for (var name in data) {\n body.append(name, data[name]);\n }\n\n return new Promise(function (resolve, reject) {\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response;\n\n try {\n response = JSON.parse(xhr.response);\n } catch (err) {\n response = xhr.response;\n }\n\n resolve(response);\n } else {\n reject(xhr.response);\n }\n };\n\n xhr.onerror = function () {\n return reject(xhr.response);\n };\n\n xhr.send(body);\n });\n };\n /**\n * Creates and sends XHR request\n *\n * @param {Object} options\n *\n * @returns Promise\n */\n\n\n function request(options) {\n var xhr = createRequest(options);\n return sendRequest(xhr, options.body);\n }\n\n var ChunkUploadHandler = /*#__PURE__*/function () {\n /**\n * Constructor\n *\n * @param {File} file\n * @param {Object} options\n */\n function ChunkUploadHandler(file, options) {\n _classCallCheck(this, ChunkUploadHandler);\n\n this.file = file;\n this.options = options;\n this.chunks = [];\n this.sessionId = null;\n this.chunkSize = null;\n this.speedInterval = null;\n }\n /**\n * Gets the max retries from options\n */\n\n\n _createClass(ChunkUploadHandler, [{\n key: \"maxRetries\",\n get: function get() {\n return parseInt(this.options.maxRetries, 10);\n }\n /**\n * Gets the max number of active chunks being uploaded at once from options\n */\n\n }, {\n key: \"maxActiveChunks\",\n get: function get() {\n return parseInt(this.options.maxActive, 10);\n }\n /**\n * Gets the file type\n */\n\n }, {\n key: \"fileType\",\n get: function get() {\n return this.file.type;\n }\n /**\n * Gets the file size\n */\n\n }, {\n key: \"fileSize\",\n get: function get() {\n return this.file.size;\n }\n /**\n * Gets the file name\n */\n\n }, {\n key: \"fileName\",\n get: function get() {\n return this.file.name;\n }\n /**\n * Gets action (url) to upload the file\n */\n\n }, {\n key: \"action\",\n get: function get() {\n return this.options.action || null;\n }\n /**\n * Gets the body to be merged when sending the request in start phase\n */\n\n }, {\n key: \"startBody\",\n get: function get() {\n return this.options.startBody || {};\n }\n /**\n * Gets the body to be merged when sending the request in upload phase\n */\n\n }, {\n key: \"uploadBody\",\n get: function get() {\n return this.options.uploadBody || {};\n }\n /**\n * Gets the body to be merged when sending the request in finish phase\n */\n\n }, {\n key: \"finishBody\",\n get: function get() {\n return this.options.finishBody || {};\n }\n /**\n * Gets the headers of the requests from options\n */\n\n }, {\n key: \"headers\",\n get: function get() {\n return this.options.headers || {};\n }\n /**\n * Whether it's ready to upload files or not\n */\n\n }, {\n key: \"readyToUpload\",\n get: function get() {\n return !!this.chunks;\n }\n /**\n * Gets the progress of the chunk upload\n * - Gets all the completed chunks\n * - Gets the progress of all the chunks that are being uploaded\n */\n\n }, {\n key: \"progress\",\n get: function get() {\n var _this = this;\n\n var completedProgress = this.chunksUploaded.length / this.chunks.length * 100;\n var uploadingProgress = this.chunksUploading.reduce(function (progress, chunk) {\n return progress + (chunk.progress | 0) / _this.chunks.length;\n }, 0);\n return Math.min(completedProgress + uploadingProgress, 100);\n }\n /**\n * Gets all the chunks that are pending to be uploaded\n */\n\n }, {\n key: \"chunksToUpload\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !chunk.active && !chunk.uploaded;\n });\n }\n /**\n * Whether there are chunks to upload or not\n */\n\n }, {\n key: \"hasChunksToUpload\",\n get: function get() {\n return this.chunksToUpload.length > 0;\n }\n /**\n * Gets all the chunks that are uploading\n */\n\n }, {\n key: \"chunksUploading\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !!chunk.xhr && !!chunk.active;\n });\n }\n /**\n * Gets all the chunks that have finished uploading\n */\n\n }, {\n key: \"chunksUploaded\",\n get: function get() {\n return this.chunks.filter(function (chunk) {\n return !!chunk.uploaded;\n });\n }\n /**\n * Creates all the chunks in the initial state\n */\n\n }, {\n key: \"createChunks\",\n value: function createChunks() {\n this.chunks = [];\n var start = 0;\n var end = this.chunkSize;\n\n while (start < this.fileSize) {\n this.chunks.push({\n blob: this.file.file.slice(start, end),\n startOffset: start,\n active: false,\n retries: this.maxRetries\n });\n start = end;\n end = start + this.chunkSize;\n }\n }\n /**\n * Updates the progress of the file with the handler's progress\n */\n\n }, {\n key: \"updateFileProgress\",\n value: function updateFileProgress() {\n this.file.progress = this.progress;\n }\n /**\n * Paues the upload process\n * - Stops all active requests\n * - Sets the file not active\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n this.file.active = false;\n this.stopChunks();\n }\n /**\n * Stops all the current chunks\n */\n\n }, {\n key: \"stopChunks\",\n value: function stopChunks() {\n this.chunksUploading.forEach(function (chunk) {\n chunk.xhr.abort();\n chunk.active = false;\n });\n this.stopSpeedCalc();\n }\n /**\n * Resumes the file upload\n * - Sets the file active\n * - Starts the following chunks\n */\n\n }, {\n key: \"resume\",\n value: function resume() {\n this.file.active = true;\n this.startChunking();\n }\n /**\n * Starts the file upload\n *\n * @returns Promise\n * - resolve The file was uploaded\n * - reject The file upload failed\n */\n\n }, {\n key: \"upload\",\n value: function upload() {\n var _this2 = this;\n\n this.promise = new Promise(function (resolve, reject) {\n _this2.resolve = resolve;\n _this2.reject = reject;\n });\n this.start();\n return this.promise;\n }\n /**\n * Start phase\n * Sends a request to the backend to initialise the chunks\n */\n\n }, {\n key: \"start\",\n value: function start() {\n var _this3 = this;\n\n request({\n method: 'POST',\n headers: _objectSpread2(_objectSpread2({}, this.headers), {}, {\n 'Content-Type': 'application/json'\n }),\n url: this.action,\n body: Object.assign(this.startBody, {\n phase: 'start',\n mime_type: this.fileType,\n size: this.fileSize,\n name: this.fileName\n })\n }).then(function (res) {\n if (res.status !== 'success') {\n _this3.file.response = res;\n return _this3.reject('server');\n }\n\n _this3.sessionId = res.data.session_id;\n _this3.chunkSize = res.data.end_offset;\n\n _this3.createChunks();\n\n _this3.startChunking();\n }).catch(function (res) {\n _this3.file.response = res;\n\n _this3.reject('server');\n });\n }\n /**\n * Starts to upload chunks\n */\n\n }, {\n key: \"startChunking\",\n value: function startChunking() {\n for (var i = 0; i < this.maxActiveChunks; i++) {\n this.uploadNextChunk();\n }\n\n this.startSpeedCalc();\n }\n /**\n * Uploads the next chunk\n * - Won't do anything if the process is paused\n * - Will start finish phase if there are no more chunks to upload\n */\n\n }, {\n key: \"uploadNextChunk\",\n value: function uploadNextChunk() {\n if (this.file.active) {\n if (this.hasChunksToUpload) {\n return this.uploadChunk(this.chunksToUpload[0]);\n }\n\n if (this.chunksUploading.length === 0) {\n return this.finish();\n }\n }\n }\n /**\n * Uploads a chunk\n * - Sends the chunk to the backend\n * - Sets the chunk as uploaded if everything went well\n * - Decreases the number of retries if anything went wrong\n * - Fails if there are no more retries\n *\n * @param {Object} chunk\n */\n\n }, {\n key: \"uploadChunk\",\n value: function uploadChunk(chunk) {\n var _this4 = this;\n\n chunk.progress = 0;\n chunk.active = true;\n this.updateFileProgress();\n chunk.xhr = createRequest({\n method: 'POST',\n headers: this.headers,\n url: this.action\n });\n chunk.xhr.upload.addEventListener('progress', function (evt) {\n if (evt.lengthComputable) {\n chunk.progress = Math.round(evt.loaded / evt.total * 100);\n }\n }, false);\n sendFormRequest(chunk.xhr, Object.assign(this.uploadBody, {\n phase: 'upload',\n session_id: this.sessionId,\n start_offset: chunk.startOffset,\n chunk: chunk.blob\n })).then(function (res) {\n chunk.active = false;\n\n if (res.status === 'success') {\n chunk.uploaded = true;\n } else {\n if (chunk.retries-- <= 0) {\n _this4.stopChunks();\n\n return _this4.reject('upload');\n }\n }\n\n _this4.uploadNextChunk();\n }).catch(function () {\n chunk.active = false;\n\n if (chunk.retries-- <= 0) {\n _this4.stopChunks();\n\n return _this4.reject('upload');\n }\n\n _this4.uploadNextChunk();\n });\n }\n /**\n * Finish phase\n * Sends a request to the backend to finish the process\n */\n\n }, {\n key: \"finish\",\n value: function finish() {\n var _this5 = this;\n\n this.updateFileProgress();\n this.stopSpeedCalc();\n request({\n method: 'POST',\n headers: _objectSpread2(_objectSpread2({}, this.headers), {}, {\n 'Content-Type': 'application/json'\n }),\n url: this.action,\n body: Object.assign(this.finishBody, {\n phase: 'finish',\n session_id: this.sessionId\n })\n }).then(function (res) {\n _this5.file.response = res;\n\n if (res.status !== 'success') {\n return _this5.reject('server');\n }\n\n _this5.resolve(res);\n }).catch(function (res) {\n _this5.file.response = res;\n\n _this5.reject('server');\n });\n }\n /**\n * Sets an interval to calculate and\n * set upload speed every 3 seconds\n */\n\n }, {\n key: \"startSpeedCalc\",\n value: function startSpeedCalc() {\n var _this6 = this;\n\n this.file.speed = 0;\n var lastUploadedBytes = 0;\n\n if (!this.speedInterval) {\n this.speedInterval = window.setInterval(function () {\n var uploadedBytes = _this6.progress / 100 * _this6.fileSize;\n _this6.file.speed = uploadedBytes - lastUploadedBytes;\n lastUploadedBytes = uploadedBytes;\n }, 1000);\n }\n }\n /**\n * Removes the upload speed interval\n */\n\n }, {\n key: \"stopSpeedCalc\",\n value: function stopSpeedCalc() {\n this.speedInterval && window.clearInterval(this.speedInterval);\n this.speedInterval = null;\n this.file.speed = 0;\n }\n }]);\n\n return ChunkUploadHandler;\n }();\n\n var CHUNK_DEFAULT_OPTIONS = {\n headers: {},\n action: '',\n minSize: 1048576,\n maxActive: 3,\n maxRetries: 5,\n handler: ChunkUploadHandler\n };\n var script = vue.defineComponent({\n compatConfig: {\n MODE: 3\n },\n props: {\n inputId: {\n type: String\n },\n name: {\n type: String,\n default: 'file'\n },\n accept: {\n type: String\n },\n capture: {},\n disabled: {\n default: false\n },\n multiple: {\n type: Boolean,\n default: false\n },\n maximum: {\n type: Number\n },\n addIndex: {\n type: [Boolean, Number]\n },\n directory: {\n type: Boolean\n },\n createDirectory: {\n type: Boolean,\n default: false\n },\n postAction: {\n type: String\n },\n putAction: {\n type: String\n },\n customAction: {\n type: Function\n },\n headers: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n data: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n timeout: {\n type: Number,\n default: 0\n },\n drop: {\n type: [Boolean, String, HTMLElement],\n default: function _default() {\n return false;\n }\n },\n dropDirectory: {\n type: Boolean,\n default: true\n },\n size: {\n type: Number,\n default: 0\n },\n extensions: {\n type: [RegExp, String, Array],\n default: function _default() {\n return [];\n }\n },\n modelValue: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n thread: {\n type: Number,\n default: 1\n },\n // Chunk upload enabled\n chunkEnabled: {\n type: Boolean,\n default: false\n },\n // Chunk upload properties\n chunk: {\n type: Object,\n default: function _default() {\n return CHUNK_DEFAULT_OPTIONS;\n }\n }\n },\n emits: ['update:modelValue', 'input-filter', 'input-file'],\n data: function data() {\n return {\n files: this.modelValue,\n features: {\n html5: true,\n directory: false,\n drop: false\n },\n active: false,\n dropActive: false,\n dropElementActive: false,\n uploading: 0,\n destroy: false,\n maps: {},\n dropElement: null,\n dropTimeout: null,\n reload: false\n };\n },\n\n /**\r\n * mounted\r\n * @return {[type]} [description]\r\n */\n mounted: function mounted() {\n var _this7 = this;\n\n var input = document.createElement('input');\n input.type = 'file';\n input.multiple = true; // html5 特征\n\n if (window.FormData && input.files) {\n // 上传目录特征\n // @ts-ignore\n if (typeof input.webkitdirectory === 'boolean' || typeof input.directory === 'boolean') {\n this.features.directory = true;\n } // 拖拽特征. 要兼容 relatedTarget\n\n\n if (this.features.html5 && typeof input.ondrop !== 'undefined' && this.isRelatedTargetSupported()) {\n this.features.drop = true;\n }\n } else {\n this.features.html5 = false;\n } // files 定位缓存\n\n\n this.maps = {};\n\n if (this.files) {\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n this.maps[file.id] = file;\n }\n } // @ts-ignore\n\n\n this.$nextTick(function () {\n // 更新下父级\n if (_this7.$parent) {\n _this7.$parent.$forceUpdate(); // 拖拽渲染\n\n\n _this7.$parent.$nextTick(function () {\n _this7.watchDrop(_this7.drop);\n });\n } else {\n // 拖拽渲染\n _this7.watchDrop(_this7.drop);\n }\n });\n },\n\n /**\r\n * beforeUnmount\r\n * @return {[type]} [description]\r\n */\n beforeUnmount: function beforeUnmount() {\n // 已销毁\n this.destroy = true; // 设置成不激活\n\n this.active = false; // 销毁拖拽事件\n\n this.watchDrop(false); // 销毁不激活\n\n this.watchActive(false);\n },\n computed: {\n /**\r\n * uploading 正在上传的线程\r\n * @return {[type]} [description]\r\n */\n\n /**\r\n * uploaded 文件列表是否全部已上传\r\n * @return {[type]} [description]\r\n */\n uploaded: function uploaded() {\n var file;\n\n for (var i = 0; i < this.files.length; i++) {\n file = this.files[i];\n\n if (file.fileObject && !file.error && !file.success) {\n return false;\n }\n }\n\n return true;\n },\n chunkOptions: function chunkOptions() {\n return Object.assign(CHUNK_DEFAULT_OPTIONS, this.chunk);\n },\n className: function className() {\n return ['file-uploads', this.features.html5 ? 'file-uploads-html5' : 'file-uploads-html4', this.features.directory && this.directory ? 'file-uploads-directory' : undefined, this.features.drop && this.drop ? 'file-uploads-drop' : undefined, this.disabled ? 'file-uploads-disabled' : undefined];\n },\n forId: function forId() {\n return this.inputId || this.name;\n },\n iMaximum: function iMaximum() {\n if (this.maximum === undefined) {\n return this.multiple ? 0 : 1;\n }\n\n return this.maximum;\n },\n iExtensions: function iExtensions() {\n if (!this.extensions) {\n return;\n }\n\n if (this.extensions instanceof RegExp) {\n return this.extensions;\n }\n\n if (!this.extensions.length) {\n return;\n }\n\n var exts = [];\n\n if (typeof this.extensions === 'string') {\n exts = this.extensions.split(',');\n } else {\n exts = this.extensions;\n }\n\n exts = exts.map(function (value) {\n return value.trim();\n }).filter(function (value) {\n return value;\n });\n return new RegExp('\\\\.(' + exts.join('|').replace(/\\./g, '\\\\.') + ')$', 'i');\n },\n iDirectory: function iDirectory() {\n if (this.directory && this.features.directory) {\n return true;\n }\n\n return undefined;\n }\n },\n watch: {\n active: function active(_active) {\n this.watchActive(_active);\n },\n dropActive: function dropActive(value) {\n this.watchDropActive(value);\n\n if (this.$parent) {\n this.$parent.$forceUpdate();\n }\n },\n drop: function drop(value) {\n this.watchDrop(value);\n },\n modelValue: function modelValue(files) {\n if (this.files === files) {\n return;\n }\n\n this.files = files;\n var oldMaps = this.maps; // 重写 maps 缓存\n\n this.maps = {};\n\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n this.maps[file.id] = file;\n } // add, update\n\n\n for (var key in this.maps) {\n var newFile = this.maps[key];\n var oldFile = oldMaps[key];\n\n if (newFile !== oldFile) {\n this.emitFile(newFile, oldFile);\n }\n } // delete\n\n\n for (var _key in oldMaps) {\n if (!this.maps[_key]) {\n this.emitFile(undefined, oldMaps[_key]);\n }\n }\n }\n },\n methods: {\n newId: function newId() {\n return Math.random().toString(36).substr(2);\n },\n // 清空\n clear: function clear() {\n if (this.files.length) {\n var files = this.files;\n this.files = []; // 定位\n\n this.maps = {}; // 事件\n\n this.emitInput();\n\n for (var i = 0; i < files.length; i++) {\n this.emitFile(undefined, files[i]);\n }\n }\n\n return true;\n },\n // 选择\n get: function get(id) {\n if (!id) {\n return false;\n }\n\n if (_typeof(id) === 'object') {\n return this.maps[id.id || ''] || false;\n }\n\n return this.maps[id] || false;\n },\n // 添加\n add: function add(_files, index) {\n // 不是数组整理成数组\n var files;\n\n if (_files instanceof Array) {\n files = _files;\n } else {\n files = [_files];\n }\n\n if (index === undefined) {\n // eslint-disable-next-line\n index = this.addIndex;\n } // 遍历规范对象\n\n\n var addFiles = [];\n\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n\n if (this.features.html5 && file instanceof Blob) {\n file = {\n id: '',\n file: file,\n size: file.size,\n // @ts-ignore\n name: file.webkitRelativePath || file.relativePath || file.name || 'unknown',\n type: file.type\n };\n }\n\n file = file;\n var fileObject = false;\n if (file.fileObject === false) ;else if (file.fileObject) {\n fileObject = true;\n } else if (typeof Element !== 'undefined' && file.el instanceof HTMLInputElement) {\n fileObject = true;\n } else if (typeof Blob !== 'undefined' && file.file instanceof Blob) {\n fileObject = true;\n }\n\n if (fileObject) {\n file = _objectSpread(_objectSpread({\n fileObject: true,\n size: -1,\n name: 'Filename',\n type: '',\n active: false,\n error: '',\n success: false,\n putAction: this.putAction,\n postAction: this.postAction,\n timeout: this.timeout\n }, file), {}, {\n response: {},\n progress: '0.00',\n speed: 0 // 只读\n // file: undefined,\n // xhr: undefined,\n // el: undefined,\n // iframe: undefined,\n\n });\n file.data = _objectSpread(_objectSpread({}, this.data), file.data ? file.data : {});\n file.headers = _objectSpread(_objectSpread({}, this.headers), file.headers ? file.headers : {});\n } // 必须包含 id\n\n\n if (!file.id) {\n file.id = this.newId();\n }\n\n if (this.emitFilter(file, undefined)) {\n continue;\n } // 最大数量限制\n\n\n if (this.iMaximum > 1 && addFiles.length + this.files.length >= this.iMaximum) {\n break;\n }\n\n addFiles.push(file); // 最大数量限制\n\n if (this.iMaximum === 1) {\n break;\n }\n } // 没有文件\n\n\n if (!addFiles.length) {\n return;\n } // 如果是 1 清空\n\n\n if (this.iMaximum === 1) {\n this.clear();\n } // 添加进去 files\n\n\n var newFiles;\n\n if (index === true || index === 0) {\n newFiles = addFiles.concat(this.files);\n } else if (index) {\n var _newFiles;\n\n newFiles = this.files.concat([]);\n\n (_newFiles = newFiles).splice.apply(_newFiles, [index, 0].concat(_toConsumableArray(addFiles)));\n } else {\n newFiles = this.files.concat(addFiles);\n }\n\n this.files = newFiles; // 读取代理后的数据\n\n var index2 = 0;\n\n if (index === true || index === 0) {\n index2 = 0;\n } else if (index) {\n if (index >= 0) {\n if (index + addFiles.length > this.files.length) {\n index2 = this.files.length - addFiles.length;\n } else {\n index2 = index;\n }\n } else {\n index2 = this.files.length - addFiles.length + index;\n\n if (index2 < 0) {\n index2 = 0;\n }\n }\n } else {\n index2 = this.files.length - addFiles.length;\n }\n\n addFiles = this.files.slice(index2, index2 + addFiles.length); // 定位\n\n for (var _i = 0; _i < addFiles.length; _i++) {\n var _file = addFiles[_i];\n this.maps[_file.id] = _file;\n } // 事件\n\n\n this.emitInput();\n\n for (var _i2 = 0; _i2 < addFiles.length; _i2++) {\n this.emitFile(addFiles[_i2], undefined);\n }\n\n return _files instanceof Array ? addFiles : addFiles[0];\n },\n // 添加表单文件\n addInputFile: function addInputFile(el) {\n var _this8 = this;\n\n var files = [];\n this.iMaximum; // @ts-ignore\n\n var entrys = el.webkitEntries || el.entries || undefined;\n\n if (entrys !== null && entrys !== void 0 && entrys.length) {\n return this.getFileSystemEntry(entrys).then(function (files) {\n return _this8.add(files);\n });\n }\n\n if (el.files) {\n for (var i = 0; i < el.files.length; i++) {\n var file = el.files[i];\n files.push({\n id: '',\n size: file.size,\n // @ts-ignore\n name: file.webkitRelativePath || file.relativePath || file.name,\n type: file.type,\n file: file\n });\n }\n } else {\n var names = el.value.replace(/\\\\/g, '/').split('/');\n\n if (!names || !names.length) {\n names = [el.value];\n } // @ts-ignore\n\n\n delete el.__vuex__;\n files.push({\n id: '',\n name: names[names.length - 1],\n el: el\n });\n }\n\n return Promise.resolve(this.add(files));\n },\n // 添加 DataTransfer\n addDataTransfer: function addDataTransfer(dataTransfer) {\n var _dataTransfer$items,\n _this9 = this;\n\n // dataTransfer.items 支持\n if (dataTransfer !== null && dataTransfer !== void 0 && (_dataTransfer$items = dataTransfer.items) !== null && _dataTransfer$items !== void 0 && _dataTransfer$items.length) {\n var entrys = []; // 遍历出所有 dataTransferVueUploadItem\n\n for (var i = 0; i < dataTransfer.items.length; i++) {\n var dataTransferTtem = dataTransfer.items[i];\n var entry = void 0; // @ts-ignore\n\n if (dataTransferTtem.getAsEntry) {\n // @ts-ignore\n entry = dataTransferTtem.getAsEntry() || dataTransferTtem.getAsFile();\n } else if (dataTransferTtem.webkitGetAsEntry) {\n entry = dataTransferTtem.webkitGetAsEntry() || dataTransferTtem.getAsFile();\n } else {\n entry = dataTransferTtem.getAsFile();\n }\n\n if (entry) {\n entrys.push(entry);\n }\n }\n\n return this.getFileSystemEntry(entrys).then(function (files) {\n return _this9.add(files);\n });\n } // dataTransfer.files 支持\n\n\n var maximumValue = this.iMaximum;\n var files = [];\n\n if (dataTransfer.files.length) {\n for (var _i3 = 0; _i3 < dataTransfer.files.length; _i3++) {\n files.push(dataTransfer.files[_i3]);\n\n if (maximumValue > 0 && files.length >= maximumValue) {\n break;\n }\n }\n\n return Promise.resolve(this.add(files));\n }\n\n return Promise.resolve([]);\n },\n // 获得 entrys \n getFileSystemEntry: function getFileSystemEntry(entry) {\n var _this10 = this;\n\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n // getFileSystemEntry(entry: any, path = ''): Promise {\n return new Promise(function (resolve) {\n var maximumValue = _this10.iMaximum;\n\n if (!entry) {\n resolve([]);\n return;\n }\n\n if (entry instanceof Array) {\n // 多个\n var uploadFiles = [];\n\n var forEach = function forEach(i) {\n var v = entry[i];\n\n if (!v || maximumValue > 0 && uploadFiles.length >= maximumValue) {\n return resolve(uploadFiles);\n }\n\n _this10.getFileSystemEntry(v, path).then(function (results) {\n uploadFiles.push.apply(uploadFiles, _toConsumableArray(results));\n forEach(i + 1);\n });\n };\n\n forEach(0);\n return;\n }\n\n if (entry instanceof Blob) {\n resolve([{\n id: '',\n size: entry.size,\n // @ts-ignore\n name: path + entry.name,\n type: entry.type,\n file: entry\n }]);\n return;\n }\n\n if (entry.isFile) {\n var fileEntry = entry;\n fileEntry.file(function (file) {\n resolve([{\n id: '',\n size: file.size,\n name: path + file.name,\n type: file.type,\n file: file\n }]);\n });\n return;\n }\n\n if (entry.isDirectory && _this10.dropDirectory) {\n var directoryEntry = entry;\n var _uploadFiles = []; // 目录也要添加到文件列表\n\n if (_this10.createDirectory) {\n _uploadFiles.push({\n id: '',\n name: path + directoryEntry.name,\n size: 0,\n type: 'text/directory',\n file: new File([], path + directoryEntry.name, {\n type: 'text/directory'\n })\n });\n }\n\n var dirReader = directoryEntry.createReader();\n\n var readEntries = function readEntries() {\n dirReader.readEntries(function (entries) {\n var forEach = function forEach(i) {\n if (!entries[i] && i === 0 || maximumValue > 0 && _uploadFiles.length >= maximumValue) {\n return resolve(_uploadFiles);\n }\n\n if (!entries[i]) {\n return readEntries();\n }\n\n _this10.getFileSystemEntry(entries[i], path + directoryEntry.name + '/').then(function (results) {\n _uploadFiles.push.apply(_uploadFiles, _toConsumableArray(results));\n\n forEach(i + 1);\n });\n };\n\n forEach(0);\n });\n };\n\n readEntries();\n return;\n }\n\n resolve([]);\n });\n },\n // 替换\n replace: function replace(id1, id2) {\n var file1 = this.get(id1);\n var file2 = this.get(id2);\n\n if (!file1 || !file2 || file1 === file2) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index1 = files.indexOf(file1);\n var index2 = files.indexOf(file2);\n\n if (index1 === -1 || index2 === -1) {\n return false;\n }\n\n files[index1] = file2;\n files[index2] = file1;\n this.files = files;\n this.emitInput();\n return true;\n },\n // 移除\n remove: function remove(id) {\n var file = this.get(id);\n\n if (file) {\n if (this.emitFilter(undefined, file)) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index = files.indexOf(file);\n\n if (index === -1) {\n console.error('remove', file);\n return false;\n }\n\n files.splice(index, 1);\n this.files = files; // 定位\n\n delete this.maps[file.id]; // 事件\n\n this.emitInput();\n this.emitFile(undefined, file);\n }\n\n return file;\n },\n // 更新\n update: function update(id, data) {\n var file = this.get(id);\n\n if (file) {\n var newFile = _objectSpread(_objectSpread({}, file), data); // 停用必须加上错误\n\n\n if (file.fileObject && file.active && !newFile.active && !newFile.error && !newFile.success) {\n newFile.error = 'abort';\n }\n\n if (this.emitFilter(newFile, file)) {\n return false;\n }\n\n var files = this.files.concat([]);\n var index = files.indexOf(file);\n\n if (index === -1) {\n console.error('update', file);\n return false;\n }\n\n files.splice(index, 1, newFile);\n this.files = files;\n newFile = this.files[index]; // 删除 旧定位 写入 新定位 (已便支持修改id)\n\n delete this.maps[file.id];\n this.maps[newFile.id] = newFile; // 事件\n\n this.emitInput();\n this.emitFile(newFile, file);\n return newFile;\n }\n\n return false;\n },\n // 预处理 事件 过滤器\n emitFilter: function emitFilter(newFile, oldFile) {\n var isPrevent = false;\n this.$emit('input-filter', newFile, oldFile, function () {\n var prevent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n isPrevent = prevent;\n return isPrevent;\n });\n return isPrevent;\n },\n // 处理后 事件 分发\n emitFile: function emitFile(newFile, oldFile) {\n var _newFile,\n _this11 = this;\n\n this.$emit('input-file', newFile, oldFile);\n\n if ((_newFile = newFile) !== null && _newFile !== void 0 && _newFile.fileObject && newFile.active && (!oldFile || !oldFile.active)) {\n this.uploading++; // 激活\n // @ts-ignore\n\n this.$nextTick(function () {\n setTimeout(function () {\n newFile && _this11.upload(newFile).then(function () {\n var _newFile2;\n\n if (newFile) {\n // eslint-disable-next-line\n newFile = _this11.get(newFile) || undefined;\n }\n\n if ((_newFile2 = newFile) !== null && _newFile2 !== void 0 && _newFile2.fileObject) {\n _this11.update(newFile, {\n active: false,\n success: !newFile.error\n });\n }\n }).catch(function (e) {\n newFile && _this11.update(newFile, {\n active: false,\n success: false,\n error: e.code || e.error || e.message || e\n });\n });\n }, Math.ceil(Math.random() * 50 + 50));\n });\n } else if ((!newFile || !newFile.fileObject || !newFile.active) && oldFile && oldFile.fileObject && oldFile.active) {\n // 停止\n this.uploading--;\n } // 自动延续激活\n // @ts-ignore\n\n\n if (this.active && (Boolean(newFile) !== Boolean(oldFile) || newFile.active !== oldFile.active)) {\n this.watchActive(true);\n }\n },\n emitInput: function emitInput() {\n this.$emit('update:modelValue', this.files);\n },\n // 上传\n upload: function upload(id) {\n var file = this.get(id); // 被删除\n\n if (!file) {\n return Promise.reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return Promise.reject(new Error('file_object'));\n } // 有错误直接响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return Promise.reject(file.error);\n }\n\n return Promise.reject(new Error(file.error));\n } // 已完成直接响应\n\n\n if (file.success) {\n return Promise.resolve(file);\n } // 后缀\n\n\n if (file.name && this.iExtensions && file.type !== \"text/directory\") {\n if (file.name.search(this.iExtensions) === -1) {\n return Promise.reject(new Error('extension'));\n }\n } // 大小\n\n\n if (this.size > 0 && file.size !== undefined && file.size >= 0 && file.size > this.size && file.type !== \"text/directory\") {\n return Promise.reject(new Error('size'));\n }\n\n if (this.customAction) {\n return this.customAction(file, this);\n }\n\n if (this.features.html5) {\n if (this.shouldUseChunkUpload(file)) {\n return this.uploadChunk(file);\n }\n\n if (file.putAction) {\n return this.uploadPut(file);\n }\n\n if (file.postAction) {\n return this.uploadHtml5(file);\n }\n }\n\n if (file.postAction) {\n return this.uploadHtml4(file);\n }\n\n return Promise.reject(new Error('No action configured'));\n },\n\n /**\r\n * Whether this file should be uploaded using chunk upload or not\r\n *\r\n * @param Object file\r\n */\n shouldUseChunkUpload: function shouldUseChunkUpload(file) {\n return this.chunkEnabled && !!this.chunkOptions.handler && file.size && file.size > this.chunkOptions.minSize;\n },\n\n /**\r\n * Upload a file using Chunk method\r\n *\r\n * @param File file\r\n */\n uploadChunk: function uploadChunk(file) {\n var HandlerClass = this.chunkOptions.handler;\n file.chunk = new HandlerClass(file, this.chunkOptions);\n return file.chunk.upload().then(function (res) {\n return file;\n });\n },\n uploadPut: function uploadPut(file) {\n var querys = [];\n var value;\n\n for (var key in file.data) {\n value = file.data[key];\n\n if (value !== null && value !== undefined) {\n querys.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n }\n\n var putAction = file.putAction || '';\n var queryString = querys.length ? (putAction.indexOf('?') === -1 ? '?' : '&') + querys.join('&') : '';\n var xhr = new XMLHttpRequest();\n xhr.open('PUT', putAction + queryString);\n return this.uploadXhr(xhr, file, file.file);\n },\n uploadHtml5: function uploadHtml5(file) {\n var form = new window.FormData();\n var value;\n\n for (var key in file.data) {\n value = file.data[key];\n\n if (value && _typeof(value) === 'object' && typeof value.toString !== 'function') {\n if (value instanceof File) {\n form.append(key, value, value.name);\n } else {\n form.append(key, JSON.stringify(value));\n }\n } else if (value !== null && value !== undefined) {\n form.append(key, value);\n }\n } // Moved file.name as the first option to set the filename of the uploaded file, since file.name\n // contains the full (relative) path of the file not just the filename as in file.file.filename\n // @ts-ignore\n\n\n form.append(this.name, file.file, file.name || file.file.name || file.file.filename);\n var xhr = new XMLHttpRequest();\n xhr.open('POST', file.postAction || '');\n return this.uploadXhr(xhr, file, form);\n },\n uploadXhr: function uploadXhr(xhr, ufile, body) {\n var _this12 = this;\n\n var file = ufile;\n var speedTime = 0;\n var speedLoaded = 0; // 进度条\n\n xhr.upload.onprogress = function (e) {\n // 还未开始上传 已删除 未激活\n if (!file) {\n return;\n }\n\n file = _this12.get(file);\n\n if (!e.lengthComputable || !file || !file.fileObject || !file.active) {\n return;\n } // 进度 速度 每秒更新一次\n\n\n var speedTime2 = Math.round(Date.now() / 1000);\n\n if (speedTime2 === speedTime) {\n return;\n }\n\n speedTime = speedTime2;\n file = _this12.update(file, {\n progress: (e.loaded / e.total * 100).toFixed(2),\n speed: e.loaded - speedLoaded\n });\n speedLoaded = e.loaded;\n }; // 检查激活状态\n\n\n var interval = window.setInterval(function () {\n if (file) {\n if (file = _this12.get(file)) {\n var _file2;\n\n if ((_file2 = file) !== null && _file2 !== void 0 && _file2.fileObject && !file.success && !file.error && file.active) {\n return;\n }\n }\n }\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n }\n\n try {\n xhr.abort();\n xhr.timeout = 1;\n } catch (e) {}\n }, 100);\n return new Promise(function (resolve, reject) {\n if (!file) {\n reject(new Error('not_exists'));\n return;\n }\n\n var complete;\n\n var fn = function fn(e) {\n // 已经处理过了\n if (complete) {\n return;\n }\n\n complete = true;\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n }\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n file = _this12.get(file); // 不存在直接响应\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return reject(new Error('file_object'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 未激活\n\n\n if (!file.active) {\n return reject(new Error('abort'));\n } // 已完成 直接相应\n\n\n if (file.success) {\n return resolve(file);\n }\n\n var data = {};\n\n switch (e.type) {\n case 'timeout':\n case 'abort':\n data.error = e.type;\n break;\n\n case 'error':\n if (!xhr.status) {\n data.error = 'network';\n } else if (xhr.status >= 500) {\n data.error = 'server';\n } else if (xhr.status >= 400) {\n data.error = 'denied';\n }\n\n break;\n\n default:\n if (xhr.status >= 500) {\n data.error = 'server';\n } else if (xhr.status >= 400) {\n data.error = 'denied';\n } else {\n data.progress = '100.00';\n }\n\n }\n\n if (xhr.responseText) {\n var contentType = xhr.getResponseHeader('Content-Type');\n\n if (contentType && contentType.indexOf('/json') !== -1) {\n data.response = JSON.parse(xhr.responseText);\n } else {\n data.response = xhr.responseText;\n }\n } // 更新\n // @ts-ignore\n\n\n file = _this12.update(file, data);\n\n if (!file) {\n return reject(new Error('abort'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 响应\n\n\n return resolve(file);\n }; // 事件\n\n\n xhr.onload = fn;\n xhr.onerror = fn;\n xhr.onabort = fn;\n xhr.ontimeout = fn; // 超时\n\n if (file.timeout) {\n xhr.timeout = file.timeout;\n } // headers\n\n\n for (var key in file.headers) {\n xhr.setRequestHeader(key, file.headers[key]);\n } // 更新 xhr\n // @ts-ignore\n\n\n file = _this12.update(file, {\n xhr: xhr\n }); // 开始上传\n\n file && xhr.send(body);\n });\n },\n uploadHtml4: function uploadHtml4(ufile) {\n var _this13 = this;\n\n var file = ufile;\n\n if (!file) {\n return Promise.reject(new Error('not_exists'));\n }\n\n var onKeydown = function onKeydown(e) {\n if (e.keyCode === 27) {\n e.preventDefault();\n }\n };\n\n var iframe = document.createElement('iframe');\n iframe.id = 'upload-iframe-' + file.id;\n iframe.name = 'upload-iframe-' + file.id;\n iframe.src = 'about:blank';\n iframe.setAttribute('style', 'width:1px;height:1px;top:-999em;position:absolute; margin-top:-999em;');\n var form = document.createElement('form');\n form.setAttribute('action', file.postAction || '');\n form.name = 'upload-form-' + file.id;\n form.setAttribute('method', 'POST');\n form.setAttribute('target', 'upload-iframe-' + file.id);\n form.setAttribute('enctype', 'multipart/form-data');\n\n for (var key in file.data) {\n var value = file.data[key];\n\n if (value && _typeof(value) === 'object' && typeof value.toString !== 'function') {\n value = JSON.stringify(value);\n }\n\n if (value !== null && value !== undefined) {\n var el = document.createElement('input');\n el.type = 'hidden';\n el.name = key;\n el.value = value;\n form.appendChild(el);\n }\n }\n\n form.appendChild(file.el);\n document.body.appendChild(iframe).appendChild(form);\n\n var getResponseData = function getResponseData() {\n var _doc;\n\n var doc;\n\n try {\n if (iframe.contentWindow) {\n doc = iframe.contentWindow.document;\n }\n } catch (err) {}\n\n if (!doc) {\n try {\n // @ts-ignore\n doc = iframe.contentDocument ? iframe.contentDocument : iframe.document;\n } catch (err) {\n // @ts-ignore\n doc = iframe.document;\n }\n } // @ts-ignore\n\n\n if ((_doc = doc) !== null && _doc !== void 0 && _doc.body) {\n return doc.body.innerHTML;\n }\n\n return null;\n };\n\n return new Promise(function (resolve, reject) {\n setTimeout(function () {\n if (!file) {\n reject(new Error('not_exists'));\n return;\n }\n\n file = _this13.update(file, {\n iframe: iframe\n }); // 不存在\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 定时检查\n\n\n var interval = window.setInterval(function () {\n if (file) {\n if (file = _this13.get(file)) {\n if (file.fileObject && !file.success && !file.error && file.active) {\n return;\n }\n }\n }\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n } // @ts-ignore\n\n\n iframe.onabort({\n type: file ? 'abort' : 'not_exists'\n });\n }, 100);\n var complete;\n\n var fn = function fn(e) {\n var _file3;\n\n // 已经处理过了\n if (complete) {\n return;\n }\n\n complete = true;\n\n if (interval) {\n clearInterval(interval);\n interval = undefined;\n } // 关闭 esc 事件\n\n\n document.body.removeEventListener('keydown', onKeydown);\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n file = _this13.get(file); // 不存在直接响应\n\n if (!file) {\n return reject(new Error('not_exists'));\n } // 不是文件对象\n\n\n if (!file.fileObject) {\n return reject(new Error('file_object'));\n } // 有错误自动响应\n\n\n if (file.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 未激活\n\n\n if (!file.active) {\n return reject(new Error('abort'));\n } // 已完成 直接相应\n\n\n if (file.success) {\n return resolve(file);\n }\n\n var response = getResponseData();\n var data = {};\n\n if (typeof e === 'string') {\n return reject(new Error(e));\n }\n\n switch (e.type) {\n case 'abort':\n data.error = 'abort';\n break;\n\n case 'error':\n if (file.error) {\n data.error = file.error;\n } else if (response === null) {\n data.error = 'network';\n } else {\n data.error = 'denied';\n }\n\n break;\n\n default:\n if (file.error) {\n data.error = file.error;\n } else if (response === null) {\n data.error = 'network';\n } else {\n data.progress = '100.00';\n }\n\n }\n\n if (response !== null) {\n if (response && response.substr(0, 1) === '{' && response.substr(response.length - 1, 1) === '}') {\n try {\n response = JSON.parse(response);\n } catch (err) {}\n }\n\n data.response = response;\n } // 更新\n\n\n file = _this13.update(file, data);\n\n if (!file) {\n return reject(new Error('not_exists'));\n }\n\n if ((_file3 = file) !== null && _file3 !== void 0 && _file3.error) {\n if (file.error instanceof Error) {\n return reject(file.error);\n }\n\n return reject(new Error(file.error));\n } // 响应\n\n\n return resolve(file);\n }; // 添加事件\n\n\n iframe.onload = fn;\n iframe.onerror = fn;\n iframe.onabort = fn; // 禁止 esc 键\n\n document.body.addEventListener('keydown', onKeydown); // 提交\n\n form.submit();\n }, 50);\n }).then(function (res) {\n var _iframe$parentNode;\n\n iframe === null || iframe === void 0 ? void 0 : (_iframe$parentNode = iframe.parentNode) === null || _iframe$parentNode === void 0 ? void 0 : _iframe$parentNode.removeChild(iframe);\n return res;\n }).catch(function (res) {\n var _iframe$parentNode2;\n\n iframe === null || iframe === void 0 ? void 0 : (_iframe$parentNode2 = iframe.parentNode) === null || _iframe$parentNode2 === void 0 ? void 0 : _iframe$parentNode2.removeChild(iframe);\n return res;\n });\n },\n watchActive: function watchActive(active) {\n var file;\n var index = 0;\n\n while (file = this.files[index]) {\n index++;\n if (!file.fileObject) ;else if (active && !this.destroy) {\n if (this.uploading >= this.thread || this.uploading && !this.features.html5) {\n break;\n }\n\n if (!file.active && !file.error && !file.success) {\n this.update(file, {\n active: true\n });\n }\n } else {\n if (file.active) {\n this.update(file, {\n active: false\n });\n }\n }\n }\n\n if (this.uploading === 0) {\n this.active = false;\n }\n },\n watchDrop: function watchDrop(newDrop) {\n var oldDrop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n if (!this.features.drop) {\n return;\n }\n\n if (newDrop === oldDrop) {\n return;\n } // 移除挂载\n\n\n if (this.dropElement) {\n try {\n document.removeEventListener('dragenter', this.onDocumentDragenter, false);\n document.removeEventListener('dragleave', this.onDocumentDragleave, false);\n document.removeEventListener('dragover', this.onDocumentDragover, false);\n document.removeEventListener('drop', this.onDocumentDrop, false);\n this.dropElement.removeEventListener('dragenter', this.onDragenter, false);\n this.dropElement.removeEventListener('dragleave', this.onDragleave, false);\n this.dropElement.removeEventListener('dragover', this.onDragover, false);\n this.dropElement.removeEventListener('drop', this.onDrop, false);\n } catch (e) {}\n }\n\n var el = null;\n if (!newDrop) ;else if (typeof newDrop === 'string') {\n // @ts-ignore\n el = document.querySelector(newDrop) || this.$root.$el.querySelector(newDrop);\n } else if (newDrop === true) {\n var _el;\n\n // @ts-ignore\n el = this.$parent.$el;\n\n if (!el || ((_el = el) === null || _el === void 0 ? void 0 : _el.nodeType) === 8) {\n var _el2;\n\n // @ts-ignore\n el = this.$root.$el;\n\n if (!el || ((_el2 = el) === null || _el2 === void 0 ? void 0 : _el2.nodeType) === 8) {\n el = document.body;\n }\n }\n } else {\n el = newDrop;\n }\n this.dropElement = el;\n\n if (this.dropElement) {\n document.addEventListener('dragenter', this.onDocumentDragenter, false);\n document.addEventListener('dragleave', this.onDocumentDragleave, false);\n document.addEventListener('dragover', this.onDocumentDragover, false);\n document.addEventListener('drop', this.onDocumentDrop, false);\n this.dropElement.addEventListener('dragenter', this.onDragenter, false);\n this.dropElement.addEventListener('dragleave', this.onDragleave, false);\n this.dropElement.addEventListener('dragover', this.onDragover, false);\n this.dropElement.addEventListener('drop', this.onDrop, false);\n }\n },\n watchDropActive: function watchDropActive(newDropActive, oldDropActive) {\n if (newDropActive === oldDropActive) {\n return;\n } // 设置 dropElementActive false\n\n\n if (!newDropActive && this.dropElementActive) {\n this.dropElementActive = false;\n }\n\n if (this.dropTimeout) {\n clearTimeout(this.dropTimeout);\n this.dropTimeout = null;\n }\n\n if (newDropActive) {\n // @ts-ignore\n this.dropTimeout = setTimeout(this.onDocumentDrop, 1000);\n }\n },\n onDocumentDragenter: function onDocumentDragenter(e) {\n var _dt$files, _dt$types;\n\n if (this.dropActive) {\n return;\n }\n\n if (!e.dataTransfer) {\n return;\n }\n\n var dt = e.dataTransfer;\n\n if (dt !== null && dt !== void 0 && (_dt$files = dt.files) !== null && _dt$files !== void 0 && _dt$files.length) {\n this.dropActive = true;\n } else if (!dt.types) {\n this.dropActive = true;\n } else if (dt.types.indexOf && dt.types.indexOf('Files') !== -1) {\n this.dropActive = true; // @ts-ignore\n } else if ((_dt$types = dt.types) !== null && _dt$types !== void 0 && _dt$types.contains && dt.types.contains('Files')) {\n this.dropActive = true;\n }\n\n if (this.dropActive) {\n this.watchDropActive(true);\n }\n },\n onDocumentDragleave: function onDocumentDragleave(e) {\n if (!this.dropActive) {\n return;\n } // @ts-ignore\n\n\n if (e.target === e.explicitOriginalTarget || !e.fromElement && (e.clientX <= 0 || e.clientY <= 0 || e.clientX >= window.innerWidth || e.clientY >= window.innerHeight)) {\n this.dropActive = false;\n this.watchDropActive(false);\n }\n },\n onDocumentDragover: function onDocumentDragover() {\n this.watchDropActive(true);\n },\n onDocumentDrop: function onDocumentDrop() {\n this.dropActive = false;\n this.watchDropActive(false);\n },\n onDragenter: function onDragenter(e) {\n if (!this.dropActive || this.dropElementActive) {\n return;\n }\n\n this.dropElementActive = true;\n },\n onDragleave: function onDragleave(e) {\n var _this$dropElement;\n\n if (!this.dropElementActive) {\n return;\n }\n\n var related = e.relatedTarget;\n\n if (!related) {\n this.dropElementActive = false;\n } else if ((_this$dropElement = this.dropElement) !== null && _this$dropElement !== void 0 && _this$dropElement.contains) {\n if (!this.dropElement.contains(related)) {\n this.dropElementActive = false;\n }\n } else {\n var child = related;\n\n while (child) {\n if (child === this.dropElement) {\n break;\n } // @ts-ignore\n\n\n child = child.parentNode;\n }\n\n if (child !== this.dropElement) {\n this.dropElementActive = false;\n }\n }\n },\n onDragover: function onDragover(e) {\n e.preventDefault();\n },\n onDrop: function onDrop(e) {\n e.preventDefault();\n e.dataTransfer && this.addDataTransfer(e.dataTransfer);\n },\n inputOnChange: async function inputOnChange(e) {\n var _this14 = this;\n\n if (!(e.target instanceof HTMLInputElement)) {\n return Promise.reject(new Error(\"not HTMLInputElement\"));\n }\n\n e.target;\n\n var reinput = function reinput(res) {\n _this14.reload = true; // @ts-ignore\n\n _this14.$nextTick(function () {\n _this14.reload = false;\n });\n\n return res;\n };\n\n return this.addInputFile(e.target).then(reinput).catch(reinput);\n },\n isRelatedTargetSupported: function isRelatedTargetSupported() {\n try {\n // 创建一个模拟的 MouseEvent\n var event = new MouseEvent('mouseout', {\n relatedTarget: document.body\n });\n return 'relatedTarget' in event; // 检查 `relatedTarget` 属性是否存在\n } catch (e) {\n // 如果 MouseEvent 不受支持,或者无法设置 relatedTarget\n return false;\n }\n }\n }\n });\n var _hoisted_1 = [\"for\"];\n var _hoisted_2 = [\"name\", \"id\", \"accept\", \"capture\", \"disabled\", \"webkitdirectory\", \"allowdirs\", \"directory\", \"multiple\"];\n\n function render(_ctx, _cache, $props, $setup, $data, $options) {\n return vue.openBlock(), vue.createElementBlock(\"span\", {\n class: vue.normalizeClass(_ctx.className)\n }, [vue.renderSlot(_ctx.$slots, \"default\"), vue.createElementVNode(\"label\", {\n for: _ctx.forId\n }, null, 8, _hoisted_1), !_ctx.reload ? (vue.openBlock(), vue.createElementBlock(\"input\", {\n key: 0,\n ref: \"input\",\n type: \"file\",\n name: _ctx.name,\n id: _ctx.forId,\n accept: _ctx.accept,\n capture: _ctx.capture,\n disabled: _ctx.disabled,\n webkitdirectory: _ctx.iDirectory,\n allowdirs: _ctx.iDirectory,\n directory: _ctx.iDirectory,\n multiple: _ctx.multiple && _ctx.features.html5,\n onChange: _cache[0] || (_cache[0] = function () {\n return _ctx.inputOnChange && _ctx.inputOnChange.apply(_ctx, arguments);\n })\n }, null, 40, _hoisted_2)) : vue.createCommentVNode(\"\", true)], 2);\n }\n\n function styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n }\n\n var css_248z = \"\\n.file-uploads {\\n overflow: hidden;\\n position: relative;\\n text-align: center;\\n display: inline-block;\\n}\\n.file-uploads.file-uploads-html4 input,\\n.file-uploads.file-uploads-html5 label {\\n /* background fix ie click */\\n background: #fff;\\n opacity: 0;\\n font-size: 20em;\\n z-index: 1;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n position: absolute;\\n width: 100%;\\n height: 100%;\\n}\\n.file-uploads.file-uploads-html5 input,\\n.file-uploads.file-uploads-html4 label {\\n /* background fix ie click */\\n position: absolute;\\n background: rgba(255, 255, 255, 0);\\n overflow: hidden;\\n position: fixed;\\n width: 1px;\\n height: 1px;\\n z-index: -1;\\n opacity: 0;\\n}\\n\";\n styleInject(css_248z);\n script.render = render;\n\n return script;\n\n}));\n//# sourceMappingURL=vue-upload-component.js.map\n"],"names":["module","vue","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","_ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","_typeof","ownKeys","_objectSpread2","_defineProperty","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","createRequest","options","xhr","XMLHttpRequest","open","method","url","responseType","headers","setRequestHeader","sendRequest","body","Promise","resolve","reject","onload","status","response","JSON","parse","err","onerror","send","stringify","sendFormRequest","data","FormData","append","request","CHUNK_DEFAULT_OPTIONS","action","minSize","maxActive","maxRetries","handler","ChunkUploadHandler","file","this","chunks","sessionId","chunkSize","speedInterval","get","parseInt","type","size","startBody","uploadBody","finishBody","_this","completedProgress","chunksUploaded","uploadingProgress","chunksUploading","reduce","progress","chunk","Math","min","active","uploaded","chunksToUpload","start","end","fileSize","blob","startOffset","retries","stopChunks","abort","stopSpeedCalc","startChunking","_this2","promise","_this3","assign","phase","mime_type","fileType","fileName","then","res","session_id","end_offset","createChunks","catch","maxActiveChunks","uploadNextChunk","startSpeedCalc","hasChunksToUpload","uploadChunk","finish","_this4","updateFileProgress","upload","addEventListener","evt","lengthComputable","round","loaded","total","start_offset","_this5","_this6","speed","lastUploadedBytes","window","setInterval","uploadedBytes","clearInterval","script","defineComponent","compatConfig","MODE","inputId","String","default","accept","capture","disabled","multiple","Boolean","maximum","Number","addIndex","directory","createDirectory","postAction","putAction","customAction","Function","timeout","drop","HTMLElement","dropDirectory","extensions","RegExp","modelValue","thread","chunkEnabled","emits","files","features","html5","dropActive","dropElementActive","uploading","destroy","maps","dropElement","dropTimeout","reload","mounted","_this7","input","document","createElement","webkitdirectory","ondrop","isRelatedTargetSupported","id","$nextTick","$parent","$forceUpdate","watchDrop","beforeUnmount","watchActive","computed","fileObject","error","success","chunkOptions","className","undefined","forId","iMaximum","iExtensions","exts","split","map","trim","join","replace","iDirectory","watch","_active","watchDropActive","oldMaps","newFile","oldFile","emitFile","_key","methods","newId","random","substr","clear","emitInput","add","_files","index","addFiles","Blob","webkitRelativePath","relativePath","Element","el","HTMLInputElement","emitFilter","newFiles","concat","_newFiles","splice","index2","_i","_file","_i2","addInputFile","_this8","entrys","webkitEntries","entries","getFileSystemEntry","names","__vuex__","addDataTransfer","dataTransfer","_dataTransfer$items","_this9","items","dataTransferTtem","entry","getAsEntry","getAsFile","webkitGetAsEntry","maximumValue","_i3","_this10","path","uploadFiles","v","results","isFile","isDirectory","directoryEntry","_uploadFiles","File","dirReader","createReader","readEntries","id1","id2","file1","file2","index1","indexOf","remove","console","update","isPrevent","$emit","_newFile","_this11","setTimeout","_newFile2","e","code","message","ceil","Error","search","shouldUseChunkUpload","uploadPut","uploadHtml5","uploadHtml4","HandlerClass","querys","encodeURIComponent","queryString","uploadXhr","form","filename","ufile","_this12","speedTime","speedLoaded","onprogress","speedTime2","Date","now","toFixed","interval","_file2","complete","fn","responseText","contentType","getResponseHeader","onabort","ontimeout","_this13","onKeydown","keyCode","preventDefault","iframe","src","setAttribute","appendChild","getResponseData","_doc","doc","contentWindow","contentDocument","innerHTML","_file3","removeEventListener","submit","_iframe$parentNode","parentNode","removeChild","_iframe$parentNode2","newDrop","oldDrop","onDocumentDragenter","onDocumentDragleave","onDocumentDragover","onDocumentDrop","onDragenter","onDragleave","onDragover","onDrop","querySelector","$root","$el","_el","_el2","nodeType","newDropActive","oldDropActive","clearTimeout","_dt$files","_dt$types","dt","types","contains","explicitOriginalTarget","fromElement","clientX","clientY","innerWidth","innerHeight","_this$dropElement","related","relatedTarget","child","inputOnChange","async","_this14","reinput","MouseEvent","_hoisted_1","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","openBlock","createElementBlock","class","normalizeClass","renderSlot","$slots","createElementVNode","for","createCommentVNode","ref","allowdirs","onChange","styleInject","css","insertAt","head","getElementsByTagName","style","firstChild","insertBefore","styleSheet","cssText","createTextNode","factory","require$$0"],"mappings":";;;;;;;;;;;;;;;;;qBASiEA,mBAG7CC,GAElB,SAASC,EAAmBC,GAAO,OAAOC,EAAmBD,IAAQE,EAAiBF,IAAQG,EAA4BH,IAAQI,IAElI,SAASA,IAAuB,MAAM,IAAIC,UAAU,wIAEpD,SAASF,EAA4BG,EAAGC,GAAU,GAAKD,EAAL,CAAgB,GAAiB,iBAANA,EAAgB,OAAOE,EAAkBF,EAAGC,GAAS,IAAIE,EAAIC,OAAOC,UAAUC,SAASC,KAAKP,GAAGQ,MAAM,GAAI,GAAiE,MAAnD,WAANL,GAAkBH,EAAES,cAAaN,EAAIH,EAAES,YAAYC,MAAgB,QAANP,GAAqB,QAANA,EAAoBQ,MAAMC,KAAKZ,GAAc,cAANG,GAAqB,2CAA2CU,KAAKV,GAAWD,EAAkBF,EAAGC,QAAzG,GAE7S,SAASL,EAAiBkB,GAAQ,GAAsB,oBAAXC,QAAmD,MAAzBD,EAAKC,OAAOC,WAA2C,MAAtBF,EAAK,cAAuB,OAAOH,MAAMC,KAAKE,GAEtJ,SAASnB,EAAmBD,GAAO,GAAIiB,MAAMM,QAAQvB,GAAM,OAAOQ,EAAkBR,GAEpF,SAASQ,EAAkBR,EAAKwB,IAAkB,MAAPA,GAAeA,EAAMxB,EAAIyB,UAAQD,EAAMxB,EAAIyB,QAAQ,IAAK,IAAIC,EAAI,EAAGC,EAAO,IAAIV,MAAMO,GAAME,EAAIF,EAAKE,IAAOC,EAAKD,GAAK1B,EAAI0B,GAAM,OAAOC,EAEhL,SAASC,EAASC,EAAQC,GAAkB,IAAIC,EAAOr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C,IAAKb,EAAK7L,OACT,KAAM,EAAG0L,GAAcG,EAAKpN,OAgBH5N,EAAI8b,mBAAmB,IAAI,IAhBd9b,EAAIsb,YAAatb,EAAIub,mBAAmB,QAAS,CACxFxY,IAAK,EACLgZ,IAAK,QACL9U,KAAM,OACN/F,KAAM8Z,EAAK9Z,KACXmN,GAAI2M,EAAK7L,MACTzD,OAAQsP,EAAKtP,OACbC,QAASqP,EAAKrP,QACdC,SAAUoP,EAAKpP,SACfsC,gBAAiB8M,EAAKpL,WACtBoM,UAAWhB,EAAKpL,WAChB1D,UAAW8O,EAAKpL,WAChB/D,SAAUmP,EAAKnP,UAAYmP,EAAK7N,SAASC,MACzC6O,SAAUhB,EAAO,KAAOA,EAAO,GAAK,WAClC,OAAOD,EAAKR,eAAiBQ,EAAKR,cAAc/X,MAAMuY,EAAMpY,cAE7D,KAAM,GAAIkY,KAAkD,GAGjE,SAASoB,EAAYC,EAAKJ,QACZ,IAARA,IAAgBA,EAAM,IAC1B,IAAIK,EAAWL,EAAIK,SAEnB,GAAKD,GAA2B,oBAAbnO,SAAnB,CAIA,IAAIqO,EAAOrO,SAASqO,MAAQrO,SAASsO,qBAAqB,QAAQ,GAC9DC,EAAQvO,SAASC,cAAc,SACnCsO,EAAMtV,KAAO,WAEI,QAAbmV,GACEC,EAAKG,WACPH,EAAKI,aAAaF,EAAOF,EAAKG,YAKhCH,EAAK7E,YAAY+E,GAGfA,EAAMG,WACRH,EAAMG,WAAWC,QAAUR,EAE3BI,EAAM/E,YAAYxJ,SAAS4O,eAAeT,KAQ9C,OAHAD,EADe,6rBAEf/Q,EAAO4P,OAASA,EAET5P,EA31EyE0R,CAAQC"} \ No newline at end of file diff --git a/dist/vue-upload-component.part.js b/dist/vue-upload-component.part.js index a7e77fc..f4874c1 100644 --- a/dist/vue-upload-component.part.js +++ b/dist/vue-upload-component.part.js @@ -1,7 +1,7 @@ /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme -Version: 3.1.15 +Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter diff --git a/dist/vue-upload-component.ssr.js b/dist/vue-upload-component.ssr.js index 7d6ca35..5bb78bd 100644 --- a/dist/vue-upload-component.ssr.js +++ b/dist/vue-upload-component.ssr.js @@ -1,7 +1,7 @@ /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme -Version: 3.1.15 +Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter diff --git a/docs/dist/docs.js.LICENSE.txt b/docs/dist/docs.js.LICENSE.txt index 68f022b..523f2c6 100644 --- a/docs/dist/docs.js.LICENSE.txt +++ b/docs/dist/docs.js.LICENSE.txt @@ -19,7 +19,7 @@ /*! * Name: vue-upload-component * Component URI: https://github.com/lian-yue/vue-upload-component#readme - * Version: 3.1.16 + * Version: 3.1.17 * Author: LianYue * License: Apache-2.0 * Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter @@ -28,7 +28,7 @@ /*! Name: vue-upload-component Component URI: https://github.com/lian-yue/vue-upload-component#readme -Version: 3.1.15 +Version: 3.1.16 Author: LianYue License: Apache-2.0 Description: Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter diff --git a/package.json b/package.json index bbcdb41..52067ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vue-upload-component", "description": "Vue.js file upload component, Multi-file upload, Upload directory, Drag upload, Drag the directory, Upload multiple files at the same time, html4 (IE 9), `PUT` method, Customize the filter", - "version": "3.1.16", + "version": "3.1.17", "author": "LianYue", "scripts": { "dev": "cross-env NODE_ENV=development webpack serve --hot",