import{s as u,h as v}from"./utility.35c60188.js";import"./_commonjsHelpers.b8add541.js";document.addEventListener("DOMContentLoaded",function(){const d=new ColorThief;function l(e){const t=d.getColor(e),n=`rgb(${t[0]}, ${t[1]}, ${t[2]})`;e.closest(".card").style.setProperty("--glow-color",n),e.closest(".card").classList.add("glow")}document.querySelectorAll(".card.style-6 img").forEach(function(e){e.setAttribute("crossorigin","anonymous"),e.complete?(l(e),e.previousElementSibling.classList.add("d-none")):e.addEventListener("load",function(){l(e),e.previousElementSibling.classList.add("d-none")})}),document.querySelectorAll(".glove-select-button").forEach(e=>{e.addEventListener("click",function(){const t=this.getAttribute("data-type"),n=document.getElementById(`nav-${t}`),a=n.querySelector('.lazy-load-content[data-type="'+t+'"]');a.innerHTML='<div class="loader-gloves"></div>',fetch(glovesLoadUrl+t).then(o=>o.text()).then(o=>{a.innerHTML=o,a.querySelectorAll("img").forEach(s=>{s.classList.add("lazy"),s.addEventListener("load",()=>{l(s),s.previousElementSibling.classList.add("d-none"),s.classList.add("loaded")})}),r(n)})})});const c=document.getElementById("glovePreviewModal");c.addEventListener("show.bs.modal",function(e){const t=e.relatedTarget,n=t.getAttribute("data-skin-image"),a=t.getAttribute("data-skin-name"),o=c.querySelector("#glovePreviewImage"),s=c.querySelector("#glovePreviewName");o.src=n,s.textContent=a}),i();function i(){u("gloves_list_loader");const e="\u2605 Broken Fang Gloves",t=document.getElementById(`nav-${e}`),n=t.querySelector('.lazy-load-content[data-type="'+e+'"]');fetch(glovesLoadUrl+e).then(a=>a.text()).then(a=>{n.innerHTML=a,n.querySelectorAll("img").forEach(o=>{o.classList.add("lazy"),o.addEventListener("load",()=>{l(o),o.previousElementSibling.classList.add("d-none"),o.classList.add("loaded")})}),r(t),v("gloves_list_loader")})}});function r(d){const l=document.querySelector(".tab-pane.show.active");l&&l.classList.remove("show","active"),d.classList.add("show","active");const c=document.querySelector(".nav-link.active");c&&c.classList.remove("active"),document.getElementById("glove-dropdown-tab").classList.add("active")}
