How does the gerund function in the following sentence?

Milo's best sport is swimming.

object of the preposition
direct object
subject
subject complement