/*
 =======================================================================*\
|| ###################################################################### ||
|| # 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   # ||
|| ###################################################################### ||
\*========================================================================
 jQuery throttle / debounce - v1.1 - 3/7/2010
 http://benalman.com/projects/jquery-throttle-debounce-plugin/

 Copyright (c) 2010 "Cowboy" Ben Alman
 Dual licensed under the MIT and GPL licenses.
 http://benalman.com/about/license/
*/
vBulletin.ensureObj("Responsive");
(function(d){function u(g,h){return g.find(h).addBack(h)}function B(){q.MediaQueries.setResizeEvent();q.MediaQueries.handleResizeEvent();let g=q.ChannelContent,h=(n,a=!1)=>{if(a||u(n,".conversation-toolbar-wrapper").length)g.cloneAndMoveToolbarButtons(),g.initToolbarShrink(n),g.initPmToolbarShrink(l);p.checkShrinkEvent()},l=d(document);h(l,!0);l.on("vb-instrument",n=>{h(d(n.target))});C();x();D()}function D(){if(d("html").hasClass("touch")){var g=navigator.userAgent.toLowerCase();firefoxIndex=g.indexOf("firefox");
windows7Index=g.indexOf("windows nt 6.1");-1!==firefoxIndex&&-1!==windows7Index&&d("html").removeClass("touch").addClass("no-touch")}}function C(){var g=d(".search-results-widget .conversation-toolbar");g.addClass("desktop");if(g.find(".toolbar-pagenav").length){var h=d("<div>").addClass("conversation-toolbar mobile-search-results");h.insertAfter(g);h.append(g.find(".toolset-right").clone(!0,!0))}}function x(){d(".conversation-content .videoscontainer").each(function(){d(this).siblings("div.post-signature").length||
d(this).addClass("no-signature")})}let q=vBulletin.Responsive,p=q.Debounce,y=0;q.scrollToFixedBreakPoint=480;q.ChannelContent={cloneAndMoveToolbarButtons:function(){function g(){var f=parseInt(d(this).data("js-movable-button-clone-id")||0,10);c=Math.max(c,f)}var h=d(".js-movable-toolbar-button"),l=d(".js-movable-toolbar-button-clone"),n=h,a=d(".js-movable-toolbar-button-container"),c=0,b={};h.each(g);l.each(g);++c;h=h.filter(function(){var f=d(this),m="uniq-"+f.attr("class").split(/\s+/).sort().join("-")+
"-"+f.attr("id");m=m.replace("-h-hide-on-small","");return b[m]?(f.addClass("h-hide-on-small"),!1):b[m]=!0});if(1>a.length){var e=!1;if(0<h.length){console.warn("Responsive warning: .js-movable-toolbar-button-container is not available.");var k=h.eq(0).closest(".canvas-widget");1==k.length&&(a=d("<div />").addClass("h-right h-clear hide-on-editmode b-button-group b-button-group--wrap h-margin-bottom-l js-movable-toolbar-button-container h-hide-on-large"),k.is(".b-module--contiguous")?(e=k.closest(".canvas-layout-row"),
a.removeClass("h-right").addClass("b-button-group--contiguous-layout").prependTo(e),d("<div />").addClass("js-movable-toolbar-button-container-marker-desktop h-hide-imp").prependTo(e),d("<div />").addClass("js-movable-toolbar-button-container-marker-small h-hide-imp").insertBefore(k)):a.prependTo(k),console.log("Responsive: Created .js-movable-toolbar-button-container"),e=!0)}if(!e)return}h=h.filter(function(){var f=d(this).data("js-movable-button-clone-id");if(f){var m=!1;l.each(function(){if(d(this).data("js-movable-button-clone-id")==
f)return m=!0,!1});if(m)return!1}return!0});l.each(function(){var f=d(this),m=f.data("js-movable-button-clone-id"),r=!1;n.each(function(v,t){if(d(t).data("js-movable-button-clone-id")==m)return r=!0,!1});r||f.remove()});h=h.reverse();h.each(function(){var f=d(this);f.data("js-movable-button-clone-id")||(f.clone().removeAttr("id").removeClass("js-movable-toolbar-button").addClass("h-hide-on-large js-movable-toolbar-button-clone").data("js-movable-button-clone-id",c).off("click").on("click",function(){f.trigger("click")}).prependTo(a),
f.addClass("h-hide-on-small").data("js-movable-button-clone-id",c),++c)})},initToolbarShrink:function(g){function h(b){d(".js-movable-toolbar-button-clone").toggleClass("h-hide-on-large",b);d(".js-movable-toolbar-button, .js-button-filter-my-label").toggleClass("h-hide-imp",!b)}function l(b,e){e=e.closest(".conversation-toolbar-wrapper").next(".js-under-toolbar-pagenav");1==e.length&&e.parent().is(":visible")&&(d(".js-toolbar-pagenav").toggleClass("h-hide-on-xsmall",b).toggleClass("h-hide-imp",!b),
e.toggleClass("h-show-on-xsmall",b),d(".js-subtoolbar-list-header").toggleClass("h-hide-imp",!b))}function n(b){l(!1,b);h(!0)}function a(b){l(!0,b);h(!1)}function c(b){l(!1,b);h(!1)}u(g,".conversation-toolbar > .js-shrink-event-parent").on("vbulletin:shrink vbulletin:unshrink",function(){var b=d(this),e=[n,a,c];l(!0,b);h(!0);for(const k of e){if("need_shrink"!=p.checkElementShrinkRequirement(b))break;k(b)}})},initPmToolbarShrink:function(g){function h(l){d(".js-movable-toolbar-button-container, .js-movable-toolbar-button-clone").toggleClass("h-hide-on-large",
l);d(".js-movable-toolbar-button, .js-button-filter-my-label").toggleClass("h-hide-imp",!l)}u(g,".js-pm-floating-toolbar-content.js-shrink-event-parent, .js-pm-floating-toolbar-content > .js-shrink-event-parent").on("vbulletin:shrink vbulletin:unshrink",function(){h(!0);"need_shrink"==p.checkElementShrinkRequirement(d(this))&&h(!1)})},movePmToolbarButtonContainer:function(){var g=d(".js-movable-toolbar-button-container.b-button-group--contiguous-layout");g.length&&(d("body").is(".l-small")?g.insertAfter(".js-movable-toolbar-button-container-marker-small"):
g.insertAfter(".js-movable-toolbar-button-container-marker-desktop"))}};q.MediaQueries={setResizeEvent:function(){var g=this.handleResizeEvent;d(window).on("resize orientationchange",g)},handleResizeEvent:function(){var g=d("#vb-page-body").width();g!=y&&(y=g,(g=vBulletin.contentslider)&&"function"==typeof g.handleWindowResize&&g.handleWindowResize())}};q.checkForVideoSignature=x;(function(){function g(a){if(2>a.length)return!0;let c=a.last(),b=c.position().top,e=c.outerHeight()/2+b,k=!0;a.each(function(f,
m){f=d(m);m=f.position().top;if(m!=b&&(f=f.outerHeight()/2+m,2<Math.abs(f-e)))return k=!1});return k}function h(a){var c=!1;a.each(function(b,e){if(b<a.length-1){var k=d(e),f=a.eq(b+1);b=k.offset();e=f.offset();k=k[0].getBoundingClientRect();f=f[0].getBoundingClientRect();b.bottom=b.top+k.height-1;b.right=b.left+k.width-1;e.bottom=e.top+f.height-1;e.right=e.left+f.width-1;if(!(b.right<e.left||b.bottom<e.top||e.right<b.left||e.bottom<b.top))return c=!0,!1}});return c}function l(a){p.callbacks.push(a)}
function n(){var a=p.callbacks.length,c;for(c=0;c<a;++c)p.callbacks[c]()}(function(a,c){"$:nomunge";var b=a.jQuery||a.Cowboy||(a.Cowboy={}),e;b.throttle=e=function(k,f,m,r){function v(){function w(){z=+new Date;m.apply(E,F)}function G(){t=c}var E=this,A=+new Date-z,F=arguments;r&&!t&&w();t&&clearTimeout(t);r===c&&A>k?w():!0!==f&&(t=setTimeout(r?G:w,r===c?k-A:k))}var t,z=0;"boolean"!==typeof f&&(r=m,m=f,f=c);b.guid&&(v.guid=m.guid=m.guid||b.guid++);return v};b.debounce=function(k,f,m){return m===c?
e(k,f,!1):e(k,m,!1!==f)}})(this);d.extend(p,{areElementsOnOneRow:g,checkElementShrinkRequirement:function(a){var c=a.is(".js-shrink-event-parent");let b=a.is("ul"),e="1"==a.data("vbulletin-shrink-triggered");c=c?a.find("> .js-shrink-event-child").filter(":visible"):b?a.find("> li").filter(":visible"):{length:0};return 1>c.length?e?"need_unshrink":"no_children":!g(c)||h(c)?(a.data("vbulletin-shrink-triggered","1"),"need_shrink"):e?"need_unshrink":"no_change"},checkShrinkEvent:function(a){"undefined"==
typeof a&&(a=d(".js-shrink-event-parent"));let c={need_shrink:"vbulletin:shrink",need_unshrink:"vbulletin:unshrink"};a.each((b,e)=>{b=d(e);e=p.checkElementShrinkRequirement(b);e in c&&b.trigger(c[e])})},init:function(){l(p.checkBrowserSize);l(function(){var a=d(".l-row");1>a.length||a.reverse().each(function(){var c=d(this);if(768<=c.width())return c.removeClass("l-small"),!0;var b=c.find("> .l-col__flex-1, > .l-col__flex-2, > .l-col__flex-3, > .l-col__flex-4, > .l-col__flex-5, > .l-col__flex-6"),
e=!1;c.removeClass("l-small");b.reverse().each(function(){if(this.offsetWidth<this.scrollWidth)return e=!0,!1});e&&c.addClass("l-small")})});l(function(){var a=d(".l-row > .l-col__large-1, .l-row > .l-col__large-2, .l-row > .l-col__large-3, .l-row > .l-col__large-4, .l-row > .l-col__large-5, .l-row > .l-col__large-6, .l-row > .l-col__large-7, .l-row > .l-col__large-8, .l-row > .l-col__large-9, .l-row > .l-col__large-10, .l-row > .l-col__large-11, .l-row > .l-col__large-12, .l-row > .l-col__fixed-1, .l-row > .l-col__flex-1, .l-row > .l-col__fixed-2, .l-row > .l-col__flex-2, .l-row > .l-col__fixed-3, .l-row > .l-col__flex-3, .l-row > .l-col__fixed-4, .l-row > .l-col__flex-4, .l-row > .l-col__fixed-5, .l-row > .l-col__flex-5, .l-row > .l-col__fixed-6, .l-row > .l-col__flex-6, .l-row > .l-col__small-1, .l-row > .l-col__small-2, .l-row > .l-col__small-3, .l-row > .l-col__small-4");
1>a.length||a.reverse().each(function(){var c=d(this),b=c.width(),e=parseInt(c.css("marginLeft"),10),k=parseInt(c.css("marginRight"),10);0>e&&(b+=e);0>k&&(b+=k);c.toggleClass("l-column-xsmall",480>b);c.toggleClass("l-column-small",768>b);c.toggleClass("l-column-desktop",768<=b)})});l(function(){d(".ui-dialog:visible .ui-dialog-content").each(function(a,c){a=d(c);a.trigger("vbulletin:dialogresize");a.dialog("option","position",{my:"center",at:"center",of:window,collision:"flipfit"});if(!a.is(".js-no-responsive-resize")){a.closest(".ui-dialog").hide();
c=d(window).width();a.closest(".ui-dialog").show();var b=a.dialog("option","width");if(b>c)a.data("original-dialog-width")||a.data("original-dialog-width",b),a.dialog("option","width",c);else if(b<c){var e=a.data("original-dialog-width");e&&b<e&&a.dialog("option","width",Math.min(e,c))}}})});l(p.checkShrinkEvent);l(q.ChannelContent.movePmToolbarButtonContainer);d(window).on("resize",d.debounce(300,n));n()},callbacks:[],registerCallback:l,runCallbacks:n,registerCallbackOnce:function(a){var c=!1;d.each(p.callbacks,
function(){if(a==this||""+a==""+this)return c=!0,!1});c||l(a)}})})();d(function(){B();p.init()})})(jQuery);
