Net Loss Per Share - Schedule of Potential Common Shares Issuable Upon Conversion of Warrants (Details) - shares
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Potential common shares      
Total (in shares) 22,227,982 20,287,599 30,086,647
Options, RSUs and ESPP shares      
Potential common shares      
Total (in shares) 11,492,002 7,909,583 7,002,527
Warrants to purchase common stock      
Potential common shares      
Total (in shares) 10,735,980 12,378,016 23,084,120