PageSourceSearch

https://www.marinelayer.com/cdn/shop/t/378/assets/base-dropdown.Xc91eFFl.min.js

js marinelayer.com collected 2026-09-24 19:47:38 UTC 2,808 bytes, 1 lines download raw bytes

1var t=Object.defineProperty;const e=".js-dropdown-input",o=".js-dropdown-label",i=".js-dropdown-wrapper",n=".js-dropdown-options",s=".js-dropdown-option",r=".js-dropdown-chevron",d=".js-group-name",a=".js-product-adjustment",p=".js-plan-price";class l extends window.HTMLElement{connectedCallback(){this.initializeBaseDropdown()}attributeChangedCallback(t,i,s){if(this.dropdownInput=this.querySelector(e),this.dropdownLabel=this.querySelector(o),this.dropdownOptions=this.querySelector(n),""!==s){JSON.parse(s).forEach((t,e)=>{0===e&&(this.dropdownInput.value=t.id,this.dropdownLabel.innerText=t.name);const o=document.createElement("button");o.type="button",o.classList.add("js-dropdown-option","base-dropdown__option"),o.innerText=t.name,o.value=t.id,o.name=t.name,t.status&&o.classList.add(t.status),this.dropdownOptions.appendChild(o)}),this.initialized||this.initializeBaseDropdown()}}initializeBaseDropdown(){this.dropdownInput=this.querySelector(e),this.dropdownLabel=this.querySelector(o),this.dropdownWrapper=this.querySelector(i),this.dropdownChevron=this.querySelector(r);const t=this.dropdownWrapper.querySelectorAll(s);this.groupName=document.querySelector(d),this.productAdjustment=document.querySelector(a),this.planPrice=document.querySelector(p),this.dropdownInput&&this.dropdownLabel&&this.dropdownWrapper&&this.dropdownChevron&&t&&t.length&&!this.initialized&&(this.initialized=!0,this.dropdownLabel.addEventListener("click",()=>{this.toggleOptions()}),this.dropdownChevron.addEventListener("click",()=>{this.toggleOptions()}),t.forEach(e=>{e.addEventListener("click",()=>{if(this.dropdownInput.value!==e.value){this.dropdownInput.value=e.value,this.dropdownLabel.innerText=e.name;const o=e.getAttribute("data-group"),i=e.getAttribute("data-product-adjustment"),n=e.getAttribute("data-plan-price");o&&i&&n&&(this.groupName.innerText=o,this.productAdjustment.innerText=i,this.planPrice.innerText=n),this.resetOptionsShow(t,e.value)}this.toggleOptions()})}),document.addEventListener("click",t=>{this.dropdownWrapper.contains(t.target)||this.dropdownLabel.contains(t.target)||this.dropdownInput.contains(t.target)||this.dropdownChevron.contains(t.target)||(this.dropdownLabel.classList.remove("active"),this.dropdownChevron.classList.remove("active"),this.dropdownWrapper.classList.remove("active"))}))}toggleOptions(){this.dropdownLabel.classList.toggle("active"),this.dropdownChevron.classList.toggle("active"),this.dropdownWrapper.classList.toggle("active")}resetOptionsShow(t,e){t&&e&&t.forEach(t=>{t.value===e?t.classList.add("hidden"):t.value&&t.classList.remove("hidden")})}}var c;((e,o,i)=>{o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i})(l,"symbol"!=typeof(c="observedAttributes")?c+"":c,["data-options"]),window.customElements.define("base-dropdown",l);

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.