Move hide-or-remove from depends to utils

This allows reuse in other patterns.
Stacks: enable animation.