This is a simple implementation of a Finite State Machine (FSM) in a Svelte application. The FSM is used to manage states and transitions, and it integrates with a timer system to manage state timeouts (like a traffic light with red, green, and yellow states).
_enter
and _exit
lifecycle methods for custom state transitions.