v3.19.3.a.u2
Net Income (Loss) Per Share - Antidilutive Securities (Details) - shares
shares in Thousands
12 Months Ended
Dec. 31, 2019
Dec. 31, 2018
Dec. 31, 2017
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 125,964 1,256,347 1,218,408
Redeemable convertible preferred stock      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 0 903,607 863,305
Convertible notes      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 0 200,595 196,398
RSUs      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 85,058 137,426 87,101
Stock options      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 34,800 8,776 50,304
Restricted common stock with performance condition      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 0 1,758 888
Common stock subject to repurchase      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 210 1,695 12,266
Warrants to purchase redeemable convertible preferred stock      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 0 1,073 4,449
SARs      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 0 758 705
RSUs to settle fixed monetary awards      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 283 559 2,712
Shares committed under ESPP      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 5,490 0 0
Warrants to purchase common stock      
Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]      
Antidilutive securities excluded from computation of earnings per share (in shares) 123 100 280