1import{B as e}from"./GlobalStylesStore--z5tmrDj.js";import{d as s}from"./defineElement-Bh-rOTph.js";s("hover-indicator",class extends e{constructor(){super(),this._cursorOnElement=!1,this._cursorIsLeaving=!1,this._lastTop=0}properties(){return{selector:"li",active:-1,disabled:!1,mediaQuery:"",activeClass:""}}connected(){this.resetCssProperties(),""!==this.mediaQuery&&(this.disabled=!window.matchMedia(this.mediaQuery).matches);try{new ResizeObserver((()=>{this.resetCssProperties()})).observe(this)}catch(e){}}watch(){return{active:()=>{this.resetCssProperties()},disabled:()=>{this._hasAlreadyRendered=!1}}}events(){return{[this.selector]:{mouseenter:e=>{this._cursorIsLeaving=!1,this.setCSSPropertiesByTarget(e.currentTarget),this._cursorOnElement=!0}},this:{mouseleave:()=>{this._cursorIsLeaving=!0,this.resetCssProperties(),this._cursorOnElement=!1}},window:{resize:()=>{""!==this.mediaQuery&&(this.disabled=!window.matchMedia(this.mediaQuery).matches),this.resetCssProperties()}}}}setActiveClass(){if(this.activeClass){this.querySelectorAll(this.selector).forEach(((e,s)=>{e.classList.toggle(this.activeClass,s===this.active)}))}}resetCssProperties(){if(-1!==this.active&&!1===this.disabled){const e=this.querySelectorAll(this.selector)[this.active];this.setCSSPropertiesByTarget(e)}else this.setCssProperties(0,0,this._lastTop)}setCssProperties(e,s,t){if(this.disabled)return void this.style.setProperty("--indicator-scale","0");const i=-1===this.active&&(!this._cursorOnElement||this._cursorIsLeaving)||!this._hasAlreadyRendered;this.classList.toggle("scale-transition",i),this.style.setProperty("--indicator-scale",""+(0===s?0:1)),this.style.setProperty("--indicator-top",`${t}px`),i&&this._cursorIsLeaving||(this.style.setProperty("--indicator-width",s+"px"),this.style.setProperty("--indicator-left",e+"px")),this._lastTop=t,this._hasAlreadyRendered=!0,this.setActiveClass()}setCSSPropertiesByTarget(e){this.setCssProperties(e.offsetLeft,e.offsetWidth,e.offsetTop+e.offsetHeight)}}); 2//# sourceMappingURL=hover-indicator-8TTYeeSE.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.