/*
 =======================================================================*\
|| ###################################################################### ||
|| # 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   # ||
|| ###################################################################### ||
\*========================================================================*/
vBulletin.precache(["user_autodelete_cooldown"],["privacy_consent_cookie_name","privacyurl","block_google_consent_gdpr"]);
(function(c,k,l,p,m){function z(a){c(a.target).closest(".js-privacy-consent-banner__banner").length||a.preventDefault()}function q(a){var b=Math.max(document.documentElement.clientWidth,window.innerWidth||0);h=Math.max(document.documentElement.clientHeight,window.innerHeight||0);b&&415>=b||h&&415>=h||b&&h&&650>=b&&650>=h?(a.data("restore-position-class")||c.each(["b-modal-banner__banner--top","b-modal-banner__banner--center","b-modal-banner__banner--bottom","b-modal-banner__banner--cover"],function(d,
e){a.is("."+e)&&a.data("restore-position-class",e)}),a.removeClass("b-modal-banner__banner--top b-modal-banner__banner--center b-modal-banner__banner--bottom b-modal-banner__banner--cover").addClass("b-modal-banner__banner--cover")):a.removeClass("b-modal-banner__banner--cover").addClass(a.data("restore-position-class"))}function r(){t(c(".js-privacy-consent-banner__banner"),c(".js-privacy-consent-banner__overlay"))}function A(a){m.render({template:"privacy_consent_banner_google",data:{},success:b=>
{c("body").append(b.template);b=c(".js-privacy-consent-banner__banner-google");t(b,c(".js-privacy-consent-banner__overlay-google"));c(".js-usersetting-privacy-deleteaccount",b).offon("click",()=>{k.dialogtools.openConfirmDialogSimple({title:"warning",message:["privacyconsent_terms_delete_warning_detailed",l.get("user_autodelete_cooldown")],iconType:"warning",yesPhrase:"usersetting_deleteaccount_label",noPhrase:"cancel",dialogClass:"b-modal-banner__banner",onClickYes:()=>{let d,e;m.ajax({call:"/profile/withdrawPrivacyConsent",
success:f=>location.href=f.url,api_error:(f,B,C)=>{f=m.showApiError(f,B,C);e=f.dialog.bind(f,"option","classes.ui-dialog");d=e();e(d+" b-modal-banner__banner");return!1},after_error:()=>e(d)})}})});c(".js-google-consent-dialog",b).offon("click",()=>{a.callbackQueue.push({CONSENT_DATA_READY:()=>a.showRevocationMessage()})})}})}function t(a,b){b=a.add(b);b.offon("click",d=>{d.stopPropagation()});q(a);b.removeClass("h-hide-imp");u(!1)}function v(a,b){a.add(b).remove();u(!0)}function u(a){var b=a?"removeEventListener":
"addEventListener";c("html, body").toggleClass("b-modal-banner--disabled",!a);try{document[b]("touchmove",z,{capture:!0,passive:!1})}catch(d){}b=c(window);b.off("resize orientationchange",w);if(!a)b.on("resize orientationchange",w)}function x(){var a=Math.round((new Date).getTime()/1E3);p.setCookie(g,"CONSENTED:"+a,3650,!1);v(c(".js-privacy-consent-banner__banner"),c(".js-privacy-consent-banner__overlay"));m.ajax({call:"/ajax/api/user/updateGuestPrivacyConsent",data:{consent:1},success:()=>{}});return!1}
function y(){let a=l.get("privacyurl");return a&&k.getAbsoluteUrl(a)==k.getAbsoluteUrl(location.href)}function D(){if(0<pageData.userid||"0"==pageData.privacystatus)return!1;g=l.get("privacy_consent_cookie_name");""==g&&(g=pageData.cookie_prefix+"privacy_consent_guest");var a=p.getCookie(g,!1);if(a&&!a.match(/^NOTINEU:/)||y())return!1;c(".js-privacy-consent-banner__banner .js-privacy-consent-banner__button").off("click",x).on("click",x);r();return!0}function E(){if(0!=pageData.userid){k.ensureObj("googlefc.callbackQueue",
[],window);var a=window.googlefc;!y()&&l.get("block_google_consent_gdpr")&&a.callbackQueue.push({CONSENT_API_READY:()=>__tcfapi("addEventListener",2.2,(b,d)=>{b.purpose.consents[1]?v(c(".js-privacy-consent-banner__banner-google"),c(".js-privacy-consent-banner__overlay-google")):A(a)})})}}let g="",w=c.debounce(100,function(a){q(c(".js-privacy-consent-banner__banner"))});if("2"==pageData.privacystatus){r();var n=!0}else n=!1;n||(n=D());n||E()})(jQuery,vBulletin,vBulletin.options,vBulletin.storagetools,
vBulletin.ajaxtools);
