\\n\";\nvar $4ca367182776f80b$var$defaultOptions = {\n /**\n * Has to be specified on elements other than form (or when the form doesn't\n * have an `action` attribute).\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */\n url: null,\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method (since `v3.12.0`).\n */\n method: \"post\",\n\n /**\n * Will be set on the XHRequest.\n */\n withCredentials: false,\n\n /**\n * The timeout for the XHR requests in milliseconds (since `v4.4.0`).\n * If set to null or 0, no timeout is going to be set.\n */\n timeout: null,\n\n /**\n * How many file uploads to process in parallel (See the\n * Enqueuing file uploads documentation section for more info)\n */\n parallelUploads: 2,\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `processingmultiple`). See the events\n * documentation section for more information.\n */\n uploadMultiple: false,\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.\n */\n chunking: false,\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n forceChunking: false,\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n chunkSize: 2097152,\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n parallelChunkUploads: false,\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n retryChunks: false,\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n retryChunksLimit: 3,\n\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */\n maxFilesize: 256,\n\n /**\n * The name of the file param that gets transferred.\n * **NOTE**: If you have the option `uploadMultiple` set to `true`, then\n * Dropzone will append `[]` to the name.\n */\n paramName: \"file\",\n\n /**\n * Whether thumbnails for images should be generated\n */\n createImageThumbnails: true,\n\n /**\n * In MB. When the filename exceeds this limit, the thumbnail will not be generated.\n */\n maxThumbnailFilesize: 10,\n\n /**\n * If `null`, the ratio of the image will be used to calculate it.\n */\n thumbnailWidth: 120,\n\n /**\n * The same as `thumbnailWidth`. If both are null, images will not be resized.\n */\n thumbnailHeight: 120,\n\n /**\n * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n thumbnailMethod: \"crop\",\n\n /**\n * If set, images will be resized to these dimensions before being **uploaded**.\n * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect\n * ratio of the file will be preserved.\n *\n * The `options.transformFile` function uses these options, so if the `transformFile` function\n * is overridden, these options don't do anything.\n */\n resizeWidth: null,\n\n /**\n * See `resizeWidth`.\n */\n resizeHeight: null,\n\n /**\n * The mime type of the resized image (before it gets uploaded to the server).\n * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.\n * See `resizeWidth` for more information.\n */\n resizeMimeType: null,\n\n /**\n * The quality of the resized images. See `resizeWidth`.\n */\n resizeQuality: 0.8,\n\n /**\n * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n resizeMethod: \"contain\",\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n filesizeBase: 1000,\n\n /**\n * If not `null` defines how many files this Dropzone handles. If it exceeds,\n * the event `maxfilesexceeded` will be called. The dropzone element gets the\n * class `dz-max-files-reached` accordingly so you can provide visual\n * feedback.\n */\n maxFiles: null,\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n */\n headers: null,\n\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */\n defaultHeaders: true,\n\n /**\n * If `true`, the dropzone element itself will be clickable, if `false`\n * nothing will be clickable.\n *\n * You can also pass an HTML element, a CSS selector (for multiple elements)\n * or an array of those. In that case, all of those elements will trigger an\n * upload when clicked.\n */\n clickable: true,\n\n /**\n * Whether hidden files in directories should be ignored.\n */\n ignoreHiddenFiles: true,\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * If the Dropzone is `clickable` this option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n acceptedFiles: null,\n\n /**\n * **Deprecated!**\n * Use acceptedFiles instead.\n */\n acceptedMimeTypes: null,\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `myDropzone.processQueue()`.\n *\n * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation\n * section for more information.\n */\n autoProcessQueue: true,\n\n /**\n * If false, files added to the dropzone will not be queued by default.\n * You'll have to call `enqueueFile(file)` manually.\n */\n autoQueue: true,\n\n /**\n * If `true`, this will add a link to every file preview to remove or cancel (if\n * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`\n * and `dictRemoveFile` options are used for the wording.\n */\n addRemoveLinks: false,\n\n /**\n * Defines where to display the file previews – if `null` the\n * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS\n * selector. The element should have the `dropzone-previews` class so\n * the previews are displayed properly.\n */\n previewsContainer: null,\n\n /**\n * Set this to `true` if you don't want previews to be shown.\n */\n disablePreviews: false,\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly.\n */\n hiddenInputContainer: \"body\",\n\n /**\n * If null, no capture type will be specified\n * If camera, mobile devices will skip the file selection and choose camera\n * If microphone, mobile devices will skip the file selection and choose the microphone\n * If camcorder, mobile devices will skip the file selection and choose the camera in video mode\n * On apple devices multiple must be set to false. AcceptedFiles may need to\n * be set to an appropriate mime type (e.g. \"image/*\", \"audio/*\", or \"video/*\").\n */\n capture: null,\n\n /**\n * **Deprecated**. Use `renameFile` instead.\n */\n renameFilename: null,\n\n /**\n * A function that is invoked before the file is uploaded to the server and renames the file.\n * This function gets the `File` as argument and can use the `file.name`. The actual name of the\n * file that gets used during the upload can be accessed through `file.upload.filename`.\n */\n renameFile: null,\n\n /**\n * If `true` the fallback will be forced. This is very useful to test your server\n * implementations first and make sure that everything works as\n * expected without dropzone if you experience problems, and to test\n * how your fallbacks will look.\n */\n forceFallback: false,\n\n /**\n * The text used before any files are dropped.\n */\n dictDefaultMessage: \"Drop files here to upload\",\n\n /**\n * The text that replaces the default message text it the browser is not supported.\n */\n dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n\n /**\n * The text that will be added before the fallback form.\n * If you provide a fallback element yourself, or if this option is `null` this will\n * be ignored.\n */\n dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n\n /**\n * If the filesize is too big.\n * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.\n */\n dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n\n /**\n * If the file doesn't match the file type.\n */\n dictInvalidFileType: \"You can't upload files of this type.\",\n\n /**\n * If the server response was invalid.\n * `{{statusCode}}` will be replaced with the servers status code.\n */\n dictResponseError: \"Server responded with {{statusCode}} code.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for the cancel upload link.\n */\n dictCancelUpload: \"Cancel upload\",\n\n /**\n * The text that is displayed if an upload was manually canceled\n */\n dictUploadCanceled: \"Upload canceled.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.\n */\n dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used to remove a file.\n */\n dictRemoveFile: \"Remove file\",\n\n /**\n * If this is not null, then the user will be prompted before removing a file.\n */\n dictRemoveFileConfirmation: null,\n\n /**\n * Displayed if `maxFiles` is st and exceeded.\n * The string `{{maxFiles}}` will be replaced by the configuration value.\n */\n dictMaxFilesExceeded: \"You can not upload any more files.\",\n\n /**\n * Allows you to translate the different units. Starting with `tb` for terabytes and going down to\n * `b` for bytes.\n */\n dictFileSizeUnits: {\n tb: \"TB\",\n gb: \"GB\",\n mb: \"MB\",\n kb: \"KB\",\n b: \"b\"\n },\n\n /**\n * Called when dropzone initialized\n * You can add event listeners here\n */\n init: function init() {},\n\n /**\n * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`\n * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case\n * of a function, this needs to return a map.\n *\n * The default implementation does nothing for normal uploads, but adds relevant information for\n * chunked uploads.\n *\n * This is the same as adding hidden input fields in the form element.\n */\n params: function params(files, xhr, chunk) {\n if (chunk) return {\n dzuuid: chunk.file.upload.uuid,\n dzchunkindex: chunk.index,\n dztotalfilesize: chunk.file.size,\n dzchunksize: this.options.chunkSize,\n dztotalchunkcount: chunk.file.upload.totalChunkCount,\n dzchunkbyteoffset: chunk.index * this.options.chunkSize\n };\n },\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n accept: function accept(file, done) {\n return done();\n },\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n chunksUploaded: function chunksUploaded(file, done) {\n done();\n },\n\n /**\n * Sends the file as binary blob in body instead of form data.\n * If this is set, the `params` option will be ignored.\n * It's an error to set this to `true` along with `uploadMultiple` since\n * multiple files cannot be in a single binary body.\n */\n binaryBody: false,\n\n /**\n * Gets called when the browser is not supported.\n * The default implementation shows the fallback input field and adds\n * a text.\n */\n fallback: function fallback() {\n // This code should pass in IE7... :(\n var messageElement;\n this.element.className = \"\".concat(this.element.className, \" dz-browser-not-supported\");\n\n var _iterator2 = _createForOfIteratorHelper(this.element.getElementsByTagName(\"div\")),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var child = _step2.value;\n\n if (/(^| )dz-message($| )/.test(child.className)) {\n messageElement = child;\n child.className = \"dz-message\"; // Removes the 'dz-default' class\n\n break;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n if (!messageElement) {\n messageElement = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement('
');\n this.element.appendChild(messageElement);\n }\n\n var span = messageElement.getElementsByTagName(\"span\")[0];\n\n if (span) {\n if (span.textContent != null) span.textContent = this.options.dictFallbackMessage;else if (span.innerText != null) span.innerText = this.options.dictFallbackMessage;\n }\n\n return this.element.appendChild(this.getFallbackForm());\n },\n\n /**\n * Gets called to calculate the thumbnail dimensions.\n *\n * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:\n *\n * - `srcWidth` & `srcHeight` (required)\n * - `trgWidth` & `trgHeight` (required)\n * - `srcX` & `srcY` (optional, default `0`)\n * - `trgX` & `trgY` (optional, default `0`)\n *\n * Those values are going to be used by `ctx.drawImage()`.\n */\n resize: function resize(file, width, height, resizeMethod) {\n var info = {\n srcX: 0,\n srcY: 0,\n srcWidth: file.width,\n srcHeight: file.height\n };\n var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified\n\n if (width == null && height == null) {\n width = info.srcWidth;\n height = info.srcHeight;\n } else if (width == null) width = height * srcRatio;else if (height == null) height = width / srcRatio; // Make sure images aren't upscaled\n\n\n width = Math.min(width, info.srcWidth);\n height = Math.min(height, info.srcHeight);\n var trgRatio = width / height;\n\n if (info.srcWidth > width || info.srcHeight > height) {\n // Image is bigger and needs rescaling\n if (resizeMethod === \"crop\") {\n if (srcRatio > trgRatio) {\n info.srcHeight = file.height;\n info.srcWidth = info.srcHeight * trgRatio;\n } else {\n info.srcWidth = file.width;\n info.srcHeight = info.srcWidth / trgRatio;\n }\n } else if (resizeMethod === \"contain\") {\n // Method 'contain'\n if (srcRatio > trgRatio) height = width / srcRatio;else width = height * srcRatio;\n } else throw new Error(\"Unknown resizeMethod '\".concat(resizeMethod, \"'\"));\n }\n\n info.srcX = (file.width - info.srcWidth) / 2;\n info.srcY = (file.height - info.srcHeight) / 2;\n info.trgWidth = width;\n info.trgHeight = height;\n return info;\n },\n\n /**\n * Can be used to transform the file (for example, resize an image if necessary).\n *\n * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes\n * images according to those dimensions.\n *\n * Gets the `file` as the first parameter, and a `done()` function as the second, that needs\n * to be invoked with the file when the transformation is done.\n */\n transformFile: function transformFile(file, done) {\n if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);else return done(file);\n },\n\n /**\n * A string that contains the template used for each dropped\n * file. Change it to fulfill your needs but make sure to properly\n * provide all elements.\n *\n * If you want to use an actual HTML element instead of providing a String\n * as a config option, you could create a div with the id `tpl`,\n * put the template inside it and provide the element like this:\n *\n * document\n * .querySelector('#tpl')\n * .innerHTML\n *\n */\n previewTemplate: /*@__PURE__*/$parcel$interopDefault($fd6031f88dce2e32$exports),\n\n /*\n Those functions register themselves to the events on init and handle all\n the user interface specific stuff. Overwriting them won't break the upload\n but can break the way it's displayed.\n You can overwrite them if you don't like the default behavior. If you just\n want to add an additional event handler, register it on the dropzone object\n and don't overwrite those options.\n */\n // Those are self explanatory and simply concern the DragnDrop.\n drop: function drop(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragstart: function dragstart(e) {},\n dragend: function dragend(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragenter: function dragenter(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragover: function dragover(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragleave: function dragleave(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n paste: function paste(e) {},\n // Called whenever there are no files left in the dropzone anymore, and the\n // dropzone should be displayed as if in the initial state.\n reset: function reset() {\n return this.element.classList.remove(\"dz-started\");\n },\n // Called when a file is added to the queue\n // Receives `file`\n addedfile: function addedfile(file) {\n var _this = this;\n\n if (this.element === this.previewsContainer) this.element.classList.add(\"dz-started\");\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(this.options.previewTemplate.trim());\n file.previewTemplate = file.previewElement; // Backwards compatibility\n\n this.previewsContainer.appendChild(file.previewElement);\n\n var _iterator3 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-name]\")),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var node = _step3.value;\n node.textContent = file.name;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n var _iterator4 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-size]\")),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n node = _step4.value;\n node.innerHTML = this.filesize(file.size);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = $3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(\"\".concat(this.options.dictRemoveFile, \"\"));\n file.previewElement.appendChild(file._removeLink);\n }\n\n var removeFileEvent = function removeFileEvent(e) {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING) return $3ed269f2f0fb224b$export$2e2bcd8739ae039.confirm(_this.options.dictCancelUploadConfirmation, function () {\n return _this.removeFile(file);\n });else {\n if (_this.options.dictRemoveFileConfirmation) return $3ed269f2f0fb224b$export$2e2bcd8739ae039.confirm(_this.options.dictRemoveFileConfirmation, function () {\n return _this.removeFile(file);\n });else return _this.removeFile(file);\n }\n };\n\n var _iterator5 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-remove]\")),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var removeLink = _step5.value;\n removeLink.addEventListener(\"click\", removeFileEvent);\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n },\n // Called whenever a file is removed.\n removedfile: function removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) file.previewElement.parentNode.removeChild(file.previewElement);\n return this._updateMaxFilesReachedClass();\n },\n // Called when a thumbnail has been generated\n // Receives `file` and `dataUrl`\n thumbnail: function thumbnail(file, dataUrl) {\n if (file.previewElement) {\n file.previewElement.classList.remove(\"dz-file-preview\");\n\n var _iterator6 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\")),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var thumbnailElement = _step6.value;\n thumbnailElement.alt = file.name;\n thumbnailElement.src = dataUrl;\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n\n return setTimeout(function () {\n return file.previewElement.classList.add(\"dz-image-preview\");\n }, 1);\n }\n },\n // Called whenever an error occurs\n // Receives `file` and `message`\n error: function error(file, message) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n if (typeof message !== \"string\" && message.error) message = message.error;\n\n var _iterator7 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var node = _step7.value;\n node.textContent = message;\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n },\n errormultiple: function errormultiple() {},\n // Called when a file gets processed. Since there is a cue, not all added\n // files are processed immediately.\n // Receives `file`\n processing: function processing(file) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-processing\");\n if (file._removeLink) return file._removeLink.innerHTML = this.options.dictCancelUpload;\n }\n },\n processingmultiple: function processingmultiple() {},\n // Called whenever the upload progress gets updated.\n // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.\n // To get the total number of bytes of the file, use `file.size`\n uploadprogress: function uploadprogress(file, progress, bytesSent) {\n if (file.previewElement) {\n var _iterator8 = _createForOfIteratorHelper(file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\")),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var node = _step8.value;\n node.nodeName === \"PROGRESS\" ? node.value = progress : node.style.width = \"\".concat(progress, \"%\");\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n },\n // Called whenever the total upload progress gets updated.\n // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent\n totaluploadprogress: function totaluploadprogress() {},\n // Called just before the file is sent. Gets the `xhr` object as second\n // parameter, so you can modify it (for example to add a CSRF token) and a\n // `formData` object to add additional information.\n sending: function sending() {},\n sendingmultiple: function sendingmultiple() {},\n // When the complete upload is finished and successful\n // Receives `file`\n success: function success(file) {\n if (file.previewElement) return file.previewElement.classList.add(\"dz-success\");\n },\n successmultiple: function successmultiple() {},\n // When the upload is canceled.\n canceled: function canceled(file) {\n return this.emit(\"error\", file, this.options.dictUploadCanceled);\n },\n canceledmultiple: function canceledmultiple() {},\n // When the upload is finished, either with success or an error.\n // Receives `file`\n complete: function complete(file) {\n if (file._removeLink) file._removeLink.innerHTML = this.options.dictRemoveFile;\n if (file.previewElement) return file.previewElement.classList.add(\"dz-complete\");\n },\n completemultiple: function completemultiple() {},\n maxfilesexceeded: function maxfilesexceeded() {},\n maxfilesreached: function maxfilesreached() {},\n queuecomplete: function queuecomplete() {},\n addedfiles: function addedfiles() {}\n};\nvar $4ca367182776f80b$export$2e2bcd8739ae039 = $4ca367182776f80b$var$defaultOptions;\n\nvar $3ed269f2f0fb224b$export$2e2bcd8739ae039 = /*#__PURE__*/function (_$4040acfd8584338d$ex) {\n _inherits($3ed269f2f0fb224b$export$2e2bcd8739ae039, _$4040acfd8584338d$ex);\n\n var _super = _createSuper($3ed269f2f0fb224b$export$2e2bcd8739ae039);\n\n function $3ed269f2f0fb224b$export$2e2bcd8739ae039(el, options) {\n var _this2;\n\n _classCallCheck(this, $3ed269f2f0fb224b$export$2e2bcd8739ae039);\n\n _this2 = _super.call(this);\n var fallback, left;\n _this2.element = el;\n _this2.clickableElements = [];\n _this2.listeners = [];\n _this2.files = []; // All files\n\n if (typeof _this2.element === \"string\") _this2.element = document.querySelector(_this2.element); // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.\n\n if (!_this2.element || _this2.element.nodeType == null) throw new Error(\"Invalid dropzone element.\");\n if (_this2.element.dropzone) throw new Error(\"Dropzone already attached.\"); // Now add this dropzone to the instances.\n\n $3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.push(_assertThisInitialized(_this2)); // Put the dropzone inside the element itself.\n\n _this2.element.dropzone = _assertThisInitialized(_this2);\n var elementOptions = (left = $3ed269f2f0fb224b$export$2e2bcd8739ae039.optionsForElement(_this2.element)) != null ? left : {};\n _this2.options = $ewBKy$justextend(true, {}, $4ca367182776f80b$export$2e2bcd8739ae039, elementOptions, options != null ? options : {});\n _this2.options.previewTemplate = _this2.options.previewTemplate.replace(/\\n*/g, \"\"); // If the browser failed, just call the fallback and leave\n\n if (_this2.options.forceFallback || !$3ed269f2f0fb224b$export$2e2bcd8739ae039.isBrowserSupported()) return _possibleConstructorReturn(_this2, _this2.options.fallback.call(_assertThisInitialized(_this2))); // @options.url = @element.getAttribute \"action\" unless @options.url?\n\n if (_this2.options.url == null) _this2.options.url = _this2.element.getAttribute(\"action\");\n if (!_this2.options.url) throw new Error(\"No URL provided.\");\n if (_this2.options.acceptedFiles && _this2.options.acceptedMimeTypes) throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n if (_this2.options.uploadMultiple && _this2.options.chunking) throw new Error(\"You cannot set both: uploadMultiple and chunking.\");\n if (_this2.options.binaryBody && _this2.options.uploadMultiple) throw new Error(\"You cannot set both: binaryBody and uploadMultiple.\"); // Backwards compatibility\n\n if (_this2.options.acceptedMimeTypes) {\n _this2.options.acceptedFiles = _this2.options.acceptedMimeTypes;\n delete _this2.options.acceptedMimeTypes;\n } // Backwards compatibility\n\n\n if (_this2.options.renameFilename != null) _this2.options.renameFile = function (file) {\n return _this2.options.renameFilename.call(_assertThisInitialized(_this2), file.name, file);\n };\n if (typeof _this2.options.method === \"string\") _this2.options.method = _this2.options.method.toUpperCase();\n if ((fallback = _this2.getExistingFallback()) && fallback.parentNode) // Remove the fallback\n fallback.parentNode.removeChild(fallback); // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false\n\n if (_this2.options.previewsContainer !== false) {\n if (_this2.options.previewsContainer) _this2.previewsContainer = $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElement(_this2.options.previewsContainer, \"previewsContainer\");else _this2.previewsContainer = _this2.element;\n }\n\n if (_this2.options.clickable) {\n if (_this2.options.clickable === true) _this2.clickableElements = [_this2.element];else _this2.clickableElements = $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElements(_this2.options.clickable, \"clickable\");\n }\n\n _this2.init();\n\n return _this2;\n }\n\n _createClass($3ed269f2f0fb224b$export$2e2bcd8739ae039, [{\n key: \"getAcceptedFiles\",\n value: // Returns all files that have been accepted\n function getAcceptedFiles() {\n return this.files.filter(function (file) {\n return file.accepted;\n }).map(function (file) {\n return file;\n });\n } // Returns all files that have been rejected\n // Not sure when that's going to be useful, but added for completeness.\n\n }, {\n key: \"getRejectedFiles\",\n value: function getRejectedFiles() {\n return this.files.filter(function (file) {\n return !file.accepted;\n }).map(function (file) {\n return file;\n });\n }\n }, {\n key: \"getFilesWithStatus\",\n value: function getFilesWithStatus(status) {\n return this.files.filter(function (file) {\n return file.status === status;\n }).map(function (file) {\n return file;\n });\n } // Returns all files that are in the queue\n\n }, {\n key: \"getQueuedFiles\",\n value: function getQueuedFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED);\n }\n }, {\n key: \"getUploadingFiles\",\n value: function getUploadingFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING);\n }\n }, {\n key: \"getAddedFiles\",\n value: function getAddedFiles() {\n return this.getFilesWithStatus($3ed269f2f0fb224b$export$2e2bcd8739ae039.ADDED);\n } // Files that are either queued or uploading\n\n }, {\n key: \"getActiveFiles\",\n value: function getActiveFiles() {\n return this.files.filter(function (file) {\n return file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.UPLOADING || file.status === $3ed269f2f0fb224b$export$2e2bcd8739ae039.QUEUED;\n }).map(function (file) {\n return file;\n });\n } // The function that gets called when Dropzone is initialized. You\n // can (and should) setup event listeners inside this function.\n\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n\n // In case it isn't set already\n if (this.element.tagName === \"form\") this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) this.element.appendChild($3ed269f2f0fb224b$export$2e2bcd8739ae039.createElement(\"\")));\n\n if (this.clickableElements.length) {\n var setupHiddenFileInput = function setupHiddenFileInput() {\n if (_this3.hiddenFileInput) _this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);\n _this3.hiddenFileInput = document.createElement(\"input\");\n\n _this3.hiddenFileInput.setAttribute(\"type\", \"file\");\n\n if (_this3.options.maxFiles === null || _this3.options.maxFiles > 1) _this3.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n _this3.hiddenFileInput.className = \"dz-hidden-input\";\n if (_this3.options.acceptedFiles !== null) _this3.hiddenFileInput.setAttribute(\"accept\", _this3.options.acceptedFiles);\n if (_this3.options.capture !== null) _this3.hiddenFileInput.setAttribute(\"capture\", _this3.options.capture); // Making sure that no one can \"tab\" into this field.\n\n _this3.hiddenFileInput.setAttribute(\"tabindex\", \"-1\"); // Not setting `display=\"none\"` because some browsers don't accept clicks\n // on elements that aren't displayed.\n\n\n _this3.hiddenFileInput.style.visibility = \"hidden\";\n _this3.hiddenFileInput.style.position = \"absolute\";\n _this3.hiddenFileInput.style.top = \"0\";\n _this3.hiddenFileInput.style.left = \"0\";\n _this3.hiddenFileInput.style.height = \"0\";\n _this3.hiddenFileInput.style.width = \"0\";\n $3ed269f2f0fb224b$export$2e2bcd8739ae039.getElement(_this3.options.hiddenInputContainer, \"hiddenInputContainer\").appendChild(_this3.hiddenFileInput);\n\n _this3.hiddenFileInput.addEventListener(\"change\", function () {\n var files = _this3.hiddenFileInput.files;\n\n if (files.length) {\n var _iterator9 = _createForOfIteratorHelper(files),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var file = _step9.value;\n\n _this3.addFile(file);\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n }\n\n _this3.emit(\"addedfiles\", files);\n\n setupHiddenFileInput();\n });\n };\n\n setupHiddenFileInput();\n }\n\n this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.\n // They're not in @setupEventListeners() because they shouldn't be removed\n // again when the dropzone gets disabled.\n\n var _iterator10 = _createForOfIteratorHelper(this.events),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var eventName = _step10.value;\n this.on(eventName, this.options[eventName]);\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n\n this.on(\"uploadprogress\", function () {\n return _this3.updateTotalUploadProgress();\n });\n this.on(\"removedfile\", function () {\n return _this3.updateTotalUploadProgress();\n });\n this.on(\"canceled\", function (file) {\n return _this3.emit(\"complete\", file);\n }); // Emit a `queuecomplete` event if all files finished uploading.\n\n this.on(\"complete\", function (file) {\n if (_this3.getAddedFiles().length === 0 && _this3.getUploadingFiles().length === 0 && _this3.getQueuedFiles().length === 0) // This needs to be deferred so that `queuecomplete` really triggers after `complete`\n return setTimeout(function () {\n return _this3.emit(\"queuecomplete\");\n }, 0);\n });\n\n var containsFiles = function containsFiles(e) {\n if (e.dataTransfer.types) // Because e.dataTransfer.types is an Object in\n // IE, we need to iterate like this instead of\n // using e.dataTransfer.types.some()\n for (var i = 0; i < e.dataTransfer.types.length; i++) {\n if (e.dataTransfer.types[i] === \"Files\") return true;\n }\n return false;\n };\n\n var noPropagation = function noPropagation(e) {\n // If there are no files, we don't want to stop\n // propagation so we don't interfere with other\n // drag and drop behaviour.\n if (!containsFiles(e)) return;\n e.stopPropagation();\n if (e.preventDefault) return e.preventDefault();else return e.returnValue = false;\n }; // Create the listeners\n\n\n this.listeners = [{\n element: this.element,\n events: {\n dragstart: function dragstart(e) {\n return _this3.emit(\"dragstart\", e);\n },\n dragenter: function dragenter(e) {\n noPropagation(e);\n return _this3.emit(\"dragenter\", e);\n },\n dragover: function dragover(e) {\n // Makes it possible to drag files from chrome's download bar\n // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar\n // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)\n var efct;\n\n try {\n efct = e.dataTransfer.effectAllowed;\n } catch (error) {}\n\n e.dataTransfer.dropEffect = \"move\" === efct || \"linkMove\" === efct ? \"move\" : \"copy\";\n noPropagation(e);\n return _this3.emit(\"dragover\", e);\n },\n dragleave: function dragleave(e) {\n return _this3.emit(\"dragleave\", e);\n },\n drop: function drop(e) {\n noPropagation(e);\n return _this3.drop(e);\n },\n dragend: function dragend(e) {\n return _this3.emit(\"dragend\", e);\n }\n }\n }];\n this.clickableElements.forEach(function (clickableElement) {\n return _this3.listeners.push({\n element: clickableElement,\n events: {\n click: function click(evt) {\n // Only the actual dropzone or the message element should trigger file selection\n if (clickableElement !== _this3.element || evt.target === _this3.element || $3ed269f2f0fb224b$export$2e2bcd8739ae039.elementInside(evt.target, _this3.element.querySelector(\".dz-message\"))) _this3.hiddenFileInput.click(); // Forward the click\n\n return true;\n }\n }\n });\n });\n this.enable();\n return this.options.init.call(this);\n } // Not fully tested yet\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.disable();\n this.removeAllFiles(true);\n\n if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = null;\n }\n\n delete this.element.dropzone;\n return $3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.splice($3ed269f2f0fb224b$export$2e2bcd8739ae039.instances.indexOf(this), 1);\n }\n }, {\n key: \"updateTotalUploadProgress\",\n value: function updateTotalUploadProgress() {\n var totalUploadProgress;\n var totalBytesSent = 0;\n var totalBytes = 0;\n var activeFiles = this.getActiveFiles();\n\n if (activeFiles.length) {\n var _iterator11 = _createForOfIteratorHelper(this.getActiveFiles()),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var file = _step11.value;\n totalBytesSent += file.upload.bytesSent;\n totalBytes += file.upload.total;\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\n } else totalUploadProgress = 100;\n\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n } // @options.paramName can be a function taking one parameter rather than a string.\n // A parameter name for a file is obtained simply by calling this with an index number.\n\n }, {\n key: \"_getParamName\",\n value: function _getParamName(n) {\n if (typeof this.options.paramName === \"function\") return this.options.paramName(n);else return \"\".concat(this.options.paramName).concat(this.options.uploadMultiple ? \"[\".concat(n, \"]\") : \"\");\n } // If @options.renameFile is a function,\n // the function will be used to rename the file.name before appending it to the formData\n\n }, {\n key: \"_renameFile\",\n value: function _renameFile(file) {\n if (typeof this.options.renameFile !== \"function\") return file.name;\n return this.options.renameFile(file);\n } // Returns a form that can be used as fallback if the browser does not support DragnDrop\n //\n // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.\n // This code has to pass in IE7 :(\n\n }, {\n key: \"getFallbackForm\",\n value: function getFallbackForm() {\n var existingFallback, form;\n if (existingFallback = this.getExistingFallback()) return existingFallback;\n var fieldsString = '
';\n if (this.options.dictFallbackText) fieldsString += \"