├── EDropzone.php
├── README.md
├── assets
├── css
│ └── dropzone.css
├── images
│ └── spritemap.png
├── js
│ └── dropzone.js
└── versions
│ └── 4.0.1
│ ├── .gitignore
│ ├── .tagconfig
│ ├── .travis.yml
│ ├── AMD_footer
│ ├── AMD_header
│ ├── CONTRIBUTING.md
│ ├── Gruntfile.coffee
│ ├── LICENSE
│ ├── README.md
│ ├── bower.json
│ ├── component.json
│ ├── composer.json
│ ├── dist
│ ├── basic.css
│ ├── dropzone-amd-module.js
│ ├── dropzone.css
│ ├── dropzone.js
│ ├── min
│ │ ├── basic.min.css
│ │ ├── dropzone-amd-module.min.js
│ │ ├── dropzone.min.css
│ │ └── dropzone.min.js
│ └── readme.md
│ ├── index.js
│ ├── package.json
│ ├── src
│ ├── basic.scss
│ ├── dropzone.coffee
│ └── dropzone.scss
│ ├── test.sh
│ └── test
│ ├── test.coffee
│ ├── test.html
│ └── test.js
└── messages
├── es
└── dropzone.php
└── ru
└── dropzone.php
/EDropzone.php:
--------------------------------------------------------------------------------
1 | url)
78 | $this->url = Yii::app()->createUrl('site/upload');
79 |
80 | if (!$this->name && $this->model instanceof CModel && $this->attribute)
81 | $this->name = CHtml::activeName($this->model, $this->attribute);
82 |
83 | if ( empty($this->htmlOptions['id']) ) {
84 | $this->htmlOptions['id'] = $this->id;
85 | } else {
86 | $this->id = $this->htmlOptions['id'];
87 | }
88 |
89 | if ( $this->enableTranslate ) {
90 | $this->initTranslate();
91 | }
92 | }
93 |
94 | /**
95 | * Create a div and the appropriate Javascript to make the div into the file upload area
96 | */
97 | public function run() {
98 | $this->registerAssets();
99 | $this->jsOptions();
100 | $this->renderHtml();
101 | }
102 |
103 | /**
104 | * I prefer to render HTML from view file. But if you override Widget you must to override all view's.
105 | * review: you need to add style manually into your project css:
106 | * .dz-browser-not-supported .fallback {display:none !important}
107 | */
108 | protected function renderHtml() {
109 | $htmlOptions = CMap::mergeArray(array('class' => 'dropzone', 'enctype'=> 'multipart/form-data'), $this->htmlOptions);
110 | echo CHtml::beginForm($this->url, 'post', $htmlOptions);
111 | echo '
112 |
113 |
114 |
115 | ';
116 | echo CHtml::endForm();
117 | }
118 |
119 | protected function registerAssets() {
120 | if ( $this->assetsVersion == self::VER_3_10_2 ) {
121 | $basePath = dirname(__FILE__) . '/assets/';
122 | $js = '/js/dropzone.js';
123 | $css = '/css/dropzone.css';
124 | } else {
125 | $min = '';
126 | $basePath = dirname(__FILE__) . "/assets/versions/{$this->assetsVersion}/dist/";
127 | if ( YII_DEBUG ) {
128 | $basePath .= 'min/';
129 | $min = '.min';
130 | }
131 | $js = "/dropzone$min.js";
132 | $css = "/dropzone$min.css";
133 | }
134 |
135 | $baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1, YII_DEBUG);
136 | Yii::app()->getClientScript()
137 | ->registerScriptFile($baseUrl . $js, CClientScript::POS_BEGIN)
138 | ->registerCssFile($baseUrl . $css);
139 |
140 | if($this->customStyle)
141 | Yii::app()->getClientScript()->registerCssFile($this->customStyle);
142 | }
143 |
144 | protected function jsOptions() {
145 | $onEvents = '';
146 | foreach($this->events as $event => $func){
147 | $onEvents .= "this.on('$event', function(param, param2, param3){ $func });";
148 | }
149 |
150 | $options = CMap::mergeArray(array(
151 | 'url' => $this->url,
152 | 'parallelUploads' => 5,
153 | 'paramName' => $this->name,
154 | //'accept' => "js:function(file, done){if({$this->mimeTypes}.indexOf(file.type) == -1 ){done('File type not allowed.');}else{done();}}", //review There are many fixes in v 4.0.1. And 'acceptedFiles' + translation now work properly. So this code is deprecated i think
155 | 'acceptedFiles' => join(',', $this->mimeTypes),
156 | 'init' => "js:function(){ $onEvents }"
157 | ), $this->options);
158 |
159 | $options = CJavaScript::encode($options);
160 | $script = "Dropzone.options.{$this->id} = $options";
161 | Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $this->getId(), $script, CClientScript::POS_BEGIN);
162 | }
163 |
164 | protected function initTranslate() {
165 | $dict = array(
166 | 'dictDefaultMessage'=>Yii::t('EDropzone.dropzone','Drop files here to upload (or click)'),
167 | 'dictFallbackMessage'=>Yii::t('EDropzone.dropzone',"Your browser does not support drag'n'drop file uploads."),
168 | 'dictFallbackText'=>Yii::t('EDropzone.dropzone','Please use the fallback form below to upload your files like in the olden days.'),
169 | 'dictInvalidFileType'=>Yii::t('EDropzone.dropzone',"Wrong type. Allowed types are: \n{types}", array('{types}'=>join('; ', $this->mimeTypes))),
170 | 'dictFileTooBig'=>Yii::t('EDropzone.dropzone','Size is too big. Allowed size is {{maxFilesize}}. Your file is {{filesize}}'),
171 | );
172 | $this->options = CMap::mergeArray($this->options, $dict);
173 | }
174 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | yii-dropzone
2 | ============
3 |
4 | A Yii extension for Dropzone.js
5 |
6 | Now you can use all of the events and set a custom CSS file. See the code for more details.
7 |
8 | $dict = array(
9 | 'dictDefaultMessage'=>'Arraste seus arquivos aqui para realizar o Upload!',
10 | 'dictFallbackMessage'=>'Seu browser não suporta esse recurso. :(',
11 | 'dictFallbackText'=>'Por favor, use o formulário de upload abaixo.',
12 | 'dictInvalidFileType'=>'Tipo de Arquivo Inválido!',
13 | 'dictFileTooBig'=>'O arquivo é muito grande!',
14 | 'dictResponseError'=>'Oops! Não foi possível fazer o upload!',
15 | 'dictCancelUpload'=>'Cancelar',
16 | 'dictCancelUploadConfirmation'=>'Deseja cancelar o upload?',
17 | 'dictRemoveFile'=>'Deletar',
18 | 'dictMaxFilesExceeded'=>'Número máximo de arquivos excedeu!',
19 | );
20 |
21 | $options = array(
22 | 'addRemoveLinks'=>true,
23 | );
24 |
25 | $events = array(
26 | 'success' => 'successUp(this, param, param2, param3)',
27 | 'totaluploadprogress'=>'incProgress(this, param, param2, param3)',
28 | 'queuecomplete'=>'complete()'
29 | );
30 |
31 | $this->widget('wcext.dropzone.EDropzone', array(
32 | //'model' => $model,
33 | //'attribute' => 'file',
34 | 'name'=>'upload',
35 | 'url' => $this->createUrl('controller/action'),
36 | 'mimeTypes' => array('image/jpeg', 'image/png', 'video/mp4'),
37 | 'events' => $events,
38 | 'options' => CMap::mergeArray($options, $dict ),
39 | 'htmlOptions' => array('style'=>'height:95%; overflow: hidden;'),
40 | 'customStyle'=> $this->module->assetsPath.'/css/customdropzone.css'
41 | ));
42 |
--------------------------------------------------------------------------------
/assets/css/dropzone.css:
--------------------------------------------------------------------------------
1 | /* The MIT License */
2 | .dropzone,
3 | .dropzone *,
4 | .dropzone-previews,
5 | .dropzone-previews * {
6 | -webkit-box-sizing: border-box;
7 | -moz-box-sizing: border-box;
8 | box-sizing: border-box;
9 | }
10 | .dropzone {
11 | position: relative;
12 | border: 1px solid rgba(0,0,0,0.08);
13 | background: rgba(0,0,0,0.02);
14 | padding: 1em;
15 | }
16 | .dropzone.dz-clickable {
17 | cursor: pointer;
18 | }
19 | .dropzone.dz-clickable .dz-message,
20 | .dropzone.dz-clickable .dz-message span {
21 | cursor: pointer;
22 | }
23 | .dropzone.dz-clickable * {
24 | cursor: default;
25 | }
26 | .dropzone .dz-message {
27 | opacity: 1;
28 | -ms-filter: none;
29 | filter: none;
30 | }
31 | .dropzone.dz-drag-hover {
32 | border-color: rgba(0,0,0,0.15);
33 | background: rgba(0,0,0,0.04);
34 | }
35 | .dropzone.dz-started .dz-message {
36 | display: none;
37 | }
38 | .dropzone .dz-preview,
39 | .dropzone-previews .dz-preview {
40 | background: rgba(255,255,255,0.8);
41 | position: relative;
42 | display: inline-block;
43 | margin: 17px;
44 | vertical-align: top;
45 | border: 1px solid #acacac;
46 | padding: 6px 6px 6px 6px;
47 | }
48 | .dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
49 | .dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
50 | display: none;
51 | }
52 | .dropzone .dz-preview .dz-details,
53 | .dropzone-previews .dz-preview .dz-details {
54 | width: 100px;
55 | height: 100px;
56 | position: relative;
57 | background: #ebebeb;
58 | padding: 5px;
59 | margin-bottom: 22px;
60 | }
61 | .dropzone .dz-preview .dz-details .dz-filename,
62 | .dropzone-previews .dz-preview .dz-details .dz-filename {
63 | overflow: hidden;
64 | height: 100%;
65 | }
66 | .dropzone .dz-preview .dz-details img,
67 | .dropzone-previews .dz-preview .dz-details img {
68 | position: absolute;
69 | top: 0;
70 | left: 0;
71 | width: 100px;
72 | height: 100px;
73 | }
74 | .dropzone .dz-preview .dz-details .dz-size,
75 | .dropzone-previews .dz-preview .dz-details .dz-size {
76 | position: absolute;
77 | bottom: -28px;
78 | left: 3px;
79 | height: 28px;
80 | line-height: 28px;
81 | }
82 | .dropzone .dz-preview.dz-error .dz-error-mark,
83 | .dropzone-previews .dz-preview.dz-error .dz-error-mark {
84 | display: block;
85 | }
86 | .dropzone .dz-preview.dz-success .dz-success-mark,
87 | .dropzone-previews .dz-preview.dz-success .dz-success-mark {
88 | display: block;
89 | }
90 | .dropzone .dz-preview:hover .dz-details img,
91 | .dropzone-previews .dz-preview:hover .dz-details img {
92 | display: none;
93 | }
94 | .dropzone .dz-preview .dz-success-mark,
95 | .dropzone-previews .dz-preview .dz-success-mark,
96 | .dropzone .dz-preview .dz-error-mark,
97 | .dropzone-previews .dz-preview .dz-error-mark {
98 | display: none;
99 | position: absolute;
100 | width: 40px;
101 | height: 40px;
102 | font-size: 30px;
103 | text-align: center;
104 | right: -10px;
105 | top: -10px;
106 | }
107 | .dropzone .dz-preview .dz-success-mark,
108 | .dropzone-previews .dz-preview .dz-success-mark {
109 | color: #8cc657;
110 | }
111 | .dropzone .dz-preview .dz-error-mark,
112 | .dropzone-previews .dz-preview .dz-error-mark {
113 | color: #ee162d;
114 | }
115 | .dropzone .dz-preview .dz-progress,
116 | .dropzone-previews .dz-preview .dz-progress {
117 | position: absolute;
118 | top: 100px;
119 | left: 6px;
120 | right: 6px;
121 | height: 6px;
122 | background: #d7d7d7;
123 | display: none;
124 | }
125 | .dropzone .dz-preview .dz-progress .dz-upload,
126 | .dropzone-previews .dz-preview .dz-progress .dz-upload {
127 | display: block;
128 | position: absolute;
129 | top: 0;
130 | bottom: 0;
131 | left: 0;
132 | width: 0%;
133 | background-color: #8cc657;
134 | }
135 | .dropzone .dz-preview.dz-processing .dz-progress,
136 | .dropzone-previews .dz-preview.dz-processing .dz-progress {
137 | display: block;
138 | }
139 | .dropzone .dz-preview .dz-error-message,
140 | .dropzone-previews .dz-preview .dz-error-message {
141 | display: none;
142 | position: absolute;
143 | top: -5px;
144 | left: -20px;
145 | background: rgba(245,245,245,0.8);
146 | padding: 8px 10px;
147 | color: #800;
148 | min-width: 140px;
149 | max-width: 500px;
150 | z-index: 500;
151 | }
152 | .dropzone .dz-preview:hover.dz-error .dz-error-message,
153 | .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
154 | display: block;
155 | }
156 | .dropzone {
157 | border: 1px solid rgba(0,0,0,0.03);
158 | min-height: 360px;
159 | -webkit-border-radius: 3px;
160 | border-radius: 3px;
161 | background: rgba(0,0,0,0.03);
162 | padding: 23px;
163 | }
164 | .dropzone .dz-default.dz-message {
165 | opacity: 1;
166 | -ms-filter: none;
167 | filter: none;
168 | -webkit-transition: opacity 0.3s ease-in-out;
169 | -moz-transition: opacity 0.3s ease-in-out;
170 | -o-transition: opacity 0.3s ease-in-out;
171 | -ms-transition: opacity 0.3s ease-in-out;
172 | transition: opacity 0.3s ease-in-out;
173 | background-image: url("../images/spritemap.png");
174 | background-repeat: no-repeat;
175 | background-position: 0 0;
176 | position: absolute;
177 | width: 428px;
178 | height: 123px;
179 | margin-left: -214px;
180 | margin-top: -61.5px;
181 | top: 50%;
182 | left: 50%;
183 | }
184 | @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
185 | .dropzone .dz-default.dz-message {
186 | background-image: url("../images/spritemap@2x.png");
187 | -webkit-background-size: 428px 406px;
188 | -moz-background-size: 428px 406px;
189 | background-size: 428px 406px;
190 | }
191 | }
192 | .dropzone .dz-default.dz-message span {
193 | display: none;
194 | }
195 | .dropzone.dz-square .dz-default.dz-message {
196 | background-position: 0 -123px;
197 | width: 268px;
198 | margin-left: -134px;
199 | height: 174px;
200 | margin-top: -87px;
201 | }
202 | .dropzone.dz-drag-hover .dz-message {
203 | opacity: 0.15;
204 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=15)";
205 | filter: alpha(opacity=15);
206 | }
207 | .dropzone.dz-started .dz-message {
208 | display: block;
209 | opacity: 0;
210 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
211 | filter: alpha(opacity=0);
212 | }
213 | .dropzone .dz-preview,
214 | .dropzone-previews .dz-preview {
215 | -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
216 | box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
217 | font-size: 14px;
218 | }
219 | .dropzone .dz-preview.dz-image-preview:hover .dz-details img,
220 | .dropzone-previews .dz-preview.dz-image-preview:hover .dz-details img {
221 | display: block;
222 | opacity: 0.1;
223 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
224 | filter: alpha(opacity=10);
225 | }
226 | .dropzone .dz-preview.dz-success .dz-success-mark,
227 | .dropzone-previews .dz-preview.dz-success .dz-success-mark {
228 | opacity: 1;
229 | -ms-filter: none;
230 | filter: none;
231 | }
232 | .dropzone .dz-preview.dz-error .dz-error-mark,
233 | .dropzone-previews .dz-preview.dz-error .dz-error-mark {
234 | opacity: 1;
235 | -ms-filter: none;
236 | filter: none;
237 | }
238 | .dropzone .dz-preview.dz-error .dz-progress .dz-upload,
239 | .dropzone-previews .dz-preview.dz-error .dz-progress .dz-upload {
240 | background: #ee1e2d;
241 | }
242 | .dropzone .dz-preview .dz-error-mark,
243 | .dropzone-previews .dz-preview .dz-error-mark,
244 | .dropzone .dz-preview .dz-success-mark,
245 | .dropzone-previews .dz-preview .dz-success-mark {
246 | display: block;
247 | opacity: 0;
248 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
249 | filter: alpha(opacity=0);
250 | -webkit-transition: opacity 0.4s ease-in-out;
251 | -moz-transition: opacity 0.4s ease-in-out;
252 | -o-transition: opacity 0.4s ease-in-out;
253 | -ms-transition: opacity 0.4s ease-in-out;
254 | transition: opacity 0.4s ease-in-out;
255 | background-image: url("../images/spritemap.png");
256 | background-repeat: no-repeat;
257 | }
258 | @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
259 | .dropzone .dz-preview .dz-error-mark,
260 | .dropzone-previews .dz-preview .dz-error-mark,
261 | .dropzone .dz-preview .dz-success-mark,
262 | .dropzone-previews .dz-preview .dz-success-mark {
263 | background-image: url("../images/spritemap@2x.png");
264 | -webkit-background-size: 428px 406px;
265 | -moz-background-size: 428px 406px;
266 | background-size: 428px 406px;
267 | }
268 | }
269 | .dropzone .dz-preview .dz-error-mark span,
270 | .dropzone-previews .dz-preview .dz-error-mark span,
271 | .dropzone .dz-preview .dz-success-mark span,
272 | .dropzone-previews .dz-preview .dz-success-mark span {
273 | display: none;
274 | }
275 | .dropzone .dz-preview .dz-error-mark,
276 | .dropzone-previews .dz-preview .dz-error-mark {
277 | background-position: -268px -123px;
278 | }
279 | .dropzone .dz-preview .dz-success-mark,
280 | .dropzone-previews .dz-preview .dz-success-mark {
281 | background-position: -268px -163px;
282 | }
283 | .dropzone .dz-preview .dz-progress .dz-upload,
284 | .dropzone-previews .dz-preview .dz-progress .dz-upload {
285 | -webkit-animation: loading 0.4s linear infinite;
286 | -moz-animation: loading 0.4s linear infinite;
287 | -o-animation: loading 0.4s linear infinite;
288 | -ms-animation: loading 0.4s linear infinite;
289 | animation: loading 0.4s linear infinite;
290 | -webkit-transition: width 0.3s ease-in-out;
291 | -moz-transition: width 0.3s ease-in-out;
292 | -o-transition: width 0.3s ease-in-out;
293 | -ms-transition: width 0.3s ease-in-out;
294 | transition: width 0.3s ease-in-out;
295 | -webkit-border-radius: 2px;
296 | border-radius: 2px;
297 | position: absolute;
298 | top: 0;
299 | left: 0;
300 | width: 0%;
301 | height: 100%;
302 | background-image: url("../images/spritemap.png");
303 | background-repeat: repeat-x;
304 | background-position: 0px -400px;
305 | }
306 | @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
307 | .dropzone .dz-preview .dz-progress .dz-upload,
308 | .dropzone-previews .dz-preview .dz-progress .dz-upload {
309 | background-image: url("../images/spritemap@2x.png");
310 | -webkit-background-size: 428px 406px;
311 | -moz-background-size: 428px 406px;
312 | background-size: 428px 406px;
313 | }
314 | }
315 | .dropzone .dz-preview.dz-success .dz-progress,
316 | .dropzone-previews .dz-preview.dz-success .dz-progress {
317 | display: block;
318 | opacity: 0;
319 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
320 | filter: alpha(opacity=0);
321 | -webkit-transition: opacity 0.4s ease-in-out;
322 | -moz-transition: opacity 0.4s ease-in-out;
323 | -o-transition: opacity 0.4s ease-in-out;
324 | -ms-transition: opacity 0.4s ease-in-out;
325 | transition: opacity 0.4s ease-in-out;
326 | }
327 | .dropzone .dz-preview .dz-error-message,
328 | .dropzone-previews .dz-preview .dz-error-message {
329 | display: block;
330 | opacity: 0;
331 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
332 | filter: alpha(opacity=0);
333 | -webkit-transition: opacity 0.3s ease-in-out;
334 | -moz-transition: opacity 0.3s ease-in-out;
335 | -o-transition: opacity 0.3s ease-in-out;
336 | -ms-transition: opacity 0.3s ease-in-out;
337 | transition: opacity 0.3s ease-in-out;
338 | }
339 | .dropzone .dz-preview:hover.dz-error .dz-error-message,
340 | .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
341 | opacity: 1;
342 | -ms-filter: none;
343 | filter: none;
344 | }
345 | .dropzone a.dz-remove,
346 | .dropzone-previews a.dz-remove {
347 | background-image: -webkit-linear-gradient(top, #fafafa, #eee);
348 | background-image: -moz-linear-gradient(top, #fafafa, #eee);
349 | background-image: -o-linear-gradient(top, #fafafa, #eee);
350 | background-image: -ms-linear-gradient(top, #fafafa, #eee);
351 | background-image: linear-gradient(to bottom, #fafafa, #eee);
352 | -webkit-border-radius: 2px;
353 | border-radius: 2px;
354 | border: 1px solid #eee;
355 | text-decoration: none;
356 | display: block;
357 | padding: 4px 5px;
358 | text-align: center;
359 | color: #aaa;
360 | margin-top: 26px;
361 | }
362 | .dropzone a.dz-remove:hover,
363 | .dropzone-previews a.dz-remove:hover {
364 | color: #666;
365 | }
366 | @-moz-keyframes loading {
367 | from {
368 | background-position: 0 -400px;
369 | }
370 | to {
371 | background-position: -7px -400px;
372 | }
373 | }
374 | @-webkit-keyframes loading {
375 | from {
376 | background-position: 0 -400px;
377 | }
378 | to {
379 | background-position: -7px -400px;
380 | }
381 | }
382 | @-o-keyframes loading {
383 | from {
384 | background-position: 0 -400px;
385 | }
386 | to {
387 | background-position: -7px -400px;
388 | }
389 | }
390 | @keyframes loading {
391 | from {
392 | background-position: 0 -400px;
393 | }
394 | to {
395 | background-position: -7px -400px;
396 | }
397 | }
398 |
--------------------------------------------------------------------------------
/assets/images/spritemap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/subdee/yii-dropzone/8e9f8d184fcb0b4d34965c7f49968da57a3245f2/assets/images/spritemap.png
--------------------------------------------------------------------------------
/assets/js/dropzone.js:
--------------------------------------------------------------------------------
1 | !function(){function a(b){var c=a.modules[b];if(!c)throw new Error('failed to require "'+b+'"');return"exports"in c||"function"!=typeof c.definition||(c.client=c.component=!0,c.definition.call(this,c.exports={},c),delete c.definition),c.exports}a.modules={},a.register=function(b,c){a.modules[b]={definition:c}},a.define=function(b,c){a.modules[b]={exports:c}},a.register("component~emitter@1.1.2",function(a,b){function c(a){return a?d(a):void 0}function d(a){for(var b in c.prototype)a[b]=c.prototype[b];return a}b.exports=c,c.prototype.on=c.prototype.addEventListener=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},c.prototype.once=function(a,b){function c(){d.off(a,c),b.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},c.fn=b,this.on(a,c),this},c.prototype.off=c.prototype.removeListener=c.prototype.removeAllListeners=c.prototype.removeEventListener=function(a,b){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;for(var d,e=0;ed;++d)c[d].apply(this,b)}return this},c.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks[a]||[]},c.prototype.hasListeners=function(a){return!!this.listeners(a).length}}),a.register("dropzone",function(b,c){c.exports=a("dropzone/lib/dropzone.js")}),a.register("dropzone/lib/dropzone.js",function(b,c){(function(){var b,d,e,f,g,h,i,j,k={}.hasOwnProperty,l=function(a,b){function c(){this.constructor=a}for(var d in b)k.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},m=[].slice;d="undefined"!=typeof Emitter&&null!==Emitter?Emitter:a("component~emitter@1.1.2"),i=function(){},b=function(a){function b(a,d){var e,f,g;if(this.element=a,this.version=b.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(b.instances.push(this),this.element.dropzone=this,e=null!=(g=b.optionsForElement(this.element))?g:{},this.options=c({},this.defaultOptions,e,null!=d?d:{}),this.options.forceFallback||!b.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?b.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:b.getElements(this.options.clickable,"clickable")),this.init()}var c;return l(b,a),b.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached"],b.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:100,thumbnailHeight:100,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return i},forceFallback:!1,fallback:function(){var a,c,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(c=a,a.className="dz-message");return c||(c=b.createElement('
'),this.element.appendChild(c)),d=c.getElementsByTagName("span")[0],d&&(d.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:i,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:i,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)c=l[f],c.textContent=a.name;for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)c=m[g],c.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(c){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),a.previewElement.classList.add("dz-image-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,g.push(c.src=b);return g}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:i,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:i,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.style.width=""+b+"%");return g}},totaluploadprogress:i,sending:i,sendingmultiple:i,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:i,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:i,complete:function(a){return a._removeLink?a._removeLink.textContent=this.options.dictRemoveFile:void 0},completemultiple:i,maxfilesexceeded:i,maxfilesreached:i,previewTemplate:'\n
\n
\n
\n
![]()
\n
\n
\n
?
\n
?
\n
\n
'},c=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?m.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},b.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},b.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},b.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},b.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(b.QUEUED)},b.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(b.UPLOADING)},b.prototype.getActiveFiles=function(){var a,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)a=e[c],(a.status===b.UPLOADING||a.status===b.QUEUED)&&f.push(a);return f},b.prototype.init=function(){var a,c,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&document.body.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.body.appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),c=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(b){return c(b),a.emit("dragenter",b)}}(this),dragover:function(a){return function(b){var d;try{d=b.dataTransfer.effectAllowed}catch(e){}return b.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",c(b),a.emit("dragover",b)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(b){return c(b),a.drop(b)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(c){return a.listeners.push({element:c,events:{click:function(d){return c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message"))?a.hiddenFileInput.click():void 0}}})}}(this)),this.enable(),this.options.init.call(this)},b.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)},b.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},b.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},b.prototype.getFallbackForm=function(){var a,c,d,e;return(a=this.getExistingFallback())?a:(d='',c=b.createElement(d),"FORM"!==this.element.tagName?(e=b.createElement(''),e.appendChild(c)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:c)},b.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},b.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},b.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},b.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},b.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},b.prototype.filesize=function(a){var b;return a>=109951162777.6?(a/=109951162777.6,b="TiB"):a>=107374182.4?(a/=107374182.4,b="GiB"):a>=104857.6?(a/=104857.6,b="MiB"):a>=102.4?(a/=102.4,b="KiB"):(a=10*a,b="b"),""+Math.round(a)/10+" "+b},b.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},b.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},b.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},b.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},b.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},b.prototype._addFilesFromDirectory=function(a,b){var c,d;return c=a.createReader(),d=function(a){return function(c){var d,e,f;for(e=0,f=c.length;f>e;e++)d=c[e],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name)}}(this),c.readEntries(d,function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0})},b.prototype.accept=function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)},b.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},b.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},b.prototype.enqueueFile=function(a){if(a.status!==b.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=b.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},b.prototype._thumbnailQueue=[],b.prototype._processingThumbnail=!1,b.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},b.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},b.prototype.removeFile=function(a){return a.status===b.UPLOADING&&this.cancelUpload(a),this.files=j(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},b.prototype.removeAllFiles=function(a){var c,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)c=f[d],(c.status!==b.UPLOADING||a)&&this.removeFile(c);return null},b.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){var e;return e=document.createElement("img"),e.onload=function(){var c,f,g,i,j,k,l,m;return a.width=e.width,a.height=e.height,g=d.options.resize.call(d,a),null==g.trgWidth&&(g.trgWidth=g.optWidth),null==g.trgHeight&&(g.trgHeight=g.optHeight),c=document.createElement("canvas"),f=c.getContext("2d"),c.width=g.trgWidth,c.height=g.trgHeight,h(f,e,null!=(j=g.srcX)?j:0,null!=(k=g.srcY)?k:0,g.srcWidth,g.srcHeight,null!=(l=g.trgX)?l:0,null!=(m=g.trgY)?m:0,g.trgWidth,g.trgHeight),i=c.toDataURL("image/png"),d.emit("thumbnail",a,i),null!=b?b():void 0},e.src=c.result}}(this),c.readAsDataURL(a)},b.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},b.prototype.processFile=function(a){return this.processFiles([a])},b.prototype.processFiles=function(a){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],c.processing=!0,c.status=b.UPLOADING,this.emit("processing",c);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},b.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},b.prototype.cancelUpload=function(a){var c,d,e,f,g,h,i;if(a.status===b.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)c=d[e],c.status=b.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)c=d[f],this.emit("canceled",c);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===b.ADDED||i===b.QUEUED)&&(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},b.prototype.uploadFile=function(a){return this.uploadFiles([a])},b.prototype.uploadFiles=function(a){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I;for(t=new XMLHttpRequest,u=0,y=a.length;y>u;u++)d=a[u],d.xhr=t;t.open(this.options.method,this.options.url,!0),t.withCredentials=!!this.options.withCredentials,q=null,f=function(b){return function(){var c,e,f;for(f=[],c=0,e=a.length;e>c;c++)d=a[c],f.push(b._errorProcessing(a,q||b.options.dictResponseError.replace("{{statusCode}}",t.status),t));return f}}(this),r=function(b){return function(c){var e,f,g,h,i,j,k,l,m;if(null!=c)for(f=100*c.loaded/c.total,g=0,j=a.length;j>g;g++)d=a[g],d.upload={progress:f,total:c.total,bytesSent:c.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)d=a[h],(100!==d.upload.progress||d.upload.bytesSent!==d.upload.total)&&(e=!1),d.upload.progress=f,d.upload.bytesSent=d.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)d=a[i],m.push(b.emit("uploadprogress",d,f,d.upload.bytesSent));return m}}(this),t.onload=function(c){return function(d){var e;if(a[0].status!==b.CANCELED&&4===t.readyState){if(q=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json"))try{q=JSON.parse(q)}catch(g){d=g,q="Invalid JSON response from server."}return r(),200<=(e=t.status)&&300>e?c._finished(a,q,d):f()}}}(this),t.onerror=function(){return function(){return a[0].status!==b.CANCELED?f():void 0}}(this),p=null!=(D=t.upload)?D:t,p.onprogress=r,i={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&c(i,this.options.headers);for(g in i)h=i[g],t.setRequestHeader(g,h);if(e=new FormData,this.options.params){E=this.options.params;for(n in E)s=E[n],e.append(n,s)}for(v=0,z=a.length;z>v;v++)d=a[v],this.emit("sending",d,t,e);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,t,e),"FORM"===this.element.tagName)for(F=this.element.querySelectorAll("input, textarea, select, button"),w=0,A=F.length;A>w;w++)if(k=F[w],l=k.getAttribute("name"),m=k.getAttribute("type"),"SELECT"===k.tagName&&k.hasAttribute("multiple"))for(G=k.options,x=0,B=G.length;B>x;x++)o=G[x],o.selected&&e.append(l,o.value);else(!m||"checkbox"!==(H=m.toLowerCase())&&"radio"!==H||k.checked)&&e.append(l,k.value);for(j=C=0,I=a.length-1;I>=0?I>=C:C>=I;j=I>=0?++C:--C)e.append(this._getParamName(j),a[j],a[j].name);return t.send(e)},b.prototype._finished=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.SUCCESS,this.emit("success",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b.prototype._errorProcessing=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.ERROR,this.emit("error",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b}(d),b.version="3.10.2",b.options={},b.optionsForElement=function(a){return a.getAttribute("id")?b.options[e(a.getAttribute("id"))]:void 0},b.instances=[],b.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))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.");return a.dropzone},b.autoDiscover=!0,b.discover=function(){var a,c,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],a=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},a(document.getElementsByTagName("div")),a(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)c=d[e],g.push(b.optionsForElement(c)!==!1?new b(c):void 0);return g},b.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],b.isBrowserSupported=function(){var a,c,d,e,f;if(a=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=b.blacklistedBrowsers,d=0,e=f.length;e>d;d++)c=f[d],c.test(navigator.userAgent)&&(a=!1);else a=!1;else a=!1;return a},j=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},e=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},b.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},b.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},b.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},b.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},b.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},b.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0}else if(d===e)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(a){return this.each(function(){return new b(this,a)})}),"undefined"!=typeof c&&null!==c?c.exports=b:window.Dropzone=b,b.ADDED="added",b.QUEUED="queued",b.ACCEPTED=b.QUEUED,b.UPLOADING="uploading",b.PROCESSING=b.UPLOADING,b.CANCELED="canceled",b.ERROR="error",b.SUCCESS="success",g=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},h=function(a,b,c,d,e,f,h,i,j,k){var l;return l=g(b),a.drawImage(b,c,d,e,f,h,i,j,k/l)},f=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},b._autoDiscoverFunction=function(){return b.autoDiscover?b.discover():void 0},f(window,b._autoDiscoverFunction)}).call(this)}),"object"==typeof exports?module.exports=a("dropzone"):"function"==typeof define&&define.amd?define([],function(){return a("dropzone")}):this.Dropzone=a("dropzone")}();
--------------------------------------------------------------------------------
/assets/versions/4.0.1/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 | components
3 | node_modules
4 | .DS_Store
5 | .sass-cache
6 | _site
7 | _config.yaml
--------------------------------------------------------------------------------
/assets/versions/4.0.1/.tagconfig:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | {
4 | "name": "src/dropzone.coffee",
5 | "regexs": [
6 | "Dropzone.version = \"###\""
7 | ]
8 | },
9 | {
10 | "name": "dist/dropzone.js",
11 | "regexs": [
12 | "version = \"###\""
13 | ]
14 | },
15 | {
16 | "name": "dist/min/dropzone.min.js",
17 | "regexs": [
18 | "version=\"###\""
19 | ]
20 | },
21 | {
22 | "name": "dist/dropzone-amd-module.js",
23 | "regexs": [
24 | "version = \"###\""
25 | ]
26 | },
27 | {
28 | "name": "dist/min/dropzone-amd-module.min.js",
29 | "regexs": [
30 | "version=\"###\""
31 | ]
32 | },
33 | {
34 | "name": "package.json",
35 | "regexs": [
36 | "\"version\": \"###\""
37 | ]
38 | },
39 | {
40 | "name": "component.json",
41 | "regexs": [
42 | "\"version\": \"###\""
43 | ]
44 | },
45 | {
46 | "name": "bower.json",
47 | "regexs": [
48 | "\"version\": \"###\""
49 | ]
50 | }
51 | ]
52 | }
53 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.10
4 | before_install:
5 | - npm install -g grunt-cli
6 | - gem install sass
7 | install: npm install
8 | before_script:
9 | - grunt
10 | script: ./test.sh compiled
--------------------------------------------------------------------------------
/assets/versions/4.0.1/AMD_footer:
--------------------------------------------------------------------------------
1 | return module.exports;
2 | }));
--------------------------------------------------------------------------------
/assets/versions/4.0.1/AMD_header:
--------------------------------------------------------------------------------
1 | // Uses AMD or browser globals to create a jQuery plugin.
2 | (function (factory) {
3 | if (typeof define === 'function' && define.amd) {
4 | // AMD. Register as an anonymous module.
5 | define(['jquery'], factory);
6 | } else {
7 | // Browser globals
8 | factory(jQuery);
9 | }
10 | } (function (jQuery) {
11 | var module = { exports: { } }; // Fake component
12 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contribute
2 | ==========
3 |
4 |
5 | > I have changed my branching model recently (November 2013)! Previously
6 | > the latest version was always in develop, and pull request had to be
7 | > made on this branch. This is no longer the case!
8 |
9 |
10 | The latest version is always in the **[master](https://github.com/enyo/dropzone)**
11 | branch.
12 |
13 |
14 | > Please provide a test for any new feature (see the [testing section](#testing) below).
15 |
16 |
17 | Communicate
18 | -----------
19 |
20 | Before you start implementing new features, please create an issue about
21 | it first and discuss your intent.
22 |
23 | It might be something that someone else is already implementing or that
24 | goes against the concepts of Dropzone, and I really hate rejecting pull
25 | requests others spent hours writing on.
26 |
27 |
28 | Developer Dependencies
29 | ----------------------
30 |
31 | The first thing you need to do, is to install the developer dependencies:
32 |
33 | ```bash
34 | $ npm install
35 | ```
36 |
37 | This will install all the tools you need to compile the source files and to test
38 | the library.
39 |
40 |
41 | Coffeescript & Sass (-> Javascript & CSS)
42 | ------------------------------------------
43 |
44 | Dropzone is written in [Coffeescript](http://coffeescript.org) and
45 | [Sass](http://sass-lang.com/) so *do not* make
46 | changes to the Javascript or CSS files
47 |
48 | **I will not merge requests written in Javascript or CSS.**
49 |
50 | Please don't include compiled `.js` or `.css` files in your pull requests but only
51 | `.coffee` or `.scss` files. That way pull requests aren't polluted and I can see
52 | immediately what you changed.
53 |
54 |
55 | To build the library use [grunt](http://gruntjs.com).
56 |
57 | ```bash
58 | $ grunt -h # Displays available options
59 | $ grunt # compiles all coffeescript and stylus files
60 | $ grunt watch # watches for changes and builds on the fly
61 | ```
62 |
63 | > I recommend using `grunt watch` when you begin developing. This way you can't
64 | > forget to compile the source files and will avoid headaches.
65 |
66 |
67 | Testing
68 | -------
69 |
70 | To test the library, open `test/test.html` in your browser or type `npm test`
71 | which will run the tests in your console in a headless browser.
72 |
73 | The tests are also written in coffeescript in the `test/test.coffee` file,
74 | and compiled with `grunt js` or `grunt watch`.
75 |
76 |
77 | * Thanks for contributing!*
78 |
79 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/Gruntfile.coffee:
--------------------------------------------------------------------------------
1 | module.exports = (grunt) ->
2 |
3 | grunt.initConfig
4 | pkg: grunt.file.readJSON "package.json"
5 |
6 |
7 | sass:
8 | options:
9 | sourcemap: 'none'
10 |
11 | default:
12 | files: [
13 | "dist/basic.css": "src/basic.scss"
14 | "dist/dropzone.css": "src/dropzone.scss"
15 | ]
16 | compressed:
17 | options:
18 | style: 'compressed'
19 | files: [
20 | "dist/min/basic.min.css": "src/basic.scss"
21 | "dist/min/dropzone.min.css": "src/dropzone.scss"
22 | ]
23 |
24 | coffee:
25 | default:
26 | files:
27 | "dist/dropzone.js": "src/dropzone.coffee"
28 | test:
29 | files:
30 | "test/test.js": "test/*.coffee"
31 |
32 | concat:
33 | amd:
34 | src: [
35 | "AMD_header"
36 | "dist/dropzone.js"
37 | "AMD_footer"
38 | ]
39 | dest: "dist/dropzone-amd-module.js"
40 |
41 | watch:
42 | js:
43 | files: [
44 | "src/dropzone.coffee"
45 | ]
46 | tasks: [ "js" ]
47 | options: nospawn: on
48 | test:
49 | files: [
50 | "test/*.coffee"
51 | ]
52 | tasks: [ "coffee:test" ]
53 | options: nospawn: on
54 | css:
55 | files: [
56 | "src/*.scss"
57 | ]
58 | tasks: [ "css" ]
59 | options: nospawn: on
60 |
61 | uglify:
62 | js:
63 | files: [
64 | "dist/min/dropzone-amd-module.min.js": "dist/dropzone-amd-module.js"
65 | "dist/min/dropzone.min.js": "dist/dropzone.js"
66 | ]
67 |
68 |
69 |
70 | grunt.loadNpmTasks "grunt-contrib-coffee"
71 | grunt.loadNpmTasks "grunt-contrib-sass"
72 | grunt.loadNpmTasks "grunt-contrib-concat"
73 | grunt.loadNpmTasks "grunt-contrib-watch"
74 | grunt.loadNpmTasks "grunt-contrib-uglify"
75 |
76 | # Default tasks
77 | grunt.registerTask "default", [ "downloads" ]
78 |
79 | grunt.registerTask "css", "Compile the sass files to css", [ "sass" ]
80 |
81 | grunt.registerTask "js", "Compile coffeescript", [ "coffee", "concat" ]
82 |
83 | grunt.registerTask "downloads", "Compile all stylus and coffeescript files and generate the download files", [ "js", "css", "uglify" ]
84 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/LICENSE:
--------------------------------------------------------------------------------
1 | License
2 |
3 | (The MIT License)
4 |
5 | Copyright (c) 2012 Matias Meno
6 | Logo & Website Design (c) 2015 "1910" www.weare1910.com
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 |
12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [ ](https://codeship.com/projects/55087)
4 |
5 | Dropzone.js is a light weight JavaScript library that turns an HTML element into a dropzone.
6 | This means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX.
7 |
8 | * * *
9 |
10 | _If you want support, please use [stackoverflow](http://stackoverflow.com/) with the `dropzone.js` tag and not the
11 | GitHub issues tracker. Only post an issue here if you think you discovered a bug or have a feature request._
12 |
13 | * * *
14 |
15 | **Please read the [contributing guidelines](CONTRIBUTING.md) before you start working on Dropzone!**
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 | Starting with version 2.0.0 this library does no longer depend on jQuery (but
26 | it still works as a jQuery module).
27 |
28 | Dropzone is compatible with [component](https://github.com/component/component),
29 | there's a standalone version and an [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD)
30 | module that's compatible with [RequireJS](http://requirejs.org) in the downloads
31 | folder.
32 |
33 |
34 |
35 |
36 |
37 | ## Main features
38 |
39 | - Image thumbnail previews. Simply register the callback `thumbnail(file, data)` and display the image wherever you like
40 | - Retina enabled
41 | - Multiple files and synchronous uploads
42 | - Progress updates
43 | - Support for large files
44 | - Complete theming. The look and feel of Dropzone is just the default theme. You
45 | can define everything yourself by overwriting the default event listeners.
46 | - Well tested
47 |
48 | ## Documentation
49 |
50 | For the full documentation and installation please visit www.dropzonejs.com
51 |
52 | Please also refer to the [FAQ](https://github.com/enyo/dropzone/wiki/FAQ).
53 |
54 | ## Examples
55 |
56 | For examples, please see the [GitHub wiki](https://github.com/enyo/dropzone/wiki).
57 |
58 | ## Usage
59 |
60 | Implicit creation:
61 |
62 | ```html
63 |
64 | ```
65 |
66 | That's it. Really!
67 |
68 | Dropzone will automatically attach to it, and handle file drops.
69 |
70 | Want more control? You can configure dropzones like this:
71 |
72 | ```js
73 | // "myAwesomeDropzone" is the camelized version of the ID of your HTML element
74 | Dropzone.options.myAwesomeDropzone = { maxFilesize: 1 };
75 | ```
76 |
77 | ...or instantiate dropzone manually like this:
78 |
79 | ```js
80 | new Dropzone("div#my-dropzone", { /* options */ });
81 | ```
82 |
83 | > Note that dropzones don't have to be forms. But if you choose another element you have to pass the `url` parameter in the options.
84 |
85 | For configuration options please look at the [documentation on the website](http://www.dropzonejs.com/#configuration)
86 | or at the [source](https://github.com/enyo/dropzone/blob/master/src/dropzone.coffee#L90).
87 |
88 |
89 |
90 | ### Register for events
91 |
92 | If you want to register to some event you can do so on the `dropzone` object itself:
93 |
94 | ```js
95 | Dropzone.options.myDropzone({
96 | init: function() {
97 | this.on("error", function(file, message) { alert(message); });
98 | }
99 | });
100 | // or if you need to access a Dropzone somewhere else:
101 | var myDropzone = Dropzone.forElement("div#my-dropzone");
102 | myDropzone.on("error", function(file, message) { alert(message); });
103 | ```
104 |
105 | For a list of all events, please look at the chapter
106 | [»listen to events«](http://www.dropzonejs.com/#listen_to_events) in the documentation
107 | or at the [source](src/dropzone.coffee#L43).
108 |
109 |
110 | ## Browser support
111 |
112 | - Chrome 7+
113 | - Firefox 4+
114 | - IE 10+
115 | - Opera 12+ (Version 12 for MacOS is disabled because their API is buggy)
116 | - Safari 6+
117 |
118 | For all the other browsers, dropzone provides an oldschool file input fallback.
119 |
120 | ## Why another library?
121 |
122 | I realize that there [are](http://valums.com/ajax-upload/) [already](http://tutorialzine.com/2011/09/html5-file-upload-jquery-php/) [other](http://code.google.com/p/html5uploader/) [libraries](http://blueimp.github.com/jQuery-File-Upload/) out there but the reason I decided to write my own are the following:
123 |
124 | - I didn't want it to be too big, and to cumbersome to dive into.
125 | - I want to design my own elements. I only want to register callbacks so I can update my elements accordingly.
126 | - Big files should get uploaded without a problem.
127 | - I wanted a callback for image previews, that don't kill the browser if too many too big images are viewed.
128 | - I want to use the latest API of browsers. I don't care if it falls back to the normal upload form if the browser is too old.
129 | - I don't think that it's necessary anymore to depend on libraries such as jQuery (especially when providing functionality that isn't available in old browsers anyway).
130 |
131 | MIT License
132 | -----------
133 |
134 | See LICENSE file
135 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropzone",
3 | "location": "enyo/dropzone",
4 | "version": "4.0.1",
5 | "description": "Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.",
6 | "homepage": "http://www.dropzonejs.com",
7 | "main": [
8 | "dist/min/dropzone.min.css",
9 | "dist/min/dropzone.min.js"
10 | ],
11 | "ignore": [
12 | "*",
13 | "!dist",
14 | "!dist/**/*"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropzone",
3 | "repo": "enyo/dropzone",
4 | "version": "4.0.1",
5 | "description": "Handles drag and drop of files for you.",
6 | "scripts": [ "index.js", "dist/dropzone.js" ],
7 | "styles": [ "dist/basic.css" ],
8 | "dependencies": { },
9 | "license": "MIT"
10 | }
11 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "enyo/dropzone",
3 | "description": "Handles drag and drop of files for you.",
4 | "homepage": "http://www.dropzonejs.com",
5 | "keywords": [
6 | "dragndrop",
7 | "drag and drop",
8 | "file upload",
9 | "upload"
10 | ],
11 | "authors": [{
12 | "name": "Matias Meno",
13 | "email": "m@tias.me",
14 | "homepage": "http://www.matiasmeno.com"
15 | }],
16 | "license": "MIT",
17 | "minimum-stability": "dev"
18 | }
19 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/basic.css:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | * Copyright (c) 2012 Matias Meno
4 | */
5 | .dropzone, .dropzone * {
6 | box-sizing: border-box; }
7 |
8 | .dropzone {
9 | position: relative; }
10 | .dropzone .dz-preview {
11 | position: relative;
12 | display: inline-block;
13 | width: 120px;
14 | margin: 0.5em; }
15 | .dropzone .dz-preview .dz-progress {
16 | display: block;
17 | height: 15px;
18 | border: 1px solid #aaa; }
19 | .dropzone .dz-preview .dz-progress .dz-upload {
20 | display: block;
21 | height: 100%;
22 | width: 0;
23 | background: green; }
24 | .dropzone .dz-preview .dz-error-message {
25 | color: red;
26 | display: none; }
27 | .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {
28 | display: block; }
29 | .dropzone .dz-preview.dz-success .dz-success-mark {
30 | display: block; }
31 | .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {
32 | position: absolute;
33 | display: none;
34 | left: 30px;
35 | top: 30px;
36 | width: 54px;
37 | height: 58px;
38 | left: 50%;
39 | margin-left: -27px; }
40 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/dropzone.css:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | * Copyright (c) 2012 Matias Meno
4 | */
5 | @-webkit-keyframes passing-through {
6 | 0% {
7 | opacity: 0;
8 | -webkit-transform: translateY(40px);
9 | -moz-transform: translateY(40px);
10 | -ms-transform: translateY(40px);
11 | -o-transform: translateY(40px);
12 | transform: translateY(40px); }
13 | 30%, 70% {
14 | opacity: 1;
15 | -webkit-transform: translateY(0px);
16 | -moz-transform: translateY(0px);
17 | -ms-transform: translateY(0px);
18 | -o-transform: translateY(0px);
19 | transform: translateY(0px); }
20 | 100% {
21 | opacity: 0;
22 | -webkit-transform: translateY(-40px);
23 | -moz-transform: translateY(-40px);
24 | -ms-transform: translateY(-40px);
25 | -o-transform: translateY(-40px);
26 | transform: translateY(-40px); } }
27 | @-moz-keyframes passing-through {
28 | 0% {
29 | opacity: 0;
30 | -webkit-transform: translateY(40px);
31 | -moz-transform: translateY(40px);
32 | -ms-transform: translateY(40px);
33 | -o-transform: translateY(40px);
34 | transform: translateY(40px); }
35 | 30%, 70% {
36 | opacity: 1;
37 | -webkit-transform: translateY(0px);
38 | -moz-transform: translateY(0px);
39 | -ms-transform: translateY(0px);
40 | -o-transform: translateY(0px);
41 | transform: translateY(0px); }
42 | 100% {
43 | opacity: 0;
44 | -webkit-transform: translateY(-40px);
45 | -moz-transform: translateY(-40px);
46 | -ms-transform: translateY(-40px);
47 | -o-transform: translateY(-40px);
48 | transform: translateY(-40px); } }
49 | @keyframes passing-through {
50 | 0% {
51 | opacity: 0;
52 | -webkit-transform: translateY(40px);
53 | -moz-transform: translateY(40px);
54 | -ms-transform: translateY(40px);
55 | -o-transform: translateY(40px);
56 | transform: translateY(40px); }
57 | 30%, 70% {
58 | opacity: 1;
59 | -webkit-transform: translateY(0px);
60 | -moz-transform: translateY(0px);
61 | -ms-transform: translateY(0px);
62 | -o-transform: translateY(0px);
63 | transform: translateY(0px); }
64 | 100% {
65 | opacity: 0;
66 | -webkit-transform: translateY(-40px);
67 | -moz-transform: translateY(-40px);
68 | -ms-transform: translateY(-40px);
69 | -o-transform: translateY(-40px);
70 | transform: translateY(-40px); } }
71 | @-webkit-keyframes slide-in {
72 | 0% {
73 | opacity: 0;
74 | -webkit-transform: translateY(40px);
75 | -moz-transform: translateY(40px);
76 | -ms-transform: translateY(40px);
77 | -o-transform: translateY(40px);
78 | transform: translateY(40px); }
79 | 30% {
80 | opacity: 1;
81 | -webkit-transform: translateY(0px);
82 | -moz-transform: translateY(0px);
83 | -ms-transform: translateY(0px);
84 | -o-transform: translateY(0px);
85 | transform: translateY(0px); } }
86 | @-moz-keyframes slide-in {
87 | 0% {
88 | opacity: 0;
89 | -webkit-transform: translateY(40px);
90 | -moz-transform: translateY(40px);
91 | -ms-transform: translateY(40px);
92 | -o-transform: translateY(40px);
93 | transform: translateY(40px); }
94 | 30% {
95 | opacity: 1;
96 | -webkit-transform: translateY(0px);
97 | -moz-transform: translateY(0px);
98 | -ms-transform: translateY(0px);
99 | -o-transform: translateY(0px);
100 | transform: translateY(0px); } }
101 | @keyframes slide-in {
102 | 0% {
103 | opacity: 0;
104 | -webkit-transform: translateY(40px);
105 | -moz-transform: translateY(40px);
106 | -ms-transform: translateY(40px);
107 | -o-transform: translateY(40px);
108 | transform: translateY(40px); }
109 | 30% {
110 | opacity: 1;
111 | -webkit-transform: translateY(0px);
112 | -moz-transform: translateY(0px);
113 | -ms-transform: translateY(0px);
114 | -o-transform: translateY(0px);
115 | transform: translateY(0px); } }
116 | @-webkit-keyframes pulse {
117 | 0% {
118 | -webkit-transform: scale(1);
119 | -moz-transform: scale(1);
120 | -ms-transform: scale(1);
121 | -o-transform: scale(1);
122 | transform: scale(1); }
123 | 10% {
124 | -webkit-transform: scale(1.1);
125 | -moz-transform: scale(1.1);
126 | -ms-transform: scale(1.1);
127 | -o-transform: scale(1.1);
128 | transform: scale(1.1); }
129 | 20% {
130 | -webkit-transform: scale(1);
131 | -moz-transform: scale(1);
132 | -ms-transform: scale(1);
133 | -o-transform: scale(1);
134 | transform: scale(1); } }
135 | @-moz-keyframes pulse {
136 | 0% {
137 | -webkit-transform: scale(1);
138 | -moz-transform: scale(1);
139 | -ms-transform: scale(1);
140 | -o-transform: scale(1);
141 | transform: scale(1); }
142 | 10% {
143 | -webkit-transform: scale(1.1);
144 | -moz-transform: scale(1.1);
145 | -ms-transform: scale(1.1);
146 | -o-transform: scale(1.1);
147 | transform: scale(1.1); }
148 | 20% {
149 | -webkit-transform: scale(1);
150 | -moz-transform: scale(1);
151 | -ms-transform: scale(1);
152 | -o-transform: scale(1);
153 | transform: scale(1); } }
154 | @keyframes pulse {
155 | 0% {
156 | -webkit-transform: scale(1);
157 | -moz-transform: scale(1);
158 | -ms-transform: scale(1);
159 | -o-transform: scale(1);
160 | transform: scale(1); }
161 | 10% {
162 | -webkit-transform: scale(1.1);
163 | -moz-transform: scale(1.1);
164 | -ms-transform: scale(1.1);
165 | -o-transform: scale(1.1);
166 | transform: scale(1.1); }
167 | 20% {
168 | -webkit-transform: scale(1);
169 | -moz-transform: scale(1);
170 | -ms-transform: scale(1);
171 | -o-transform: scale(1);
172 | transform: scale(1); } }
173 | .dropzone, .dropzone * {
174 | box-sizing: border-box; }
175 |
176 | .dropzone {
177 | min-height: 150px;
178 | border: 2px solid rgba(0, 0, 0, 0.3);
179 | background: white;
180 | padding: 20px 20px; }
181 | .dropzone.dz-clickable {
182 | cursor: pointer; }
183 | .dropzone.dz-clickable * {
184 | cursor: default; }
185 | .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
186 | cursor: pointer; }
187 | .dropzone.dz-started .dz-message {
188 | display: none; }
189 | .dropzone.dz-drag-hover {
190 | border-style: solid; }
191 | .dropzone.dz-drag-hover .dz-message {
192 | opacity: 0.5; }
193 | .dropzone .dz-message {
194 | text-align: center;
195 | margin: 2em 0; }
196 | .dropzone .dz-preview {
197 | position: relative;
198 | display: inline-block;
199 | vertical-align: top;
200 | margin: 16px;
201 | min-height: 100px; }
202 | .dropzone .dz-preview:hover {
203 | z-index: 1000; }
204 | .dropzone .dz-preview:hover .dz-details {
205 | opacity: 1; }
206 | .dropzone .dz-preview.dz-file-preview .dz-image {
207 | border-radius: 20px;
208 | background: #999;
209 | background: linear-gradient(to bottom, #eee, #ddd); }
210 | .dropzone .dz-preview.dz-file-preview .dz-details {
211 | opacity: 1; }
212 | .dropzone .dz-preview.dz-image-preview {
213 | background: white; }
214 | .dropzone .dz-preview.dz-image-preview .dz-details {
215 | -webkit-transition: opacity 0.2s linear;
216 | -moz-transition: opacity 0.2s linear;
217 | -ms-transition: opacity 0.2s linear;
218 | -o-transition: opacity 0.2s linear;
219 | transition: opacity 0.2s linear; }
220 | .dropzone .dz-preview .dz-remove {
221 | font-size: 14px;
222 | text-align: center;
223 | display: block;
224 | cursor: pointer;
225 | border: none; }
226 | .dropzone .dz-preview .dz-remove:hover {
227 | text-decoration: underline; }
228 | .dropzone .dz-preview:hover .dz-details {
229 | opacity: 1; }
230 | .dropzone .dz-preview .dz-details {
231 | z-index: 20;
232 | position: absolute;
233 | top: 0;
234 | left: 0;
235 | opacity: 0;
236 | font-size: 13px;
237 | min-width: 100%;
238 | max-width: 100%;
239 | padding: 2em 1em;
240 | text-align: center;
241 | color: rgba(0, 0, 0, 0.9);
242 | line-height: 150%; }
243 | .dropzone .dz-preview .dz-details .dz-size {
244 | margin-bottom: 1em;
245 | font-size: 16px; }
246 | .dropzone .dz-preview .dz-details .dz-filename {
247 | white-space: nowrap; }
248 | .dropzone .dz-preview .dz-details .dz-filename:hover span {
249 | border: 1px solid rgba(200, 200, 200, 0.8);
250 | background-color: rgba(255, 255, 255, 0.8); }
251 | .dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
252 | overflow: hidden;
253 | text-overflow: ellipsis; }
254 | .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
255 | border: 1px solid transparent; }
256 | .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
257 | background-color: rgba(255, 255, 255, 0.4);
258 | padding: 0 0.4em;
259 | border-radius: 3px; }
260 | .dropzone .dz-preview:hover .dz-image img {
261 | -webkit-transform: scale(1.05, 1.05);
262 | -moz-transform: scale(1.05, 1.05);
263 | -ms-transform: scale(1.05, 1.05);
264 | -o-transform: scale(1.05, 1.05);
265 | transform: scale(1.05, 1.05);
266 | -webkit-filter: blur(8px);
267 | filter: blur(8px); }
268 | .dropzone .dz-preview .dz-image {
269 | border-radius: 20px;
270 | overflow: hidden;
271 | width: 120px;
272 | height: 120px;
273 | position: relative;
274 | display: block;
275 | z-index: 10; }
276 | .dropzone .dz-preview .dz-image img {
277 | display: block; }
278 | .dropzone .dz-preview.dz-success .dz-success-mark {
279 | -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
280 | -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
281 | -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
282 | -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
283 | animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
284 | .dropzone .dz-preview.dz-error .dz-error-mark {
285 | opacity: 1;
286 | -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
287 | -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
288 | -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
289 | -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
290 | animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
291 | .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
292 | pointer-events: none;
293 | opacity: 0;
294 | z-index: 500;
295 | position: absolute;
296 | display: block;
297 | top: 50%;
298 | left: 50%;
299 | margin-left: -27px;
300 | margin-top: -27px; }
301 | .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
302 | display: block;
303 | width: 54px;
304 | height: 54px; }
305 | .dropzone .dz-preview.dz-processing .dz-progress {
306 | opacity: 1;
307 | -webkit-transition: all 0.2s linear;
308 | -moz-transition: all 0.2s linear;
309 | -ms-transition: all 0.2s linear;
310 | -o-transition: all 0.2s linear;
311 | transition: all 0.2s linear; }
312 | .dropzone .dz-preview.dz-complete .dz-progress {
313 | opacity: 0;
314 | -webkit-transition: opacity 0.4s ease-in;
315 | -moz-transition: opacity 0.4s ease-in;
316 | -ms-transition: opacity 0.4s ease-in;
317 | -o-transition: opacity 0.4s ease-in;
318 | transition: opacity 0.4s ease-in; }
319 | .dropzone .dz-preview:not(.dz-processing) .dz-progress {
320 | -webkit-animation: pulse 6s ease infinite;
321 | -moz-animation: pulse 6s ease infinite;
322 | -ms-animation: pulse 6s ease infinite;
323 | -o-animation: pulse 6s ease infinite;
324 | animation: pulse 6s ease infinite; }
325 | .dropzone .dz-preview .dz-progress {
326 | opacity: 1;
327 | z-index: 1000;
328 | pointer-events: none;
329 | position: absolute;
330 | height: 16px;
331 | left: 50%;
332 | top: 50%;
333 | margin-top: -8px;
334 | width: 80px;
335 | margin-left: -40px;
336 | background: rgba(255, 255, 255, 0.9);
337 | -webkit-transform: scale(1);
338 | border-radius: 8px;
339 | overflow: hidden; }
340 | .dropzone .dz-preview .dz-progress .dz-upload {
341 | background: #333;
342 | background: linear-gradient(to bottom, #666, #444);
343 | position: absolute;
344 | top: 0;
345 | left: 0;
346 | bottom: 0;
347 | width: 0;
348 | -webkit-transition: width 300ms ease-in-out;
349 | -moz-transition: width 300ms ease-in-out;
350 | -ms-transition: width 300ms ease-in-out;
351 | -o-transition: width 300ms ease-in-out;
352 | transition: width 300ms ease-in-out; }
353 | .dropzone .dz-preview.dz-error .dz-error-message {
354 | display: block; }
355 | .dropzone .dz-preview.dz-error:hover .dz-error-message {
356 | opacity: 1;
357 | pointer-events: auto; }
358 | .dropzone .dz-preview .dz-error-message {
359 | pointer-events: none;
360 | z-index: 1000;
361 | position: absolute;
362 | display: block;
363 | display: none;
364 | opacity: 0;
365 | -webkit-transition: opacity 0.3s ease;
366 | -moz-transition: opacity 0.3s ease;
367 | -ms-transition: opacity 0.3s ease;
368 | -o-transition: opacity 0.3s ease;
369 | transition: opacity 0.3s ease;
370 | border-radius: 8px;
371 | font-size: 13px;
372 | top: 130px;
373 | left: -10px;
374 | width: 140px;
375 | background: #be2626;
376 | background: linear-gradient(to bottom, #be2626, #a92222);
377 | padding: 0.5em 1.2em;
378 | color: white; }
379 | .dropzone .dz-preview .dz-error-message:after {
380 | content: '';
381 | position: absolute;
382 | top: -6px;
383 | left: 64px;
384 | width: 0;
385 | height: 0;
386 | border-left: 6px solid transparent;
387 | border-right: 6px solid transparent;
388 | border-bottom: 6px solid #be2626; }
389 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/min/basic.min.css:
--------------------------------------------------------------------------------
1 | .dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:0.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px}
2 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/min/dropzone-amd-module.min.js:
--------------------------------------------------------------------------------
1 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b={exports:{}};return function(){var c,d,e,f,g,h,i,j,k=[].slice,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=function(){},d=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),c=function(a){function b(a,d){var e,f,g;if(this.element=a,this.version=b.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(b.instances.push(this),this.element.dropzone=this,e=null!=(g=b.optionsForElement(this.element))?g:{},this.options=c({},this.defaultOptions,e,null!=d?d:{}),this.options.forceFallback||!b.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?b.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:b.getElements(this.options.clickable,"clickable")),this.init()}var c,e;return m(b,a),b.prototype.Emitter=d,b.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],b.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,filesizeBase:1e3,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return i},forceFallback:!1,fallback:function(){var a,c,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(c=a,a.className="dz-message");return c||(c=b.createElement('
'),this.element.appendChild(c)),d=c.getElementsByTagName("span")[0],d&&(d.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:i,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:i,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)c=l[f],c.textContent=a.name;for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)c=m[g],c.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(c){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:i,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:i,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:i,sending:i,sendingmultiple:i,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:i,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:i,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:i,maxfilesexceeded:i,maxfilesreached:i,queuecomplete:i,previewTemplate:'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'},c=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?k.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},b.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},b.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},b.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},b.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(b.QUEUED)},b.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(b.UPLOADING)},b.prototype.getActiveFiles=function(){var a,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)a=e[c],(a.status===b.UPLOADING||a.status===b.QUEUED)&&f.push(a);return f},b.prototype.init=function(){var a,c,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&document.body.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.body.appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),c=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(b){return c(b),a.emit("dragenter",b)}}(this),dragover:function(a){return function(b){var d;try{d=b.dataTransfer.effectAllowed}catch(e){}return b.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",c(b),a.emit("dragover",b)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(b){return c(b),a.drop(b)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(c){return a.listeners.push({element:c,events:{click:function(d){return c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message"))?a.hiddenFileInput.click():void 0}}})}}(this)),this.enable(),this.options.init.call(this)},b.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)},b.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},b.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},b.prototype.getFallbackForm=function(){var a,c,d,e;return(a=this.getExistingFallback())?a:(d='',c=b.createElement(d),"FORM"!==this.element.tagName?(e=b.createElement(''),e.appendChild(c)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:c)},b.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},b.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},b.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},b.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},b.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},b.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;for(g=["TB","GB","MB","KB","b"],d=e=null,c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}return d=Math.round(10*d)/10,""+d+" "+e},b.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},b.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},b.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},b.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},b.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},b.prototype._addFilesFromDirectory=function(a,b){var c,d;return c=a.createReader(),d=function(a){return function(c){var d,e,f;for(e=0,f=c.length;f>e;e++)d=c[e],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name)}}(this),c.readEntries(d,function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0})},b.prototype.accept=function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)},b.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},b.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},b.prototype.enqueueFile=function(a){if(a.status!==b.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=b.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},b.prototype._thumbnailQueue=[],b.prototype._processingThumbnail=!1,b.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},b.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},b.prototype.removeFile=function(a){return a.status===b.UPLOADING&&this.cancelUpload(a),this.files=j(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},b.prototype.removeAllFiles=function(a){var c,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)c=f[d],(c.status!==b.UPLOADING||a)&&this.removeFile(c);return null},b.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){var e;return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):(e=document.createElement("img"),e.onload=function(){var c,f,g,i,j,k,l,m;return a.width=e.width,a.height=e.height,g=d.options.resize.call(d,a),null==g.trgWidth&&(g.trgWidth=g.optWidth),null==g.trgHeight&&(g.trgHeight=g.optHeight),c=document.createElement("canvas"),f=c.getContext("2d"),c.width=g.trgWidth,c.height=g.trgHeight,h(f,e,null!=(j=g.srcX)?j:0,null!=(k=g.srcY)?k:0,g.srcWidth,g.srcHeight,null!=(l=g.trgX)?l:0,null!=(m=g.trgY)?m:0,g.trgWidth,g.trgHeight),i=c.toDataURL("image/png"),d.emit("thumbnail",a,i),null!=b?b():void 0},e.onerror=b,e.src=c.result)}}(this),c.readAsDataURL(a)},b.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},b.prototype.processFile=function(a){return this.processFiles([a])},b.prototype.processFiles=function(a){var c,d,e;for(d=0,e=a.length;e>d;d++)c=a[d],c.processing=!0,c.status=b.UPLOADING,this.emit("processing",c);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},b.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},b.prototype.cancelUpload=function(a){var c,d,e,f,g,h,i;if(a.status===b.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)c=d[e],c.status=b.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)c=d[f],this.emit("canceled",c);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===b.ADDED||i===b.QUEUED)&&(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?k.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},b.prototype.uploadFile=function(a){return this.uploadFiles([a])},b.prototype.uploadFiles=function(a){var d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)d=a[x],d.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(b){return function(){var c,e,f;for(f=[],c=0,e=a.length;e>c;c++)d=a[c],f.push(b._errorProcessing(a,s||b.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(b){return function(c){var e,f,g,h,i,j,k,l,m;if(null!=c)for(f=100*c.loaded/c.total,g=0,j=a.length;j>g;g++)d=a[g],d.upload={progress:f,total:c.total,bytesSent:c.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)d=a[h],(100!==d.upload.progress||d.upload.bytesSent!==d.upload.total)&&(e=!1),d.upload.progress=f,d.upload.bytesSent=d.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)d=a[i],m.push(b.emit("uploadprogress",d,f,d.upload.bytesSent));return m}}(this),w.onload=function(c){return function(d){var e;if(a[0].status!==b.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?c._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==b.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&c(j,this.options.headers);for(h in j)i=j[h],w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)d=a[y],this.emit("sending",d,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],a[k].name);return w.send(f)},b.prototype._finished=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.SUCCESS,this.emit("success",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b.prototype._errorProcessing=function(a,c,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=b.ERROR,this.emit("error",e,c,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},b}(d),c.version="4.0.1",c.options={},c.optionsForElement=function(a){return a.getAttribute("id")?c.options[e(a.getAttribute("id"))]:void 0},c.instances=[],c.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))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.");return a.dropzone},c.autoDiscover=!0,c.discover=function(){var a,b,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],a=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},a(document.getElementsByTagName("div")),a(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)b=d[e],g.push(c.optionsForElement(b)!==!1?new c(b):void 0);return g},c.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],c.isBrowserSupported=function(){var a,b,d,e,f;if(a=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=c.blacklistedBrowsers,d=0,e=f.length;e>d;d++)b=f[d],b.test(navigator.userAgent)&&(a=!1);else a=!1;else a=!1;return a},j=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},e=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},c.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},c.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},c.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},c.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},c.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},c.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0}else if(d===e)return!0;return!1},"undefined"!=typeof a&&null!==a&&(a.fn.dropzone=function(a){return this.each(function(){return new c(this,a)})}),"undefined"!=typeof b&&null!==b?b.exports=c:window.Dropzone=c,c.ADDED="added",c.QUEUED="queued",c.ACCEPTED=c.QUEUED,c.UPLOADING="uploading",c.PROCESSING=c.UPLOADING,c.CANCELED="canceled",c.ERROR="error",c.SUCCESS="success",g=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},h=function(a,b,c,d,e,f,h,i,j,k){var l;
2 | return l=g(b),a.drawImage(b,c,d,e,f,h,i,j,k/l)},f=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0},g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},c._autoDiscoverFunction=function(){return c.autoDiscover?c.discover():void 0},f(window,c._autoDiscoverFunction)}.call(this),b.exports});
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/min/dropzone.min.css:
--------------------------------------------------------------------------------
1 | @-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,0.3);background:white;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:0.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:white}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;-ms-transition:opacity 0.2s linear;-o-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,0.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,0.8);background-color:rgba(255,255,255,0.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,0.4);padding:0 0.4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05, 1.05);-moz-transform:scale(1.05, 1.05);-ms-transform:scale(1.05, 1.05);-o-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity 0.4s ease-in;-moz-transition:opacity 0.4s ease-in;-ms-transition:opacity 0.4s ease-in;-o-transition:opacity 0.4s ease-in;transition:opacity 0.4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,0.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom, #666, #444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width 300ms ease-in-out;-moz-transition:width 300ms ease-in-out;-ms-transition:width 300ms ease-in-out;-o-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity 0.3s ease;-moz-transition:opacity 0.3s ease;-ms-transition:opacity 0.3s ease;-o-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom, #be2626, #a92222);padding:0.5em 1.2em;color:white}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}
2 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/min/dropzone.min.js:
--------------------------------------------------------------------------------
1 | (function(){var a,b,c,d,e,f,g,h,i=[].slice,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=function(){},b=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;f>e;e++)b=c[e],b.apply(this,a);return this},a.prototype.removeListener=a.prototype.off,a.prototype.removeAllListeners=a.prototype.off,a.prototype.removeEventListener=a.prototype.off,a.prototype.off=function(a,b){var c,d,e,f,g;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(d=this._callbacks[a],!d)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(e=f=0,g=d.length;g>f;e=++f)if(c=d[e],c===b){d.splice(e,1);break}return this},a}(),a=function(a){function c(a,b){var e,f,g;if(this.element=a,this.version=c.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(c.instances.push(this),this.element.dropzone=this,e=null!=(g=c.optionsForElement(this.element))?g:{},this.options=d({},this.defaultOptions,e,null!=b?b:{}),this.options.forceFallback||!c.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(f=this.getExistingFallback())&&f.parentNode&&f.parentNode.removeChild(f),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?c.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:c.getElements(this.options.clickable,"clickable")),this.init()}var d,e;return k(c,a),c.prototype.Emitter=b,c.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],c.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,filesizeBase:1e3,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(a,b){return b()},init:function(){return g},forceFallback:!1,fallback:function(){var a,b,d,e,f,g;for(this.element.className=""+this.element.className+" dz-browser-not-supported",g=this.element.getElementsByTagName("div"),e=0,f=g.length;f>e;e++)a=g[e],/(^| )dz-message($| )/.test(a.className)&&(b=a,a.className="dz-message");return b||(b=c.createElement('
'),this.element.appendChild(b)),d=b.getElementsByTagName("span")[0],d&&(d.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:g,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:g,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var b,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=c.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;i>f;f++)b=l[f],b.textContent=a.name;for(m=a.previewElement.querySelectorAll("[data-dz-size]"),g=0,j=m.length;j>g;g++)b=m[g],b.innerHTML=this.filesize(a.size);for(this.options.addRemoveLinks&&(a._removeLink=c.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(b){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===c.UPLOADING?c.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?c.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;k>h;h++)e=n[h],o.push(e.addEventListener("click",d));return o}},removedfile:function(a){var b;return a.previewElement&&null!=(b=a.previewElement)&&b.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){var c,d,e,f;if(a.previewElement){for(a.previewElement.classList.remove("dz-file-preview"),f=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,e=f.length;e>d;d++)c=f[d],c.alt=a.name,c.src=b;return setTimeout(function(){return function(){return a.previewElement.classList.add("dz-image-preview")}}(this),1)}},error:function(a,b){var c,d,e,f,g;if(a.previewElement){for(a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error),f=a.previewElement.querySelectorAll("[data-dz-errormessage]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.textContent=b);return g}},errormultiple:g,processing:function(a){return a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink)?a._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:g,uploadprogress:function(a,b){var c,d,e,f,g;if(a.previewElement){for(f=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push("PROGRESS"===c.nodeName?c.value=b:c.style.width=""+b+"%");return g}},totaluploadprogress:g,sending:g,sendingmultiple:g,success:function(a){return a.previewElement?a.previewElement.classList.add("dz-success"):void 0},successmultiple:g,canceled:function(a){return this.emit("error",a,"Upload canceled.")},canceledmultiple:g,complete:function(a){return a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement?a.previewElement.classList.add("dz-complete"):void 0},completemultiple:g,maxfilesexceeded:g,maxfilesreached:g,queuecomplete:g,previewTemplate:'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'},d=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?i.call(arguments,1):[],f=0,g=c.length;g>f;f++){b=c[f];for(a in b)e=b[a],d[a]=e}return d},c.prototype.getAcceptedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted&&e.push(a);return e},c.prototype.getRejectedFiles=function(){var a,b,c,d,e;for(d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.accepted||e.push(a);return e},c.prototype.getFilesWithStatus=function(a){var b,c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.status===a&&f.push(b);return f},c.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(c.QUEUED)},c.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(c.UPLOADING)},c.prototype.getActiveFiles=function(){var a,b,d,e,f;for(e=this.files,f=[],b=0,d=e.length;d>b;b++)a=e[b],(a.status===c.UPLOADING||a.status===c.QUEUED)&&f.push(a);return f},c.prototype.init=function(){var a,b,d,e,f,g,h;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(c.createElement(''+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&document.body.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.body.appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;f>e;e++)b=c[e],a.addFile(b);return d()})}}(this))(),this.URL=null!=(g=window.URL)?g:window.webkitURL,h=this.events,e=0,f=h.length;f>e;e++)a=h[e],this.on(a,this.options[a]);return this.on("uploadprogress",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(a){return function(){return a.updateTotalUploadProgress()}}(this)),this.on("canceled",function(a){return function(b){return a.emit("complete",b)}}(this)),this.on("complete",function(a){return function(){return 0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length?setTimeout(function(){return a.emit("queuecomplete")},0):void 0}}(this)),b=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(a){return function(b){return a.emit("dragstart",b)}}(this),dragenter:function(a){return function(c){return b(c),a.emit("dragenter",c)}}(this),dragover:function(a){return function(c){var d;try{d=c.dataTransfer.effectAllowed}catch(e){}return c.dataTransfer.dropEffect="move"===d||"linkMove"===d?"move":"copy",b(c),a.emit("dragover",c)}}(this),dragleave:function(a){return function(b){return a.emit("dragleave",b)}}(this),drop:function(a){return function(c){return b(c),a.drop(c)}}(this),dragend:function(a){return function(b){return a.emit("dragend",b)}}(this)}}],this.clickableElements.forEach(function(a){return function(b){return a.listeners.push({element:b,events:{click:function(d){return b!==a.element||d.target===a.element||c.elementInside(d.target,a.element.querySelector(".dz-message"))?a.hiddenFileInput.click():void 0}}})}}(this)),this.enable(),this.options.init.call(this)},c.prototype.destroy=function(){var a;return this.disable(),this.removeAllFiles(!0),(null!=(a=this.hiddenFileInput)?a.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,c.instances.splice(c.instances.indexOf(this),1)},c.prototype.updateTotalUploadProgress=function(){var a,b,c,d,e,f,g,h;if(d=0,c=0,a=this.getActiveFiles(),a.length){for(h=this.getActiveFiles(),f=0,g=h.length;g>f;f++)b=h[f],d+=b.upload.bytesSent,c+=b.upload.total;e=100*d/c}else e=100;return this.emit("totaluploadprogress",e,c,d)},c.prototype._getParamName=function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):""+this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")},c.prototype.getFallbackForm=function(){var a,b,d,e;return(a=this.getExistingFallback())?a:(d='',b=c.createElement(d),"FORM"!==this.element.tagName?(e=c.createElement(''),e.appendChild(b)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:b)},c.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)if(b=a[c],/(^| )fallback($| )/.test(b.className))return b},f=["div","form"],d=0,e=f.length;e>d;d++)if(c=f[d],a=b(this.element.getElementsByTagName(c)))return a},c.prototype.setupEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.addEventListener(b,c,!1));return e}());return g},c.prototype.removeEventListeners=function(){var a,b,c,d,e,f,g;for(f=this.listeners,g=[],d=0,e=f.length;e>d;d++)a=f[d],g.push(function(){var d,e;d=a.events,e=[];for(b in d)c=d[b],e.push(a.element.removeEventListener(b,c,!1));return e}());return g},c.prototype.disable=function(){var a,b,c,d,e;for(this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),d=this.files,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(this.cancelUpload(a));return e},c.prototype.enable=function(){return this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()},c.prototype.filesize=function(a){var b,c,d,e,f,g,h,i;for(g=["TB","GB","MB","KB","b"],d=e=null,c=h=0,i=g.length;i>h;c=++h)if(f=g[c],b=Math.pow(this.options.filesizeBase,4-c)/10,a>=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}return d=Math.round(10*d)/10,""+d+" "+e},c.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},c.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},c.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},c.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.addFile(b));return e},c.prototype._addFilesFromItems=function(a){var b,c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],f.push(null!=c.webkitGetAsEntry&&(b=c.webkitGetAsEntry())?b.isFile?this.addFile(c.getAsFile()):b.isDirectory?this._addFilesFromDirectory(b,b.name):void 0:null!=c.getAsFile?null==c.kind||"file"===c.kind?this.addFile(c.getAsFile()):void 0:void 0);return f},c.prototype._addFilesFromDirectory=function(a,b){var c,d;return c=a.createReader(),d=function(a){return function(c){var d,e,f;for(e=0,f=c.length;f>e;e++)d=c[e],d.isFile?d.file(function(c){return a.options.ignoreHiddenFiles&&"."===c.name.substring(0,1)?void 0:(c.fullPath=""+b+"/"+c.name,a.addFile(c))}):d.isDirectory&&a._addFilesFromDirectory(d,""+b+"/"+d.name)}}(this),c.readEntries(d,function(a){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(a):void 0})},c.prototype.accept=function(a,b){return a.size>1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):c.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},c.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=c.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},c.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;d>c;c++)b=a[c],this.enqueueFile(b);return null},c.prototype.enqueueFile=function(a){if(a.status!==c.ADDED||a.accepted!==!0)throw new Error("This file can't be queued because it has already been processed or was rejected.");return a.status=c.QUEUED,this.options.autoProcessQueue?setTimeout(function(a){return function(){return a.processQueue()}}(this),0):void 0},c.prototype._thumbnailQueue=[],c.prototype._processingThumbnail=!1,c.prototype._enqueueThumbnail=function(a){return this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024?(this._thumbnailQueue.push(a),setTimeout(function(a){return function(){return a._processThumbnailQueue()}}(this),0)):void 0},c.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(a){return function(){return a._processingThumbnail=!1,a._processThumbnailQueue()}}(this)))},c.prototype.removeFile=function(a){return a.status===c.UPLOADING&&this.cancelUpload(a),this.files=h(this.files,a),this.emit("removedfile",a),0===this.files.length?this.emit("reset"):void 0},c.prototype.removeAllFiles=function(a){var b,d,e,f;for(null==a&&(a=!1),f=this.files.slice(),d=0,e=f.length;e>d;d++)b=f[d],(b.status!==c.UPLOADING||a)&&this.removeFile(b);return null},c.prototype.createThumbnail=function(a,b){var c;return c=new FileReader,c.onload=function(d){return function(){var e;return"image/svg+xml"===a.type?(d.emit("thumbnail",a,c.result),void(null!=b&&b())):(e=document.createElement("img"),e.onload=function(){var c,g,h,i,j,k,l,m;return a.width=e.width,a.height=e.height,h=d.options.resize.call(d,a),null==h.trgWidth&&(h.trgWidth=h.optWidth),null==h.trgHeight&&(h.trgHeight=h.optHeight),c=document.createElement("canvas"),g=c.getContext("2d"),c.width=h.trgWidth,c.height=h.trgHeight,f(g,e,null!=(j=h.srcX)?j:0,null!=(k=h.srcY)?k:0,h.srcWidth,h.srcHeight,null!=(l=h.trgX)?l:0,null!=(m=h.trgY)?m:0,h.trgWidth,h.trgHeight),i=c.toDataURL("image/png"),d.emit("thumbnail",a,i),null!=b?b():void 0},e.onerror=b,e.src=c.result)}}(this),c.readAsDataURL(a)},c.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;b>a;){if(!d.length)return;this.processFile(d.shift()),a++}}},c.prototype.processFile=function(a){return this.processFiles([a])},c.prototype.processFiles=function(a){var b,d,e;for(d=0,e=a.length;e>d;d++)b=a[d],b.processing=!0,b.status=c.UPLOADING,this.emit("processing",b);return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)},c.prototype._getFilesWithXhr=function(a){var b,c;return c=function(){var c,d,e,f;for(e=this.files,f=[],c=0,d=e.length;d>c;c++)b=e[c],b.xhr===a&&f.push(b);return f}.call(this)},c.prototype.cancelUpload=function(a){var b,d,e,f,g,h,i;if(a.status===c.UPLOADING){for(d=this._getFilesWithXhr(a.xhr),e=0,g=d.length;g>e;e++)b=d[e],b.status=c.CANCELED;for(a.xhr.abort(),f=0,h=d.length;h>f;f++)b=d[f],this.emit("canceled",b);this.options.uploadMultiple&&this.emit("canceledmultiple",d)}else((i=a.status)===c.ADDED||i===c.QUEUED)&&(a.status=c.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));return this.options.autoProcessQueue?this.processQueue():void 0},e=function(){var a,b;return b=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],"function"==typeof b?b.apply(this,a):b},c.prototype.uploadFile=function(a){return this.uploadFiles([a])},c.prototype.uploadFiles=function(a){var b,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L;for(w=new XMLHttpRequest,x=0,B=a.length;B>x;x++)b=a[x],b.xhr=w;p=e(this.options.method,a),u=e(this.options.url,a),w.open(p,u,!0),w.withCredentials=!!this.options.withCredentials,s=null,g=function(c){return function(){var d,e,f;for(f=[],d=0,e=a.length;e>d;d++)b=a[d],f.push(c._errorProcessing(a,s||c.options.dictResponseError.replace("{{statusCode}}",w.status),w));return f}}(this),t=function(c){return function(d){var e,f,g,h,i,j,k,l,m;if(null!=d)for(f=100*d.loaded/d.total,g=0,j=a.length;j>g;g++)b=a[g],b.upload={progress:f,total:d.total,bytesSent:d.loaded};else{for(e=!0,f=100,h=0,k=a.length;k>h;h++)b=a[h],(100!==b.upload.progress||b.upload.bytesSent!==b.upload.total)&&(e=!1),b.upload.progress=f,b.upload.bytesSent=b.upload.total;if(e)return}for(m=[],i=0,l=a.length;l>i;i++)b=a[i],m.push(c.emit("uploadprogress",b,f,b.upload.bytesSent));return m}}(this),w.onload=function(b){return function(d){var e;if(a[0].status!==c.CANCELED&&4===w.readyState){if(s=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{s=JSON.parse(s)}catch(f){d=f,s="Invalid JSON response from server."}return t(),200<=(e=w.status)&&300>e?b._finished(a,s,d):g()}}}(this),w.onerror=function(){return function(){return a[0].status!==c.CANCELED?g():void 0}}(this),r=null!=(G=w.upload)?G:w,r.onprogress=t,j={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&d(j,this.options.headers);for(h in j)i=j[h],w.setRequestHeader(h,i);if(f=new FormData,this.options.params){H=this.options.params;for(o in H)v=H[o],f.append(o,v)}for(y=0,C=a.length;C>y;y++)b=a[y],this.emit("sending",b,w,f);if(this.options.uploadMultiple&&this.emit("sendingmultiple",a,w,f),"FORM"===this.element.tagName)for(I=this.element.querySelectorAll("input, textarea, select, button"),z=0,D=I.length;D>z;z++)if(l=I[z],m=l.getAttribute("name"),n=l.getAttribute("type"),"SELECT"===l.tagName&&l.hasAttribute("multiple"))for(J=l.options,A=0,E=J.length;E>A;A++)q=J[A],q.selected&&f.append(m,q.value);else(!n||"checkbox"!==(K=n.toLowerCase())&&"radio"!==K||l.checked)&&f.append(m,l.value);for(k=F=0,L=a.length-1;L>=0?L>=F:F>=L;k=L>=0?++F:--F)f.append(this._getParamName(k),a[k],a[k].name);return w.send(f)},c.prototype._finished=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.SUCCESS,this.emit("success",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("successmultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c.prototype._errorProcessing=function(a,b,d){var e,f,g;for(f=0,g=a.length;g>f;f++)e=a[f],e.status=c.ERROR,this.emit("error",e,b,d),this.emit("complete",e);return this.options.uploadMultiple&&(this.emit("errormultiple",a,b,d),this.emit("completemultiple",a)),this.options.autoProcessQueue?this.processQueue():void 0},c}(b),a.version="4.0.1",a.options={},a.optionsForElement=function(b){return b.getAttribute("id")?a.options[c(b.getAttribute("id"))]:void 0},a.instances=[],a.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))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.");return a.dropzone},a.autoDiscover=!0,a.discover=function(){var b,c,d,e,f,g;for(document.querySelectorAll?d=document.querySelectorAll(".dropzone"):(d=[],b=function(a){var b,c,e,f;for(f=[],c=0,e=a.length;e>c;c++)b=a[c],f.push(/(^| )dropzone($| )/.test(b.className)?d.push(b):void 0);return f},b(document.getElementsByTagName("div")),b(document.getElementsByTagName("form"))),g=[],e=0,f=d.length;f>e;e++)c=d[e],g.push(a.optionsForElement(c)!==!1?new a(c):void 0);return g},a.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],a.isBrowserSupported=function(){var b,c,d,e,f;if(b=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(f=a.blacklistedBrowsers,d=0,e=f.length;e>d;d++)c=f[d],c.test(navigator.userAgent)&&(b=!1);else b=!1;else b=!1;return b},h=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;e>d;d++)c=a[d],c!==b&&f.push(c);return f},c=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})},a.createElement=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.childNodes[0]},a.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},a.getElement=function(a,b){var c;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},a.getElements=function(a,b){var c,d,e,f,g,h,i,j;if(a instanceof Array){e=[];try{for(f=0,h=a.length;h>f;f++)d=a[f],e.push(this.getElement(d,b))}catch(k){c=k,e=null}}else if("string"==typeof a)for(e=[],j=document.querySelectorAll(a),g=0,i=j.length;i>g;g++)d=j[g],e.push(d);else null!=a.nodeType&&(e=[a]);if(null==e||!e.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return e},a.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},a.isValidFile=function(a,b){var c,d,e,f,g;if(!b)return!0;for(b=b.split(","),d=a.type,c=d.replace(/\/.*$/,""),f=0,g=b.length;g>f;f++)if(e=b[f],e=e.trim(),"."===e.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(e.toLowerCase(),a.name.length-e.length))return!0}else if(/\/\*$/.test(e)){if(c===e.replace(/\/.*$/,""))return!0}else if(d===e)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(b){return this.each(function(){return new a(this,b)})}),"undefined"!=typeof module&&null!==module?module.exports=a:window.Dropzone=a,a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success",e=function(a){var b,c,d,e,f,g,h,i,j,k;for(h=a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,k=0,f=g,i=g;i>k;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){return"readystatechange"!==c.type||"complete"===d.readyState?(("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0):void 0
2 | },g=function(){var a;try{j.doScroll("left")}catch(b){return a=b,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(l){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},a._autoDiscoverFunction=function(){return a.autoDiscover?a.discover():void 0},d(window,a._autoDiscoverFunction)}).call(this);
--------------------------------------------------------------------------------
/assets/versions/4.0.1/dist/readme.md:
--------------------------------------------------------------------------------
1 | # Warning!
2 |
3 | You shouldn't pull these files from the github master branch directly!
4 |
5 | They might be outdated or not working at all since I normally only push them
6 | when I create a version release.
7 |
8 | To be sure to get a proper release, please go to the
9 | [dropzone releases section on github](https://github.com/enyo/dropzone/releases/latest).
10 |
11 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/index.js:
--------------------------------------------------------------------------------
1 | module.exports = require("./lib/dropzone.js"); // Exposing dropzone
2 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropzone",
3 | "version": "4.0.1",
4 | "description": "Handles drag and drop of files for you.",
5 | "keywords": [
6 | "dragndrop",
7 | "drag and drop",
8 | "file upload",
9 | "upload"
10 | ],
11 | "homepage": "http://www.dropzonejs.com",
12 | "main": "./dist/dropzone.js",
13 | "maintainers": [
14 | {
15 | "name": "Matias Meno",
16 | "email": "m@tias.me",
17 | "web": "http://www.matiasmeno.com"
18 | }
19 | ],
20 | "contributors": [
21 | {
22 | "name": "Matias Meno",
23 | "email": "m@tias.me",
24 | "web": "http://www.matiasmeno.com"
25 | }
26 | ],
27 | "scripts": {
28 | "test": "./test.sh"
29 | },
30 | "bugs": {
31 | "email": "m@tias.me",
32 | "url": "https://github.com/enyo/dropzone/issues"
33 | },
34 | "licenses": [
35 | {
36 | "type": "MIT",
37 | "url": "http://www.opensource.org/licenses/MIT"
38 | }
39 | ],
40 | "repository": {
41 | "type": "git",
42 | "url": "https://github.com/enyo/dropzone.git"
43 | },
44 | "dependencies": {},
45 | "devDependencies": {
46 | "chai": "1.7.x",
47 | "grunt": "^0.4.4",
48 | "grunt-contrib-coffee": "^0.10.1",
49 | "grunt-contrib-concat": "^0.4.0",
50 | "grunt-contrib-sass": "^0.8.1",
51 | "grunt-contrib-uglify": "^0.4.0",
52 | "grunt-contrib-watch": "^0.6.1",
53 | "mocha": "^1.18.2",
54 | "mocha-phantomjs": "^3.3.2",
55 | "sinon": "1.9.1"
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/src/basic.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | * Copyright (c) 2012 Matias Meno
4 | */
5 |
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | // this software and associated documentation files (the "Software"), to deal in
8 | // the Software without restriction, including without limitation the rights to
9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | // of the Software, and to permit persons to whom the Software is furnished to do
11 | // so, subject to the following conditions:
12 |
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | .dropzone, .dropzone * {
25 | box-sizing: border-box;
26 | }
27 | .dropzone {
28 |
29 | position: relative;
30 |
31 | .dz-preview {
32 | position: relative;
33 | display: inline-block;
34 | width: 120px;
35 | margin: 0.5em;
36 |
37 | .dz-progress {
38 | display: block;
39 | height: 15px;
40 | border: 1px solid #aaa;
41 | .dz-upload {
42 | display: block;
43 | height: 100%;
44 | width: 0;
45 | background: green;
46 | }
47 | }
48 |
49 | .dz-error-message {
50 | color: red;
51 | display: none;
52 | }
53 | &.dz-error {
54 | .dz-error-message, .dz-error-mark {
55 | display: block;
56 | }
57 | }
58 | &.dz-success {
59 | .dz-success-mark {
60 | display: block;
61 | }
62 | }
63 |
64 | .dz-error-mark, .dz-success-mark {
65 | position: absolute;
66 | display: none;
67 | left: 30px;
68 | top: 30px;
69 | width: 54px;
70 | height: 58px;
71 | left: 50%;
72 | margin-left: -(54px/2);
73 | }
74 |
75 |
76 | }
77 |
78 | }
--------------------------------------------------------------------------------
/assets/versions/4.0.1/src/dropzone.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | * Copyright (c) 2012 Matias Meno
4 | */
5 |
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | // this software and associated documentation files (the "Software"), to deal in
8 | // the Software without restriction, including without limitation the rights to
9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | // of the Software, and to permit persons to whom the Software is furnished to do
11 | // so, subject to the following conditions:
12 |
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | @mixin keyframes($name) {
25 | @-webkit-keyframes #{$name} {
26 | @content;
27 | }
28 | @-moz-keyframes #{$name} {
29 | @content;
30 | }
31 | @keyframes #{$name} {
32 | @content;
33 | }
34 | }
35 |
36 |
37 | @mixin prefix($map, $vendors: webkit moz ms o) {
38 | @each $prop, $value in $map {
39 | @if $vendors {
40 | @each $vendor in $vendors {
41 | #{"-" + $vendor + "-" + $prop}: #{$value};
42 | }
43 | }
44 | // Dump regular property anyway
45 | #{$prop}: #{$value};
46 | }
47 | }
48 |
49 |
50 | @include keyframes(passing-through) {
51 |
52 | 0% {
53 | opacity: 0;
54 | @include prefix((transform: translateY(40px)));
55 | }
56 |
57 | 30%, 70% {
58 | opacity: 1;
59 | @include prefix((transform: translateY(0px)));
60 | }
61 |
62 | 100% {
63 | opacity: 0;
64 | @include prefix((transform: translateY(-40px)));
65 | }
66 | }
67 |
68 |
69 | @include keyframes(slide-in) {
70 |
71 | 0% {
72 | opacity: 0;
73 | @include prefix((transform: translateY(40px)));
74 | }
75 |
76 | 30% {
77 | opacity: 1;
78 | @include prefix((transform: translateY(0px)));
79 | }
80 | }
81 |
82 |
83 |
84 | @include keyframes(pulse) {
85 |
86 | 0% { @include prefix((transform: scale(1))); }
87 | 10% { @include prefix((transform: scale(1.1))); }
88 | 20% { @include prefix((transform: scale(1))); }
89 |
90 | }
91 |
92 |
93 |
94 | .dropzone, .dropzone * {
95 | box-sizing: border-box;
96 | }
97 | .dropzone {
98 |
99 | $image-size: 120px;
100 |
101 | $image-border-radius: 20px;
102 |
103 | &.dz-clickable {
104 | cursor: pointer;
105 |
106 | * {
107 | cursor: default;
108 | }
109 | .dz-message {
110 | &, * {
111 | cursor: pointer;
112 | }
113 | }
114 | }
115 |
116 | min-height: 150px;
117 | border: 2px solid rgba(0, 0, 0, 0.3);
118 | background: white;
119 | padding: 20px 20px;
120 |
121 | &.dz-started {
122 | .dz-message {
123 | display: none;
124 | }
125 | }
126 |
127 | &.dz-drag-hover {
128 | border-style: solid;
129 | .dz-message {
130 | opacity: 0.5;
131 | }
132 | }
133 | .dz-message {
134 | text-align: center;
135 | margin: 2em 0;
136 |
137 |
138 | }
139 |
140 |
141 |
142 | .dz-preview {
143 | position: relative;
144 | display: inline-block;
145 |
146 | vertical-align: top;
147 |
148 | margin: 16px;
149 | min-height: 100px;
150 |
151 | &:hover {
152 | // Making sure that always the hovered preview element is on top
153 | z-index: 1000;
154 | .dz-details {
155 | opacity: 1;
156 | }
157 | }
158 |
159 | &.dz-file-preview {
160 |
161 | .dz-image {
162 | border-radius: $image-border-radius;
163 | background: #999;
164 | background: linear-gradient(to bottom, #eee, #ddd);
165 | }
166 |
167 | .dz-details {
168 | opacity: 1;
169 | }
170 | }
171 |
172 | &.dz-image-preview {
173 | background: white;
174 | .dz-details {
175 | @include prefix((transition: opacity 0.2s linear));
176 | }
177 | }
178 |
179 | .dz-remove {
180 | font-size: 14px;
181 | text-align: center;
182 | display: block;
183 | cursor: pointer;
184 | border: none;
185 | &:hover {
186 | text-decoration: underline;
187 | }
188 | }
189 |
190 | &:hover .dz-details {
191 | opacity: 1;
192 | }
193 | .dz-details {
194 | $background-color: #444;
195 |
196 | z-index: 20;
197 |
198 | position: absolute;
199 | top: 0;
200 | left: 0;
201 |
202 | opacity: 0;
203 |
204 | font-size: 13px;
205 | min-width: 100%;
206 | max-width: 100%;
207 | padding: 2em 1em;
208 | text-align: center;
209 | color: rgba(0, 0, 0, 0.9);
210 |
211 | $width: 120px;
212 |
213 | line-height: 150%;
214 |
215 | .dz-size {
216 | margin-bottom: 1em;
217 | font-size: 16px;
218 | }
219 |
220 | .dz-filename {
221 |
222 | white-space: nowrap;
223 |
224 | &:hover {
225 | span {
226 | border: 1px solid rgba(200, 200, 200, 0.8);
227 | background-color: rgba(255, 255, 255, 0.8);
228 | }
229 | }
230 | &:not(:hover) {
231 | span {
232 | border: 1px solid transparent;
233 | }
234 | overflow: hidden;
235 | text-overflow: ellipsis;
236 | }
237 |
238 | }
239 |
240 | .dz-filename, .dz-size {
241 | span {
242 | background-color: rgba(255, 255, 255, 0.4);
243 | padding: 0 0.4em;
244 | border-radius: 3px;
245 | }
246 | }
247 |
248 | }
249 |
250 | &:hover {
251 | .dz-image {
252 | // opacity: 0.8;
253 | img {
254 | @include prefix((transform: scale(1.05, 1.05))); // Getting rid of that white bleed-in
255 | @include prefix((filter: blur(8px)), webkit); // Getting rid of that white bleed-in
256 | }
257 | }
258 | }
259 | .dz-image {
260 | border-radius: $image-border-radius;
261 | overflow: hidden;
262 | width: $image-size;
263 | height: $image-size;
264 | position: relative;
265 | display: block;
266 | z-index: 10;
267 |
268 | img {
269 | display: block;
270 | }
271 | }
272 |
273 |
274 | &.dz-success {
275 | .dz-success-mark {
276 | @include prefix((animation: passing-through 3s cubic-bezier(0.770, 0.000, 0.175, 1.000)));
277 | }
278 | }
279 | &.dz-error {
280 | .dz-error-mark {
281 | opacity: 1;
282 | @include prefix((animation: slide-in 3s cubic-bezier(0.770, 0.000, 0.175, 1.000)));
283 | }
284 | }
285 |
286 |
287 | .dz-success-mark, .dz-error-mark {
288 |
289 | $image-height: 54px;
290 | $image-width: 54px;
291 |
292 | pointer-events: none;
293 |
294 | opacity: 0;
295 | z-index: 500;
296 |
297 | position: absolute;
298 | display: block;
299 | top: 50%;
300 | left: 50%;
301 | margin-left: -($image-width/2);
302 | margin-top: -($image-height/2);
303 |
304 | svg {
305 | display: block;
306 | width: $image-width;
307 | height: $image-height;
308 | }
309 | }
310 |
311 |
312 | &.dz-processing .dz-progress {
313 | opacity: 1;
314 | @include prefix((transition: all 0.2s linear));
315 | }
316 | &.dz-complete .dz-progress {
317 | opacity: 0;
318 | @include prefix((transition: opacity 0.4s ease-in));
319 | }
320 |
321 | &:not(.dz-processing) {
322 | .dz-progress {
323 | @include prefix((animation: pulse 6s ease infinite));
324 | }
325 | }
326 | .dz-progress {
327 |
328 | opacity: 1;
329 | z-index: 1000;
330 |
331 | pointer-events: none;
332 | position: absolute;
333 | height: 16px;
334 | left: 50%;
335 | top: 50%;
336 | margin-top: -8px;
337 |
338 | width: 80px;
339 | margin-left: -40px;
340 |
341 | // border: 2px solid #333;
342 | background: rgba(255, 255, 255, 0.9);
343 |
344 | // Fix for chrome bug: https://code.google.com/p/chromium/issues/detail?id=157218
345 | -webkit-transform: scale(1);
346 |
347 |
348 | border-radius: 8px;
349 |
350 | overflow: hidden;
351 |
352 | .dz-upload {
353 | background: #333;
354 | background: linear-gradient(to bottom, #666, #444);
355 | position: absolute;
356 | top: 0;
357 | left: 0;
358 | bottom: 0;
359 | width: 0;
360 | @include prefix((transition: width 300ms ease-in-out));
361 | }
362 |
363 | }
364 |
365 | &.dz-error {
366 | .dz-error-message {
367 | display: block;
368 | }
369 | &:hover .dz-error-message {
370 | opacity: 1;
371 | pointer-events: auto;
372 | }
373 | }
374 |
375 | .dz-error-message {
376 | $width: $image-size + 20px;
377 | $color: rgb(190, 38, 38);
378 |
379 | pointer-events: none;
380 | z-index: 1000;
381 | position: absolute;
382 | display: block;
383 | display: none;
384 | opacity: 0;
385 | @include prefix((transition: opacity 0.3s ease));
386 | border-radius: 8px;
387 | font-size: 13px;
388 | top: $image-size + 10px;
389 | left: -10px;
390 | width: $width;
391 | background: $color;
392 | background: linear-gradient(to bottom, $color, darken($color, 5%));
393 | padding: 0.5em 1.2em;
394 | color: white;
395 |
396 | // The triangle pointing up
397 | &:after {
398 | content: '';
399 | position: absolute;
400 | top: -6px;
401 | left: $width / 2 - 6px;
402 | width: 0;
403 | height: 0;
404 | border-left: 6px solid transparent;
405 | border-right: 6px solid transparent;
406 | border-bottom: 6px solid $color;
407 | }
408 | }
409 |
410 | }
411 | }
412 |
413 |
414 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ $# -gt 0 ]
4 | then
5 | if [ $1 != "compiled" ]
6 | then
7 | echo
8 | echo "Invalid argument passed. Call './test.sh compiled' if don't want to compile the source before."
9 | echo
10 | exit 1
11 | fi
12 | else
13 | grunt
14 | fi
15 | ./node_modules/mocha-phantomjs/bin/mocha-phantomjs test/test.html
16 |
--------------------------------------------------------------------------------
/assets/versions/4.0.1/test/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
19 |
23 |
--------------------------------------------------------------------------------
/messages/es/dropzone.php:
--------------------------------------------------------------------------------
1 | Drop files here to upload (or click)' => 'Пертяните файлы для загрузки (или клик)',
4 | "Your browser does not support drag'n'drop file uploads." => "Ваш браузер не поддерживает способ загрузки файлов drag'n'drop.",
5 | 'Please use the fallback form below to upload your files like in the olden days.' => 'Пожалуйста, воспользуйтесь формой ниже, для загрузки файлов по старинке.',
6 | 'Wrong type. Allowed types are: {types}' => 'El archivo incorrecto. Tipos permitidos son: {types}',
7 | 'Size is too big. Allowed size is {{maxFilesize}} MB. Your file is {{filesize}} MB' => 'El archivo es demasiado grande ({{filesize}}). El máximo tamaño permitido es {{maxFilesize}}.',
8 | );
--------------------------------------------------------------------------------
/messages/ru/dropzone.php:
--------------------------------------------------------------------------------
1 | Drop files here to upload (or click)' => 'Перетяните файлы для загрузки (или клик)',
4 | "Your browser does not support drag'n'drop file uploads." => "Ваш браузер не поддерживает способ загрузки файлов drag'n'drop.",
5 | 'Please use the fallback form below to upload your files like in the olden days.' => 'Пожалуйста, воспользуйтесь формой ниже, для загрузки файлов по старинке.',
6 | 'Wrong type. Allowed types are: {types}' => 'Неправильный файл. Допустимые типы: {types}',
7 | 'Size is too big. Allowed size is {{maxFilesize}} MB. Your file is {{filesize}} MB' => 'Файл слишком большой. Максимально допустимый размер: {{maxFilesize}} MB. Размер Вашего файла: {{filesize}} MB',
8 | );
--------------------------------------------------------------------------------