text: /*
   * jQuery File Upload Plugin 3.7.1
   *
   * Copyright 2010, Sebastian Tschan, AQUANTUM
   * Licensed under the MIT license:
   * http://creativecommons.org/licenses/MIT/
   *
   * https://blueimp.net
   * http://www.aquantum.de
   */
  
  /*jslint browser: true */
  /*global File, FileReader, FormData, unescape, jQuery */
  (function(H){var C="file_upload",F="undefined",G="function",E="number",A,D,B=function(K,I){var J=0;this.complete=function(){J+=1;if(J===I){K()}}};A=function(Z){var X=this,S,L,j={namespace:C,uploadFormFilter:function(p){return true},fileInputFilter:function(p){return true},cssClass:C,dragDropSupport:true,dropZone:Z,url:function(p){return p.attr("action")},method:function(p){return p.attr("method")},fieldName:function(p){return p.attr("name")},formData:function(p){return p.serializeArray()},multipart:true,multiFileRequest:false,withCredentials:false,forceIframeUpload:false},K={},m={},U=/^http(s)?:\/\//,W,V=function(){return typeof XMLHttpRequest!==F&&typeof File!==F&&(!j.multipart||typeof FormData!==F||typeof FileReader!==F)},f=function(){if(j.dragDropSupport){if(typeof j.onDocumentDragEnter===G){K["dragenter."+j.namespace]=function(p){j.onDocumentDragEnter(p)}}if(typeof j.onDocumentDragLeave===G){K["dragleave."+j.namespace]=function(p){j.onDocumentDragLeave(p)}}K["dragover."+j.namespace]=X.onDocumentDragOver;K["drop."+j.namespace]=X.onDocumentDrop;H(document).bind(K);if(typeof j.onDragEnter===G){m["dragenter."+j.namespace]=function(p){j.onDragEnter(p)}}if(typeof j.onDragLeave===G){m["dragleave."+j.namespace]=function(p){j.onDragLeave(p)}}m["dragover."+j.namespace]=X.onDragOver;m["drop."+j.namespace]=X.onDrop;j.dropZone.bind(m)}L.bind("change."+j.namespace,X.onChange)},J=function(){H.each(K,function(p,q){H(document).unbind(p,q)});H.each(m,function(p,q){j.dropZone.unbind(p,q)});L.unbind("change."+j.namespace)},N=function(r,p,s,q){if(typeof q.onProgress===G){s.upload.onprogress=function(t){q.onProgress(t,r,p,s,q)}}if(typeof q.onLoad===G){s.onload=function(t){q.onLoad(t,r,p,s,q)}}if(typeof q.onAbort===G){s.onabort=function(t){q.onAbort(t,r,p,s,q)}}if(typeof q.onError===G){s.onerror=function(t){q.onError(t,r,p,s,q)}}},i=function(p){if(typeof p.url===G){return p.url(p.uploadForm||S)}return p.url},I=function(p){if(typeof p.method===G){return p.method(p.uploadForm||S)}return p.method},T=function(p){if(typeof p.fieldName===G){return p.fieldName(p.fileInput||L)}return p.fieldName},e=function(p){var q;if(typeof p.formData===G){return p.formData(p.uploadForm||S)}else{if(H.isArray(p.formData)){return p.formData}else{if(p.formData){q=[];H.each(p.formData,function(r,s){q.push({name:r,value:s})});return q}}}return[]},o=function(s){if(U.test(s)){var t=location.host,r=location.protocol.length+2,q=s.indexOf(t,r),p=q+t.length;if((q===r||q===s.indexOf("@",r)+1)&&(s.length===p||H.inArray(s.charAt(p),["/","?","#"])!==-1)){return true}return false}return true},d=function(q,r,p){if(p){r.setRequestHeader("X-File-Name",unescape(encodeURIComponent(q.name)))}r.setRequestHeader("Content-Type",q.type);r.send(q)},P=function(r,t,q){var s=new FormData(),p;H.each(e(q),function(u,v){s.append(v.name,v.value)});for(p=0;p<r.length;p+=1){s.append(T(q),r[p])}t.send(s)},R=function(q,r){var p=new FileReader();p.onload=function(s){q.content=s.target.result;r()};p.readAsBinaryString(q)},Y=function(v,r,q,p){var t="--",u="\r\n",s="";H.each(p,function(w,x){s+=t+v+u+'Content-Disposition: form-data; name="'+unescape(encodeURIComponent(x.name))+'"'+u+u+unescape(encodeURIComponent(x.value))+u});H.each(r,function(w,x){s+=t+v+u+'Content-Disposition: form-data; name="'+unescape(encodeURIComponent(q))+'"; filename="'+unescape(encodeURIComponent(x.name))+'"'+u+"Content-Type: "+x.type+u+u+x.content+u});s+=t+v+t+u;return s},O=function(s,t,r){var u="----MultiPartFormBoundary"+(new Date()).getTime(),p,q;t.setRequestHeader("Content-Type","multipart/form-data; boundary="+u);p=new B(function(){t.sendAsBinary(Y(u,s,T(r),e(r)))},s.length);for(q=0;q<s.length;q+=1){R(s[q],p.complete)}},k=function(u,r,v,s){var q=i(s),p=o(q),t;N(u,r,v,s);v.open(I(s),q,true);if(p){v.setRequestHeader("X-Requested-With","XMLHttpRequest")}else{if(s.withCredentials){v.withCredentials=true}}if(!s.multipart){d(u[r],v,p)}else{if(typeof r===E){t=[u[r]]}else{t=u}if(typeof FormData!==F){P(t,v,s)}else{if(typeof FileReader!==F){O(t,v,s)}else{H.error("Browser does neither support FormData nor FileReader interface")}}}},l=function(u,t,q,s,r){var v=new XMLHttpRequest(),p=H.extend({},j);p.fileInput=q;p.uploadForm=s;if(typeof p.initUpload===G){p.initUpload(u,t,r,v,p,function(){k(t,r,v,p)})}else{k(t,r,v,p)}},n=function(t,s,p,r){var q;if(j.multiFileRequest){l(t,s,p,r)}else{for(q=0;q<s.length;q+=1){l(t,s,p,r,q)}}},M=function(p,r,q){var s=e(q);r.find(":input").not(":disabled").attr("disabled",true).addClass(q.namespace+"_disabled");H.each(s,function(t,u){H('<input type="hidden"/>').attr("name",u.name).val(u.value).addClass(q.namespace+"_form_data").appendTo(r)});p.attr("name",T(q)).appendTo(r)},b=function(p,r,q){p.detach();r.find("."+q.namespace+"_disabled").removeAttr("disabled").removeClass(q.namespace+"_disabled");r.find("."+q.namespace+"_form_data").remove()},h=function(p,v,t,s){var q=v.attr("action"),u=v.attr("method"),r=v.attr("target");t.unbind("abort").bind("abort",function(w){t.readyState=0;t.unbind("load").attr("src","javascript".concat(":false;"));if(typeof s.onAbort===G){s.onAbort(w,[{name:p.val(),type:null,size:null}],0,t,s)}}).unbind("load").bind("load",function(w){t.readyState=4;if(typeof s.onLoad===G){s.onLoad(w,[{name:p.val(),type:null,size:null}],0,t,s)}H('<iframe src="javascript:false;" style="display:none"></iframe>').appendTo(v).remove()});v.attr("action",i(s)).attr("method",I(s)).attr("target",t.attr("name"));M(p,v,s);t.readyState=2;v.get(0).submit();b(p,v,s);v.attr("action",q).attr("method",u).attr("target",r)},c=function(t,q,s){var r=H('<iframe src="javascript:false;" style="display:none" name="iframe_'+j.namespace+"_"+(new Date()).getTime()+'"></iframe>'),p=H.extend({},j);p.fileInput=q;p.uploadForm=s;r.readyState=0;r.abort=function(){r.trigger("abort")};r.bind("load",function(){r.unbind("load");if(typeof p.initUpload===G){p.initUpload(t,[{name:q.val(),type:null,size:null}],0,r,p,function(){h(q,s,r,p)})}else{h(q,s,r,p)}}).appendTo(s)},g=function(){S=(Z.is("form")?Z:Z.find("form")).filter(j.uploadFormFilter)},Q=function(){L=S.find("input:file").filter(j.fileInputFilter)},a=function(p){var q=p.clone(true);H("<form/>").append(q).get(0).reset();p.after(q).detach();Q()};this.onDocumentDragOver=function(p){if(typeof j.onDocumentDragOver===G&&j.onDocumentDragOver(p)===false){return false}p.preventDefault()};this.onDocumentDrop=function(p){if(typeof j.onDocumentDrop===G&&j.onDocumentDrop(p)===false){return false}p.preventDefault()};this.onDragOver=function(q){if(typeof j.onDragOver===G&&j.onDragOver(q)===false){return false}var p=q.originalEvent.dataTransfer;if(p){p.dropEffect=p.effectAllowed="copy"}q.preventDefault()};this.onDrop=function(q){if(typeof j.onDrop===G&&j.onDrop(q)===false){return false}var p=q.originalEvent.dataTransfer;if(p&&p.files&&V()){n(q,p.files)}q.preventDefault()};this.onChange=function(r){if(typeof j.onChange===G&&j.onChange(r)===false){return false}var p=H(r.target),q=H(r.target.form);if(q.length===1){p.data(C+"_form",q);a(p)}else{q=p.data(C+"_form")}if(!j.forceIframeUpload&&r.target.files&&V()){n(r,r.target.files,p,q)}else{c(r,p,q)}};this.init=function(p){if(p){H.extend(j,p);W=p}g();Q();if(Z.data(j.namespace)){H.error('FileUpload with namespace "'+j.namespace+'" already assigned to this element');return }Z.data(j.namespace,X).addClass(j.cssClass);j.dropZone.not(Z).addClass(j.cssClass);f()};this.options=function(r){var t,q,s,p;if(typeof r===F){return H.extend({},j)}if(W){H.extend(W,r)}J();H.each(r,function(u,v){switch(u){case"namespace":H.error("The FileUpload namespace cannot be updated.");return ;case"uploadFormFilter":s=true;p=true;break;case"fileInputFilter":p=true;break;case"cssClass":t=j.cssClass;break;case"dropZone":q=j.dropZone;break}j[u]=v});if(s){g()}if(p){Q()}if(typeof t!==F){Z.removeClass(t).addClass(j.cssClass);(q?q:j.dropZone).not(Z).removeClass(t);j.dropZone.not(Z).addClass(j.cssClass)}else{if(q){q.not(Z).removeClass(j.cssClass);j.dropZone.not(Z).addClass(j.cssClass)}}f()};this.option=function(q,r){var p;if(typeof r===F){return j[q]}p={};p[q]=r;X.options(p)};this.destroy=function(){J();Z.removeData(j.namespace).removeClass(j.cssClass);j.dropZone.not(Z).removeClass(j.cssClass)}};D={init:function(I){return this.each(function(){(new A(H(this))).init(I)})},option:function(K,L,J){J=J?J:C;var I=H(this).data(J);if(I){if(typeof K==="string"){return I.option(K,L)}return I.options(K)}else{H.error('No FileUpload with namespace "'+J+'" assigned to this element')}},destroy:function(I){I=I?I:C;return this.each(function(){var J=H(this).data(I);if(J){J.destroy()}else{H.error('No FileUpload with namespace "'+I+'" assigned to this element')}})}};H.fn.fileUpload=function(I){if(D[I]){return D[I].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof I==="object"||!I){return D.init.apply(this,arguments)}else{H.error("Method "+I+" does not exist on jQuery.fileUpload")}}}}(jQuery));
  /*
   * jQuery File Upload User Interface Plugin 3.6
   *
   * Copyright 2010, Sebastian Tschan, AQUANTUM
   * Licensed under the MIT license:
   * http://creativecommons.org/licenses/MIT/
   *
   * https://blueimp.net
   * http://www.aquantum.de
   */
  
  /*jslint browser: true */
  /*global jQuery, FileReader, URL */
  (function(E){var B="undefined",C="function",D,A,F=function(J,H){var I,G;if(!H.test(J.type)){return null}I=document.createElement("img");if(typeof URL!==B&&typeof URL.createObjectURL===C){I.src=URL.createObjectURL(J);I.onload=function(){URL.revokeObjectURL(this.src)};return I}if(typeof FileReader!==B){G=new FileReader();if(typeof G.readAsDataURL===C){G.onload=function(K){I.src=K.target.result};G.readAsDataURL(J);return I}}return null};D=function(H,J){var G=this,I,K;this.dropZone=H;this.imageTypes=/^image\/(gif|jpeg|png)$/;this.previewSelector=".file_upload_preview";this.progressSelector=".file_upload_progress div";this.cancelSelector=".file_upload_cancel button";this.cssClassSmall="file_upload_small";this.cssClassLarge="file_upload_large";this.cssClassHighlight="file_upload_highlight";this.dropEffect="highlight";this.uploadTable=this.downloadTable=null;this.buildUploadRow=this.buildDownloadRow=function(){return null};this.addNode=function(L,M,N){if(M){M.css("display","none").appendTo(L).fadeIn(function(){if(typeof N===C){try{N()}catch(O){E(this).stop();throw O}}})}else{if(typeof N===C){N()}}};this.removeNode=function(L,M){if(L){L.fadeOut(function(){E(this).remove();if(typeof M===C){try{M()}catch(N){E(this).stop();throw N}}})}else{if(typeof M===C){M()}}};this.onAbort=function(O,N,L,P,M){M.removeNode(M.uploadRow)};this.cancelUpload=function(P,O,M,Q,N){var L=Q.readyState;Q.abort();if(isNaN(L)||L<2){N.onAbort(P,O,M,Q,N)}};this.initProgressBar=function(M,N){if(typeof M.progressbar===C){return M.progressbar({value:N})}else{var L=E('<progress value="'+N+'" max="100"/>').appendTo(M);L.progressbar=function(O,P){L.attr("value",P)};return L}};this.initUploadRow=function(O,N,L,R,M,P){var Q=M.uploadRow=M.buildUploadRow(N,L,M);if(Q){M.progressbar=M.initProgressBar(Q.find(M.progressSelector),(R.upload?0:100));Q.find(M.cancelSelector).click(function(S){M.cancelUpload(S,N,L,R,M)});Q.find(M.previewSelector).each(function(){E(this).append(new F(N[L],M.imageTypes))})}M.addNode((typeof M.uploadTable===C?M.uploadTable(M):M.uploadTable),Q,P)};this.initUpload=function(O,N,L,Q,M,P){M.initUploadRow(O,N,L,Q,M,function(){if(typeof M.beforeSend===C){M.beforeSend(O,N,L,Q,M,P)}else{P()}})};this.onProgress=function(O,N,L,P,M){if(M.progressbar){M.progressbar.progressbar("value",parseInt(O.loaded/O.total*100,10))}};this.parseResponse=function(L){if(typeof L.responseText!==B){return E.parseJSON(L.responseText)}else{return E.parseJSON(L.contents().text())}};this.initDownloadRow=function(L,M,P,R,S,N){var T,O;try{T=S.response=S.parseResponse(R);O=S.downloadRow=S.buildDownloadRow(T,S);S.addNode((typeof S.downloadTable===C?S.downloadTable(S):S.downloadTable),O,N)}catch(Q){if(typeof S.onError===C){S.originalEvent=L;S.onError(Q,M,P,R,S)}else{throw Q}}};this.onLoad=function(O,N,L,P,M){M.removeNode(M.uploadRow,function(){M.initDownloadRow(O,N,L,P,M,function(){if(typeof M.onComplete===C){M.onComplete(O,N,L,P,M)}})})};this.dropZoneEnlarge=function(){if(!K){if(typeof G.dropZone.switchClass===C){G.dropZone.switchClass(G.cssClassSmall,G.cssClassLarge)}else{G.dropZone.addClass(G.cssClassLarge);G.dropZone.removeClass(G.cssClassSmall)}K=true}};this.dropZoneReduce=function(){if(typeof G.dropZone.switchClass===C){G.dropZone.switchClass(G.cssClassLarge,G.cssClassSmall)}else{G.dropZone.addClass(G.cssClassSmall);G.dropZone.removeClass(G.cssClassLarge)}K=false};this.onDocumentDragEnter=function(L){G.dropZoneEnlarge()};this.onDocumentDragOver=function(L){if(I){clearTimeout(I)}I=setTimeout(function(){G.dropZoneReduce()},200)};this.onDragEnter=this.onDragLeave=function(L){G.dropZone.toggleClass(G.cssClassHighlight)};this.onDrop=function(L){if(I){clearTimeout(I)}if(G.dropEffect&&typeof G.dropZone.effect===C){G.dropZone.effect(G.dropEffect,function(){G.dropZone.removeClass(G.cssClassHighlight);G.dropZoneReduce()})}else{G.dropZone.removeClass(G.cssClassHighlight);G.dropZoneReduce()}};E.extend(this,J)};A={init:function(G){return this.each(function(){E(this).fileUpload(new D(E(this),G))})},option:function(H,I,G){if(typeof H===B||(typeof H==="string"&&typeof I===B)){return E(this).fileUpload("option",H,I,G)}return this.each(function(){E(this).fileUpload("option",H,I,G)})},destroy:function(G){return this.each(function(){E(this).fileUpload("destroy",G)})}};E.fn.fileUploadUI=function(G){if(A[G]){return A[G].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof G==="object"||!G){return A.init.apply(this,arguments)}else{E.error("Method "+G+" does not exist on jQuery.fileUploadUI")}}}}(jQuery));