scratch – Blame information for rev 58

Subversion Repositories:
Rev:
Rev Author Line No. Line
58 office 1  
2 /*
3 *
4 * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
5 *
6 * Copyright (c) 2012, Matias Meno
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27  
28 (function() {
29 var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,
30 __slice = [].slice,
31 __hasProp = {}.hasOwnProperty,
32 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
33  
34 noop = function() {};
35  
36 Emitter = (function() {
37 function Emitter() {}
38  
39 Emitter.prototype.addEventListener = Emitter.prototype.on;
40  
41 Emitter.prototype.on = function(event, fn) {
42 this._callbacks = this._callbacks || {};
43 if (!this._callbacks[event]) {
44 this._callbacks[event] = [];
45 }
46 this._callbacks[event].push(fn);
47 return this;
48 };
49  
50 Emitter.prototype.emit = function() {
51 var args, callback, callbacks, event, _i, _len;
52 event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
53 this._callbacks = this._callbacks || {};
54 callbacks = this._callbacks[event];
55 if (callbacks) {
56 for (_i = 0, _len = callbacks.length; _i < _len; _i++) {
57 callback = callbacks[_i];
58 callback.apply(this, args);
59 }
60 }
61 return this;
62 };
63  
64 Emitter.prototype.removeListener = Emitter.prototype.off;
65  
66 Emitter.prototype.removeAllListeners = Emitter.prototype.off;
67  
68 Emitter.prototype.removeEventListener = Emitter.prototype.off;
69  
70 Emitter.prototype.off = function(event, fn) {
71 var callback, callbacks, i, _i, _len;
72 if (!this._callbacks || arguments.length === 0) {
73 this._callbacks = {};
74 return this;
75 }
76 callbacks = this._callbacks[event];
77 if (!callbacks) {
78 return this;
79 }
80 if (arguments.length === 1) {
81 delete this._callbacks[event];
82 return this;
83 }
84 for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {
85 callback = callbacks[i];
86 if (callback === fn) {
87 callbacks.splice(i, 1);
88 break;
89 }
90 }
91 return this;
92 };
93  
94 return Emitter;
95  
96 })();
97  
98 Dropzone = (function(_super) {
99 var extend, resolveOption;
100  
101 __extends(Dropzone, _super);
102  
103 Dropzone.prototype.Emitter = Emitter;
104  
105  
106 /*
107 This is a list of all available events you can register on a dropzone object.
108  
109 You can register an event handler like this:
110  
111 dropzone.on("dragEnter", function() { });
112 */
113  
114 Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
115  
116 Dropzone.prototype.defaultOptions = {
117 url: null,
118 method: "post",
119 withCredentials: false,
120 parallelUploads: 2,
121 uploadMultiple: false,
122 maxFilesize: 256,
123 paramName: "file",
124 createImageThumbnails: true,
125 maxThumbnailFilesize: 10,
126 thumbnailWidth: 120,
127 thumbnailHeight: 120,
128 filesizeBase: 1000,
129 maxFiles: null,
130 params: {},
131 clickable: true,
132 ignoreHiddenFiles: true,
133 acceptedFiles: null,
134 acceptedMimeTypes: null,
135 autoProcessQueue: true,
136 autoQueue: true,
137 addRemoveLinks: false,
138 previewsContainer: null,
139 hiddenInputContainer: "body",
140 capture: null,
141 renameFilename: null,
142 dictDefaultMessage: "Drop files here to upload",
143 dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
144 dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
145 dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
146 dictInvalidFileType: "You can't upload files of this type.",
147 dictResponseError: "Server responded with {{statusCode}} code.",
148 dictCancelUpload: "Cancel upload",
149 dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
150 dictRemoveFile: "Remove file",
151 dictRemoveFileConfirmation: null,
152 dictMaxFilesExceeded: "You can not upload any more files.",
153 accept: function(file, done) {
154 return done();
155 },
156 init: function() {
157 return noop;
158 },
159 forceFallback: false,
160 fallback: function() {
161 var child, messageElement, span, _i, _len, _ref;
162 this.element.className = "" + this.element.className + " dz-browser-not-supported";
163 _ref = this.element.getElementsByTagName("div");
164 for (_i = 0, _len = _ref.length; _i < _len; _i++) {
165 child = _ref[_i];
166 if (/(^| )dz-message($| )/.test(child.className)) {
167 messageElement = child;
168 child.className = "dz-message";
169 continue;
170 }
171 }
172 if (!messageElement) {
173 messageElement = Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");
174 this.element.appendChild(messageElement);
175 }
176 span = messageElement.getElementsByTagName("span")[0];
177 if (span) {
178 if (span.textContent != null) {
179 span.textContent = this.options.dictFallbackMessage;
180 } else if (span.innerText != null) {
181 span.innerText = this.options.dictFallbackMessage;
182 }
183 }
184 return this.element.appendChild(this.getFallbackForm());
185 },
186 resize: function(file) {
187 var info, srcRatio, trgRatio;
188 info = {
189 srcX: 0,
190 srcY: 0,
191 srcWidth: file.width,
192 srcHeight: file.height
193 };
194 srcRatio = file.width / file.height;
195 info.optWidth = this.options.thumbnailWidth;
196 info.optHeight = this.options.thumbnailHeight;
197 if ((info.optWidth == null) && (info.optHeight == null)) {
198 info.optWidth = info.srcWidth;
199 info.optHeight = info.srcHeight;
200 } else if (info.optWidth == null) {
201 info.optWidth = srcRatio * info.optHeight;
202 } else if (info.optHeight == null) {
203 info.optHeight = (1 / srcRatio) * info.optWidth;
204 }
205 trgRatio = info.optWidth / info.optHeight;
206 if (file.height < info.optHeight || file.width < info.optWidth) {
207 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.trgHeight = info.srcHeight;
208 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.trgWidth = info.srcWidth;
209 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
210 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (srcRatio > trgRatio) {
211 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcHeight = file.height;
212 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcWidth = info.srcHeight * trgRatio;
213 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
214 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcWidth = file.width;
215 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcHeight = info.srcWidth / trgRatio;
216 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
217 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
218 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcX = (file.width - info.srcWidth) / 2;
219 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcY = (file.height - info.srcHeight) / 2;
220 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return info;
221 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
222  
223 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { /*
224 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Those functions register themselves to the events on init and handle all
225 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { the user interface specific stuff. Overwriting them won't break the upload
226 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { but can break the way it's displayed.
227 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { You can overwrite them if you don't like the default behavior. If you just
228 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { want to add an additional event handler, register it on the dropzone object
229 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { and don't overwrite those options.
230 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { */
231 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { drop: function(e) {
232 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");
233 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
234 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragstart: noop,
235 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragend: function(e) {
236 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");
237 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
238 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragenter: function(e) {
239 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.add("dz-drag-hover");
240 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
241 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragover: function(e) {
242 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.add("dz-drag-hover");
243 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
244 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragleave: function(e) {
245 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");
246 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
247 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { paste: noop,
248 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { reset: function() {
249 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-started");
250 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
251 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { addedfile: function(file) {
252 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
253 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element === this.previewsContainer) {
254 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.classList.add("dz-started");
255 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
256 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.previewsContainer) {
257 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
258 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewTemplate = file.previewElement;
259 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer.appendChild(file.previewElement);
260 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-name]");
261 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
262 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];
263 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node.textContent = this._renameFilename(file.name);
264 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
265 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
266 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
267 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref1[_j];
268 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node.innerHTML = this.filesize(file.size);
269 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
270 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.addRemoveLinks) {
271 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");
272 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.appendChild(file._removeLink);
273 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
274 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { removeFileEvent = (function(_this) {
275 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
276 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.preventDefault();
277 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.stopPropagation();
278 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING) {
279 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {
280 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);
281 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { });
282 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
283 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.dictRemoveFileConfirmation) {
284 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {
285 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);
286 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { });
287 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
288 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);
289 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
290 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
291 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
292 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this);
293 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]");
294 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
295 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
296 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { removeLink = _ref2[_k];
297 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(removeLink.addEventListener("click", removeFileEvent));
298 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
299 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
300 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
301 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
302 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { removedfile: function(file) {
303 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var _ref;
304 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
305 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_ref = file.previewElement) != null) {
306 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref.parentNode.removeChild(file.previewElement);
307 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
308 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
309 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this._updateMaxFilesReachedClass();
310 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
311 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnail: function(file, dataUrl) {
312 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var thumbnailElement, _i, _len, _ref;
313 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
314 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.remove("dz-file-preview");
315 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
316 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
317 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement = _ref[_i];
318 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement.alt = file.name;
319 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement.src = dataUrl;
320 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
321 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout(((function(_this) {
322 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {
323 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-image-preview");
324 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
325 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this)), 1);
326 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
327 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
328 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { error: function(file, message) {
329 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, _i, _len, _ref, _results;
330 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
331 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.add("dz-error");
332 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof message !== "String" && message.error) {
333 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { message = message.error;
334 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
335 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
336 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
337 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
338 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];
339 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.textContent = message);
340 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
341 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
342 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
343 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
344 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { errormultiple: noop,
345 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { processing: function(file) {
346 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
347 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.add("dz-processing");
348 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file._removeLink) {
349 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file._removeLink.textContent = this.options.dictCancelUpload;
350 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
351 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
352 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
353 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { processingmultiple: noop,
354 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { uploadprogress: function(file, progress, bytesSent) {
355 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, _i, _len, _ref, _results;
356 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
357 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");
358 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
359 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
360 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];
361 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (node.nodeName === 'PROGRESS') {
362 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.value = progress);
363 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
364 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.style.width = "" + progress + "%");
365 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
366 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
367 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
368 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
369 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
370 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totaluploadprogress: noop,
371 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { sending: noop,
372 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { sendingmultiple: noop,
373 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { success: function(file) {
374 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
375 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-success");
376 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
377 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
378 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { successmultiple: noop,
379 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { canceled: function(file) {
380 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("error", file, "Upload canceled.");
381 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
382 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { canceledmultiple: noop,
383 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { complete: function(file) {
384 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file._removeLink) {
385 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file._removeLink.textContent = this.options.dictRemoveFile;
386 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
387 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {
388 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-complete");
389 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
390 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { },
391 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { completemultiple: noop,
392 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { maxfilesexceeded: noop,
393 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { maxfilesreached: noop,
394 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { queuecomplete: noop,
395 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { addedfiles: noop,
396 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n <div class=\"dz-details\">\n <div class=\"dz-size\"><span data-dz-size></span></div>\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n <div class=\"dz-success-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Check</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </svg>\n </div>\n <div class=\"dz-error-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Error</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>"
397 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
398  
399 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { extend = function() {
400 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var key, object, objects, target, val, _i, _len;
401 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
402 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = objects.length; _i < _len; _i++) {
403 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { object = objects[_i];
404 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (key in object) {
405 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { val = object[key];
406 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { target[key] = val;
407 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
408 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
409 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return target;
410 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
411  
412 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { function Dropzone(element, options) {
413 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var elementOptions, fallback, _ref;
414 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element = element;
415 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.version = Dropzone.version;
416 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
417 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = [];
418 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.listeners = [];
419 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.files = [];
420 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.element === "string") {
421 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element = document.querySelector(this.element);
422 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
423 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!(this.element && (this.element.nodeType != null))) {
424 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Invalid dropzone element.");
425 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
426 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.dropzone) {
427 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Dropzone already attached.");
428 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
429 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.instances.push(this);
430 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.dropzone = this;
431 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
432 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
433 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
434 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.fallback.call(this);
435 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
436 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.url == null) {
437 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.url = this.element.getAttribute("action");
438 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
439 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!this.options.url) {
440 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("No URL provided.");
441 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
442 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {
443 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
444 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
445 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.acceptedMimeTypes) {
446 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.acceptedFiles = this.options.acceptedMimeTypes;
447 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { delete this.options.acceptedMimeTypes;
448 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
449 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.method = this.options.method.toUpperCase();
450 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
451 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { fallback.parentNode.removeChild(fallback);
452 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
453 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.previewsContainer !== false) {
454 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.previewsContainer) {
455 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer");
456 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
457 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer = this.element;
458 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
459 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
460 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.clickable) {
461 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.clickable === true) {
462 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = [this.element];
463 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
464 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable");
465 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
466 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
467 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.init();
468 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
469  
470 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getAcceptedFiles = function() {
471 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;
472 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;
473 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
474 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
475 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];
476 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.accepted) {
477 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);
478 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
479 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
480 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
481 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
482  
483 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getRejectedFiles = function() {
484 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;
485 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;
486 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
487 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
488 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];
489 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!file.accepted) {
490 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);
491 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
492 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
493 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
494 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
495  
496 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getFilesWithStatus = function(status) {
497 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;
498 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;
499 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
500 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
501 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];
502 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === status) {
503 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);
504 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
505 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
506 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
507 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
508  
509 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getQueuedFiles = function() {
510 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.QUEUED);
511 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
512  
513 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getUploadingFiles = function() {
514 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.UPLOADING);
515 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
516  
517 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getAddedFiles = function() {
518 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.ADDED);
519 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
520  
521 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getActiveFiles = function() {
522 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;
523 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;
524 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];
525 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
526 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];
527 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {
528 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);
529 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
530 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
531 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;
532 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
533  
534 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.init = function() {
535 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;
536 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.tagName === "form") {
537 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.setAttribute("enctype", "multipart/form-data");
538 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
539 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
540 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));
541 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
542 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.clickableElements.length) {
543 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { setupHiddenFileInput = (function(_this) {
544 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {
545 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.hiddenFileInput) {
546 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);
547 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
548 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput = document.createElement("input");
549 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("type", "file");
550 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
551 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("multiple", "multiple");
552 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
553 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.className = "dz-hidden-input";
554 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.acceptedFiles != null) {
555 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
556 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
557 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.capture != null) {
558 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("capture", _this.options.capture);
559 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
560 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.visibility = "hidden";
561 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.position = "absolute";
562 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.top = "0";
563 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.left = "0";
564 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.height = "0";
565 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.width = "0";
566 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);
567 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.hiddenFileInput.addEventListener("change", function() {
568 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, files, _i, _len;
569 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { files = _this.hiddenFileInput.files;
570 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (files.length) {
571 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) {
572 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = files[_i];
573 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.addFile(file);
574 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
575 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
576 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.emit("addedfiles", files);
577 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setupHiddenFileInput();
578 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { });
579 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
580 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this);
581 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { setupHiddenFileInput();
582 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
583 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;
584 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = this.events;
585 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
586 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { eventName = _ref1[_i];
587 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on(eventName, this.options[eventName]);
588 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
589 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("uploadprogress", (function(_this) {
590 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {
591 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.updateTotalUploadProgress();
592 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
593 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));
594 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("removedfile", (function(_this) {
595 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {
596 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.updateTotalUploadProgress();
597 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
598 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));
599 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("canceled", (function(_this) {
600 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(file) {
601 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("complete", file);
602 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
603 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));
604 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("complete", (function(_this) {
605 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(file) {
606 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {
607 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout((function() {
608 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("queuecomplete");
609 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }), 0);
610 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
611 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
612 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));
613 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation = function(e) {
614 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.stopPropagation();
615 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (e.preventDefault) {
616 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return e.preventDefault();
617 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
618 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return e.returnValue = false;
619 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
620 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
621 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.listeners = [
622 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { {
623 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { element: this.element,
624 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { events: {
625 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragstart": (function(_this) {
626 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
627 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragstart", e);
628 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
629 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),
630 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragenter": (function(_this) {
631 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
632 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);
633 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragenter", e);
634 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
635 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),
636 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragover": (function(_this) {
637 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
638 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var efct;
639 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { try {
640 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { efct = e.dataTransfer.effectAllowed;
641 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } catch (_error) {}
642 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';
643 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);
644 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragover", e);
645 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
646 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),
647 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragleave": (function(_this) {
648 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
649 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragleave", e);
650 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
651 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),
652 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "drop": (function(_this) {
653 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
654 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);
655 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.drop(e);
656 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
657 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),
658 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragend": (function(_this) {
659 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {
660 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragend", e);
661 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
662 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this)
663 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
664 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
665 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { ];
666 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements.forEach((function(_this) {
667 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(clickableElement) {
668 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.listeners.push({
669 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { element: clickableElement,
670 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { events: {
671 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { "click": function(evt) {
672 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
673 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.click();
674 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
675 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return true;
676 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
677 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
678 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { });
679 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
680 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));
681 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.enable();
682 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.init.call(this);
683 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
684  
685 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.destroy = function() {
686 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var _ref;
687 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.disable();
688 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.removeAllFiles(true);
689 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {
690 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
691 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.hiddenFileInput = null;
692 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
693 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { delete this.element.dropzone;
694 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
695 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
696  
697 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.updateTotalUploadProgress = function() {
698 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;
699 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytesSent = 0;
700 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytes = 0;
701 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { activeFiles = this.getActiveFiles();
702 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (activeFiles.length) {
703 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.getActiveFiles();
704 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
705 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];
706 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytesSent += file.upload.bytesSent;
707 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytes += file.upload.total;
708 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
709 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalUploadProgress = 100 * totalBytesSent / totalBytes;
710 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
711 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalUploadProgress = 100;
712 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
713 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
714 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
715  
716 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._getParamName = function(n) {
717 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.options.paramName === "function") {
718 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.paramName(n);
719 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {
720 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");
721 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
722 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
723  
724 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._renameFilename = function(name) {
725 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.options.renameFilename !== "function") {
726 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return name;
727 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
728 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.renameFilename(name);
729 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { };
730  
731 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getFallbackForm = function() {
732 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { var existingFallback, fields, fieldsString, form;
733 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (existingFallback = this.getExistingFallback()) {
734 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { return existingFallback;
735 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { }
736 < info.optHeight || file.width < info.optWidth) {< info.optWidth) { fieldsString = "
";
737 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {
if (this.options.dictFallbackText) {
738 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {
fieldsString += "

" + this.options.dictFallbackText + "p>";

739 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

740 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

fieldsString += "<input type=\"file\" name=\"" + (this._getParamName(0)) + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><input type=\"submit\" value=\"Upload!\"></div>";

741 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

fields = Dropzone.createElement(fieldsString);

742 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.element.tagName !== "FORM") {

743 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");

744 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

form.appendChild(fields);

745 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

746 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.element.setAttribute("enctype", "multipart/form-data");

747 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.element.setAttribute("method", this.options.method);

748 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

749 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return form != null ? form : fields;

750 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

751  
752 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.getExistingFallback = function() {

753 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var fallback, getFallback, tagName, _i, _len, _ref;

754 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

getFallback = function(elements) {

755 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var el, _i, _len;

756 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = elements.length; _i < _len; _i++) {

757 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

el = elements[_i];

758 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (/(^| )fallback($| )/.test(el.className)) {

759 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return el;

760 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

761 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

762 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

763 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = ["div", "form"];

764 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

765 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

tagName = _ref[_i];

766 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {

767 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return fallback;

768 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

769 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

770 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

771  
772 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.setupEventListeners = function() {

773 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var elementListeners, event, listener, _i, _len, _ref, _results;

774 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = this.listeners;

775 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

776 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

777 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elementListeners = _ref[_i];

778 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push((function() {

779 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var _ref1, _results1;

780 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref1 = elementListeners.events;

781 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results1 = [];

782 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (event in _ref1) {

783 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

listener = _ref1[event];

784 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results1.push(elementListeners.element.addEventListener(event, listener, false));

785 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

786 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results1;

787 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})());

788 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

789 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

790 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

791  
792 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.removeEventListeners = function() {

793 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var elementListeners, event, listener, _i, _len, _ref, _results;

794 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = this.listeners;

795 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

796 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

797 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elementListeners = _ref[_i];

798 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push((function() {

799 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var _ref1, _results1;

800 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref1 = elementListeners.events;

801 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results1 = [];

802 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (event in _ref1) {

803 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

listener = _ref1[event];

804 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results1.push(elementListeners.element.removeEventListener(event, listener, false));

805 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

806 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results1;

807 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})());

808 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

809 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

810 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

811  
812 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.disable = function() {

813 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len, _ref, _results;

814 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.clickableElements.forEach(function(element) {

815 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return element.classList.remove("dz-clickable");

816 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

});

817 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.removeEventListeners();

818 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = this.files;

819 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

820 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

821 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = _ref[_i];

822 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(this.cancelUpload(file));

823 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

824 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

825 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

826  
827 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.enable = function() {

828 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.clickableElements.forEach(function(element) {

829 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return element.classList.add("dz-clickable");

830 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

});

831 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.setupEventListeners();

832 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

833  
834 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.filesize = function(size) {

835 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;

836 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

selectedSize = 0;

837 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

selectedUnit = "b";

838 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (size > 0) {

839 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

units = ['TB', 'GB', 'MB', 'KB', 'b'];

840 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {

841 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

unit = units[i];

842 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;

843 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (size >= cutoff) {

844 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);

845 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

selectedUnit = unit;

846 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

break;

847 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

848 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

849 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

selectedSize = Math.round(10 * selectedSize) / 10;

850 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

851 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return "" + selectedSize + "strong> " + selectedUnit;

852 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

853  
854 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._updateMaxFilesReachedClass = function() {

855 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {

856 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.getAcceptedFiles().length === this.options.maxFiles) {

857 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit('maxfilesreached', this.files);

858 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

859 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.element.classList.add("dz-max-files-reached");

860 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

861 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.element.classList.remove("dz-max-files-reached");

862 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

863 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

864  
865 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.drop = function(e) {

866 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var files, items;

867 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!e.dataTransfer) {

868 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

869 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

870 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("drop", e);

871 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

files = e.dataTransfer.files;

872 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("addedfiles", files);

873 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (files.length) {

874 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

items = e.dataTransfer.items;

875 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (items && items.length && (items[0].webkitGetAsEntry != null)) {

876 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this._addFilesFromItems(items);

877 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

878 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.handleFiles(files);

879 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

880 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

881 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

882  
883 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.paste = function(e) {

884 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var items, _ref;

885 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {

886 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

887 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

888 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("paste", e);

889 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

items = e.clipboardData.items;

890 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (items.length) {

891 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this._addFilesFromItems(items);

892 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

893 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

894  
895 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.handleFiles = function(files) {

896 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len, _results;

897 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

898 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

899 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

900 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(this.addFile(file));

901 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

902 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

903 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

904  
905 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._addFilesFromItems = function(items) {

906 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var entry, item, _i, _len, _results;

907 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

908 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = items.length; _i < _len; _i++) {

909 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

item = items[_i];

910 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {

911 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (entry.isFile) {

912 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(this.addFile(item.getAsFile()));

913 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (entry.isDirectory) {

914 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(this._addFilesFromDirectory(entry, entry.name));

915 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

916 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(void 0);

917 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

918 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (item.getAsFile != null) {

919 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if ((item.kind == null) || item.kind === "file") {

920 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(this.addFile(item.getAsFile()));

921 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

922 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(void 0);

923 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

924 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

925 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(void 0);

926 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

927 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

928 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

929 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

930  
931 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._addFilesFromDirectory = function(directory, path) {

932 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var dirReader, errorHandler, readEntries;

933 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

dirReader = directory.createReader();

934 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

errorHandler = function(error) {

935 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0;

936 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

937 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

readEntries = (function(_this) {

938 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

939 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return dirReader.readEntries(function(entries) {

940 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var entry, _i, _len;

941 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (entries.length > 0) {

942 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = entries.length; _i < _len; _i++) {

943 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

entry = entries[_i];

944 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (entry.isFile) {

945 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

entry.file(function(file) {

946 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {

947 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

948 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

949 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.fullPath = "" + path + "/" + file.name;

950 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this.addFile(file);

951 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

});

952 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (entry.isDirectory) {

953 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this._addFilesFromDirectory(entry, "" + path + "/" + entry.name);

954 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

955 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

956 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

readEntries();

957 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

958 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return null;

959 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}, errorHandler);

960 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

961 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

962 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return readEntries();

963 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

964  
965 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.accept = function(file, done) {

966 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.size > this.options.maxFilesize * 1024 * 1024) {

967 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));

968 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {

969 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return done(this.options.dictInvalidFileType);

970 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {

971 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));

972 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.emit("maxfilesexceeded", file);

973 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

974 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.options.accept.call(this, file, done);

975 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

976 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

977  
978 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.addFile = function(file) {

979 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.upload = {

980 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progress: 0,

981 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

total: file.size,

982 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

bytesSent: 0

983 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

984 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.files.push(file);

985 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.ADDED;

986 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("addedfile", file);

987 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this._enqueueThumbnail(file);

988 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.accept(file, (function(_this) {

989 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function(error) {

990 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (error) {

991 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.accepted = false;

992 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this._errorProcessing([file], error);

993 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

994 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.accepted = true;

995 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (_this.options.autoQueue) {

996 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this.enqueueFile(file);

997 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

998 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

999 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this._updateMaxFilesReachedClass();

1000 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1001 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this));

1002 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1003  
1004 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.enqueueFiles = function(files) {

1005 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len;

1006 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

1007 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

1008 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.enqueueFile(file);

1009 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1010 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return null;

1011 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1012  
1013 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.enqueueFile = function(file) {

1014 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.status === Dropzone.ADDED && file.accepted === true) {

1015 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.QUEUED;

1016 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.autoProcessQueue) {

1017 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return setTimeout(((function(_this) {

1018 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1019 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this.processQueue();

1020 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1021 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this)), 0);

1022 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1023 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1024 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

throw new Error("This file can't be queued because it has already been processed or was rejected.");

1025 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1026 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1027  
1028 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._thumbnailQueue = [];

1029  
1030 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._processingThumbnail = false;

1031  
1032 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._enqueueThumbnail = function(file) {

1033 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {

1034 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this._thumbnailQueue.push(file);

1035 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return setTimeout(((function(_this) {

1036 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1037 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this._processThumbnailQueue();

1038 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1039 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this)), 0);

1040 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1041 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1042  
1043 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._processThumbnailQueue = function() {

1044 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this._processingThumbnail || this._thumbnailQueue.length === 0) {

1045 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1046 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1047 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this._processingThumbnail = true;

1048 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {

1049 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1050 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this._processingThumbnail = false;

1051 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this._processThumbnailQueue();

1052 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1053 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this));

1054 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1055  
1056 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.removeFile = function(file) {

1057 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.status === Dropzone.UPLOADING) {

1058 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.cancelUpload(file);

1059 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1060 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.files = without(this.files, file);

1061 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("removedfile", file);

1062 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.files.length === 0) {

1063 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.emit("reset");

1064 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1065 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1066  
1067 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {

1068 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len, _ref;

1069 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (cancelIfNecessary == null) {

1070 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

cancelIfNecessary = false;

1071 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1072 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = this.files.slice();

1073 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

1074 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = _ref[_i];

1075 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {

1076 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.removeFile(file);

1077 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1078 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1079 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return null;

1080 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1081  
1082 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.createThumbnail = function(file, callback) {

1083 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var fileReader;

1084 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

fileReader = new FileReader;

1085 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

fileReader.onload = (function(_this) {

1086 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1087 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.type === "image/svg+xml") {

1088 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this.emit("thumbnail", file, fileReader.result);

1089 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (callback != null) {

1090 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

callback();

1091 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1092 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1093 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1094 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this.createThumbnailFromUrl(file, fileReader.result, callback);

1095 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1096 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1097 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return fileReader.readAsDataURL(file);

1098 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1099  
1100 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) {

1101 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var img;

1102 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

img = document.createElement("img");

1103 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (crossOrigin) {

1104 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

img.crossOrigin = crossOrigin;

1105 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1106 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

img.onload = (function(_this) {

1107 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1108 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;

1109 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.width = img.width;

1110 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.height = img.height;

1111 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

resizeInfo = _this.options.resize.call(_this, file);

1112 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (resizeInfo.trgWidth == null) {

1113 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

resizeInfo.trgWidth = resizeInfo.optWidth;

1114 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1115 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (resizeInfo.trgHeight == null) {

1116 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

resizeInfo.trgHeight = resizeInfo.optHeight;

1117 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1118 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas = document.createElement("canvas");

1119 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ctx = canvas.getContext("2d");

1120 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas.width = resizeInfo.trgWidth;

1121 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas.height = resizeInfo.trgHeight;

1122 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);

1123 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

thumbnail = canvas.toDataURL("image/png");

1124 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_this.emit("thumbnail", file, thumbnail);

1125 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (callback != null) {

1126 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return callback();

1127 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1128 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1129 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1130 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (callback != null) {

1131 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

img.onerror = callback;

1132 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1133 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return img.src = imageUrl;

1134 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1135  
1136 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.processQueue = function() {

1137 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var i, parallelUploads, processingLength, queuedFiles;

1138 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

parallelUploads = this.options.parallelUploads;

1139 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

processingLength = this.getUploadingFiles().length;

1140 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

i = processingLength;

1141 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (processingLength >= parallelUploads) {

1142 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1143 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1144 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

queuedFiles = this.getQueuedFiles();

1145 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!(queuedFiles.length > 0)) {

1146 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1147 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1148 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1149 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));

1150 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1151 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

while (i < parallelUploads) {

1152 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!queuedFiles.length) {

1153 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1154 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1155 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.processFile(queuedFiles.shift());

1156 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

i++;

1157 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1158 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1159 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1160  
1161 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.processFile = function(file) {

1162 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.processFiles([file]);

1163 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1164  
1165 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.processFiles = function(files) {

1166 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len;

1167 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

1168 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

1169 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.processing = true;

1170 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.UPLOADING;

1171 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("processing", file);

1172 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1173 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1174 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("processingmultiple", files);

1175 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1176 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.uploadFiles(files);

1177 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1178  
1179 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._getFilesWithXhr = function(xhr) {

1180 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, files;

1181 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return files = (function() {

1182 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var _i, _len, _ref, _results;

1183 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = this.files;

1184 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1185 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

1186 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = _ref[_i];

1187 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.xhr === xhr) {

1188 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(file);

1189 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1190 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1191 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1192 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}).call(this);

1193 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1194  
1195 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.cancelUpload = function(file) {

1196 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;

1197 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.status === Dropzone.UPLOADING) {

1198 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

groupedFiles = this._getFilesWithXhr(file.xhr);

1199 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {

1200 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

groupedFile = groupedFiles[_i];

1201 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

groupedFile.status = Dropzone.CANCELED;

1202 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1203 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.xhr.abort();

1204 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {

1205 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

groupedFile = groupedFiles[_j];

1206 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("canceled", groupedFile);

1207 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1208 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1209 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("canceledmultiple", groupedFiles);

1210 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1211 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {

1212 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.CANCELED;

1213 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("canceled", file);

1214 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1215 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("canceledmultiple", [file]);

1216 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1217 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1218 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.autoProcessQueue) {

1219 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.processQueue();

1220 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1221 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1222  
1223 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

resolveOption = function() {

1224 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var args, option;

1225 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];

1226 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (typeof option === 'function') {

1227 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return option.apply(this, args);

1228 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1229 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return option;

1230 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1231  
1232 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.uploadFile = function(file) {

1233 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.uploadFiles([file]);

1234 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1235  
1236 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.uploadFiles = function(files) {

1237 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;

1238 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr = new XMLHttpRequest();

1239 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

1240 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

1241 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.xhr = xhr;

1242 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1243 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

method = resolveOption(this.options.method, files);

1244 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

url = resolveOption(this.options.url, files);

1245 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr.open(method, url, true);

1246 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr.withCredentials = !!this.options.withCredentials;

1247 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

response = null;

1248 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

handleError = (function(_this) {

1249 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1250 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var _j, _len1, _results;

1251 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1252 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_j = 0, _len1 = files.length; _j < _len1; _j++) {

1253 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_j];

1254 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr));

1255 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1256 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1257 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1258 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1259 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

updateProgress = (function(_this) {

1260 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function(e) {

1261 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;

1262 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (e != null) {

1263 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progress = 100 * e.loaded / e.total;

1264 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_j = 0, _len1 = files.length; _j < _len1; _j++) {

1265 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_j];

1266 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.upload = {

1267 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progress: progress,

1268 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

total: e.total,

1269 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

bytesSent: e.loaded

1270 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1271 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1272 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1273 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

allFilesFinished = true;

1274 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progress = 100;

1275 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_k = 0, _len2 = files.length; _k < _len2; _k++) {

1276 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_k];

1277 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {

1278 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

allFilesFinished = false;

1279 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1280 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.upload.progress = progress;

1281 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.upload.bytesSent = file.upload.total;

1282 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1283 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (allFilesFinished) {

1284 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1285 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1286 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1287 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1288 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_l = 0, _len3 = files.length; _l < _len3; _l++) {

1289 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_l];

1290 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent));

1291 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1292 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1293 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1294 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1295 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr.onload = (function(_this) {

1296 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function(e) {

1297 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var _ref;

1298 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (files[0].status === Dropzone.CANCELED) {

1299 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1300 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1301 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (xhr.readyState !== 4) {

1302 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1303 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1304 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

response = xhr.responseText;

1305 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {

1306 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

try {

1307 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

response = JSON.parse(response);

1308 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} catch (_error) {

1309 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

e = _error;

1310 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

response = "Invalid JSON response from server.";

1311 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1312 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1313 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

updateProgress();

1314 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!((200 <= (_ref = xhr.status) && _ref < 300))) {

1315 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return handleError();

1316 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1317 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _this._finished(files, response, e);

1318 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1319 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1320 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1321 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr.onerror = (function(_this) {

1322 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return function() {

1323 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (files[0].status === Dropzone.CANCELED) {

1324 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1325 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1326 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return handleError();

1327 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1328 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(this);

1329 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progressObj = (_ref = xhr.upload) != null ? _ref : xhr;

1330 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

progressObj.onprogress = updateProgress;

1331 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

headers = {

1332 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

"Accept": "application/json",

1333 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

"Cache-Control": "no-cache",

1334 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

"X-Requested-With": "XMLHttpRequest"

1335 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1336 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.headers) {

1337 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

extend(headers, this.options.headers);

1338 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1339 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (headerName in headers) {

1340 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

headerValue = headers[headerName];

1341 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (headerValue) {

1342 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

xhr.setRequestHeader(headerName, headerValue);

1343 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1344 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1345 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

formData = new FormData();

1346 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.params) {

1347 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref1 = this.options.params;

1348 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (key in _ref1) {

1349 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

value = _ref1[key];

1350 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

formData.append(key, value);

1351 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1352 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1353 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_j = 0, _len1 = files.length; _j < _len1; _j++) {

1354 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_j];

1355 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("sending", file, xhr, formData);

1356 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1357 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1358 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("sendingmultiple", files, xhr, formData);

1359 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1360 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.element.tagName === "FORM") {

1361 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref2 = this.element.querySelectorAll("input, textarea, select, button");

1362 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {

1363 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

input = _ref2[_k];

1364 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

inputName = input.getAttribute("name");

1365 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

inputType = input.getAttribute("type");

1366 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {

1367 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref3 = input.options;

1368 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {

1369 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

option = _ref3[_l];

1370 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (option.selected) {

1371 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

formData.append(inputName, option.value);

1372 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1373 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1374 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) {

1375 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

formData.append(inputName, input.value);

1376 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1377 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1378 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1379 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {

1380 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name));

1381 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1382 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.submitRequest(xhr, formData, files);

1383 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1384  
1385 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype.submitRequest = function(xhr, formData, files) {

1386 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return xhr.send(formData);

1387 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1388  
1389 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._finished = function(files, responseText, e) {

1390 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len;

1391 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

1392 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

1393 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.SUCCESS;

1394 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("success", file, responseText, e);

1395 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("complete", file);

1396 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1397 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1398 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("successmultiple", files, responseText, e);

1399 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("completemultiple", files);

1400 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1401 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.autoProcessQueue) {

1402 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.processQueue();

1403 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1404 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1405  
1406 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.prototype._errorProcessing = function(files, message, xhr) {

1407 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var file, _i, _len;

1408 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = files.length; _i < _len; _i++) {

1409 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file = files[_i];

1410 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

file.status = Dropzone.ERROR;

1411 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("error", file, message, xhr);

1412 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("complete", file);

1413 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1414 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.uploadMultiple) {

1415 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("errormultiple", files, message, xhr);

1416 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

this.emit("completemultiple", files);

1417 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1418 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (this.options.autoProcessQueue) {

1419 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.processQueue();

1420 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1421 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1422  
1423 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return Dropzone;

1424  
1425 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

})(Emitter);

1426  
1427 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.version = "4.3.0";

1428  
1429 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.options = {};

1430  
1431 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.optionsForElement = function(element) {

1432 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (element.getAttribute("id")) {

1433 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return Dropzone.options[camelize(element.getAttribute("id"))];

1434 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1435 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return void 0;

1436 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1437 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1438  
1439 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.instances = [];

1440  
1441 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.forElement = function(element) {

1442 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (typeof element === "string") {

1443 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

element = document.querySelector(element);

1444 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1445 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if ((element != null ? element.dropzone : void 0) == null) {

1446 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");

1447 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1448 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return element.dropzone;

1449 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1450  
1451 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.autoDiscover = true;

1452  
1453 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.discover = function() {

1454 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var checkElements, dropzone, dropzones, _i, _len, _results;

1455 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (document.querySelectorAll) {

1456 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

dropzones = document.querySelectorAll(".dropzone");

1457 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1458 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

dropzones = [];

1459 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

checkElements = function(elements) {

1460 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var el, _i, _len, _results;

1461 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1462 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = elements.length; _i < _len; _i++) {

1463 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

el = elements[_i];

1464 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (/(^| )dropzone($| )/.test(el.className)) {

1465 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(dropzones.push(el));

1466 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1467 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(void 0);

1468 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1469 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1470 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1471 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1472 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

checkElements(document.getElementsByTagName("div"));

1473 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

checkElements(document.getElementsByTagName("form"));

1474 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1475 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1476 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = dropzones.length; _i < _len; _i++) {

1477 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

dropzone = dropzones[_i];

1478 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (Dropzone.optionsForElement(dropzone) !== false) {

1479 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(new Dropzone(dropzone));

1480 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1481 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(void 0);

1482 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1483 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1484 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1485 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1486  
1487 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];

1488  
1489 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.isBrowserSupported = function() {

1490 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var capableBrowser, regex, _i, _len, _ref;

1491 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

capableBrowser = true;

1492 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {

1493 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!("classList" in document.createElement("a"))) {

1494 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

capableBrowser = false;

1495 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1496 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = Dropzone.blacklistedBrowsers;

1497 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = _ref.length; _i < _len; _i++) {

1498 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

regex = _ref[_i];

1499 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (regex.test(navigator.userAgent)) {

1500 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

capableBrowser = false;

1501 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

continue;

1502 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1503 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1504 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1505 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1506 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

capableBrowser = false;

1507 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1508 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return capableBrowser;

1509 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1510  
1511 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

without = function(list, rejectedItem) {

1512 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var item, _i, _len, _results;

1513 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results = [];

1514 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = list.length; _i < _len; _i++) {

1515 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

item = list[_i];

1516 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (item !== rejectedItem) {

1517 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_results.push(item);

1518 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1519 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1520 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return _results;

1521 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1522  
1523 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

camelize = function(str) {

1524 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return str.replace(/[\-_](\w)/g, function(match) {

1525 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return match.charAt(1).toUpperCase();

1526 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

});

1527 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1528  
1529 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.createElement = function(string) {

1530 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var div;

1531 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

div = document.createElement("div");

1532 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

div.innerHTML = string;

1533 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return div.childNodes[0];

1534 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1535  
1536 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.elementInside = function(element, container) {

1537 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (element === container) {

1538 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1539 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1540 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

while (element = element.parentNode) {

1541 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (element === container) {

1542 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1543 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1544 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1545 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return false;

1546 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1547  
1548 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.getElement = function(el, name) {

1549 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var element;

1550 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (typeof el === "string") {

1551 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

element = document.querySelector(el);

1552 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (el.nodeType != null) {

1553 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

element = el;

1554 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1555 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (element == null) {

1556 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element.");

1557 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1558 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return element;

1559 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1560  
1561 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.getElements = function(els, name) {

1562 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var e, el, elements, _i, _j, _len, _len1, _ref;

1563 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (els instanceof Array) {

1564 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements = [];

1565 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

try {

1566 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = els.length; _i < _len; _i++) {

1567 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

el = els[_i];

1568 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements.push(this.getElement(el, name));

1569 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1570 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} catch (_error) {

1571 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

e = _error;

1572 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements = null;

1573 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1574 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (typeof els === "string") {

1575 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements = [];

1576 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

_ref = document.querySelectorAll(els);

1577 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {

1578 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

el = _ref[_j];

1579 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements.push(el);

1580 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1581 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (els.nodeType != null) {

1582 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

elements = [els];

1583 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1584 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!((elements != null) && elements.length)) {

1585 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");

1586 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1587 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return elements;

1588 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1589  
1590 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.confirm = function(question, accepted, rejected) {

1591 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (window.confirm(question)) {

1592 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return accepted();

1593 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (rejected != null) {

1594 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return rejected();

1595 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1596 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1597  
1598 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.isValidFile = function(file, acceptedFiles) {

1599 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var baseMimeType, mimeType, validType, _i, _len;

1600 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!acceptedFiles) {

1601 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1602 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1603 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

acceptedFiles = acceptedFiles.split(",");

1604 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

mimeType = file.type;

1605 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

baseMimeType = mimeType.replace(/\/.*$/, "");

1606 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {

1607 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

validType = acceptedFiles[_i];

1608 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

validType = validType.trim();

1609 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (validType.charAt(0) === ".") {

1610 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {

1611 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1612 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1613 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else if (/\/\*$/.test(validType)) {

1614 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (baseMimeType === validType.replace(/\/.*$/, "")) {

1615 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1616 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1617 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1618 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (mimeType === validType) {

1619 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return true;

1620 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1621 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1622 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1623 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return false;

1624 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1625  
1626 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (typeof jQuery !== "undefined" && jQuery !== null) {

1627 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

jQuery.fn.dropzone = function(options) {

1628 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return this.each(function() {

1629 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return new Dropzone(this, options);

1630 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

});

1631 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1632 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1633  
1634 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (typeof module !== "undefined" && module !== null) {

1635 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

module.exports = Dropzone;

1636 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1637 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

window.Dropzone = Dropzone;

1638 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1639  
1640 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.ADDED = "added";

1641  
1642 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.QUEUED = "queued";

1643  
1644 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.ACCEPTED = Dropzone.QUEUED;

1645  
1646 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.UPLOADING = "uploading";

1647  
1648 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.PROCESSING = Dropzone.UPLOADING;

1649  
1650 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.CANCELED = "canceled";

1651  
1652 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.ERROR = "error";

1653  
1654 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone.SUCCESS = "success";

1655  
1656  
1657 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

/*

1658  
1659 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Bugfix for iOS 6 and 7

1660 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios

1661 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

based on the work of https://github.com/stomita/ios-imagefile-megapixel

1662 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

*/

1663  
1664 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

detectVerticalSquash = function(img) {

1665 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;

1666 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

iw = img.naturalWidth;

1667 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ih = img.naturalHeight;

1668 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas = document.createElement("canvas");

1669 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas.width = 1;

1670 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

canvas.height = ih;

1671 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ctx = canvas.getContext("2d");

1672 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ctx.drawImage(img, 0, 0);

1673 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

data = ctx.getImageData(0, 0, 1, ih).data;

1674 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

sy = 0;

1675 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ey = ih;

1676 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

py = ih;

1677 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

while (py > sy) {

1678 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

alpha = data[(py - 1) * 4 + 3];

1679 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (alpha === 0) {

1680 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ey = py;

1681 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1682 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

sy = py;

1683 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1684 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

py = (ey + sy) >> 1;

1685 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1686 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

ratio = py / ih;

1687 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (ratio === 0) {

1688 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return 1;

1689 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} else {

1690 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return ratio;

1691 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1692 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1693  
1694 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {

1695 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var vertSquashRatio;

1696 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

vertSquashRatio = detectVerticalSquash(img);

1697 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);

1698 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1699  
1700  
1701 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

/*

1702 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* contentloaded.js

1703 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

*

1704 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* Author: Diego Perini (diego.perini at gmail.com)

1705 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* Summary: cross-browser wrapper for DOMContentLoaded

1706 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* Updated: 20101020

1707 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* License: MIT

1708 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* Version: 1.2

1709 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

*

1710 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* URL:

1711 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* http://javascript.nwbox.com/ContentLoaded/

1712 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

* http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE

1713 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

*/

1714  
1715 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

contentLoaded = function(win, fn) {

1716 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var add, doc, done, init, poll, pre, rem, root, top;

1717 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

done = false;

1718 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

top = true;

1719 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

doc = win.document;

1720 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

root = doc.documentElement;

1721 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

add = (doc.addEventListener ? "addEventListener" : "attachEvent");

1722 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

rem = (doc.addEventListener ? "removeEventListener" : "detachEvent");

1723 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

pre = (doc.addEventListener ? "" : "on");

1724 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

init = function(e) {

1725 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (e.type === "readystatechange" && doc.readyState !== "complete") {

1726 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1727 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1728 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

(e.type === "load" ? win : doc)[rem](pre + e.type, init, false);

1729 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (!done && (done = true)) {

1730 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return fn.call(win, e.type || e);

1731 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1732 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1733 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

poll = function() {

1734 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

var e;

1735 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

try {

1736 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

root.doScroll("left");

1737 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} catch (_error) {

1738 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

e = _error;

1739 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

setTimeout(poll, 50);

1740 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return;

1741 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1742 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return init("poll");

1743 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1744 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (doc.readyState !== "complete") {

1745 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (doc.createEventObject && root.doScroll) {

1746 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

try {

1747 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

top = !win.frameElement;

1748 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

} catch (_error) {}

1749 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (top) {

1750 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

poll();

1751 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1752 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1753 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

doc[add](pre + "DOMContentLoaded", init, false);

1754 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

doc[add](pre + "readystatechange", init, false);

1755 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return win[add](pre + "load", init, false);

1756 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1757 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1758  
1759 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

Dropzone._autoDiscoverFunction = function() {

1760 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

if (Dropzone.autoDiscover) {

1761 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

return Dropzone.discover();

1762 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}

1763 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

};

1764  
1765 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

contentLoaded(window, Dropzone._autoDiscoverFunction);

1766  
1767 < info.optHeight || file.width < info.optWidth) {< info.optWidth) {

}).call(this);