1import{a as i,i as s,n}from"./lit-LA9uEQAA.js";var o=i`:host{cursor:pointer}`,e=class extends n{static get is(){return"toujou-top-button"}static get styles(){return o}static get properties(){return{visible:{type:Boolean,reflect:!0}}}constructor(){super(),this.visible=!1,this.settings={visibleClass:"topbutton--visible"},this._checkVisibility=this._checkVisibility.bind(this)}render(){return s` 2 <slot id="content"></slot> 3 `}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this._checkVisibility(),window.addEventListener("scroll",this._checkVisibility),window.addEventListener("resize",this._checkVisibility),this.addEventListener("click",this._handleClick),this.addEventListener("keyup",this._handleKeyUp)}disconnectedCallback(){window.removeEventListener("scroll",this._checkVisibility),window.addEventListener("resize",this._checkVisibility),this.removeEventListener("click",this._handleClick),this.removeEventListener("keyup",this._handleKeyUp),super.disconnectedCallback()}updated(t){super.updated(t),t.has("visible")&&(this.setAttribute("aria-hidden",(!this.visible).toString()),this.classList.toggle(this.settings.visibleClass,this.visible))}get _viewportHeight(){return Math.max(document.documentElement.clientHeight,window.innerHeight||0)}_checkVisibility(){this.visible=document.body.scrollTop>this._viewportHeight||document.documentElement.scrollTop>this._viewportHeight}_handleClick(){window.scrollTo({top:0,left:0,behavior:"smooth"}),this._resetFocus()}_handleKeyUp(t){(t.key==="Enter"||t.code==="Enter"||t.code==="Space"||t.key===" ")&&this._handleClick()}_resetFocus(){const t=document.activeElement;t&&t.blur()}};customElements.define(e.is,e); 4 5//# sourceMappingURL=toujou-top-button.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.