/*
 =======================================================================*\
|| ###################################################################### ||
|| # 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(["blog_memberblogLabel","forum"],[]);
(function(b,w){if(!vBulletin.pageHasSelectors([".forum-activity-stream-widget",".bloghome-widget",".search-widget"]))return!1;b(function(){vBulletin.conversation=vBulletin.conversation||{};let h=b(".activity-stream-widget"),x,q,y,p,k,B,C;if(h.hasClass("forum-activity-stream-widget")||h.hasClass("bloghome-widget")){var l=h.find(".widget-tabs-nav .ui-tabs-nav > li"),z=l.filter(".ui-tabs-active"),A=z.index(),r={},D="1"==l.parent().data("allow-history"),Q=new vBulletin.history.instance(D),E=!1,F=null,
G=null;-1==A&&(A=0,z=l.first());var t=z.find("> a").attr("href");var H=function(c,a){var f=a.filter;a.pagination&&a.pagination.setOption("context",c);f.setOption("context",c);"undefined"!=typeof f.lastFilters&&0<b(".conversation-empty:not(.h-hide)",c).length&&delete f.lastFilters},I=function(c,a,f,d,e,g,m){var n=b(".conversation-list",c);return w.newTab(c,a,d,e,g,n,m,b.noop,f)},K=function(c,a){vBulletin.conversation.filter({context:a,autoCheck:!1,scrollToTop:c,pagination:!1,allowHistory:!1,tabParamAsQueryString:!0,
beforeApplyFilters:function(){J();return!1},afterResetFilters:function(){J()}})},L=function(c){var a=b(".toolbar-pagenav",c);0<a.length&&new vBulletin.pagination({context:c,allowHistory:void 0,onPageChanged:function(f,d){if(!d){d=b(".js-button-filter-my.js-checked",c).data("filter-value");var e=b(".js-button-filter-display-blogs.js-checked",c).data("filter-value"),g=a.closest(".activity-stream-widget");u(g,c,f,d,!1,!0,e)}}})},M=function(c,a){vBulletin.memberChannel.updateToolbarPagination(c);vBulletin.memberChannel.updateToolbarButtonPressState(c);
a&&K(b(".bloghome-widget"),b("#memberblog-tab"));a=c.find(".js-button-filter-display-blogs.js-checked").data("filter-value")||"display_grid";c.find(".js-flexgrid").toggleClass("b-groupgrid b-flexgrid","display_grid"==a);vBulletin.initFlexGridFixLastRowAll(!0);vBulletin.initFrameImagesWithColor()},J=function(){var c=b("#memberblog-tab .js-pagenum").val()||1,a=b(".js-button-filter-my.js-checked").data("filter-value"),f=b(".js-button-filter-display-blogs.js-checked").data("filter-value");u(F,G,c,a,!1,
!1,f)},u=function(c,a,f,d,e,g,m){f=f||1;d=d||"show_all";m=m||"display_grid";var n=vBulletin.makePaginatedUrl(location.href,f);!e&&k.isEnabled()&&(n=vBulletin.makeFilterUrl(n,"filter_blogs",d,a),e=k.getState(),k[e&&e.data&&e.data.from&&"filter_blogs"!=e.data.from?"setDefaultState":"pushState"]({from:"filter_blogs",page:f,filters:{filter_blogs:d}},document.title,n));n={tab:a.prop("id"),filter_blogs:"show_all"==d?void 0:d,display_blogs:"display_grid"==m?void 0:m};var v=b(".toolbar-filter-overlay",a);
e=v.find('input[name="filter_sort"]:checked').val();v=v.find('input[name="filter_order"]:checked').val();vBulletin.AJAX({call:"/ajax/render/blogmember_tab",data:{from:f,my:d,display_blogs:m,noToolbar:g,page:n,blogChannelId:c.data("blog-channel-id"),sort_field:e,sort_order:v},error_phrase:"unable_to_contact_server_please_try_again",success:function(N){let O=b(N);O.filter(".conversation-toolbar-wrapper").length?(a.html(N),L(a),a.trigger("vb-instrument")):(b(".blogmember-list",a).hide().replaceWith(O).show(),
b(".conversation-toolbar-wrapper",a).removeClass("h-hide"));M(c,!E);E=!0}})};w.initTabs(h,Q,l,D,A,t,[p,q],!0,function(c,a,f){F=c;G=f;var d=b(f);a="#"+d.prop("id");f=t==a;a in r||(r[a]=w.tabAllowHistory(d));p&&"#activity-stream-tab"!=a&&"#article-tab"!=a&&p.toggleNewConversations(!1);q&&"#subscribed-tab"==a&&q.toggleNewConversations(!1);if("#memberblog-tab"==a){d.off("click",".js-button-filter").on("click",".js-button-filter",function(e,g){e=b(this);var m=b(".js-button-filter-my.js-checked").data("filter-value"),
n=b(".js-button-filter-display-blogs.js-checked").data("filter-value");e.is(".js-button-filter-my")?(m=e.data("filter-value"),b(".js-button-filter-my").removeClass("js-checked")):(n=e.data("filter-value"),b(".js-button-filter-display-blogs").removeClass("js-checked"));e.addClass("js-checked");u(c,d,1,m,g,!0,n)});K(b(".bloghome-widget"),b("#memberblog-tab"));if(!k&&(k=vBulletin.history.instance(r[a]),k.isEnabled())){f=k.getState();if(!f||b.isEmptyObject(f.data))f={from:"filter_blogs",page:Number(b(".pagenav-form .defaultpage",
d).val())||1,tab:a,filters:{filter_blogs:b(".js-button-filter-my.js-checked",d).data("filter-value"),filter_display_blogs:b(".js-button-filter-display-blogs.js-checked",d).data("filter-value")}},k.setDefaultState(f,document.title,location.href);k.setStateChange(function(e){e=k.getState();if("filter_blogs"==e.data.from||"display_blogs"==e.data.from){k.log(e.data,e.title,e.url);var g=c.tabs("option","selected");c.find(".ui-tabs-nav > li").eq(g).find("a").attr("href")!=e.data.tab?(e=getTabIndexByHash(e.data.tab),
vBulletin.selectTabByIndex.call(c,e)):u(c,d,e.data.page,e.data.filters.filter_blogs,!0,!0,e.data.filters.display_blogs)}},"filter")}t==a&&L(d);M(c,!1);if(!b(".conversation-list",d).hasClass("dataLoaded")){if(t==a&&!C)return C=!0,!1;b(".conversation-empty",d).addClass("h-hide");u(c,d)}}else if("#activity-stream-tab"==a||"#article-tab"==a)p?H(d,y):(y=I(d,h,r[a],!0,!0,f,null),p=y.filter),p.applyFilters(!1,!0);else if("#subscribed-tab"==a)q?H(d,x):(x=I(d,h,r[a],!0,!0,f,null),q=x.filter),q.applyFilters(!1,
!0);else if("#forum-tab"==a){if(d.hasClass("dataLoaded"))return!1;if(t==a&&!B)return B=!0,!1;b(".conversation-empty",d).addClass("h-hide");vBulletin.AJAX({call:"/ajax/render/display_Forums_tab",data:{isAjaxTemplateRenderWithData:!0,channelDepth:d.data("channelDepth")},success:function(e){d.html(e.template).addClass(function(){var g=b(".conversation-empty",this);if(0==g.length)return"dataLoaded";g.removeClass("h-hide");return""})}})}});var P=0;h.find(".ui-tabs-nav li").each(function(){P+=b(this).width()});
l=h.find(".ui-tabs-nav").width();P>l&&h.find(".widget-tabs-nav, .module-title").height(h.find(".ui-tabs-nav").height())}vBulletin.truncatePostContent(".search-widget");l=b(".conversation-list",h);vBulletin.conversation.initPollEvents(l);vBulletin.conversation.initContentEvents(l);l.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(c){vBulletin.conversation.postComment.apply(this,[c,function(){p.updatePageNumber(1).applyFilters(!1,!0)}])});vBulletin.conversation.bindEditFormEventHandlers("all")})})(jQuery,
vBulletin.tabtools);
