Precursors of state transitions in stochastic systems with delay