function a(){document.querySelectorAll("[data-copy]").forEach(t=>{t.addEventListener("click",()=>{const e=document.getElementById(t.dataset.copy);if(!e)return;const n=e.value||e.textContent||"",o=()=>{const c=t.textContent;t.textContent="Copied",setTimeout(()=>{t.textContent=c},1200)};if(navigator.clipboard?.writeText)navigator.clipboard.writeText(n).then(o).catch(()=>{e.select?.()});else{e.select?.();try{document.execCommand("copy"),o()}catch{}}})})}export{a as default};
