2023-03-29 18:20:22 +00:00
|
|
|
function generateStickyDebounce(s,n,a){var o;return function(){var t=this,e=arguments,i=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||s.apply(t,e)},n),i&&s.apply(t,e)}}!function(M,E,W){function e(t,e){var i=0,s=0,n="",a=0,o=!1,r=!1,l=!1,c=!1,d=0,p=0,h=0,m=0,u=M(),f=M("body"),g=0,b=0,k=0,v=M(t).clone().css({visibility:"hidden",display:"none"}).attr({id:"sticky-placeholder","aria-hidden":!0,itemtype:null,itemscope:null}),y=M(),w={top:0,bottom:0,custom:[]},C={scrollHide:!1,lazyHeight:0,topMargin:"auto",keepInWrapper:!1,wrapperSelector:"",zIndex:1e4,namespaceClass:"stuckElement",fixedClass:"isStuck",disableOn:function(){return!0},transition:"none"},I=function(){var t=0<jQuery("#wpadminbar").length&&"fixed"==jQuery("#wpadminbar").css("position")?jQuery("#wpadminbar").outerHeight():0;return"auto"===C.topMargin?parseInt(t+u.css("marginTop")):isNaN(C.topMargin)&&0<C.topMargin.search("px")?parseInt(t+C.topMargin.replace("px","")):isNaN(parseInt(C.topMargin))?0:parseInt(t+C.topMargin)},H=function(){v.remove(),u.removeClass(C.fixedClass).css({"max-width":"","margin-top":"","margin-left":"","margin-right":"",position:"",top:"",left:"",right:"",bottom:"",width:"",opacity:"",height:"",overflow:"","-webkit-transform":"","-ms-transform":"",transform:"","-webkit-transition":"","-ms-transition":"",transition:"",visibility:"","z-index":""}).removeClass("sticky-navigation-transition").removeClass("navigation-transition").removeClass("sticky-nav-scrolling-up"),"sticky-navigation"===u.attr("id")&&u.attr("id","site-navigation"),l=r=o=!1,u.trigger("stickUp:unStick")},x=function(t){M(v).insertAfter(u).show().addClass(C.fixedClass);var e,i=v.offsetParent();t&&(u.css({position:"absolute"}),e=y.offset().top+y.outerHeight()-i.offset().top-p-parseInt(y.css("paddingBottom"))),u.css({position:"absolute",marginTop:b,bottom:"",left:v.position().left,top:t?e:u.offset().top-i.offset().top-b}),u.trigger("stickUp:holdIt")},S=function(){o=!0,C.zIndex&&u.css("z-index",C.zIndex),"fade"==C.transition&&u.hide(),"slide"!=C.transition&&!C.scrollHide||u.css({height:"0",overflow:"hidden",visibility:"hidden"}),M(v).insertAfter(u).show().addClass(C.fixedClass),M(".gen-sidebar-nav").length&&v.css("height",u.outerHeight()),"left"!=u.css("float")&&"right"!=u.css("float")||(v.css("float",u.css("float")),v.attr("style",v.attr("style")+"width:auto !important;")),"slide"==C.transition&&"block"==v.css("display")&&u.css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)","-webkit-transition":"transform 300ms ease-in-out","-ms-transition":"transform 300ms ease-in-out",transition:"transform 300ms ease-in-out"}),u.addClass(C.fixedClass),"site-navigation"===u.attr("id")&&u.attr("id","sticky-navigation");var t=-k;u.css({"margin-top":b,position:"fixed",top:t+"px",left:"",right:"",bottom:""}),u.trigger("stickUp:stickIt"),"fade"==C.transition&&u.fadeIn(300),"slide"==C.transition&&u.one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(t){u.css({visibility:"",height:"",overflow:""}),setTimeout(function(){u.css({"-webkit-transform":"translateY(0)","-ms-transform":"translateY(0)",transform:"translateY(0)"})},10)}),C.scrollHide&&u.css({height:"",overflow:"",visibility:""})},U=function(){v&&v.width()!==u.outerWidth()&&u.outerWidth(v.outerWidth())},z=function(t){var e;C.disableOn()?(c=c&&!1,(!C.keepInWrapper||y.is(":visible"))&&(s=M(t.target).scrollTop(),n=i<=s?"down":"up",a=Math.abs(i-s),M(E).outerHeight(),i=s,h=u.offset().top,d=parseInt(u.outerHeight()+b)+parseInt(u.css("marginBottom")),o||l||r||(parseInt(u.outerHeight(!0)),r||l?(w.top=parseInt(v.offset().top),parseInt(u.offset().left)):w.top=parseInt(u.offset().top)),p=parseInt(u.outerHeight())+parseInt(u.css("margin-bottom"))+b,C.keepInWrapper?w.bottom=y.offset().top+y.outerHeight()-parseInt(y.css("paddingBottom")):w.bottom=M(W).outerHeight(),m=u.offset().top+p,k=C.scrollHide?d+C.lazyHeight:C.lazyHeight,"none"!==C.transition&&(g=2*u.outerHeight()),b=null!==C.topMargin?I():0,o&&b!==u.css("margin-top")&&u.css("margin-top",b),(!o&&!r&&
|