/*
 =======================================================================*\
|| ###################################################################### ||
|| # 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(a){function J(){vBulletin.AJAX({call:"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:!1,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},cache:!1,success:b=>{b.templates&&(a("#sitebuilder-wrapper").prepend(b.templates.main),a(".js-top-menu-sitebuilder").show(),a(".edit-switch-container .switch-control").addClass("on"),H.setCookie("sitebuilder_active","1"))}})}function M(b,c){var d=0,e=b.length;b.each(function(){if(this.complete&&
0<this.naturalHeight&&this.src)++d;else a(this).one("load",function(){++d;d==e&&c()})});d==e&&c()}function N(b,c,d,e,k){function l(p){p=p.position().top+p.outerHeight();p=Math.round(p);return[p-1,p,p+1]}function h(p,u){var n,q;for(n in p)for(q in u)if(p[n]===u[q])return!0;return!1}a(b).each(function(){var p=a(this);p.trigger("vbulletin:flexgridstart",{isResize:k});var u=a(c,p),n=u.last(),q=!1,w={},f=0,r=!1,x=!1,B=u.first();u.length&&(u.removeClass(d+" vb-temp-placeholder-grid-lastrow"),u.removeClass(e),
setTimeout(function(){q=l(n);u.each(function(){var z=a(this),D=l(z);h(q,D)?z.addClass("vb-temp-placeholder-grid-lastrow"):(r||(r=D),h(r,D)||(++f,B.addClass(e)),r=D,B=z,"undefined"==typeof w[f]&&(w[f]=0),++w[f])});B!=u.first()&&B.addClass(e);a.each(w,function(z,D){!1===x&&(x=D);D<x&&(x=D)});var A=u.filter(".vb-temp-placeholder-grid-lastrow");A.removeClass("vb-temp-placeholder-grid-lastrow");(!1===x||A.length<x)&&A.addClass(d);!1!==x&&A.length==x&&A.last().addClass(e);p.trigger("vbulletin:flexgridready",
{isResize:k})},0))})}function R(b,c,d,e,k,l,h){a(b).each(function(){var p=a(this),u=a(d,p);l?N(p,c,e,k,h):M(u,function(){N(p,c,e,k,h)})})}function U(b,c){function d(n,q,w){var f={},r=[];var x=n.data.length-32;var B=n.data;for(n=0;n<x;n+=32){var A=Math.round(B[n]/q);var z=Math.round(B[n+1]/q);var D=Math.round(B[n+2]/q);var E=Math.round(B[n+3]/q);A=A+100*z+1E4*D+1E6*E;f[A]?++f[A]:f[A]=1}for(n in f)r.push([n,f[n]]);r.sort(function(g,m){return g[1]>m[1]?-1:m[1]>g[1]?1:0});r.length>w&&(r=r.slice(0,w));
return r}function e(n){var q=Math.floor(n/1E6);var w=Math.floor(n/1E4)-100*q;var f=Math.floor(n/100)-1E4*q-100*w;return[n-1E6*q-1E4*w-100*f,f,w,q]}function k(n,q){n=e(n[0]);var w=e(q[0]);q=Math.min(n[0],n[1],n[2]);var f=Math.max(n[0],n[1],n[2]);n=Math.min(w[0],w[1],w[2]);w=Math.max(w[0],w[1],w[2]);q=f-q;n=w-n;return q>n?-1:n>q?1:0}function l(n,q){var w=0,f=0;n=e(n[0]);q=e(q[0]);n[0]!=n[1]&&++w;n[0]!=n[2]&&++w;n[1]!=n[2]&&++w;q[0]!=q[1]&&++f;q[0]!=q[2]&&++f;q[1]!=q[2]&&++f;return w>f?-1:f>w?1:0}function h(n,
q){n=a(c,q);var w=q.innerWidth();q=q.innerHeight();var f=n.outerWidth(),r=n.outerHeight();if(f>=w&&r>=q)switch(n.css("object-fit")){case "contain":return u(n);case "scale-down":return[w,q,f,r]=p(n),n=w<f&&q<r?!0:u(n),n;case "none":return[n,,w,q]=p(n),n<w||n<q;default:return!1}return!0}function p(n){return[n.prop("naturalWidth"),n.prop("naturalHeight"),n.prop("width"),n.prop("height")]}function u(n){var q;let w;[q,f,n,w]=p(n);q/=f;var f=w;let r=q*f;r>n&&(r=n,f=n/q);return n>r||w>f}a(b).each(function(n){var q=
a(this),w=a(c,q);w.length&&setTimeout(function(){M(w,function(){var f=a(c,q),r=f.data("bgStrat")||"primary-color";if(f.length&&h(f,q))switch(r){case "cover-blur":q.css("background-image","url('"+f.attr("src")+"')");q.css("background-size","cover");f.css("backdrop-filter","blur(10px)");break;default:var x=f.outerWidth(),B=f.outerHeight();f=f.get(0);r=document.createElement("canvas");var A=r.getContext&&r.getContext("2d");x=f.naturalWidth||x;B=f.naturalHeight||B;var z=!1;r.width=x;r.height=B;A.drawImage(f,
0,0);try{z=A.getImageData(0,0,x,B)}catch(D){}z&&z.data&&z.data.length&&(f=d(z,20,100),f.sort(k),f.sort(l),f=f.shift(),f=e(f[0]),f[0]*=20,f[1]*=20,f[2]*=20,f[3]*=20,245<=f[3]&&(f[3]=255),q.css("backgroundColor","rgba("+f.join(",")+")"))}})},0)})}function V(){function b(){var c=a(this);if(""==c.prop("title")){var d=c.get(0);d.scrollWidth>d.clientWidth&&(d=c.text().trim(),300<d.length&&(d=d.substr(0,297)+"..."),c.prop("title",d))}c.addClass("js-ellipsis-has-title")}a(document).off("mouseover",".ellipsis:not(.js-ellipsis-has-title)",
b).on("mouseover",".ellipsis:not(.js-ellipsis-has-title)",b)}const C=vBulletin;pageData=window.pageData||{};pageData=Object.assign(pageData,vBulletin.data());pageData.tzOffset=parseInt(pageData.tzOffset);pageData.dstauto=parseInt(pageData.dstauto);vBulletin.version=pageData.templateversion;a.fn.offon=function(b,c,d,e){null==e&&(e=d,null==d?(e=c,c=void 0):"string"!==typeof c&&(d=c,c=void 0));return this.off(b,c).on(b,c,d,e)};String.prototype.format=function(){for(var b=this,c=arguments.length;c--;)b=
b.replace(new RegExp("\\{"+c+"\\}","gm"),arguments[c]);return b};jQuery.fn.reverse=[].reverse;a(".js-module__hide-if-empty:not(:has(*))").each(function(){let b=a(this);/\s/.test(b.html())&&b.closest(".js-module").hide()});jQuery.ajaxPrefilter(function(b){b.crossDomain&&(b.contents.script=!1)});a.ajaxPrefilter("script",function(b){b.cache=!0});vBulletin.normalizeAjaxUrl=function(b){return 0==b.indexOf("http://")?b.substring(5):0==b.indexOf("https://")?b.substring(6):b};vBulletin.getAjaxBaseurl=function(){return vBulletin.normalizeAjaxUrl(pageData.baseurl)};
vBulletin.getAbsoluteUrl=function(){var b;return function(c){b||(b=document.createElement("a"));b.href=c;return b.href}}();vBulletin.regexEscape=function(b){return b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};let S=vBulletin.normalizeAjaxUrl(pageData.baseurl);vBulletin.isInternalUrl=function(){let b=new RegExp("^"+vBulletin.regexEscape(S));return function(c){c=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(c));return b.test(c)}}();vBulletin.isInternalJSUrl=function(){let b=new RegExp("^"+vBulletin.regexEscape(S+
"/js/")+".*.js");return function(c){c=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(c));return b.test(c)}}();vBulletin.isAbsoluteUrl=function(){var b=RegExp("^(?:[a-z]+:)?//","i");return function(c){return b.test(c)}}();vBulletin.isEmptyList=function(b){return a.isArray(b)&&0==b.length||a.isPlainObject(b)&&a.isEmptyObject(b)};C.ensureArray=b=>void 0===b?[]:Array.isArray(b)?b:[b];C.getFormData=(b,c)=>{let d={};for(const e of b.serializeArray()){let {name:k,value:l}=e;k in d?(d[k]=C.ensureArray(d[k]),
d[k].push(l)):d[k]=l}"undefined"!=typeof c&&a("input:checkbox:not(:disabled)",b).each((e,k)=>{d[k.name]||(d[k.name]=c)});return d};C.objSubset=(b,c)=>{let d={};for(let e of c)e in b&&(d[e]=b[e]);return d};a.ajaxPrefilter(function(b,c,d){if(!b.url||vBulletin.isInternalUrl(b.url)&&!vBulletin.isInternalJSUrl(b.url))if("undefined"==typeof b.data)b.data="securitytoken="+pageData.securitytoken,"undefined"!==typeof b.formData&&Array.isArray(b.formData)&&b.formData.push({name:"securitytoken",value:pageData.securitytoken});
else if("undefined"!==typeof FormData&&b.data instanceof FormData)b.data.append("securitytoken",pageData.securitytoken);else{var e=!0;c=b.data.split("&");a.each(c,function(k,l){if(l.match(/^securitytoken=/))return e=!1});e&&(b.data+="&securitytoken="+pageData.securitytoken)}});a.ajaxPrefilter(function(b,c,d){(function(){var e=vBulletin.getAjaxBaseurl();if(0==c.url.indexOf(e)&&0==c.url.substr(e.length).indexOf("/ajax/render/")||c&&c.data&&c.data.isAjaxTemplateRender){var k=b.success;b.success=function(){console.log("Intercept AJAX template render calls: Start (URL: {0})".format(b.url));
var l=arguments[0];if(!l||"object"!=typeof l||a.isEmptyObject(l))return"function"==typeof k?k.apply(this,arguments):!1;c.data&&c.data.isAjaxTemplateRenderWithData?arguments[0]=l:(arguments[0]=l.template,arguments[1]=l.errors);var h=l.css_links;if(h&&0!=h.length){console.log("Intercept AJAX template render calls: Has CSS");var p=/sheet=([^&]+)&/;l=h.pop();var u=null!=l.match(p);h.push(l);var n=function(A){var z=A.match(p),D={};z&&z[1]?a.each(z[1].split(","),function(E,g){D[g]=A}):D[A.replace(/^.*\//g,
"")]=A;return D},q={};a("head link[rel=stylesheet]").each(function(){a.extend(q,n(a(this).attr("href")))});var w={};a.each(h,function(A,z){a.extend(w,n(z))});var f=[];a.each(w,function(A,z){A&&"undefined"==typeof q[A]&&(u?f.push(A):f.push(z))});if(0==f.length){if(console.log("Intercept AJAX template render calls: Needed CSS is already on the page"),"function"==typeof k)return console.log("Intercept AJAX template render calls: Calling original success handler"),k.apply(this,arguments)}else{h=[];u?
(console.log("Intercept AJAX template render calls: found DB CSS"),h.push(l.replace(/sheet=[^&]+&/,"sheet="+f.join(",")+"&"))):(console.log("Intercept AJAX template render calls: found FS CSS"),h=f);var r=this,x=arguments;console.log("Intercept AJAX template render calls: Fetching CSS: {0}".format(h.join(", ")));var B=function(A){if(0==A.length)console.log("Intercept AJAX template render calls: Done. Calling original callback."),setTimeout(function(){if("function"==typeof k)return k.apply(r,x)},50);
else{var z=a("<div />").append(A.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(z));a.get(z,{cache:!0},function(D){D=a("<link />",{rel:"stylesheet",type:"text/css",href:z});var E=a(".js-additional-css");1==E.length?E.before(D):a("head").append(D)}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(z));if(0<a(".js-debug-css-template-list").length){var D=n(z),E=a("<ol />");a.each(D,function(g,m){u?E.append(a("<li />").append(g)):
E.append(a("<li />").append(m))});D=a(".js-debug-css-template-list").append(a("<li />").append(vBulletin.phrase.get("added_via_ajax_call")+":").append(E)).prev("b");D.text(parseInt(D.text(),10)+1)}B(A)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(z));B(A)})}};B(h)}}else if(console.log("Intercept AJAX template render calls: No CSS"),"function"==typeof k)return console.log("Intercept AJAX template render calls: Calling original success handler"),
k.apply(this,arguments)}}})()});vBulletin.isRtl=()=>"rtl"==a("html").attr("dir");let H=vBulletin.createStorageTools(pageData.cookie_prefix,Cookies.withAttributes({path:pageData.cookie_path,domain:pageData.cookie_domain,secure:"https"==pageData.baseurl.substr(0,5).toLowerCase()||"https:"==location.protocol}));vBulletin.storagetools=H;(function(){var b=jQuery.fn.selectBox;jQuery.fn.selectBox=function(){var c=a(this);"undefined"==typeof c.attr("tabindex")&&c.attr("tabindex","0");c=b.apply(this,arguments);
a(".selectBox-arrow").addClass("b-icon-fa b-icon-fa--12 fa-solid fa-caret-down");return c}})();(function(){(function(){var b=a(".js-login-menu");b.find(".js-comp-menu-dropdown__trigger").on("click",function(){setTimeout(function(){b.find(".js-login-username").trigger("focus")},0)});(function(){function c(l,h){a(l).toggleClass("h-hide-imp",!h)}var d=a(".js-top-menu-user--list"),e=[".js-header__notifications-label",".js-pmchat__messages-label",".js-menu__username-label"],k=e.slice(0).reverse();d.on("vbulletin:shrink",
function(){a.each(e,function(l,h){c(h,!1);if("need_shrink"!=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(d))return!1})}).on("vbulletin:unshrink",function(){a.each(k,function(l,h){c(h,!0);if("need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(d))return c(h,!1),!1})})})();(function(){var c=a(".js-top-menu-sitebuilder--list"),d=c.find(".b-top-menu__item"),e=d.find(".js-top-menu-link"),k=c.closest(".js-top-menu-sitebuilder"),l=[function(h){e.toggleClass("b-top-menu__item-link--compact",
h)},function(h){k.toggleClass("b-top-menu__background--compact",h)},function(h){vBulletin.CompMenuHorizontal.convertDropdownProgressive({$parent:c,$children:d,removeMenu:!h})}];c.on("vbulletin:shrink",function(){a.each(l,function(h,p){p(!0);if("need_shrink"!=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(c))return!1})}).on("vbulletin:unshrink",function(){for(var h=l.length;0<=--h;)if(l[h](!1),"need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(c)){l[h](!0);break}})})()})();
a(".ui-tabs .ui-tabs-nav > li").addClass("ui-state-disabled")})();vBulletin.pageHasSelectors=function(b){if(a.isArray(b)&&0<b.length&&""!=a.trim(b.toString())){var c=!1;a.each(b,function(d,e){if(0<a(e).length)return c=!0,!1});return c}return!0};vBulletin.areJsonObjectsEqual=function(b,c){var d=function(e,k){for(var l in e)if(e.hasOwnProperty(l)&&k.hasOwnProperty(l)){var h=e[l],p=k[l];if(h!=p)if(h instanceof Array&&p instanceof Array){if(0<a(h).not(p).length||0<a(p).not(h).length)return!1}else return!1}else return!1;
return!0};return Object.keys(b).length==Object.keys(c).length?d(b,c):!1};vBulletin.loadingIndicator=function(){function b(h){if(h){h=a(".js-loading-indicator");var p=h.outerWidth(),u=vBulletin.isRtl()?"margin-right":"margin-left";0<p&&h.css(u,-(p/2));h.removeClass("h-hide");a("body").css("cursor","wait")}else a(".js-loading-indicator").addClass("h-hide"),a("body").css("cursor","auto")}var c=0,d=!1,e=!1,k=0,l=0;return{init:function(){d||(a(document).ajaxStart(function(){vBulletin.loadingIndicator.show("ajaxStart")}),
a(document).ajaxStop(function(){vBulletin.loadingIndicator.hide("ajaxStop")}),d=!0)},show:function(h){0<k&&"ajaxStart"==h?(--k,++l,console.log("vBulletin.loadingIndicator.show ajax indicator suppressed")):(++c,console.log("vBulletin.loadingIndicator.show Counter: "+c+" Source: "+(h||"Unspecified")),0<c&&(e=setTimeout(function(){e&&(b(!0),e=!1)},1E3)))},hide:function(h){0<l&&"ajaxStop"==h?(--l,console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed")):(--c,c=0>c?0:c,h||(c=0),console.log("vBulletin.loadingIndicator.hide Counter: "+
c+" Source: "+(h||"Unspecified")),1>c&&(e&&(clearTimeout(e),e=!1),b(!1)))},suppressNextAjaxIndicator:function(){++k}}}();vBulletin.precache("admin admin_auth april august cancel_edit close december done email_addresses_must_match error error_loading_ckeditor_script error_loading_editor error_posting_comment_code error_x existing_reply_will_be_deleted february follow follow_error following following_pending following_remove friday_min go_to_first_new_post hour inlinemod_auth_password_empty invalid_data invalid_data_requested invalid_email_address invalid_request invalid_server_response_please_try_again invalid_special_channel_subscribe_request invalid_username_specified invalid_username_specified_maxlength_x invalid_username_specified_minlength_x invalid_query_definition_x january join joined join_error july june leave loading logged_out_while_editing_post login login_success_admin_auth march may minute moderator monday_min new_posts no no_create_permissions no_icon no_leave_channel_permission no_permission no_update_permissions no_valid_tags_found not_logged_no_permission november now october phrase_passthrough physically_remove_blog physically_remove_comment physically_remove_media physically_remove_reply physically_remove_topic physically_remove_visitorMessage please_enter_your_comment please_enter_your_email_address please_provide_search_string post_comment post_history posttype_blog posttype_comment posttype_media posttype_reply posttype_topic posttype_visitorMessage preview refer_a_friend saturday_min search see_less see_more select_option_and_click_delete_button_blog select_option_and_click_delete_button_comment select_option_and_click_delete_button_media select_option_and_click_delete_button_reply select_option_and_click_delete_button_topic select_option_and_click_delete_button_visitorMessage send_report september soft_delete_blog soft_delete_comment soft_delete_media soft_delete_notes_blog soft_delete_notes_comment soft_delete_notes_media soft_delete_notes_reply soft_delete_notes_topic soft_delete_notes_visitorMessage soft_delete_reply soft_delete_topic soft_delete_visitorMessage sunday_min thanks_for_signing_up_log_in time tuesday_min thursday_min unable_to_check_admin_permissions unable_to_contact_server_please_try_again unexpected_error unfollow_error usernametaken wednesday_min".split(" "),
["bbtitle","markinglimit","threadpreview"]);var K=C.getAjaxBaseurl(),G=C.createSiteDataTools(K);G.phrase.init(pageData,pageData.languageid,H.createStorageTimed("phrase",pageData.phrasedate,pageData.current_server_datetime),C.phrase.precache);a.extend(C.phrase,G.phrase);G.options.init(H.createStorageTimed("options",pageData.optionsdate,pageData.current_server_datetime),C.options.precache);a.extend(C.options,G.options);G=C.createDialogTools(a,C,C.phrase);C.dialogtools=G;C.error=G.error;C.warning=G.warning;
C.alert=G.alert;C.openConfirmDialog=G.openConfirmDialog;window.openAlertDialog=G.openAlertDialog;window.openConfirmDialog=G.openConfirmDialog;let L=C.createAjaxTools(K,pageData.userid,C.phrase,C.dialogtools);C.ajaxtools=L;C.ajaxlib=L.library;C.AJAX=L.ajax;C.ajaxForm=L.ajaxForm;vBulletin.getScrollbarWidth=function(){if(a("body").data("scrollbar-width"))return a("body").data("scrollbar-width");var b=a('<div style="width:50px;height:50px;overflow:auto;position:absolute;top:-99999px;"><div /></div>').appendTo("body"),
c=b.children();c=c.innerWidth()-c.height(99).innerWidth();b.remove();a("body").data("scrollbar-width",c);return c};vBulletin.assertUserHasAdminPermission=function(b,c,d,e){if(a(c).data("in-progress"))return!1;a("body").css("cursor","wait");a(c).data("in-progress",!0);vBulletin.AJAX({call:"/ajax/api/user/currentUserHasAdminPermission",data:{adminPermission:b},complete:function(){a("body").css("cursor","auto");a(c).data("in-progress",null)},success:function(k){!0===k?d():(vBulletin.error("error","unable_to_check_admin_permissions"),
a("#config-dialog .loader").hide())},api_error:"undefined"==typeof e?void 0:function(k){return vBulletin.ajaxtools.hasError(k,"inlinemodauth_required")?(vBulletin.ajaxlib.inlineMod(e),!1):!0},error_phrase:"unable_to_check_admin_permissions"})};vBulletin.selectTabByIndex=function(b){var c=this instanceof a?this:a(this);c.length&&-1<b&&c.hasClass("ui-tabs")&&c.data("noPushState",!0).tabs("option","active",b).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(b).addClass("ui-state-focus").find("a").trigger("focus")};
a.ui.tabs.prototype._isLocal=function(){return!0};(function(){var b=a.ui.tabs.prototype._processTabs;a.ui.tabs.prototype._processTabs=function(){var c=b.apply(this,arguments);this.panels.removeClass("h-hide");return c}})();vBulletin.getSelectedTabHashOrPath=function(b,c){return(c?b.find(".ui-tabs-nav > .ui-tabs-active > a").prop("hash"):b.find(".ui-tabs-nav > .ui-tabs-active > a").data("url-path"))||""};vBulletin.parseUrl=function(b){var c=document.createElement("a");c.href=b||"/";b=c.pathname;0!=
b.indexOf("/")&&(b="/"+b);return{protocol:c.protocol,hostname:c.hostname,port:c.port,pathname:b,search:c.search,hash:c.hash}};vBulletin.makeTabUrl=function(b,c,d,e,k){b?(b=vBulletin.parseUrl(b),d?(k=k||"tab",d=new RegExp("([?+|&+])"+k+"=\\w+[-\\w]*","i"),b=b.search.match(d)?b.pathname+b.search.replace(d,"$1{0}={1}".format(k,c)):b.search?"{0}{1}&{2}={3}".format(b.pathname,b.search,k,c):"{0}?{1}={2}".format(b.pathname,k,c)):(k=b.pathname.replace(/\/$/,""),d=k.split("/"),d="\\/"+d[d.length-(k.match(/\/page([0-9]+)/)?
2:1)]+"$",b=b.pathname.replace(new RegExp(d),"/"+c)+b.search)):b="/";e&&(b+="#"+e);return b};vBulletin.makePaginatedUrl=function(b,c){if(b){var d=b.match(/\/page[0-9]+/);d?b=1<c?b.replace(d[0],"/page"+c):b.replace(d[0],""):1<c&&(b=b.match(/\?/)?b.replace(/\?/,"/page"+c+"?"):b.match(/#/)?b.replace(/#.*/,"/page"+c):b+("/page"+c))}return b};vBulletin.makeFilterUrl=function(b,c,d,e,k,l){l=l||!1;b=b||location.href;var h=a(".filtered-by",e);b=vBulletin.parseUrl(b);var p=b.search,u=a(".js-button-filter.js-default-checked.js-checked",
e);u.data("filter-name")==c&&u.data("filter-value")==d&&(l=!0);!l&&(h.data("clicked")&&a('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(c,d),e).hasClass("js-default-checked")||a('.toolbar-search-form input[name="{0}"]'.format(c),e).length&&!d)&&(l=!0,h.data("clicked",null));b=b.pathname;if(p&&1<p.length)if(p.match(new RegExp(c+"=","i"))){if(e=vBulletin.parseQueryString(p),!a.isEmptyObject(e)){var n="";a.each(e,function(q,w){l&&q==c||(n+="{0}={1}&".format(q,q==c?d:w))});n&&(b+="?"+
n.substring(0,n.length-1))}}else b=l?b+p:b+(p+"&{0}={1}".format(c,encodeURIComponent(d)));else l||(b+="?{0}={1}".format(c,encodeURIComponent(d)));k&&(b+="#"+k);return b};vBulletin.getSelectedFilters=function(b,c){var d={};if(c){var e=b.parent().find(".filtered-by .filter-text").filter(":visible");b.find(":input:radio:checked").each(function(k,l){k=a(l);if((k.hasClass("js-default-checked")||1==k.data("bypass-filter-display"))&&(0==e.length||0==e.filter('[data-filter-name={0}][data-filter-value="{1}"]').length))return!0;
"[]"==l.name.slice(-2)?(k=l.name.split("[]"),d[k[0]]=d[k[0]]||[],d[k[0]].push(l.value)):d[l.name]=l.value})}else b=b.serializeArray(),a.each(b,function(k,l){"securitytoken"!=l.name&&("[]"==l.name.slice(-2)?(k=l.name.split("[]"),d[k[0]]=d[k[0]]||[],d[k[0]].push(l.value)):d[l.name]=l.value)});return d};vBulletin.parseQueryString=function(b,c){var d={};if(b&&1<b.length){var e=b.indexOf("?");c=c instanceof Array?c:[];-1!=e&&(b=b.substring(e+1).split("&"),a.each(b,function(k,l){k=l.split("=");if(0==c.length||
-1==a.inArray(k[0],c))d[k[0]]=decodeURIComponent(k[1]||"").replace(/\+/g," ")}))}return d};vBulletin.togglePageScrolling=function(b){function c(){d.scrollTop(e).scrollLeft(k)}var d=a(window),e=d.scrollTop(),k=d.scrollLeft();d.off("scroll.vbtogglepagescrolling");if(!b)d.on("scroll.vbtogglepagescrolling",c)};vBulletin.pagination=function(b){function c(){return parseInt((a(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function d(f,r){var x=c.apply(this),B=a(".arrow[rel=next]",this),A=a(".arrow[rel=prev]",
this);1>f?f=1:f>x&&(f=x);a(".js-pagenum",this).val(f);f==x?B.addClass("h-disabled").removeAttr("href"):B.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,f+1));1==f?A.addClass("h-disabled").removeAttr("href"):A.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,f-1));"function"==typeof l.onPageChanged&&l.onPageChanged.apply(this,[f,r]);1<x&&u.isEnabled()&&!r&&(r=u.getState(),!r||!r.data||!r.data.from||a.inArray(r.data.from,-1==["filter_blogs",
"filter_groups"]))&&(w=1==f?a(".arrow[rel=next]",this).attr("href"):a(".arrow[rel=prev]",this).attr("href"))&&(w=vBulletin.makePaginatedUrl(w,f),f={from:"pagination",page:f,tab:l.tabParamAsQueryString?"#"+a(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(a(this).closest(".ui-tabs"),!1)},u.pushState(f,document.title,w))}function e(f){a("a.see-all-btn",this).closest(".pagenav-controls")[f?"addClass":"removeClass"]("h-hide")}function k(){a(l.context).off("click",".js-pagenav .js-pagenav-button").on("click",
".js-pagenav .js-pagenav-button",function(f){if(u.isEnabled()){f=a(this).data("page");var r=a(".pagenav-form",l.context).get(0);d.apply(r,[f,!1]);return!1}return!0}).off("mouseover",".js-pagenav .js-pagenav-button").on("mouseover",".js-pagenav .js-pagenav-button",function(f){f=a(this);f.prop("href")||f.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(f.data("page"),10)))});a(".js-pagenav .js-pagenav-button",l.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,
parseInt(a(this).data("page")))});(function(){a(document).on("vbulletin:shrink vbulletin:unshrink",".js-pagenav",function(){var f=a(this),r=f.data("vbshrink-hidden-elements");"undefined"!=typeof r&&r.removeClass("h-hide-imp");r=f.find("> .js-pagenav-button").filter(":visible");var x=a(),B=a(),A=r.filter(".js-pagenav-current-button").data("page");r.each(function(z,D){z=a(D);var E=z.data("page");D=z.is(".js-pagenav-prev-button, .js-pagenav-current-button, .js-pagenav-next-button");var g=z.is(".js-pagenav-first-button, .js-pagenav-last-button");
E=E==A-1||E==A+1;g=g?"1":E?"2":"3";D||(x=x.add(z),z.data("vbshrink-priority",g))});a.each(["3","2","1"],function(z,D){x.each(function(E,g){E=a(g);if(E.data("vbshrink-priority")!=D)return!0;if("need_shrink"==vBulletin.Responsive.Debounce.checkElementShrinkRequirement(f))E.addClass("h-hide-imp"),B=B.add(E);else return!1})});f.data("vbshrink-hidden-elements",B)});vBulletin.Responsive.Debounce.checkShrinkEvent(a(".js-pagenav"))})()}var l={context:document,onPageChanged:null,tabParamAsQueryString:!0,allowHistory:!1};
b&&"object"==typeof b&&a.extend(l,b);var h=a(".pagenav-controls .pagenav-form",l.context),p=Number(a(".defaultpage",h).val())||Number(a(".js-pagenum",h).val())||1,u=new vBulletin.history.instance(l.allowHistory);h.data("object-instance",this);if(u.isEnabled()){b=vBulletin.parseQueryString(location.search,["_"]);var n=location.pathname.match(/\/page([0-9]+)/),q=u.getState();if(n&&1<Number(n[1])&&a.isEmptyObject(b)&&(!q||a.isEmptyObject(q.data))){var w=vBulletin.makePaginatedUrl(location.href,p);b=
{from:"pagination",page:p,tab:l.tabParamAsQueryString?"#"+h.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(h.closest(".ui-tabs"),!1)};u.setDefaultState(b,document.title,w)}u.setStateChange(function(f){f=u.getState();if("pagination"==f.data.from){u.log(f.data,f.title,f.url);if(location.search){var r=vBulletin.parseQueryString(location.search,["_"]);if(!a.isEmptyObject(r)||"groups-tab"==r.tab){delete r.tab;a(window).trigger("statechange.filter",["pagination",r]);return}}var x,
B;f.data.tab&&(x=l.tabParamAsQueryString?a(f.data.tab):a('.ui-tabs .ui-tabs-panel[data-url-path="'+f.data.tab+'"]'));r=x&&x.length&&x||l.context;(B=a(".conversation-toolbar .filter-wrapper",r).data("object-instance"))&&B.resetFilters(!0);if(f.data.tab&&(x=x.closest(".ui-tabs"),$tabAnchor=l.tabParamAsQueryString?x.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(f.data.tab)):x.find('.ui-tabs-nav > li > a[data-url-path="'+f.data.tab+'"]'),!$tabAnchor.parent().hasClass("ui-tabs-active"))){f=$tabAnchor.parent().index();
vBulletin.selectTabByIndex.call(x,f);return}x=a(".pagenav-controls .pagenav-form",r);(r=x.data("object-instance"))&&"function"==typeof r.getOption&&"function"==typeof r.getOption("onPageChanged")&&(f=f.data.page||p,r.getOption("onPageChanged").apply(x.get(0),[f,!1,!location.search,location.search]))}},"pagination")}a(".arrow",h).off("click").on("click",function(f){var r=a(this);f=this.form||r.closest("form").get(0);if(!r.hasClass("h-disabled")){r=parseInt(a(".js-pagenum",f).val())+("next"==r.attr("rel")?
1:-1);if(!u.isEnabled()&&l.allowHistory)return this.href&&this.hash!=this.href||(this.href=vBulletin.makePaginatedUrl(location.href,r)),!0;d.apply(f,[r,!1])}return!1});k();a(".js-pagenum",h).offon("keypress",function(f){if(13==f.keyCode){f.preventDefault();f=a(this).val();f=isNaN(f)?1:parseInt(f,10);var r=c.apply(this.form);f>r&&(f=r);1>f&&(f=1);u.isEnabled()?d.apply(this.form,[f,!1]):l.allowHistory?location.href=vBulletin.makePaginatedUrl(location.href,f):d.apply(this.form,[f,!1])}});a(".js-pagenum",
h).offon("click",function(f){a(this).select()});this.updatePageInfo=function(f,r){if(f&&"object"==typeof f){var x=f.totalpages||1,B=a(".pagenav-controls .pagenav-form",l.context);a(".pagetotal",B).text(x);"undefined"!=typeof f.showseemore&&e.apply(B,[!f.showseemore]);f.perpage=C.conversation.POSTS_PER_PAGE;r&&0<a(".pagenav-container",l.context).length&&C.AJAX({call:"/ajax/render/pagenav",data:{pagenav:f,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},success:A=>{a(".pagenav-container",l.context).replaceWith(A.template);
k()}});B.length&&d.apply(B.get(0),[f.pagenumber,r])}};this.updateResultId=function(f){(f=parseInt(f))&&"number"===typeof f&&a("input[name=result-id]",h).val(f)};this.setOption=function(f,r){l[f]=r};this.getOption=function(f){return l[f]};this.updatePageNavigation=function(f,r,x){d.apply(f.get(0),[r,x])}};K=C.ensureObj("contentEntryBox");G=C.data("contententry-data");K.ATTACHLIMIT=Number(G.attachlimit||0)||0;vBulletin.isScrolledIntoView=function(b,c){let d=!1;a.isPlainObject(c)&&"[object Object]"==
c.toString()&&(d=!0,c.top=0,c.bottom=0);b=a(b);if(0==b.length)return!1;var e=a(window).scrollTop(),k=e+a(window).height();let l=b.offset().top;b=l+b.outerHeight();e=l-e;k-=b;d&&(c.top=e,c.bottom=k);return 0<=e&&0<=k};vBulletin.scrollToFixed=function(b){function c(l){e=a.extend({},e,l);if(e.element&&(e.element=e.element instanceof a?e.element:a(e.element),0<e.element.length)){a.inArray(e.fixedAt,["top","bottom"])&&(e.fixedAt="top");var h=e.element,p={width:h.width(),offset:h.offset(),"margin-top":parseInt(h.css("margin-top"),
10),"margin-bottom":parseInt(h.css("margin-bottom"),10),cssPosition:h.css("position"),coordinates:{left:h.css("left"),top:h.css("top"),right:h.css("right"),bottom:h.css("bottom")}},u=a("<div />").addClass("scrolltofixed-filler").hide().insertAfter(h);h.data("origOffsetTop",p.offset.top);h.css("z-index",e.zIndex);h.data("object-instance",d);l=a(window).off("scroll."+k).on("scroll."+k,function(){if(!h.is(":hidden")){var n=a(this).scrollTop();if(0<e.limit&&n>e.limit&&h.hasClass("scrolltofixed"))h.removeClass("scrolltofixed").css({position:"absolute",
left:"auto",right:"auto",top:"auto",bottom:"auto",width:p.width});else if(0<e.limit&&n<e.limit&&n>p.offset.top&&!h.hasClass("scrolltofixed")||0>=e.limit&&n>p.offset.top&&!h.hasClass("scrolltofixed")){if(u.css({display:h.css("display"),width:h.outerWidth(!0),height:h.outerHeight(!0),"float":h.css("float")}),n=vBulletin.Responsive&&vBulletin.Responsive.scrollToFixedBreakPoint?vBulletin.Responsive.scrollToFixedBreakPoint:0,a("#vb-page-body").width()>n?h.addClass("scrolltofixed").width(p.width).css({left:p.offset.left,
right:"auto",width:p.width,top:"top"==e.fixedAt?0:"auto",bottom:"bottom"==e.fixedAt?0:"auto",position:""}):u.hide(),n=p["margin-"+e.fixedAt]){var q={};q[e.fixedAt]=-n+"px";h.animate(q,"fast")}}else n<=p.offset.top&&h.hasClass("scrolltofixed")&&(u.hide(),h.removeClass("scrolltofixed").css({position:"",width:"",left:"",top:"",right:"",bottom:""}))}}).off("resize."+k).on("resize."+k,function(){h.removeClass("scrolltofixed").width("auto").css({position:"",left:""});p.width=h.width();p.offset=h.offset();
a(this).trigger("scroll."+k)});e.triggerOnload&&l.trigger("scroll."+k)}}var d=this,e={element:a(),fixedAt:"top",limit:0,triggerOnload:!0,zIndex:99},k=("scrollToFixed"+Math.random()).replace(".","");this.updateLimit=function(l){isNaN(Number(l))||(e.limit=l,a(window).trigger("scroll."+k))};this.addLimit=function(l){isNaN(Number(l))||(e.limit+=l,a(window).trigger("scroll."+k))};this.reset=function(l){c(l)};c(b)};vBulletin.scrollToAnchor=function(b){b=b.replace(/(:|\.|\[|\]|,|\/)/g,"\\$1");var c=a(b);
console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(b,c.length));if(0<c.length){var d=c.show().offset().top-2;c.hide();var e=a("html,body"),k=a(".scrolltofixed-floating.scrolltofixed-top"),l=!1;0<k.length&&(1==a(".list-container .list-item:first > a.anchor"+b).length?(k.hasClass("scrolltofixed")&&k.removeClass("scrolltofixed"),d=k.offset().top,l=!0):k.hasClass("scrolltofixed")&&(d-=k.outerHeight()));function h(){e.stop(!0)}e.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup",
h).one("scroll mousedown wheel DOMMouseScroll mousewheel keyup",h);e.animate({scrollTop:d},{duration:1E3,step:function(p,u){l||(p=c.show().offset().top,c.hide(),p-=k.hasClass("scrolltofixed")?k.outerHeight():0,u.end=Math.round(p))},always:function(){c.show();e.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup",h)}});return!1}return!0};location.hash&&vBulletin.scrollToAnchor(location.hash);vBulletin.animateScrollTop=function(b,c){console.log("vBulletin.animateScrollTop({0})".format(b));var d=
a(".scrolltofixed-floating.scrolltofixed-top");if(0<d.length){var e=d.data("origOffsetTop")||d.offset().top;!d.hasClass("scrolltofixed")&&e<b&&(b-=d.outerHeight(!0));e<b&&(b-=d.outerHeight())}a("html, body").animate({scrollTop:b},c)};vBulletin.truncatePostContent=function(b){b=b instanceof a?b:a(b);b.length||(b=a("body"));a(".poll-desc.ellipsis, .message-body.ellipsis",b).each(function(){var c=a(this);truncatedHeight=c.height();c.removeClass("ellipsis");var d=c.height();c.addClass("ellipsis");if(d>
truncatedHeight)c.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var e=a(this);e.hasClass("more")?c.removeClass("ellipsis"):c.addClass("ellipsis");e.toggleClass("more less");var k=e.text();e.text(e.data("toggle-text")).data("toggle-text",k);return!1})});a(".list-item .see-link.more",b).each(function(c){var d=a(this).closest(".list-item"),e=a(d).find(".post-content");if(0<e.length){var k=!1,l=!1,h=a(this).text(),p="",
u=a(e).html(),n=this;a(this).on("click",function(){nodeid=a(d).attr("data-node-id");k?(a(n).text(h),a(e).html(u),k=!1):l?(a(n).text(vBulletin.phrase.get("see_less")),k=!0,a(e).html(p)):!l&&nodeid&&vBulletin.AJAX({call:"/activity/fetchText",data:{nodeid},success:function(q){p=q.nodeText;if(p.length<=u.length)a(n).addClass("ui-helper-hidden"),postLink=a(n).closest(".post-links").html().replace("<span>|</span>",""),a(n).closest(".post-links").html(postLink);else return a(e).html(p),a(n).text(vBulletin.phrase.get("see_less")),
console.log("loaded content for node "+nodeid),l=k=!0,!1},error:vBulletin.ajaxtools.logAjaxError,api_error:vBulletin.ajaxtools.logApiError});return!1})}})};const T=Number(pageData.userid);C.markchannelsread=function(b,c,d){const e=C.setChannelRead;if(parseInt(b))e(b,c);else if(pageData.channelid&&parseInt(pageData.channelid))e(pageData.channelid,c);else{var k=[];d=a(d).closest(".widget-content").find(".forum-list-container");b=d.find(".forum-item");d=d.find(".subforum-item");var l=function(h,p){(h=
parseInt(a(p).attr("data-channel-id"),10))&&k.push(h)};a.each(b,l);a.each(d,l);a.each(k,function(h,p){h>=k.length-1?e(p,c):e(p,[])})}};vBulletin.markRead=function(b,c=null){T&&(b={nodeid:b},c&&(b.readtime=c),vBulletin.AJAX({call:"/ajax/api/node/markRead",data:b,success:a.noop,api_error:a.noop,error:a.noop}))};vBulletin.markTopicAsRead=function(b){if(b){var c=a('.js-markread-context[data-starter="'+b+'"]'),d=0;a('.js-markread-candidate[data-starter="'+b+'"]',c).each((e,k)=>{e=k.dataset.publishdate||
0;e>d&&(d=e)});0<d&&vBulletin.markRead(b,d)}};C.setChannelRead=function(b,c){T&&(c=C.ensureFun(c.success),C.AJAX({call:"/ajax/api/node/markChannelsRead",data:{nodeid:b},success:c,api_error:L.logApiError}));return!0};vBulletin.ckeditor=vBulletin.ckeditor||{};window.CKEDITOR_BASEPATH=pageData.baseurl+"/js/ckeditor/";vBulletin.ckeditor.requiredScriptsLoaded=!1;vBulletin.ckeditor.requiredScriptsLoadFailed=!1;vBulletin.ckeditor.requiredScriptLoadingStarted=!1;vBulletin.ckeditor.checkEnvironment=function(){return!0};
vBulletin.ckeditor.fireCallbacks=function(b,c,d,e){"error"==d&&"function"==typeof c.error&&c.error(b);"success"==d&&"function"==typeof c.success&&c.success.apply(e,[b,e]);"function"==typeof c.complete&&c.complete(b)};vBulletin.ckeditor.initEditor=function(b,c){c=c||{};b=vBulletin.ckeditor.verifyEditorId(b);console.log("Ckeditor: initEditor({0})".format(b));if(vBulletin.ckeditor.checkEnvironment())vBulletin.ckeditor.requiredScriptsLoaded?vBulletin.ckeditor.doInitEditor(b,c):vBulletin.ckeditor.loadScripts(b,
c);else{var d=a("#"+b).closest(".js-content-entry");d.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");d.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");d.find("form").append(a('<input type="hidden" name="nl2br" value="1" />'));vBulletin.ckeditor.fireCallbacks(b,c,"error")}};vBulletin.ckeditor.loadScripts=function(b,c,d){if(vBulletin.ckeditor.requiredScriptLoadingStarted)console.warn("Ckeditor: Trying to load required scripts more than once.");
else{vBulletin.ckeditor.requiredScriptLoadingStarted=!0;c=c||{};b=b||"";"undefined"===typeof c.hideLoadingDialog||c.hideLoadingDialog||vBulletin.ckeditor.showLoadingDialog(b);var e=function(){!c.showError&&vBulletin.ckeditor.requiredScriptsLoadFailed||vBulletin.warning("error","error_loading_ckeditor_script");vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=!0;vBulletin.ckeditor.fireCallbacks(b,c,"error")},k=function(){vBulletin.ckeditor.requiredScriptsLoadFailed?(vBulletin.ckeditor.fireCallbacks(b,
c,"error"),c.hideLoadingDialog||vBulletin.ckeditor.hideLoadingDialog(b)):("function"==typeof d&&d(),"function"==typeof vBulletin.ckeditor.doInitEditor&&window.CKEDITOR?(vBulletin.ckeditor.requiredScriptsLoaded=!0,vBulletin.ckeditor.doInitEditor(b,c)):setTimeout(k,10))};"function"==typeof vBulletin.ckeditor.doInitEditor||window.CKEDITOR?k():vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(l){for(var h=[],p=/src="([^"]+)"/g;match=p.exec(l);)h.push(match[1]);
var u=function(){0<h.length?(console.log("Ckeditor: Calling getScript for: {0}".format(h[0])),a.getScript(h[0],function(n,q,w){if("success"!=q)return console.warn("Ckeditor: Error loading "+h[0]),e(),!1;console.log("Ckeditor: Script loaded: "+h[0]);h.splice(0,1);u()}).fail(function(n,q,w){console.warn("Ckeditor: Error loading script: "+q+" Exception: "+w);e()})):k()};u()},error_phrase:"error_fetching_dialog"})}};vBulletin.ckeditor.editorExists=function(b){return!1};vBulletin.ckeditor.isEditorEmpty=
function(b){return!0};vBulletin.ckeditor.resetEditor=function(b){return!1};vBulletin.ckeditor.getEditorContent=function(b){b=vBulletin.ckeditor.verifyEditorId(b);return b?vBulletin.ckeditor.editorExists(b)?(b=vBulletin.ckeditor.getEditor(b))&&b.getData?a.trim(b.getData()):!1:a.trim(a("#"+b).val()):!1};vBulletin.ckeditor.focusEditor=function(b){if(b=vBulletin.ckeditor.verifyEditorId(b))vBulletin.ckeditor.editorExists(b)?(b=vBulletin.ckeditor.getEditor(b))&&b.focus():a("#"+b).trigger("focus")};vBulletin.ckeditor.loadingDialogStack=
{};vBulletin.ckeditor.showLoadingDialog=function(b){if("undefined"==typeof vBulletin.ckeditor.loadingDialogStack[b]||!vBulletin.ckeditor.loadingDialogStack[b]){vBulletin.ckeditor.loadingDialogStack[b]=!0;var c=a("#"+b);0<c.length&&c.is(":visible")&&c.prop("disabled",!0);vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+b)}};vBulletin.ckeditor.hideLoadingDialog=function(b){"undefined"!=typeof vBulletin.ckeditor.loadingDialogStack[b]&&vBulletin.ckeditor.loadingDialogStack[b]&&
(vBulletin.ckeditor.loadingDialogStack[b]=!1,a("#"+b).prop("disabled",!1),vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+b))};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(b){b=b||"";if("string"==typeof b)return b;if("object"==typeof b&&"undefined"!=typeof b.checkDirty&&"undefined"!=typeof b.name)return b.name;b=b instanceof a?b:a(b);b.attr("id")||(++vBulletin.ckeditor.generatedIdCounter,b.attr("id","vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter));
return b.attr("id")};vBulletin.ckeditor.initEditorComponents=function(b,c){b=b||document;a(function(){a(".js-ckeditor-init-on-focus",b).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(a(this))});a(".js-ckeditor-init-on-page-load",b).each(function(){vBulletin.ckeditor.initEditor(a(this))});if(!c){var d=function(h){if(0==h)return a("<span />").html(vBulletin.phrase.get("no_icon")).get(0);var p=a(".js-content-entry-post-icons option",b).filter((n,q)=>a(q).val()==h),u=p.data("icon-url");
return u?(p=p.text(),a("<img />").attr("src",u).attr("alt","").attr("title",p).get(0)):""},e=a(".js-content-entry-post-icons",b);e.selectBox().on("change",function(){var h=a(this).val();a(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",b).html(d(h))});a(".js-content-entry-post-icons-selectBox-dropdown-menu li a").each(function(){var h=a(this).attr("rel");a(this).html(d(h))});e.trigger("change");a(".js-content-entry-prefixes",b).selectBox();e=a(".js-content-entry-event-highlights-container",
b);var k=e.is(".h-hide-imp");k&&e.removeClass("h-hide-imp");a(".js-content-entry-event-highlights",b).selectBox();k&&e.addClass("h-hide-imp");var l=[];a(".js-select-box",b).each(function(){for(var h=a(this),p;h.is(":hidden");){p=h.closest(".h-hide");if(1>p.length)break;l.push(p);p.removeClass("h-hide")}h.selectBox()});a.each(l,function(h,p){p.addClass("h-hide")})}})};vBulletin.ckeditor.initEditorComponents(document);a(".js-focus-on-page-load").first().trigger("focus");vBulletin.doReplaceSecurityToken=
function(b){"undefined"!=typeof b&&""!=b&&(a("form").each(function(){var c=a(this);if(this.action&&!vBulletin.isInternalUrl(this.action))return console.log("Skipping security token for external url (form action): "+this.action),!0;"undefined"!=typeof this.method&&"post"==this.method.toLowerCase()&&(c.find('input[name="securitytoken"]').length?c.find('input[name="securitytoken"]').val(b):c.append('<input type="hidden" name="securitytoken" value="'+b+'" />'))}),pageData.securitytoken=b,console.log("Securitytoken updated"))};
var O=null;vBulletin.flashMessage=function(b,c=5){var d=a(".js-flash-message"),e=d.find(".js-flash-message-content");clearTimeout(O);e.text(b);d.removeClass("h-hide").show();O=setTimeout(function(){d.fadeOut(function(){d.addClass("h-hide")})},1E3*c)};vBulletin.clearFlashMessage=()=>{let b=a(".js-flash-message");clearTimeout(O);b.addClass("h-hide")};vBulletin.flashPhrase=function(b,c=5){vBulletin.flashMessage(vBulletin.phrase.get(b),c)};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=
function(b){b=a(this);b.hasClass("on")?(H.setCookie("sitebuilder_active",""),a(".js-top-menu-sitebuilder").slideUp("fast"),b.removeClass("on"),b.attr("aria-pressed","false")):(a(".js-top-menu-sitebuilder").slideDown("fast"),b.addClass("on"),b.attr("aria-pressed","true"),H.setCookie("sitebuilder_active","1"))};vBulletin.sitebuilder.setupMenuProxy=()=>{var b=a(".js-top-menu-sitebuilder--list");b.find(".js-top-menu-link:not(.js-top-menu-tab--admincp)").removeClass("b-top-menu__item-link--disabled");
b.on("click.menuproxy",".js-top-menu-link:not(.js-top-menu-tab--admincp)",c=>{J();vBulletin.ready(["sb_page","sb_page_style"]).then(()=>{b.off(".menuproxy");a(c.currentTarget).trigger("click")});return!1})};pageData.dstauto&&(K=(new Date).getTimezoneOffset()/60,1==Math.abs(pageData.tzOffset+K)&&vBulletin.AJAX({call:"/profile/save-dst",data:{userid:pageData.userid,clientUtcOffset:K},success:()=>location.reload(),api_error:a.noop,error:a.noop}));vBulletin.initFlexGridFixLastRowAll=function(b){function c(d){R(".js-flexgrid",
".js-flexgrid-item",".js-flexgrid-image","b-flexgrid__item--lastrow","b-flexgrid__item--lastinrow",!0,d);R(".js-photo-preview",".b-gallery-thumbnail-list__item",".b-gallery-thumbnail-list__thumbnail","b-gallery-thumbnail-list__item--lastrow","b-gallery-thumbnail-list__item--lastinrow",!1,d)}c("undefined"==typeof b?!1:b);vBulletin.Responsive.Debounce.registerCallbackOnce(function(){c(!0)})};vBulletin.initFrameImagesWithColor=function(){U(".js-frame-image-wrapper",".js-frame-image")};setTimeout(function(){function b(){clearTimeout(securitytoken_timeout);
if("guest"!=pageData.securitytoken){securitytoken_timeout=setTimeout(b,36E5);var d=function(){3==++securitytoken_errors&&vBulletin.doReplaceSecurityToken("guest")};vBulletin.AJAX({call:"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},success:function(e){securitytoken_errors=0;vBulletin.doReplaceSecurityToken(e.newtoken)},api_error:d,error:d})}}a.support.selectstart||a.fn.extend({disableSelection:function(){return this.each(function(){a(this).css({"-moz-user-select":"-moz-none",
"-webkit-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none"})})},enableSelection:function(){return this.each(function(){a(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}});(function(){function d(g){a("textarea.autogrow",g).css("min-height",function(){return a(this).css("height")}).autogrow()}function e(g){g.preventDefault();g=a(".js-refer-user-dialog");g.length?g.dialog("open"):vBulletin.AJAX({call:"/ajax/render/dialog_refer_user",
data:{isAjaxTemplateRenderWithData:!0},success:function(m){a(m.template).appendTo("body");a(".js-refer-user-dialog").dialog({title:vBulletin.phrase.get("refer_a_friend"),autoOpen:!0,modal:!0,resizable:!1,closeOnEscape:!0,showCloseButton:!1,width:500,dialogClass:"dialog-container dialog-box",create:function(){a(".js-close-button",this).on("click",function(v){v.preventDefault();a(this).closest(".js-refer-user-dialog").dialog("close")})},open:function(){function v(y){this.select()}var t=a(".js-referral-link",
this);t.val(t.data("link")).off("focus",v).on("focus",v).trigger("focus")}})}})}function k(g){var m=a(`.js-namecard-html[data-userid="${g}"]`);return new Promise((v,t)=>{0<m.length?v(m):vBulletin.AJAX({call:"/ajax/render/user_namecard",data:{userid:g,isAjaxTemplateRender:!0,isAjaxTemplateRenderWithData:!0},success:function(y){y.template&&(m=a(y.template).filter(".js-namecard-html"),m.appendTo(document.body),v(m))},after_error:()=>{t()}})})}function l(g){var m=parseInt(g.data("vbnamecard")||0);if(Number.isNaN(m))return!1;
k(m).then(v=>{vBulletin.qtip.apply(g,"",{content:function(t,y){t=a(v[0].outerHTML).removeClass("h-hide-imp");t.find(".js-close-qtip").click(()=>{y.hide()});return t},position:{my:"top center",at:"bottom center",viewport:a(window),adjust:{method:"shift flip"}},show:{solo:!1,ready:!0,event:!1},hide:{event:"unfocus",fixed:!0},style:{classes:"qtip--b-namecard"}})});return!0}function h(g){g.find("input.js-dependent-master").each(function(){var m=a(this),v=m.attr("type"),t=function(){var y=m.data("action"),
F=!m.is(":checked"),I=a(document).find(m.data("on"));"invisible"==y?I.toggleClass("h-invisible",F):"hide"==y?I.toggleClass("h-hide-imp",F):(I.find(":input").addBack(":input").prop("disabled",F),I.find("select").addBack("select").selectBox(F?"disable":"enable"))};if("checkbox"==v)m.on("change",t);else if("radio"==v)m.closest("form").find('input[name="'+m.attr("name")+'"]').on("change",t)})}function p(g){vBulletin.flashMessage(g);g=new URL(location.href);g.searchParams.delete("flashmsg");var m=document.title;
History.replaceState({},m,g.href);document.title=m}function u(){a(".js-full-height").each(function(){var g=a(this),m=g.parent();g.css("height","");g.outerHeight(Math.floor(m.height()),!0)})}function n(g){let m=v=>v.src="core/images/default/google-material/image_placeholder.svg";a("img.js-img-fallback",g).each((v,t)=>{!t.complete||t.naturalWidth&&t.naturalHeight||m(t);t.addEventListener("error",()=>m(t))})}vBulletin.loadingIndicator.init();const q=a(document),w=vBulletin.phrase;q.off("click","a.animate-scroll").on("click",
"a.animate-scroll",function(){vBulletin.scrollToAnchor(this.hash)&&(location.href=this.href);return!1});const f=H.createStorage("categoryCollapse"),r=w.get("expand"),x=w.get("collapse");let B=[];function A(g,m){return new Promise((v,t)=>{t=g.length;let y;1>t?v():(y=200/t,y=Math.max(y,1),B.forEach(F=>clearTimeout(F)),m||(g=g.reverse()),g.each((F,I)=>{const P=setTimeout(()=>{m?a(I).fadeIn(F*y):a(I).fadeOut(F*y)},F*y);B.push(P)}),t=setTimeout(()=>{v()},(t-1)*y),B.push(t))})}function z(g,m,v=!0,t=!0){const y=
a('.js-collapse-category-btn[data-nodeid="'+g+'"]'),F=a('.js-category-subitem[data-category-collapse-id="'+g+'"]'),I=a('.js-category-footer[data-category-collapse-id="'+g+'"]'),P=y.is(".js-legacy-tables"),Q=()=>I.toggleClass("category-collapsed",!m);y.toggleClass("collapsed expand",!m);y.toggleClass("collapse",m);I.toggleClass("with-animation",v);v?P?A(F,m).then(Q):(m?F.slideDown("fast"):F.slideUp("fast"),Q()):(F.toggle(m),Q());y.attr("title",m?x:r);t&&f.set(g,m?0:1)}q.offon("click",".js-collapse-category-btn",
g=>{g=a(g.currentTarget);const m=g.data("nodeid");isCollapsed=g.hasClass("collapsed");z(m,isCollapsed)});(function(){const g=f.getAll("categoryCollapse")||{};a(".js-collapse-category-btn").each((m,v)=>{m=v.dataset.nodeid;v=0<Number(v.dataset.collapsedDefault);var t=a('.js-category-subitem[data-category-collapse-id="'+m+'"]').first().closest(".forum-list-container");const y=t.is(".cards");t=t.is(".no-collapse-controls");y||t||(g.hasOwnProperty(m)?0<g[m]&&z(m,!1,!1,!1):v&&z(m,!1,!1,!1))})})();var D=
H.createStorage("collapse");q.offon("click",".canvas-widget .toggle-button",function(g,m){g=a(this);var v=g.closest(".canvas-widget"),t=a(".widget-content",v),y=v.data("widget-instance-id"),F=g.closest(".edit-mode").length;g.hasClass("expand")?(v.removeClass("collapsed"),m?t.show():t.slideDown("slow"),F||D.unset(y)):(m?(t.hide(),v.addClass("collapsed")):t.slideUp("slow",function(){v.addClass("collapsed")}),F||D.set(y,1));g.toggleClass("collapse expand");m=g.attr("title");g.attr("title",g.data("toggle-title")).data("toggle-title",
m);return!1});(function(){var g=D.getAll("collapse");g&&null!=g&&a.each(g,function(m,v){a("#widget_"+m+":not(.widget-no-header-buttons) .widget-header .toggle-button").trigger("click",[!0])})})();a(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");d(q);q.on("vb-loadnewposts",function(g,m){d(q,m.insertedHtml)});a(".edit-switch-container .switch-control").on("click",vBulletin.sitebuilder.toggleSitebuilder);vBulletin.sitebuilder.setupMenuProxy();var E=(new URL(location.href)).searchParams.get("adminAction");
actionMap={quickConfig:".js-top-menu-tab--quicksetup",stylePanel:".js-top-menu-tab--style",editPage:".js-top-menu-tab--editpage"};$action=a(actionMap[E]);0<$action.length?($action.trigger("click"),"editPage"==E&&vBulletin.ready("history").then(()=>{let g=new URL(location.href),m=new vBulletin.history.instance(!0);g.searchParams.delete("adminAction");m.pushState({},document.title,g)})):0==pageData.userid&&actionMap[E]&&vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,a.noop,function(){location.reload()});
a("select.custom-dropdown",".js-select-box").selectBox();q.off("keypress",".js-button").on("keypress",".js-button",function(g){if(32==g.which||13==g.which)g.target&&g.target.nodeName&&"label"==(g.target.nodeName+"").toLowerCase()&&1==a(g.target).find("input").length?a(g.target).find("input").trigger("click"):a(this).trigger("click"),g.preventDefault()});q.off("keypress",".js-link").on("keypress",".js-link",function(g){13==g.which&&(a(this).trigger("click"),g.preventDefault())});a(".js-debug-collapse-list").next("ol, ul").hide();
q.off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(g){a(this).next("ol, ul").toggle()});q.off("click",".js-refer-user",e).on("click",".js-refer-user",e);q.off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var g=a(this);g.is(".b-toggle-slider--yes")?(g.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no"),g.find(".b-toggle-slider__radio--no").prop("checked",!0),g.data("value","0")):(g.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes"),
g.find(".b-toggle-slider__radio--yes").prop("checked",!0),g.data("value","1"));var m=a(".js-toggle-slider, .js-toggle-slider__dependent"),v=m.index(g),t=!1;m.each(function(y,F){if(y==v)t=!0;else if(1==t)if(y=a(this),y.is(".js-toggle-slider__dependent"))y.toggleClass("h-hide");else return t=!1});g.trigger("change",g.data("value"));return!1});vBulletin.options.get("usenamecard")&&a(document).offon("click","a[data-vbnamecard]",function(g){l(a(g.currentTarget))&&g.preventDefault()});a(document).offon("click",
".js-follow-action",g=>{g=a(g.currentTarget);var m=parseInt(g.data("userid")),v=g.data("action");if("add"!=v&&"delete"!=v||isNaN(m))return!1;vBulletin.AJAX({call:"/ajax/api/user/changeUserRelation",data:{action:v,userid:m},success:function(t){if(1==t.follow||2==t.follow){var y=t.follow;"delete"==v&&(y=0);a(document).trigger("vb-userrelation-change",{newRelation:y,ignoring:t.ignoring,targetUserid:m})}},title_phrase:"profile_guser"})});a(document).offon("vb-userrelation-change",(g,m)=>{var v=parseInt(m.hasOwnProperty("targetUserid")?
m.targetUserid:"");g=m.hasOwnProperty("newRelation")?m.newRelation:null;m=m.hasOwnProperty("ignoring")?m.ignoring:null;var t=`.js-ignore-user[data-userid="${v}"][data-state="`,y=a(`${t}ignoring"]`);t=a(`${t}normal"]`);isNaN(v)||(null!==m&&(y.toggleClass("h-hide-imp",!m),t.toggleClass("h-hide-imp",m)),null!==g&&(y=`.js-follow-action[data-userid="${v}"]`,v=a(y),y=a(`${y}[data-state="${g}"]`),v.addClass("h-hide-imp"),y.removeClass("h-hide-imp"),0===g||m||t.addClass("h-hide-imp")))});a(document).offon("click",
".js-ignore-user",g=>{g=a(g.currentTarget);var m=parseInt(g.data("userid"));g=g.data("action");var v="ignore"==g?1:0;if("ignore"!=g&&"unignore"!=g||isNaN(m))return!1;vBulletin.AJAX({call:"/ajax/api/user/ignoreUser",data:{userid:m,add:v},success:function(t){t&&a(document).trigger("vb-userrelation-change",{ignoring:v,targetUserid:m})},title_phrase:"profile_guser"})});a(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){location.href=pageData.baseurl+"/new-content/"+
pageData.channelid});a(".pagenav-form").on("submit",function(){var g=Number(this.page.value);0<g&&(location.href=this.action+"&p="+g);return!1}).trigger("reset");a(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(g){var m=g.which;return g.shiftKey||g.altKey||g.ctrlKey||!(48<=m&&57>=m||96<=m&&105>=m||8==m||9==m||13==m||35==m||36==m||37==m||39==m||46==m||45==m)?!1:!0});a(document).offon("click",".js-post__manage",function(){if("undefined"==typeof vBulletin.inlinemod){var g=
vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?c="+pageData.cachebuster;a.getScript(g,()=>{vBulletin.inlinemod.manage_deleted_form.apply(this)}).fail(()=>{vBulletin.warning("error","error_loading_inlinemod_script")})}else vBulletin.inlinemod.manage_deleted_form.apply(this)});a(document).offon("click",".js-post__show-hide",function(){var g=a(this),m=g.text(),v=g.data("toggle-text"),t=g.hasClass("js-post__show-hide--show");g.closest(".js-post").toggleClass("b-post--show-deleted-content",t);g.html(v).data("toggle-text",
m).toggleClass("js-post__show-hide--show",!t)});a(document).offon("click","a.video-frame",function(g){g.preventDefault();let m=a(g.currentTarget);L.render({template:"bbcode_video",data:m.data(),success:v=>{(v=v.template)&&m.replaceWith(v)}})});q.offon("click",".js-bookmark-toggle",g=>{const m=a(g.currentTarget),v=1!=m.data("bookmarked");g=m.data("nodeid");let t,y;v?(y="addBookmark",t=w.get("remove_bookmark")):(y="removeBookmark",t=w.get("add_bookmark"));C.AJAX({call:"/ajax/api/bookmark/"+y,data:{nodeid:g},
success(F){m.attr("title",t);m.attr("data-bookmarked",v?1:0);m.data("bookmarked",v?1:0)}})});a(document).offon("click","a.markchannelsread, a.navbar_mark_channels_read",function(){C.markchannelsread(0,{success:function(){location.reload()}},a(this));return!1});a(".js-footer-go-to-top").off("click").on("click",function(g){g.preventDefault();a("body,html").animate({scrollTop:0},800)});h(a(document));a("input.js-select-all-master").on("change",function(){var g=a(this);$list=a(document).find(g.data("list"));
$list.prop("checked",g.is(":checked"))});pageData.flash_message&&p(pageData.flash_message);a("input[placeholder]").each(function(){var g=a(this),m=g.attr("placeholder");m&&!g.attr("aria-label")&&g.attr("aria-label",m)});u();vBulletin.Responsive.Debounce.registerCallbackOnce(u);a(document).off("vb-filterposts",u).on("vb-filterposts",u);n(a(document));a(document).on("vb-instrument",g=>{g=a(g.target);n(g);h(g)});vBulletin.ready("global").resolve()})();a("#btnAdvSearch").off("click").on("click",function(d){d.preventDefault();
a(this).data("clicked2submit",1);d=a("#searchForm");a('<input type="hidden" name="AdvSearch" value="1" />').appendTo(d);d.submit()});a("#searchForm").off("submit.searchform").on("submit.searchform",function(d){function e(u,n,q){0<q.length&&q.prop("checked")&&(u[n]=q.val())}var k=a(this),l={},h=k.find("#q"),p=a.trim(h.val());if(0<p.length)l.keywords=p;else if(!a("#btnAdvSearch").data("clicked2submit"))return vBulletin.warning("search","please_provide_search_string",function(){h.trigger("focus")}),
d.stopPropagation(),!1;d=k.find(".searchPopupBody");e(l,"title_only",d.find(".searchFields_title_only"));e(l,"authorid",d.find(".searchFields_authorid"));e(l,"channel",d.find(".searchFields_channel"));k.find("input[name=searchJSON]").val(JSON.stringify(l));return!0});var c=H.getCookie("np_notices_displayed");c=c?c.split(","):[];c=c.concat(a('ul.notices li[data-notice-persistent="0"]').map((d,e)=>a(e).data("notice-id")).get());c=c.filter((d,e)=>c.indexOf(d)===e);0<c.length&&H.setCookie("np_notices_displayed",
c.join(","),!0);a("ul.notices > li > .close").off("click").on("click",function(d){var e=a(this).closest("li");d=e.attr("data-notice-id");vBulletin.AJAX({call:"/ajax/api/notice/dismiss",data:{noticeid:d},success:function(k){e.hide("slow",function(){var l=a(this).parent();0==l.find(">li:visible").length&&l.addClass("h-hide")})}})});a(".js-stylechooser a").off("click").on("click",function(){let d=a(this).data("styleid");H.setCookie("userstyleid",d,365);pageData.userid?L.ajaxSilent({call:"/ajax/apidetach/user/save",
data:{userid:pageData.userid,password:"",user:{styleid:d},options:[""],adminoptions:[""],userfield:[""]},success:()=>location.reload()}):location.reload();return!1});a(".js-languagechooser a").off("click").on("click",function(){H.setCookie("languageid",a(this).data("languageid"),365);location.reload();return!1});vBulletin.doReplaceSecurityToken(pageData.securitytoken);securitytoken_timeout=setTimeout(b,36E5);securitytoken_errors=0;vBulletin.initFlexGridFixLastRowAll();vBulletin.initFrameImagesWithColor();
V();vBulletin.ready("pushnotification").then(d=>{d.getExistingSubscription().then(e=>{const k=d.getEndpointFromCookie();e?k!=e.endpoint&&d.setEndpointToCookie(e.endpoint):d.setEndpointToCookie("")})});setTimeout(function(){""!=pageData.crontask&&vBulletin.ajaxtools.ajaxSilent({call:"/ajax/apidetach/cron/"+pageData.crontask,api_error:a.noop,error:vBulletin.ajaxtools.logAjaxError})},5)},1)})(jQuery);
function JShtmlEncode(a){var J="";a&&"undefined"!==typeof a&&0<a.length&&(J=$("<div/>").text(a).html());return J=String(J).replace(/"/g,"&quot;")}
function isValidEmailAddress(a){return(new RegExp(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i)).test(a)}
function str_repeat(a,J){for(var M="",N=0;N<J;N++)M=M.concat(a);return M}vBulletin.htmlEntities=function(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};vBulletin.htmlEntities_decode=function(a){return String(a).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')};
