// Show / hide password. The button keeps one name ("Show password") and reports its state with aria-pressed.
document.querySelectorAll('[data-peek]').forEach(function (btn) {
var input = document.getElementById(btn.getAttribute('aria-controls'));
btn.addEventListener('click', function () {
var show = input.type === 'password';
input.type = show ? 'text' : 'password';
btn.setAttribute('aria-pressed', String(show));
});
});