',a.dataset.sha256Values="",a.addEventListener("click",async()=>{navigator.clipboard.writeText(a.dataset.sha256Values).then(()=>{a.innerHTML='';let e=document.createElement("div");e.className="copy-success",e.textContent="复制成功!",document.body.appendChild(e);var t=a.getBoundingClientRect();e.style.top=(t.bottom-30).toString()+"px",e.style.left=(t.right+10).toString()+"px",setTimeout(()=>{e.classList.add("fade-out"),e.addEventListener("transitionend",()=>{document.body.removeChild(e)}),setTimeout(()=>{a.innerHTML=''},1500)},500)}).catch(e=>{console.error("Failed to copy text: ",e);let t=document.createElement("div");t.className="copy-success",t.textContent="复制失败!",document.body.appendChild(t);e=a.getBoundingClientRect();t.style.top=(e.bottom-30).toString()+"px",t.style.left=(e.right+10).toString()+"px",setTimeout(()=>{t.classList.add("fade-out"),t.addEventListener("transitionend",()=>{document.body.removeChild(t)}),setTimeout(()=>{a.innerHTML=''},1500)},500)})}),i.appendChild(a),t.appendChild(o),t.appendChild(n),t.appendChild(i),r.appendChild(t),a.dataset.sha256Values=await fetchFileSHA256("https://raw.githubusercontent.com/KodateMitsuru/customrepo/refs/heads/main/"+e.name),n.textContent=await fetchFileSize(e.name)}))}function navInEvent(e){if(!e.relatedTarget||!document.querySelector(".navbar").contains(e.relatedTarget)){var t;for(t of document.querySelectorAll(".navbar a"))t.style.display="block",t.style.animation="slideIn 0.3s forwards";activeLink&&moveIndicator(activeLink,10)}}function navOutEvent(e){if(!e.relatedTarget||!document.querySelector(".navbar").contains(e.relatedTarget)){document.querySelector(".hover-indicator").style.display="none";for(let e of document.querySelectorAll(".navbar a"))e.style.animation="slideOut 0.15s forwards",setTimeout(()=>{e.style.display="none"},150)}}function moveIndicator(e,t=0){var n=document.querySelector(".hover-indicator"),i=e.getBoundingClientRect(),e=e.parentElement.getBoundingClientRect();n.style.width=i.width+"px",n.style.height=i.height+"px",n.style.left=i.left-e.left+"px",n.style.top=i.top-e.top+t+"px",n.style.display="block"}async function renderMenu(){var e=document.querySelector(".navbar"),t=document.querySelector(".toggle-menu");let i=e.querySelectorAll("a"),o=Array.from(i).find(e=>e.getAttribute("href")===window.location.pathname);if(i.forEach(e=>{e.style.color="#f2f2f2",e.addEventListener("mouseover",r)}),e.addEventListener("mouseout",function(e){e.relatedTarget&&document.querySelector(".navbar").contains(e.relatedTarget)||(activeLink&&(activeLink.style.color="#f2f2f2",activeLink=null),o?((activeLink=o).style.color="#333333",moveIndicator(activeLink)):document.querySelector(".hover-indicator").style.display="none")}),o&&(moveIndicator(activeLink=o),o.style.color="#333333"),window.innerWidth<=600){ismobile=!0,document.querySelector(".hover-indicator").style.display="none";for(var n of i)n.style.display="none";e.addEventListener("mouseover",navInEvent),t.addEventListener("click",navInEvent),e.addEventListener("mouseout",navOutEvent)}else{ismobile=!1,e.removeEventListener("mouseover",navInEvent),t.removeEventListener("click",navInEvent),e.removeEventListener("mouseout",navOutEvent);for(var a of i)a.style.display="block",a.style.animation=""}function r(e){let t=e.target;for(;t&&!t.getAttribute("href");)t=t.parentNode;let n=t.getAttribute("href");e=Array.from(i).find(e=>e.getAttribute("href")===n);e?(activeLink&&(activeLink.style.color="#f2f2f2"),(activeLink=e).style.color="#333333",moveIndicator(e)):o?moveIndicator(activeLink=o):document.querySelector(".hover-indicator").style.display="none"}}window.ismobile=!1,window.activeLink=null,swup.hooks.on("content:replace",async()=>{await renderFileList(),await renderMenu()}),document.addEventListener("DOMContentLoaded",async()=>{await renderFileList(),await renderMenu()}),window.addEventListener("resize",async()=>{ismobile!==window.innerWidth<=600&&await renderMenu()})