!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(L){"use strict";var h={},t=(h.fileapi=void 0!==L("").get(0).files,h.formdata=void 0!==window.FormData,!!L.fn.prop);function r(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),L(e.target).ajaxSubmit(t))}function a(e){var t=e.target,r=L(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n=this;"image"==(n.clk=t).type&&(void 0!==e.offsetX?(n.clk_x=e.offsetX,n.clk_y=e.offsetY):"function"==typeof L.fn.offset?(a=r.offset(),n.clk_x=e.pageX-a.left,n.clk_y=e.pageY-a.top):(n.clk_x=e.pageX-t.offsetLeft,n.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){n.clk=n.clk_x=n.clk_y=null},100)}function M(){var e;L.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}L.fn.attr2=function(){if(!t)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},L.fn.ajaxSubmit=function(u){if(!this.length)return M("ajaxSubmit: skipping submit process - no element selected"),this;var A,E=this,e=("function"==typeof u?u={success:u}:void 0===u&&(u={}),A=u.type||this.attr2("method"),e=(e=(e="string"==typeof(e=u.url||this.attr2("action"))?L.trim(e):"")||window.location.href||"")&&(e.match(/^([^#]+)/)||[])[1],u=L.extend(!0,{url:e,success:L.ajaxSettings.success,type:A||L.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},u),{});if(this.trigger("form-pre-serialize",[this,u,e]),e.veto)return M("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(u.beforeSerialize&&!1===u.beforeSerialize(this,u))return M("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var t=u.traditional,n=(void 0===t&&(t=L.ajaxSettings.traditional),[]),r=this.formToArray(u.semantic,n);if(u.data&&(u.extraData=u.data,l=L.param(u.data,t)),u.beforeSubmit&&!1===u.beforeSubmit(r,this,u))return M("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[r,this,u,e]),e.veto)return M("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var a,o,i,e=L.param(r,t),s=(l&&(e=e?e+"&"+l:l),"GET"==u.type.toUpperCase()?(u.url+=(0<=u.url.indexOf("?")?"&":"?")+e,u.data=null):u.data=e,[]);u.resetForm&&s.push(function(){E.resetForm()}),u.clearForm&&s.push(function(){E.clearForm(u.includeHidden)}),!u.dataType&&u.target?(a=u.success||function(){},s.push(function(e){var t=u.replaceTarget?"replaceWith":"html";L(u.target)[t](e).each(a,arguments)})):u.success&&s.push(u.success),u.success=function(e,t,r){for(var a=u.context||this,n=0,o=s.length;n')).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=f[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";M("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}f.attr("src",c.iframeSrc),p.error=t,c.error&&c.error.call(c.context,p,t,e),l&&L.event.trigger("ajaxError",[p,c,t]),c.complete&&c.complete.call(c.context,p,t)}},(l=c.global)&&0==L.active++&&L.event.trigger("ajaxStart"),l&&L.event.trigger("ajaxSend",[p,c]),c.beforeSend&&!1===c.beforeSend.call(c.context,p,c))return c.global&&L.active--,v.reject(),v;if(p.aborted)return v.reject(),v;(e=i.clk)&&(r=e.name)&&!e.disabled&&(c.extraData=c.extraData||{},c.extraData[r]=e.value,"image"==e.type&&(c.extraData[r+".x"]=i.clk_x,c.extraData[r+".y"]=i.clk_y));var g=1,x=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){M("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument||t.document}catch(e){M("cannot get iframe.contentDocument: "+e),r=t.document}return r}var e=L("meta[name=csrf-token]").attr("content"),r=L("meta[name=csrf-param]").attr("content");function a(){var e=E.attr2("target"),t=E.attr2("action"),r=E.attr("enctype")||E.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),A&&!/post/i.test(A)||i.setAttribute("method","POST"),t!=c.url&&i.setAttribute("action",c.url),c.skipEncodingOverride||A&&!/post/i.test(A)||E.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),c.timeout&&(h=setTimeout(function(){d=!0,S(g)},c.timeout));var a=[];try{if(c.extraData)for(var n in c.extraData)c.extraData.hasOwnProperty(n)&&(L.isPlainObject(c.extraData[n])&&c.extraData[n].hasOwnProperty("name")&&c.extraData[n].hasOwnProperty("value")?a.push(L('').val(c.extraData[n].value).appendTo(i)[0]):a.push(L('').val(c.extraData[n]).appendTo(i)[0]));c.iframeTarget||f.appendTo("body"),m.attachEvent?m.attachEvent("onload",S):m.addEventListener("load",S,!1),setTimeout(function e(){try{var t=b(m).readyState;M("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){M("Server abort: ",e," (",e.name,")"),S(x),h&&clearTimeout(h),h=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):E.removeAttr("target"),L(a).remove()}}r&&e&&(c.extraData=c.extraData||{},c.extraData[r]=e),c.forceSync?a():setTimeout(a,10);var y,T,j,w=50;function S(t){if(!p.aborted&&!j){if((T=b(m))||(M("cannot access response document"),t=x),t===g&&p)return p.abort("timeout"),void v.reject(p,"timeout");if(t==x&&p)return p.abort("server abort"),void v.reject(p,"error","server abort");if(T&&T.location.href!=c.iframeSrc||d){m.detachEvent?m.detachEvent("onload",S):m.removeEventListener("load",S,!1);var r,t="success";try{if(d)throw"timeout";var e="xml"==c.dataType||T.XMLDocument||L.isXMLDoc(T);if(M("isXml="+e),!e&&window.opera&&(null===T.body||!T.body.innerHTML)&&--w)return M("requeing onLoad callback, DOM not available"),void setTimeout(S,250);var a,n,o,i=T.body||T.documentElement,s=(p.responseText=i?i.innerHTML:null,p.responseXML=T.XMLDocument||T,e&&(c.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":c.dataType}[e.toLowerCase()]},i&&(p.status=Number(i.getAttribute("status"))||p.status,p.statusText=i.getAttribute("statusText")||p.statusText),(c.dataType||"").toLowerCase()),u=/(json|script|text)/.test(s);u||c.textarea?(a=T.getElementsByTagName("textarea")[0])?(p.responseText=a.value,p.status=Number(a.getAttribute("status"))||p.status,p.statusText=a.getAttribute("statusText")||p.statusText):u&&(n=T.getElementsByTagName("pre")[0],o=T.getElementsByTagName("body")[0],n?p.responseText=n.textContent||n.innerText:o&&(p.responseText=o.textContent||o.innerText)):"xml"==s&&!p.responseXML&&p.responseText&&(p.responseXML=k(p.responseText));try{y=D(p,s,c)}catch(e){t="parsererror",p.error=r=e||t}}catch(e){M("error caught: ",e),t="error",p.error=r=e||t}p.aborted&&(M("upload aborted"),t=null),"success"===(t=p.status?200<=p.status&&p.status<300||304===p.status?"success":"error":t)?(c.success&&c.success.call(c.context,y,"success",p),v.resolve(p.responseText,"success",p),l&&L.event.trigger("ajaxSuccess",[p,c])):t&&(void 0===r&&(r=p.statusText),c.error&&c.error.call(c.context,p,t,r),v.reject(p,"error",r),l&&L.event.trigger("ajaxError",[p,c,r])),l&&L.event.trigger("ajaxComplete",[p,c]),l&&!--L.active&&L.event.trigger("ajaxStop"),c.complete&&c.complete.call(c.context,p,t),j=!0,c.timeout&&clearTimeout(h),setTimeout(function(){c.iframeTarget?f.attr("src",c.iframeSrc):f.remove(),p.responseXML=null},100)}}}var k=L.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},s=L.parseJSON||function(e){return window.eval("("+e+")")},D=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n="xml"===t||!t&&0<=a.indexOf("xml"),e=n?e.responseXML:e.responseText;return n&&"parsererror"===e.documentElement.nodeName&&L.error&&L.error("parsererror"),"string"==typeof(e=r&&r.dataFilter?r.dataFilter(e,t):e)&&("json"===t||!t&&0<=a.indexOf("json")?e=s(e):("script"===t||!t&&0<=a.indexOf("javascript"))&&L.globalEval(e)),e};return v}},L.fn.ajaxForm=function(e){var t;return(e=e||{}).delegation=e.delegation&&L.isFunction(L.fn.on),e.delegation||0!==this.length?e.delegation?(L(document).off("submit.form-plugin",this.selector,r).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,e,r).on("click.form-plugin",this.selector,e,a),this):this.ajaxFormUnbind().bind("submit.form-plugin",e,r).bind("click.form-plugin",e,a):(t={s:this.selector,c:this.context},!L.isReady&&t.s?(M("DOM not ready, queuing ajaxForm"),L(function(){L(t.s,t.c).ajaxForm(e)})):M("terminating; zero elements found by selector"+(L.isReady?"":" (DOM not ready)")),this)},L.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},L.fn.formToArray=function(e,t){var r=[];if(0===this.length)return r;var a,n,o,i,s,u,c,l,f=this[0],m=this.attr("id"),p=e?f.getElementsByTagName("*"):f.elements;if(p&&!/MSIE [678]/.test(navigator.userAgent)&&(p=L(p).get()),!(p=m&&(m=L(':input[form="'+m+'"]').get()).length?(p||[]).concat(m):p)||!p.length)return r;for(a=0,s=p.length;a