diff --git a/CHANGES.md b/CHANGES.md index 982e07b9..68382b5c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ * Change Hachoir can't support PY2 so backport their PY3 to prevent a need for system dependant external binaries like mediainfo * Update html5lib 0.99999999/1.0b9 (1a28d72) to 1.1-dev (e9ef538) * Update IMDb 5.1 (r907) to 5.2.1dev20171113 (f640595) +* Update jquery.form plugin 3.51.0 to 4.2.2 [develop changelog] diff --git a/gui/slick/js/lib/jquery.form.min.js b/gui/slick/js/lib/jquery.form.min.js index 10d3695f..9a447f7c 100644 --- a/gui/slick/js/lib/jquery.form.min.js +++ b/gui/slick/js/lib/jquery.form.min.js @@ -1,42 +1,23 @@ -/* - 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').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)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)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.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},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l