PageSourceSearch

https://www.bee-viva.de/cdn/shop/t/8/assets/shop-bar.js?v=145704984487706585941770047117

js bee-viva.de collected 2026-10-09 23:24:17 UTC 2,072 bytes, 1 lines download raw bytes

1!function(){"use strict";customElements.get("shop-bar")||customElements.define("shop-bar",class extends HTMLElement{constructor(){super(),this.section=this.closest("product-info"),this.form=this.section.querySelector("[data-product-form]"),this.formWrapper=theme.settings.productPageSticky&&this.section.querySelector(".product__info")||this.form,this.handleProductAddError=this.handleProductAddError.bind(this),this.boundToggleCartBarOnScroll=this.toggleCartBarOnScroll.bind(this),this.boundSetCartBarHeight=this.setCartBarHeight.bind(this)}connectedCallback(){this.setCartBarHeight(),this.addEventListener("click",this.handleClick.bind(this)),document.addEventListener("theme:scroll",this.boundToggleCartBarOnScroll),document.addEventListener("theme:resize",this.boundSetCartBarHeight),document.addEventListener("theme:product:add-error",this.handleProductAddError)}handleClick(t){const e=t.target.closest("[data-cart-bar-add-to-cart]");if(e)return t.preventDefault(),e.classList.add("is-loading"),e.setAttribute("disabled","disabled"),void this.form.querySelector("[data-add-to-cart]").dispatchEvent(new Event("click",{bubbles:!0}));t.target.closest("[data-cart-bar-scroll]")&&(t.preventDefault(),this.scrollToTop())}handleProductAddError(){this.querySelector("[data-cart-bar-add-to-cart]")&&this.scrollToTop()}scrollToTop(){const t=this.section.querySelector("variant-selects"),e=(window.theme.isMobile()?t||this.form:this.section).getBoundingClientRect().top;window.theme.scrollTo(window.theme.isMobile()?e-10:e)}toggleCartBarOnScroll(){const t=window.scrollY;if(this.formWrapper){const e=t>this.formWrapper.offsetTop+this.formWrapper.offsetHeight;this.classList.toggle("is-visible",e)}}setCartBarHeight(){const t=this.offsetHeight;document.documentElement.style.setProperty("--cart-bar-height",`${t}px`)}disconnectedCallback(){document.removeEventListener("theme:product:add-error",this.handleProductAddError),document.removeEventListener("theme:scroll",this.boundToggleCartBarOnScroll),document.removeEventListener("theme:resize",this.boundSetCartBarHeight)}})}();

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.