/*
 =======================================================================*\
|| ###################################################################### ||
|| # 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   # ||
|| ###################################################################### ||
\*========================================================================*/
// ***************************
// js.compressed/memberchannel.js
// ***************************
vBulletin.memberChannel=function(d){function n(a,b,e){a=a.filter(b).toggleClass("h-disabled",!e);e?a.attr("href",e):a.removeAttr("href")}function p(a,b){function e(c){var g=c.innerWidth(),h=parseInt(c.css("paddingLeft"),10);c=parseInt(c.css("paddingRight"),10);return Math.floor(g-h-c)}function f(c,g){var h=!!g;c.width(g);c.toggleClass("b-groupgrid__item-inner--expanded",h);g=d(".js-groupgrid-item-icon",l).outerWidth();l=d(".js-groupgrid-item-icon-link",l).outerWidth();h&&l>g&&c.removeClass("b-groupgrid__item-inner--expanded");
var l=c.first();h=e(l)-1;c.find(".js-groupgrid-item-icon-link").width(h).height(h)}if(a.length&&(f(a,""),b)){b=a.first();var k=e(b.closest(".b-groupgrid__item")),m=Math.ceil(b.outerWidth(!0))-e(b);b.closest(".b-groupgrid__item").is(".b-flexgrid__item--lastrow")||(a.each(function(){var c=d(this).closest(".b-groupgrid__item");if(c.is(".b-flexgrid__item--lastrow"))return!0;k=Math.min(k,e(c))}),f(a,k-m-1))}}function q(a,b){a=d(".b-groupgrid__item-inner");b&&b.isResize&&a.css({opacity:"0"});p(a,!1)}function r(a,
b){a=d(".b-groupgrid__item-inner");p(a,!0);b&&b.isResize&&a.removeClass("h-tranparent").animate({opacity:"1"},400)}return{updateToolbarButtonPressState:function(a){function b(f){var k=f.data("js-movable-button-clone-id");return d(".js-movable-toolbar-button-clone").filter(function(){return d(this).data("js-movable-button-clone-id")==k})}if(!a.find(".js-button-filter-display-blogs.js-checked").length){var e=a.find(".js-display-blogs-state").data("display-blogs-state");a.find(".js-button-filter-display-blogs").filter('[data-filter-value="{0}"]'.format(e)).addClass("js-checked")}a.find(".js-button-filters .js-button-filter").removeClass("b-button--pressed").each(function(){b(d(this)).removeClass("b-button--pressed")}).filter(".js-checked").addClass("b-button--pressed").each(function(){b(d(this)).addClass("b-button--pressed")})},
updateToolbarPagination:function(a){var b=d(".conversation-toolbar-wrapper .pagenav-controls .pagenav-form",a),e=d(".arrow",b).removeClass("h-disabled"),f=a.find(".js-membergroup-pagination-info"),k=f.find(".js-prevpage").val(),m=f.find(".js-nextpage").val(),c=f.find(".js-pagenum").val()||1;f=f.find(".js-totalpages").val()||1;var g=a.find(".js-under-toolbar-pagenav .js-pagenav");a=a.find(".js-pagenav").not(g);d(".js-pagenum",b).val(c);d(".pagetotal",b).text(f);n(e,"[rel=prev]",k);n(e,"[rel=next]",
m);0==a.length?g.html(""):g.html(a.clone().html())},initFlexGridAdjustments:function(a){a.on("vbulletin:flexgridstart",".js-flexgrid",q).on("vbulletin:flexgridready",".js-flexgrid",r)}}}(jQuery);
;

