Where does the phrase “basket of deplorables” come from?

I have spent dayshours minutes using my weak google-fu trying to determine the answer to this question, and now, in the spirit of the contemporary entrepreneurial university, I am going to outsource it.

My guesses regarding its origin:

(1) Something from a Smiths song.

(2) A phrase from a Victorian novel.

(3) One of Shakespeare’s minor plays.

(4) Harry Potter?

If this wasn’t actually an allusion, and Hillary came up with the phrase herself, color me impressed.