HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/plugins/kadence-blocks/includes/assets/js/kb-header-sticky-image.min.js
class KBStickyImage{constructor(a,b={}){this.root="string"==typeof a?document.querySelector(a):a,this.state="CREATED",this.isLogo=this.root.classList.contains("kb-identity"),this.standardElem=this.isLogo?this.root.querySelector(".custom-logo"):this.root.querySelector(".kb-img:not(.kb-img-sticky):not(.kb-img-transparent)"),this.stickyElem=this.root.querySelector(".kb-img-sticky"),this.transparentElem=this.root.querySelector(".kb-img-transparent"),this.isSticking=!1,this.isTransparentDesktop=this.root.closest(".wp-block-kadence-header")?.classList?.contains("header-desktop-transparent"),this.isTransparentTablet=this.root.closest(".wp-block-kadence-header")?.classList?.contains("header-tablet-transparent"),this.isTransparentMobile=this.root.closest(".wp-block-kadence-header")?.classList?.contains("header-mobile-transparent"),this.stickyElem&&this.initStickyTracking(),this.emitEvent("MOUNTED"),this.state="IDLE"}initStickyTracking(){window.addEventListener("KADENCE_HEADER_STICKY_CHANGED",this.toggleSticky.bind(this))}toggleSticky({isSticking:a}){this.isSticking=a,a?this.setStickyStyles():this.setStandardStyles()}setStickyStyles(){this.stickyElem&&(this.stickyElem.style.display="initial"),this.standardElem&&(this.standardElem.style.display="none"),this.transparentElem&&(this.transparentElem.style.display="none")}setStandardStyles(){const a=this.getActiveSize(),b="desktop"==a&&this.isTransparentDesktop||"tablet"==a&&this.isTransparentTablet||"mobile"==a&&this.isTransparentMobile;this.stickyElem&&(this.stickyElem.style.display="none"),this.transparentElem&&!this.isLogo&&(this.transparentElem.style.display="none"),b?this.transparentElem&&(this.transparentElem.style.display="initial"):this.standardElem&&(this.standardElem.style.display="initial")}getActiveSize(){if(parseInt(kadenceHeaderConfig.breakPoints.desktop)<window.innerWidth)return"desktop";return parseInt(kadenceHeaderConfig.breakPoints.tablet)<window.innerWidth?"tablet":"mobile"}get state(){return this._state}set state(a){this._state=a,this.emitEvent("STATE",{val:a})}emitEvent(a,b={}){const c=new CustomEvent(a,{bubbles:!0,detail:b});this.root.dispatchEvent(c)}}function initKBImages(){const a=document.querySelectorAll(".wp-block-kadence-image, .wp-block-kadence-identity");window.KBStickyBlocks=Array.from(a).map(a=>new KBStickyImage(a))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initKBImages):initKBImages(),window.KBStickyImage=KBStickyImage;