/*
 =======================================================================*\
|| ###################################################################### ||
|| # vBulletin 6.2.3
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2026 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(c,f){function g(){let a=new URL(location.href);a.hash="";location.replace(a)}function h(a){a.preventDefault();var d=c(a.currentTarget).closest(".js-login-form-main");a=d.closest(".js-login-form-main-container");var n=c(".js-error-box",a),k=c(".js-login-message-box",a),p=c(".js-login-button",a);k.height(d.height());var l=b=>{p.prop("disabled",!b);k.toggleClass("h-hide",b);d.toggleClass("h-hide",!b)},m=b=>{n.html(b).toggleClass("h-hide",!b);d.find(".js-login-username, .js-login-password").toggleClass("badlogin",
!!b)};l(!1);m("");f.ajaxtools.ajaxSilent({call:"/auth/ajax-login",data:d.serializeArray(),success:()=>g(),api_error:b=>{d.find(".js-login-password").val("");m(f.phrase.get(b[0]));l(!0)},error:()=>{location.href=pageData.baseurl}})}var e=c(document);e.on("click",".js-login-button",h);e.on("keydown",".js-login-username, .js-login-password",a=>{13==a.keyCode&&h(a)});e.on("focus",".js-login-username, .js-login-password",function(a){c(this).removeClass("badlogin")});e.on("vb-login",()=>g())})(jQuery,vBulletin);
