    } else {
                                    // Last digit entered, submit the form
                                    const pin = Array.from(inputs).map(input => input.value).join('');
                                    submitPin(pin, inputs);
                                }
                            } else {
                                e.target.classList.remove('has-value');
                            }
                        });

                        input.addEventListener('keydown', (