// ***************************
// js.compressed/sb_socialgroups.js
// ***************************
vBulletin.precache(["contenttype_vbforum_socialgroup","social_groups_gsocialgroups"],[]);
(function(c){function v(a,b){w||(w=vBulletin.conversation.filter({context:b,autoCheck:!1,scrollToTop:a,pagination:!1,allowHistory:!1,tabParamAsQueryString:!0,beforeApplyFilters:function(){t({},!1);return!1}}))}function A(){if(c(".socialgroup-widget").hasClass("socialgroup-home-widget")){var a=vBulletin.tabtools,b=c(".activity-stream-widget"),e,f,g=b.find(".widget-tabs-nav .ui-tabs-nav > li"),h=g.filter(".ui-tabs-active"),u=h.index(),x="1"==g.parent().data("allow-history"),B=new vBulletin.history.instance(x);
-1==u&&(u=0,h=g.first());q=h.find("> a").attr("href");a.initTabs(b,B,g,x,u,q,[r],!0,function(l,n,m){l=c(m);m="#"+l.prop("id");n=q==m;m in p||(p[m]=a.tabAllowHistory(l));if("#activity-stream-tab"==m){if(r)n=e.filter,e.pagination&&e.pagination.setOption("context",l),n.setOption("context",l),"undefined"!=typeof n.lastFilters&&0<c(".conversation-empty:not(.h-hide)",l).length&&delete n.lastFilters;else{m=p[m];var C=c(".conversation-list",l);e=a.newTab(l,b,!1,!0,n,C,null,c.noop,m);r=e.filter;n&&c(this).data("noPushState",
!0)}r.applyFilters(!1,!0)}else if("#groups-tab"==m&&(v(b,c("#groups-tab")),r&&r.toggleNewConversations(!1),k||(k=vBulletin.history.instance(p[m]),n&&y(!0),z()),l=c(".conversation-empty",l),0<l.length)){if(n&&!f)return f=!0,!1;l.addClass("h-hide");t({},!c(this).data("noPushState"))}});vBulletin.conversation.bindEditFormEventHandlers("all")}}function y(a){if(k.isEnabled()){var b=k.getState();if(!b||c.isEmptyObject(b.data)){b={from:"filter_groups",page:Number(c(".pagenav-form .defaultpage",d).val())||
1,filters:{filter_groups:c(".js-button-filter.js-checked",d).data("filter-value")}};a&&(b.tab="#groups-tab");var e=vBulletin.parseQueryString(location.search);a&&"undefined"==typeof e.tab&&q&&"#groups-tab"!=q?(e.tab="groups-tab",a=location.pathname+"?"+c.param(e)):a=location.href;k.setDefaultState(b,document.title,a)}}}function z(){k.isEnabled()&&k.setStateChange(function(a,b,e){a=k.getState();if("filter_groups"==a.data.from||"pagination"==b){k.log(a.data,a.title,a.url);var f=c(".socialgroup-widget"),
g=(f=f.hasClass("ui-tabs")&&f)&&f.tabs("option","selected");g=f&&f.find(".ui-tabs-nav > li").eq(g).find("a").attr("href");!1!==g&&g!=a.data.tab?(b=f.find(".ui-tabs-nav > li").filter('li:has(a[href*="{0}"])'.format(a.data.tab)).index(),vBulletin.selectTabByIndex.call(f,b)):t({page:a.data.page,my:"pagination"==b&&e?e.filter_groups||"show_all":a.data.filters.filter_groups,display_groups:"pagination"==b&&e?e.display_groups||"display_grid":a.data.filters.display_groups},!1)}},"filter")}function D(a){vBulletin.AJAX({call:"/ajax/api/content_channel/canAddChannel",
data:{nodeid:pageData.channelid},success:function(b){!0===b.can?location.href=pageData.baseurl+"/sgadmin/create/settings":0<b.exceeded&&vBulletin.warning("social_groups_gsocialgroups","you_can_only_create_x_groups_delete")},title_phrase:"social_groups_gsocialgroups"})}function E(a){a=c(this);var b={page:1};a.is(".js-button-filter-my")?(b.my=a.data("filter-value"),b.display_groups=c(".js-button-filter-display-groups.js-checked",d).data("filter-value")):(b.my=c(".js-button-filter-my.js-checked",d).data("filter-value"),
b.display_groups=a.data("filter-value"));t(b,!0)}function t(a,b){var e=c(".conversation-list",d),f=c(".sg-groups-list",e),g=c(".js-membergroup-pagination-info",f);a.sgparent=a.sgparent||c(".js-category",g).val();a.page=a.page||c(".js-pagenum",g).val();a.perpage=a.perpage||c(".js-perpage",g).val();a.my=a.my||d.find(".js-button-filters .js-button-filter-my.js-checked").data("filter-value");a.display_groups=a.display_groups||d.find(".js-button-filters .js-button-filter-display-groups.js-checked").data("filter-value");
a.routeInfo=a.routeInfo||f.find(".sg-groups-list-container").data("route");a.sort_field=a.sort_field||d.find('.toolbar-filter-overlay input[name="filter_sort"]:checked').val()||"title";a.sort_order=a.sort_order||d.find('.toolbar-filter-overlay input[name="filter_order"]:checked').val()||"asc";c(".js-button-filters .js-button-filter-my",d).removeClass("js-checked").filter('[data-filter-value="{0}"]'.format(a.my)).addClass("js-checked");c(".js-button-filters .js-button-filter-display-groups",d).removeClass("js-checked").filter('[data-filter-value="{0}"]'.format(a.display_groups)).addClass("js-checked");
a.isAjaxTemplateRenderWithData=!0;vBulletin.AJAX({call:"/ajax/render/socialgroup_nodes",data:a,success:function(h){h=c(h.template);e.replaceWith(h);vBulletin.memberChannel.updateToolbarPagination(d);vBulletin.memberChannel.updateToolbarButtonPressState(d);vBulletin.initFlexGridFixLastRowAll(!0);vBulletin.initFrameImagesWithColor();h.trigger("vb-instrument")},title_phrase:"contenttype_vbforum_socialgroup",error_phrase:"unable_to_contact_server_please_try_again"});if(b)if(b=location.pathname,q&&"#groups-tab"!=
q&&(b+="?tab=groups-tab"),b=vBulletin.makePaginatedUrl(b,a.page),b=vBulletin.makeFilterUrl(b,"filter_groups",a.my,d),b=vBulletin.makeFilterUrl(b,"display_groups",a.display_groups,d),k&&k.isEnabled())k.getState(),a={from:"filter_groups",page:a.page,tab:d.hasClass("ui-tabs-panel")?"#"+d.attr("id"):void 0,filters:{filter_groups:a.my,display_groups:a.display_groups}},k.pushState(a,document.title,b);else if(p["#groups-tab"])return b=vBulletin.makeFilterUrl(b,"filter_groups",filterValue,d,c(".activity-stream-widget .js-module-top-anchor").attr("id")),
location.href=b,!1}if(!vBulletin.pageHasSelectors([".socialgroup-home-widget",".socialgroup-category-list-widget"]))return!1;var k,p={},r,w,d,q;c(function(){d=c(".groups-tab",a);A();a=c(".socialgroup-category-list-widget");a.length&&v(a,a);p["#groups-tab"]=p["#groups-tab"]||"1"==c(".conversation-toolbar-wrapper",d).data("allow-history");c(document).off("click",".add-sg").on("click",".add-sg",D);d.off("click",".js-button-filter").on("click",".js-button-filter",E);groupsPagination=new vBulletin.pagination({context:d,
allowHistory:p["#groups-tab"],onPageChanged:function(b,e,f,g){if(!e){var h="undefined"!=typeof g?vBulletin.parseQueryString(h):null;b={my:h&&"undefined"==typeof h.filter_groups?"show_all":c(".js-button-filter-my.js-checked",d).data("filter-value"),display_groups:h&&"undefined"==typeof h.display_groups?"display_grid":c(".js-button-filter-display-groups.js-checked",d).data("filter-value"),page:b};t(b,e)}}});var a=c(".socialgroup-widget");a.hasClass("ui-tabs")||(k=vBulletin.history.instance(p["#groups-tab"]),
y(!1),z());vBulletin.memberChannel.updateToolbarButtonPressState(d);vBulletin.memberChannel.initFlexGridAdjustments(c(".socialgroup-widget"))})})(jQuery);
;

