Consolidated Statements of Redeemable Convertible and Convertible Preferred Stock and Stockholders' Equity (Deficit) - USD ($) $ in Thousands |
Total |
Cumulative effect of Accounting Changes [Member] |
Series H-1 Convertible Preferred Stock [Member] |
Series F Convertible Stock [Member] |
Series D Convertible Stock [Member] |
Common Stock [Member] |
Common Stock [Member]
Series H-1 Convertible Preferred Stock [Member]
|
Common Stock [Member]
Series F Convertible Stock [Member]
|
Common Stock [Member]
Series D Convertible Stock [Member]
|
Additional Paid-in Capital [Member] |
Additional Paid-in Capital [Member]
Cumulative effect of Accounting Changes [Member]
|
Additional Paid-in Capital [Member]
Series H-1 Convertible Preferred Stock [Member]
|
Additional Paid-in Capital [Member]
Series F Convertible Stock [Member]
|
Additional Paid-in Capital [Member]
Series D Convertible Stock [Member]
|
Treasury Stock [Member] |
Accumulated Other Comprehensive Income (Loss) [Member] |
Retained Earnings [Member] |
Retained Earnings [Member]
Cumulative effect of Accounting Changes [Member]
|
Redeemable Convertible Preferred Stock [Member] |
Redeemable Convertible Preferred Stock [Member]
Series H Redeemable Convertible Preferred Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member] |
Nonredeemable Convertible Preferred Stock [Member]
Series H-1 Convertible Preferred Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series K Convertible Preferred Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series H Redeemable Convertible Preferred Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series F Convertible Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series D Convertible Stock [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series D Convertible Stock [Member]
Excercise Of Warrants [Member]
|
Nonredeemable Convertible Preferred Stock [Member]
Series A Convertible Stock [Member]
|
| Temporary equity, beginning period, Shares at Dec. 31, 2018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25,947,000
|
|
742,813,000
|
|
|
|
|
|
|
|
| Temporary equity, beginning period at Dec. 31, 2018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 172,163
|
|
$ 2,087,560
|
|
|
|
|
|
|
|
| Balance at beginning period, Shares at Dec. 31, 2018 |
|
|
|
|
|
549,368,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at beginning period at Dec. 31, 2018 |
$ (1,751,428)
|
$ 12,525
|
|
|
|
$ 570
|
|
|
|
$ 1,627,737
|
$ (34)
|
|
|
|
$ (148,621)
|
$ 762
|
$ (3,231,876)
|
$ 12,559
|
|
|
|
|
|
|
|
|
|
|
| Balance at beginning period, treasury shares at Dec. 31, 2018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20,637,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of Series H redeemable convertible preferred stock upon exercise of warrants, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2,949,000
|
|
|
|
|
|
|
|
|
| Issuance of Series H redeemable convertible preferred stock upon exercise of warrants |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 26,069
|
|
|
|
|
|
|
|
|
| Repurchase of common stock, held in treasury, Shares |
|
|
|
|
|
(2,340,000)
|
|
|
|
|
|
|
|
|
2,340,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Repurchase of common stock, held in treasury |
(11,202)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ (11,202)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Sale of common stock, held in treasury |
100,000
|
|
|
|
|
|
|
|
|
(20,928)
|
|
|
|
|
$ 120,928
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options |
16,897
|
|
|
|
|
$ 18
|
|
|
|
16,879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options, Shares |
|
|
|
|
|
17,845,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Reclassification of redeemable convertible preferred stock into convertible preferred stock upon expiration of redemption option, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(2,016,000)
|
|
|
|
2,016,000
|
|
|
|
|
| Repurchase of convertible preferred stock, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(3,037,000)
|
(8,000)
|
|
(1,000)
|
| Repurchase of convertible preferred stock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ (5,386)
|
$ (6)
|
|
|
| Conversion of convertible preferred stock to common stock, Shares |
|
|
|
|
|
|
|
10,000
|
30,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(10,000)
|
(30,000)
|
|
|
| Conversion of convertible preferred stock to common stock |
|
|
|
$ 20
|
$ 24
|
|
|
|
|
|
|
|
$ 20
|
$ 24
|
|
|
|
|
|
|
|
|
|
|
$ (20)
|
$ (24)
|
|
|
| Issuance of common stock upon net exercise of common stock warrants, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1,097,000
|
|
| Issuance of common stock upon net exercise of common stock warrants |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 7,375
|
|
| Stock issued during period |
7,500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Stock issued during period, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1,068,000
|
|
|
|
|
|
|
|
|
| Reclassification of redeemable convertible preferred stock into convertible preferred stock upon expiration of redemption option |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ (4,163)
|
|
|
|
$ 4,163
|
|
|
|
|
| Redemption of redeemable convertible preferred stock, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(23,931,000)
|
|
|
|
|
|
|
|
|
| Redemption of redeemable convertible preferred stock |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ (168,000)
|
|
|
|
|
|
|
|
|
| Sale of common stock, held in treasury, Shares |
|
|
|
|
|
16,584,000
|
|
|
|
|
|
|
|
|
(16,584,000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Other comprehensive income |
(1,465)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(1,465)
|
|
|
|
|
|
|
|
|
|
|
|
|
| Distributed earnings attributable to participating securities |
(8,481)
|
|
|
|
|
|
|
|
|
(8,481)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Stock-based compensation |
242,114
|
|
|
|
|
|
|
|
|
242,114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Net loss |
(579,646)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(579,646)
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period, Shares at Dec. 31, 2019 |
|
|
|
|
|
581,497,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period at Dec. 31, 2019 |
(1,980,642)
|
|
|
|
|
$ 588
|
|
|
|
1,857,331
|
|
|
|
|
$ (38,895)
|
(703)
|
(3,798,963)
|
|
|
|
|
|
|
|
|
|
|
|
| Temporary equity, ending period, Shares at Dec. 31, 2019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4,017,000
|
|
742,840,000
|
|
|
|
|
|
|
|
| Temporary equity, ending period at Dec. 31, 2019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 33,569
|
|
$ 2,093,662
|
|
|
|
|
|
|
|
| Balance at end of period, treasury shares at Dec. 31, 2019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6,393,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Repurchase of common stock, held in treasury, Shares |
|
|
|
|
|
(808,000)
|
|
|
|
|
|
|
|
|
808,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Repurchase of common stock, held in treasury |
(3,777)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ (3,777)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options |
298,829
|
|
|
|
|
$ 120
|
|
|
|
298,709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options, Shares |
|
|
|
|
|
120,618,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Retirement of treasury stock, Shares |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(7,201,000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Retirement of treasury stock |
|
|
|
|
|
$ (7)
|
|
|
|
(42,665)
|
|
|
|
|
$ 42,672
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Conversion of convertible preferred stock to common stock, Shares |
|
|
|
|
|
793,726,000
|
28,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(745,313,000)
|
(28,000)
|
|
|
|
|
|
|
| Conversion of convertible preferred stock to common stock |
2,105,319
|
|
$ 100
|
|
|
$ 794
|
|
|
|
2,104,525
|
|
$ 100
|
|
|
|
|
|
|
|
|
$ (2,105,319)
|
$ (100)
|
|
|
|
|
|
|
| Conversion of redeemable convertible preferred stock to common stock |
33,569
|
|
|
|
|
$ 4
|
|
|
|
33,565
|
|
|
|
|
|
|
|
|
$ (33,569)
|
|
|
|
|
|
|
|
|
|
| Conversion of redeemable convertible preferred stock to common stock, Shares |
|
|
|
|
|
4,017,000
|
|
|
|
|
|
|
|
|
|
|
|
|
(4,017,000)
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon net exercise of common stock warrants, Shares |
|
|
|
|
|
7,631,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2,380,000
|
|
|
| Issuance of common stock upon net exercise of common stock warrants |
|
|
|
|
|
$ 8
|
|
|
|
(8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 10,810
|
|
|
| Stock issued during period |
942,529
|
|
|
|
|
$ 207
|
|
|
|
942,322
|
|
|
|
|
|
|
|
|
|
|
|
|
$ 947
|
|
|
|
|
|
| Stock issued during period, Shares |
|
|
|
|
|
206,501,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121,000
|
|
|
|
|
|
| Conversion of preferred stock warrants to common stock warrants |
31,007
|
|
|
|
|
|
|
|
|
31,007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Settlement of employee loan accounted for as a modification to stock option (Value) |
(205)
|
|
|
|
|
$ (4)
|
|
|
|
(201)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Other comprehensive income |
(2,042)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(2,042)
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon settlement of restricted stock units ("RSUs"), Shares |
|
|
|
|
|
82,430,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon settlement of restricted stock units ("RSUs") |
|
|
|
|
|
$ 82
|
|
|
|
(82)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Stock-based compensation |
1,264,254
|
|
|
|
|
|
|
|
|
1,264,254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Settlement of employee loan accounted for as a modification to stock option (Shares) |
|
|
|
|
|
(3,500,000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Net loss |
(1,166,391)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(1,166,391)
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period, Shares at Dec. 31, 2020 |
|
|
|
|
|
1,792,140,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period at Dec. 31, 2020 |
1,522,550
|
|
|
|
|
$ 1,792
|
|
|
|
6,488,857
|
|
|
|
|
|
(2,745)
|
(4,965,354)
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options |
$ 507,455
|
|
|
|
|
$ 178
|
|
|
|
507,277
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock from the exercise of stock options, Shares |
178,849
|
|
|
|
|
178,849,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon vesting of growth units, Shares |
|
|
|
|
|
1,471,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon vesting of growth units |
|
|
|
|
|
$ 1
|
|
|
|
(1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon net exercise of common stock warrants and other, Shares |
|
|
|
|
|
4,664,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon net exercise of common stock warrants and other |
$ 1,712
|
|
|
|
|
$ 6
|
|
|
|
1,706
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Other comprehensive income |
396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon settlement of restricted stock units ("RSUs"), Shares |
|
|
|
|
|
50,350,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Issuance of common stock upon settlement of restricted stock units ("RSUs") |
|
|
|
|
|
$ 50
|
|
|
|
(50)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Stock-based compensation |
779,296
|
|
|
|
|
|
|
|
|
779,296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Net loss |
(520,379)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(520,379)
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period, Shares at Dec. 31, 2021 |
|
|
|
|
|
2,027,474,000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Balance at end of period at Dec. 31, 2021 |
$ 2,291,030
|
|
|
|
|
$ 2,027
|
|
|
|
$ 7,777,085
|
|
|
|
|
|
$ (2,349)
|
$ (5,485,733)
|
|
|
|
|
|
|
|
|
|
|
|