/* jQuery Form Plugin version: 3.51.0-2014.06.20 Requires jQuery v1.5 or later Copyright (c) 2014 M. Alsup Examples and documentation at: http://malsup.com/jquery/form/ Project repository: https://github.com/malsup/form Dual licensed under the MIT and GPL licenses. https://github.com/malsup/form#copyright-and-license */ var $jscomp={scope:{},findInternal:function(b,l,f){b instanceof String&&(b=String(b));for(var p=b.length,r=0;r").get(0).files;v=void 0!==window.FormData;var H=!!b.fn.prop;b.fn.attr2=function(){if(!H)return this.attr.apply(this, arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"===typeof a?a:this.attr.apply(this,arguments)};b.fn.ajaxSubmit=function(a){function n(c){c=b.param(c,a.traditional).split("&");var g=c.length,n=[],h,d;for(h=0;h').val(e.extraData[q].value).appendTo(m)[0]):f.push(b('').val(e.extraData[q]).appendTo(m)[0]));e.iframeTarget||r.appendTo("body");w.attachEvent?w.attachEvent("onload",n):w.addEventListener("load",n,!1);setTimeout(a,15);try{m.submit()}catch(L){document.createElement("form").submit.apply(m)}}finally{m.setAttribute("action",g),m.setAttribute("enctype",k),c?m.setAttribute("target", c):t.removeAttr("target"),b(f).remove()}}function n(a){if(!k.aborted&&!J)if(u=d(w),u||(p("cannot access response document"),a=2),1===a&&k)k.abort("timeout"),x.reject(k,"timeout");else if(2==a&&k)k.abort("server abort"),x.reject(k,"error","server abort");else if(u&&u.location.href!=e.iframeSrc||D){w.detachEvent?w.detachEvent("onload",n):w.removeEventListener("load",n,!1);a="success";var c;try{if(D)throw"timeout";var g="xml"==e.dataType||u.XMLDocument||b.isXMLDoc(u);p("isXml="+g);if(!g&&window.opera&& (null===u.body||!u.body.innerHTML)&&--K){p("requeing onLoad callback, DOM not available");setTimeout(n,250);return}var h=u.body?u.body:u.documentElement;k.responseText=h?h.innerHTML:null;k.responseXML=u.XMLDocument?u.XMLDocument:u;g&&(e.dataType="xml");k.getResponseHeader=function(a){return{"content-type":e.dataType}[a.toLowerCase()]};h&&(k.status=Number(h.getAttribute("status"))||k.status,k.statusText=h.getAttribute("statusText")||k.statusText);var m=(e.dataType||"").toLowerCase(),f=/(json|script|text)/.test(m); if(f||e.textarea){var l=u.getElementsByTagName("textarea")[0];if(l)k.responseText=l.value,k.status=Number(l.getAttribute("status"))||k.status,k.statusText=l.getAttribute("statusText")||k.statusText;else if(f){var t=u.getElementsByTagName("pre")[0],A=u.getElementsByTagName("body")[0];t?k.responseText=t.textContent?t.textContent:t.innerText:A&&(k.responseText=A.textContent?A.textContent:A.innerText)}}else"xml"==m&&!k.responseXML&&k.responseText&&(k.responseXML=E(k.responseText));try{y=G(k,m,e)}catch(C){a= "parsererror",k.error=c=C||a}}catch(C){p("error caught: ",C),a="error",k.error=c=C||a}k.aborted&&(p("upload aborted"),a=null);k.status&&(a=200<=k.status&&300>k.status||304===k.status?"success":"error");"success"===a?(e.success&&e.success.call(e.context,y,"success",k),x.resolve(k.responseText,"success",k),q&&b.event.trigger("ajaxSuccess",[k,e])):a&&(void 0===c&&(c=k.statusText),e.error&&e.error.call(e.context,k,a,c),x.reject(k,"error",c),q&&b.event.trigger("ajaxError",[k,e,c]));q&&b.event.trigger("ajaxComplete", [k,e]);q&&!--b.active&&b.event.trigger("ajaxStop");e.complete&&e.complete.call(e.context,k,a);J=!0;e.timeout&&clearTimeout(v);setTimeout(function(){e.iframeTarget?r.attr("src",e.iframeSrc):r.remove();k.responseXML=null},100)}}var m=t[0],f,e,q,l,r,w,k,D,v,x=b.Deferred();x.abort=function(a){k.abort(a)};if(c)for(f=0;f'),r.css({position:"absolute",top:"-1000px",left:"-1000px"}));w=r[0];k={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(a){var c="timeout"===a?"timeout":"aborted";p("aborting upload... "+c);this.aborted=1;try{w.contentWindow.document.execCommand&&w.contentWindow.document.execCommand("Stop")}catch(B){}r.attr("src", e.iframeSrc);k.error=c;e.error&&e.error.call(e.context,k,c,a);q&&b.event.trigger("ajaxError",[k,e,c]);e.complete&&e.complete.call(e.context,k,c)}};(q=e.global)&&0===b.active++&&b.event.trigger("ajaxStart");q&&b.event.trigger("ajaxSend",[k,e]);if(e.beforeSend&&!1===e.beforeSend.call(e.context,k,e))return e.global&&b.active--,x.reject(),x;if(k.aborted)return x.reject(),x;(c=m.clk)&&(f=c.name)&&!c.disabled&&(e.extraData=e.extraData||{},e.extraData[f]=c.value,"image"==c.type&&(e.extraData[f+".x"]=m.clk_x, e.extraData[f+".y"]=m.clk_y));c=b("meta[name=csrf-token]").attr("content");(f=b("meta[name=csrf-param]").attr("content"))&&c&&(e.extraData=e.extraData||{},e.extraData[f]=c);e.forceSync?g():setTimeout(g,10);var y,u,K=50,J,E=b.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");return b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},F=b.parseJSON||function(a){return window.eval("("+ a+")")},G=function(a,c,e){var d=a.getResponseHeader("content-type")||"",g="xml"===c||!c&&0<=d.indexOf("xml");a=g?a.responseXML:a.responseText;g&&"parsererror"===a.documentElement.nodeName&&b.error&&b.error("parsererror");e&&e.dataFilter&&(a=e.dataFilter(a,c));"string"===typeof a&&("json"===c||!c&&0<=d.indexOf("json")?a=F(a):("script"===c||!c&&0<=d.indexOf("javascript"))&&b.globalEval(a));return a};return x}if(!this.length)return p("ajaxSubmit: skipping submit process - no element selected"),this; var h,g,t=this;"function"==typeof a?a={success:a}:void 0===a&&(a={});h=a.type||this.attr2("method");g=a.url||this.attr2("action");(g=(g="string"===typeof g?b.trim(g):"")||window.location.href||"")&&(g=(g.match(/^([^#]+)/)||[])[1]);a=b.extend(!0,{url:g,success:b.ajaxSettings.success,type:h||b.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},a);g={};this.trigger("form-pre-serialize",[this,a,g]);if(g.veto)return p("ajaxSubmit: submit vetoed via form-pre-serialize trigger"), this;if(a.beforeSerialize&&!1===a.beforeSerialize(this,a))return p("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var q=a.traditional;void 0===q&&(q=b.ajaxSettings.traditional);var z=[],m,f=this.formToArray(a.semantic,z);a.data&&(a.extraData=a.data,m=b.param(a.data,q));if(a.beforeSubmit&&!1===a.beforeSubmit(f,this,a))return p("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",[f,this,a,g]);if(g.veto)return p("ajaxSubmit: submit vetoed via form-submit-validate trigger"), this;g=b.param(f,q);m&&(g=g?g+"&"+m:m);"GET"==a.type.toUpperCase()?(a.url+=(0<=a.url.indexOf("?")?"&":"?")+g,a.data=null):a.data=g;var l=[];a.resetForm&&l.push(function(){t.resetForm()});a.clearForm&&l.push(function(){t.clearForm(a.includeHidden)});if(!a.dataType&&a.target){var E=a.success||function(){};l.push(function(c){var d=a.replaceTarget?"replaceWith":"html";b(a.target)[d](c).each(E,arguments)})}else a.success&&l.push(a.success);a.success=function(b,c,d){for(var g=a.context||this,h=0,n=l.length;h< n;h++)l[h].apply(g,[b,c,d||t,t])};if(a.error){var F=a.error;a.error=function(b,c,d){F.apply(a.context||this,[b,c,d,t])}}if(a.complete){var G=a.complete;a.complete=function(b,c){G.apply(a.context||this,[b,c,t])}}m=0g)return null;for(var d=[],h=a.options,f=(c="select-one"==c)?g+1:h.length,g=c?g:0;g