text: (function(){function b(a,c,d){var e=b.resolve(a);if(null==e){d=d||a,c=c||"root";var f=Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=b.modules[e];return g.exports||(g.exports={},g.client=g.component=!0,g.call(this,g.exports,b.relative(e),g)),g.exports}var a=Object.prototype.hasOwnProperty;b.modules={},b.aliases={},b.resolve=function(c){"/"===c.charAt(0)&&(c=c.slice(1));for(var d=c+"/index.js",e=[c,c+".js",c+".json",c+"/index.js",c+"/index.json"],f=0;e.length>f;f++){var c=e[f];if(a.call(b.modules,c))return c}return a.call(b.aliases,d)?b.aliases[d]:void 0},b.normalize=function(a,b){var c=[];if("."!=b.charAt(0))return b;a=a.split("/"),b=b.split("/");for(var d=0;b.length>d;++d)".."==b[d]?a.pop():"."!=b[d]&&""!=b[d]&&c.push(b[d]);return a.concat(c).join("/")},b.register=function(a,c){b.modules[a]=c},b.alias=function(c,d){if(!a.call(b.modules,c))throw Error('Failed to alias "'+c+'", it does not exist');b.aliases[d]=c},b.relative=function(c){function e(a,b){for(var c=a.length;c--;)if(a[c]===b)return c;return-1}function f(a){var d=f.resolve(a);return b(d,c,a)}var d=b.normalize(c,"..");return f.resolve=function(a){var f=a.charAt(0);if("/"==f)return a.slice(1);if("."==f)return b.normalize(d,a);var g=c.split("/"),h=e(g,"deps")+1;return h||(h=0),a=g.slice(0,h+1).join("/")+"/deps/"+a},f.exists=function(c){return a.call(b.modules,f.resolve(c))},f},b.register("component-emitter/index.js",function(a,b,c){function d(a){return a?e(a):void 0}function e(a){for(var b in d.prototype)a[b]=d.prototype[b];return a}c.exports=d,d.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},(this._callbacks[a]=this._callbacks[a]||[]).push(b),this},d.prototype.once=function(a,b){function d(){c.off(a,d),b.apply(this,arguments)}var c=this;return this._callbacks=this._callbacks||{},b._off=d,this.on(a,d),this},d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=function(a,b){this._callbacks=this._callbacks||{};var c=this._callbacks[a];if(!c)return this;if(1==arguments.length)return delete this._callbacks[a],this;var d=c.indexOf(b._off||b);return~d&&c.splice(d,1),this},d.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;e>d;++d)c[d].apply(this,b)}return this},d.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks[a]||[]},d.prototype.hasListeners=function(a){return!!this.listeners(a).length}}),b.register("dropzone/index.js",function(a,b,c){c.exports=b("./lib/dropzone.js")}),b.register("dropzone/lib/dropzone.js",function(a,b,c){(function(){var a,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function d(){this.constructor=a}for(var c in b)h.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},j=[].slice;f="undefined"!=typeof jQuery&&null!==jQuery?jQuery:b("jquery"),d="undefined"!=typeof Emitter&&null!==Emitter?Emitter:b("emitter"),a=function(a){function b(a,c){var d,g,h,i;if(this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.element=f(a),1!==this.element.length)throw Error("You can only instantiate dropzone on a single element.");if(this.element.data("dropzone"))throw Error("Dropzone already attached.");if(this.element.data("dropzone",this),d=this.element.attr("id"),g=null!=(i=d?b.options[e(d)]:void 0)?i:{},this.elementTagName=this.element.get(0).tagName,h=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=arguments.length>=2?j.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},this.options=h({},this.defaultOptions,g,null!=c?c:{}),null==this.options.url&&(this.options.url=this.element.attr("action")),!this.options.url)throw Error("No URL provided.");this.init()}return i(b,a),b.prototype.version="1.3.4",b.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","selectedfiles","addedfile","thumbnail","error","processingfile","uploadprogress","sending","success","complete"],b.prototype.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],b.prototype.defaultOptions={url:null,parallelUploads:2,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:2,thumbnailWidth:100,thumbnailHeight:100,clickable:!0,accept:function(a,b){return b()},fallback:function(){return this.element.addClass("browser-not-supported"),this.element.find(".message").removeClass("default"),this.element.find(".message span").html("Your browser does not support drag'n'drop file uploads."),this.element.append("Please use the fallback form below to upload your files like in the olden days.</p>"),this.element.append(this.getFallbackForm())},drop:function(){return this.element.removeClass("drag-hover")},dragstart:f.noop,dragend:function(){return this.element.removeClass("drag-hover")},dragenter:function(){return this.element.addClass("drag-hover")},dragover:function(){return this.element.addClass("drag-hover")},dragleave:function(){return this.element.removeClass("drag-hover")},selectedfiles:function(){return this.element.addClass("started")},addedfile:function(a){return a.previewTemplate=f(this.options.previewTemplate),this.element.append(a.previewTemplate),a.previewTemplate.find(".filename span").text(a.name),a.previewTemplate.find(".details").append(f('<div class="size">'+this.filesize(a.size)+"</div>"))},thumbnail:function(a,b){return a.previewTemplate.removeClass("file-preview").addClass("image-preview"),a.previewTemplate.find(".details").append(f('<img alt="'+a.name+'" src="'+b+'"/>'))},error:function(a,b){return a.previewTemplate.addClass("error"),a.previewTemplate.find(".error-message span").text(b)},processingfile:function(a){return a.previewTemplate.addClass("processing")},uploadprogress:function(a,b){return a.previewTemplate.find(".progress .upload").css({width:""+b+"%"})},sending:f.noop,success:function(a){return a.previewTemplate.addClass("success")},complete:f.noop,previewTemplate:'<div class="preview file-preview">\n  <div class="details">\n   <div class="filename"><span></span></div>\n  </div>\n  <div class="progress"><span class="upload"></span></div>\n  <div class="success-mark"><span>\u2714</span></div>\n  <div class="error-mark"><span>\u2718</span></div>\n  <div class="error-message"><span></span></div>\n</div>'},b.prototype.init=function(){var a,b,c,d,e,g,h=this;if("form"===this.elementTagName&&"multipart/form-data"!==this.element.attr("enctype")&&this.element.attr("enctype","multipart/form-data"),0===this.element.find(".message").length&&this.element.append(f('<div class="default message"><span>Drop files here to upload</span></div>')),a=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData)for(e=this.blacklistedBrowsers,c=0,d=e.length;d>c;c++)b=e[c],b.test(navigator.userAgent)&&(a=!1);else a=!1;return a?(this.options.clickable&&(this.element.addClass("clickable"),this.hiddenFileInput=f('<input type="file" multiple />'),this.element.click(function(a){var b;return b=f(a.target),b.is(h.element)||b.is(h.element.find(".message"))?h.hiddenFileInput.click():void 0}),this.hiddenFileInput.change(function(){var a;return a=h.hiddenFileInput.get(0).files,h.emit("selectedfiles",a),a.length?h.handleFiles(a):void 0})),this.files=[],this.files.queue=[],this.files.processing=[],this.URL=null!=(g=window.URL)?g:window.webkitURL,this.setupEventListeners()):this.options.fallback.call(this)},b.prototype.getFallbackForm=function(){var a;return a=f('<div class="fallback-elements"><input type="file" name="newFiles" multiple="multiple" /><button type="submit">Upload!</button></div>'),"FORM"!==this.elementTagName&&(a=f('<form action="'+this.options.url+'" enctype="multipart/form-data" method="post"></form>').append(a)),a},b.prototype.setupEventListeners=function(){var a,b,c,d,e,f=this;for(e=this.events,c=0,d=e.length;d>c;c++)a=e[c],this.on(a,this.options[a]);return b=function(a){return a.stopPropagation(),a.preventDefault()},this.element.on("dragstart",function(a){return f.emit("dragstart",a)}),this.element.on("dragenter",function(a){return b(a),f.emit("dragenter",a)}),this.element.on("dragover",function(a){return b(a),f.emit("dragover",a)}),this.element.on("dragleave",function(a){return f.emit("dragleave",a)}),this.element.on("drop",function(a){return b(a),f.drop(a),f.emit("drop",a)}),this.element.on("dragend",function(a){return f.emit("dragend",a)})},b.prototype.filesize=function(a){var b;return a>=1e11?(a/=1e11,b="TB"):a>=1e8?(a/=1e8,b="GB"):a>=1e5?(a/=1e5,b="MB"):a>=100?(a/=100,b="KB"):(a=10*a,b="b"),"<strong>"+Math.round(a)/10+"</strong> "+b},b.prototype.drop=function(a){var b;if(a.originalEvent.dataTransfer)return b=a.originalEvent.dataTransfer.files,this.emit("selectedfiles",b),b.length?this.handleFiles(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.accept=function(a,b){return a.size>1024*1024*this.options.maxFilesize?b("File is too big ("+Math.round(a.size/1024/10.24)/100+"MB). Max filesize: "+this.options.maxFilesize+"MB"):this.options.accept.call(this,a,b)},b.prototype.addFile=function(a){var b=this;return this.files.push(a),this.emit("addedfile",a),this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*1024*this.options.maxThumbnailFilesize&&this.createThumbnail(a),this.accept(a,function(c){return c?b.errorProcessing(a,c):(b.files.queue.push(a),b.processQueue())})},b.prototype.createThumbnail=function(a){var b,c=this;return b=new FileReader,b.onload=function(){var d;return d=new Image,d.onload=function(){var b,e,f,g,h,i,j,k,l,m,n,o,p;return b=document.createElement("canvas"),e=b.getContext("2d"),i=0,j=0,h=d.width,f=d.height,b.width=c.options.thumbnailWidth,b.height=c.options.thumbnailHeight,o=0,p=0,n=b.width,l=b.height,g=d.width/d.height,m=b.width/b.height,d.height<b.height||d.width<b.width?(l=f,n=h):g>m?(f=d.height,h=f*m):(h=d.width,f=h/m),i=(d.width-h)/2,j=(d.height-f)/2,p=(b.height-l)/2,o=(b.width-n)/2,e.drawImage(d,i,j,h,f,o,p,n,l),k=b.toDataURL("image/png"),c.emit("thumbnail",a,k)},d.src=b.result},b.readAsDataURL(a)},b.prototype.processQueue=function(){var a,b,c;for(b=this.options.parallelUploads,c=this.files.processing.length,a=c;b>a;){if(!this.files.queue.length)return;this.processFile(this.files.queue.shift()),a++}},b.prototype.processFile=function(a){return this.files.processing.push(a),this.emit("processingfile",a),this.uploadFile(a)},b.prototype.uploadFile=function(a){var b,c,d,e,g,h,i,j,k,l,m,n=this;if(i=new XMLHttpRequest,b=new FormData,b.append(this.options.paramName,a),this.elementTagName="FORM")for(l=this.element.find("input, textarea, select, button"),j=0,k=l.length;k>j;j++)e=l[j],d=f(e),g=d.attr("name"),(!d.attr("type")||"checkbox"!==d.attr("type").toLowerCase()||e.checked)&&b.append(d.attr("name"),d.val());return i.open("POST",this.options.url,!0),c=function(){return n.errorProcessing(a,i.responseText||"Server responded with "+i.status+" code.")},i.onload=function(b){var d;return 200!==i.status?c():(n.emit("uploadprogress",a,100),d=i.responseText,~i.getResponseHeader("content-type").indexOf("application/json")&&(d=JSON.parse(d)),n.finished(a,d,b))},i.onerror=function(){return c()},h=null!=(m=i.upload)?m:i,h.onprogress=function(b){return n.emit("uploadprogress",a,Math.max(0,Math.min(100,100*(b.loaded/b.total))))},i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Cache-Control","no-cache"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("X-File-Name",a.name),this.emit("sending",a,i),i.send(b)},b.prototype.finished=function(a,b,c){return this.files.processing=g(this.files.processing,a),this.emit("success",a,b,c),this.emit("finished",a,b,c),this.emit("complete",a),this.processQueue()},b.prototype.errorProcessing=function(a,b){return this.files.processing=g(this.files.processing,a),this.emit("error",a,b),this.emit("complete",a),this.processQueue()},b}(d),a.options={},g=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[1].toUpperCase()})},f.fn.dropzone=function(b){return this.each(function(){return new a(this,b)})},f(function(){return f(".dropzone").dropzone()}),c!==void 0&&null!==c?c.exports=a:window.Dropzone=a}).call(this)}),b.alias("component-emitter/index.js","dropzone/deps/emitter/index.js"),"object"==typeof exports?module.exports=b("dropzone"):"function"==typeof define&&define.amd?define(b("dropzone")):window.Dropzone=b("dropzone")})();