// ***************************
// js.compressed/subscribe.js
// ***************************
vBulletin.precache(["follow","following","following_pending","social_group_count_members_x","unsubscribe_overlay_error"],[]);
(function(){function h(a,b){a=$(".js-replace-member-count-"+a);a.length&&a.each(function(){var c=$(this),d=c.data("replace-phrase-varname"),k=parseInt(c.data("member-count"),10)+b;c.text(vBulletin.phrase.get(d,k));c.data("member-count",k)})}function l(a){a=$(this);if(a.hasClass("isSubscribed")&&!a.hasClass("is-owner")){let b=a.outerWidth();a.css("width",b+"px");e(a,"following_remove","b-button--unfollow")}}function m(a){a=$(this);a.hasClass("b-button--unfollow")&&f(a,"following","","b-button--unfollow");
a.css("width","")}vBulletin.subscribe={};var g=function(a,b){a.children(".js-button__text-primary").text(vBulletin.phrase.get(b))},f=function(a,b,c,d){g(a,b);a.addClass((c||"")+" b-button--special").removeClass((d||"")+" b-button--secondary")},e=function(a,b,c,d){g(a,b);a.addClass((c||"")+" b-button--secondary").removeClass((d||"")+" b-button--special")},n=function(a,b,c){vBulletin.AJAX({call:b,data:c,success:function(d){!isNaN(d)&&1<=d?1==d?f(a,"following","isSubscribed"):f(a,"following_pending",
"is-pending"):vBulletin.error("follow","follow_error")},title_phrase:"follow",error_phrase:"follow_error"})},p=function(a){var b=$(a),c=parseInt(b.attr("data-node-id"),10);a=parseInt(b.attr("data-owner-id"),10);vBulletin.AJAX({call:"/ajax/api/node/requestChannel",data:{channelid:c,recipient:a,requestType:"sg_member"},success:function(d){!0===d?(f(b,"joined","has-joined"),h(c,1),(b.hasClass("join-to-post-btn")||b.hasClass("js-refresh"))&&window.location.reload()):isNaN(d)||f(b,"following_pending",
"is-pending")},title_phrase:"join",error_phrase:"join_error"})},q=function(a){var b=$(a),c=parseInt($(a).attr("data-node-id"),10);vBulletin.AJAX({call:"/ajax/api/blog/leaveChannel",data:{channelId:c},success:function(d){!0===d?(b.hasClass("js-button--follow")?(g(b,"follow"),b.addClass("b-button--special").removeClass("isSubscribed b-button--unfollow")):(g(b,"join"),b.removeClass("has-joined b-button--special leave-btn")),h(c,-1),b.is(".js-no-refresh")||location.reload()):vBulletin.error("leave","invalid_server_response_please_try_again")},
title_phrase:"leave",error_phrase:"invalid_server_response_please_try_again"})},r=function(a){var b=$(a);a=$(a).attr("data-node-id");vBulletin.AJAX({call:"/ajax/api/follow/delete",data:{follow_item:a,type:"follow_contents"},success:function(c){1==c?e(b,"follow","","isSubscribed b-button--unfollow"):vBulletin.error("follow","unfollow_error")},title_phrase:"follow",error_phrase:"unfollow_error"})};vBulletin.subscribe.updateSubscribeButton=function(a){if("undefined"!=typeof a){var b=$(".js-button--follow").filter(function(){return $(this).data("node-id")==
pageData.nodeid&&pageData.nodeid!=pageData.channelid});switch(a){case 0:e(b,"follow","","isSubscribed b-button--unfollow");break;case 1:e(b,"following","isSubscribed");break;case 2:e(b,"following_pending","is-pending")}}};$(".js-button--follow").on("click",function(a){a=$(this);if(a.hasClass("isSubscribed"))a.hasClass("b-button--unfollow")&&(a.hasClass("is-blog-channel")?q(this):r(this));else if(a=$(this),!a.hasClass("isSubscribed")&&!a.hasClass("is-pending")){var b=parseInt(a.attr("data-node-id"),
10),c={};a.hasClass("is-topic")?(c.follow_item=b,c.type="follow_contents",n(a,"/ajax/api/follow/add",c)):(c={},c.channelid=b,c.recipient=parseInt(a.attr("data-owner-id"),10),a.hasClass("is-blog-channel")?c.requestType="member":a.hasClass("is-sg-channel")?c.requestType="sg_subscriber":c.requestType="subscriber",n(a,"/ajax/api/node/requestChannel",c))}});$(".js-button--follow").on("mouseover",l);$(".js-button--follow, .js-subscription__follow").on("mouseout",m);$(".subscriptionsContainer").on("mouseover",
".js-subscription__follow",l);$(".subscriptionsContainer").on("mouseout",".js-subscription__follow",m);$(".join-to-post-btn").on("click",function(a){$(this).hasClass("has-joined")||$(this).hasClass("is-pending")||p(this)});$(document).on("click",".join-btn",function(a){$(this).hasClass("has-joined")||$(this).hasClass("is-pending")?$(this).hasClass("leave-btn")&&!$(this).hasClass("is-owner")&&q(this):p(this)});$(document).on("mouseover",".join-btn",function(a){a=$(this);a.hasClass("has-joined")&&!a.hasClass("is-owner")&&
e(a,"leave","leave-btn")});$(document).on("mouseout",".join-btn",function(a){a=$(this);a.hasClass("leave-btn")&&!a.hasClass("is-owner")&&f(a,"joined","","leave-btn")})})();
;

