Condensed Statements of Convertible Preferred Stock and Shareholders' Deficit - USD ($) $ in Thousands | Total | Convertible Preferred Stock | Common Stock | Additional Paid In Capital | Accumulated Other Comprehensive (loss) Income | Accumulated Deficit |
Beginning Balance at Dec. 31, 2017 | $ (224,616) | | $ 1 | $ 24,972 | $ (166) | $ (249,423) |
Beginning Balance, Shares at Dec. 31, 2017 | | | 12,208,731 | | | |
Convertible preferred stock, Beginning Balance at Dec. 31, 2017 | | $ 561,333 | | | | |
Convertible preferred stock, Beginning Balance, Shares at Dec. 31, 2017 | | 92,656,029 | | | | |
Adjustments to accumulated deficit for adoption of guidance on accounting for share-based payment transactions (unaudited) | | | | 140 | | (140) |
Issuance of common stock for cash upon exercise of stock options (unaudited) | 823 | | | 823 | | |
Issuance of common stock for cash upon exercise of stock options (unaudited), Shares | | | 338,113 | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited) | | $ 100 | | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited), Shares | | 134,065 | | | | |
Vested Series E-1 convertible preferred stock option forfeitures (unaudited) | 767 | | | 476 | | 291 |
Vested Series E-1 convertible preferred stock option forfeitures (unaudited) | | $ (767) | | | | |
Series E-1 convertible preferred stock option share-based compensation (unaudited) | 3 | | | 3 | | |
Adjustment to redemption value for vested Series E-1 convertible preferred stock options (unaudited) | (3) | | | (3) | | |
Adjustment to redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | 3 | | | | |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | 2 | | | | | 2 |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | (2) | | | | |
Common stock option share-based compensation (unaudited) | 5,547 | | | 5,547 | | |
Other comprehensive income (unaudited) | (74) | | | | (74) | |
Net loss | (24,884) | | | | | (24,884) |
Convertible preferred stock, Ending Balance at Jun. 30, 2018 | | $ 560,667 | | | | |
Convertible preferred stock, Ending Balance, Shares at Jun. 30, 2018 | | 92,790,094 | | | | |
Ending Balance at Jun. 30, 2018 | (242,435) | | $ 1 | 31,958 | (240) | (274,154) |
Ending Balance, Shares at Jun. 30, 2018 | | | 12,546,844 | | | |
Beginning Balance at Mar. 31, 2018 | (233,612) | | $ 1 | 28,620 | (283) | (261,950) |
Beginning Balance, Shares at Mar. 31, 2018 | | | 12,301,844 | | | |
Convertible preferred stock, Beginning Balance at Mar. 31, 2018 | | $ 561,396 | | | | |
Convertible preferred stock, Beginning Balance, Shares at Mar. 31, 2018 | | 92,745,734 | | | | |
Issuance of common stock for cash upon exercise of stock options (unaudited) | 415 | | | 415 | | |
Issuance of common stock for cash upon exercise of stock options (unaudited), Shares | | | 245,000 | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited) | | $ 35 | | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited), Shares | | 44,360 | | | | |
Vested Series E-1 convertible preferred stock option forfeitures (unaudited) | 767 | | | 476 | | 291 |
Vested Series E-1 convertible preferred stock option forfeitures (unaudited) | | $ (767) | | | | |
Series E-1 convertible preferred stock option share-based compensation (unaudited) | 1 | | | 1 | | |
Adjustment to redemption value for vested Series E-1 convertible preferred stock options (unaudited) | (1) | | | (1) | | |
Adjustment to redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | 1 | | | | |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | (2) | | | | | (2) |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | 2 | | | | |
Common stock option share-based compensation (unaudited) | 2,447 | | | 2,447 | | |
Other comprehensive income (unaudited) | 43 | | | | 43 | |
Net loss | (12,493) | | | | | (12,493) |
Convertible preferred stock, Ending Balance at Jun. 30, 2018 | | $ 560,667 | | | | |
Convertible preferred stock, Ending Balance, Shares at Jun. 30, 2018 | | 92,790,094 | | | | |
Ending Balance at Jun. 30, 2018 | (242,435) | | $ 1 | 31,958 | (240) | (274,154) |
Ending Balance, Shares at Jun. 30, 2018 | | | 12,546,844 | | | |
Beginning Balance at Dec. 31, 2018 | (258,112) | | $ 1 | 37,902 | (107) | (295,908) |
Beginning Balance, Shares at Dec. 31, 2018 | | | 12,841,536 | | | |
Convertible preferred stock, Beginning Balance at Dec. 31, 2018 | $ 560,858 | $ 560,858 | | | | |
Convertible preferred stock, Beginning Balance, Shares at Dec. 31, 2018 | 92,790,094 | 92,790,094 | | | | |
Issuance of common stock for cash upon exercise of stock options (unaudited) | $ 1,880 | | | 1,880 | | |
Issuance of common stock for cash upon exercise of stock options (unaudited), Shares | | | 883,845 | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited) | | $ 109 | | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited), Shares | | 249,643 | | | | |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | (964) | | | | | (964) |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | $ 964 | | | | |
Common stock option share-based compensation (unaudited) | 6,378 | | | 6,378 | | |
Other comprehensive income (unaudited) | 489 | | | | 489 | |
Net loss | (34,045) | | | | | (34,045) |
Convertible preferred stock, Ending Balance at Jun. 30, 2019 | $ 561,931 | $ 561,931 | | | | |
Convertible preferred stock, Ending Balance, Shares at Jun. 30, 2019 | 93,039,737 | 93,039,737 | | | | |
Ending Balance at Jun. 30, 2019 | $ (284,374) | | $ 1 | 46,160 | 382 | (330,917) |
Ending Balance, Shares at Jun. 30, 2019 | | | 13,725,381 | | | |
Beginning Balance at Mar. 31, 2019 | (273,474) | | $ 1 | 40,981 | 92 | (314,548) |
Beginning Balance, Shares at Mar. 31, 2019 | | | 12,930,536 | | | |
Convertible preferred stock, Beginning Balance at Mar. 31, 2019 | | $ 561,210 | | | | |
Convertible preferred stock, Beginning Balance, Shares at Mar. 31, 2019 | | 93,023,694 | | | | |
Issuance of common stock for cash upon exercise of stock options (unaudited) | 1,847 | | | 1,847 | | |
Issuance of common stock for cash upon exercise of stock options (unaudited), Shares | | | 794,845 | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited) | | $ 11 | | | | |
Issuance of Series E-1 convertible preferred stock for cash upon exercise of Series E-1 convertible preferred stock options at fair value (unaudited), Shares | | 16,043 | | | | |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | (710) | | | | | (710) |
Change in redemption value for vested Series E-1 convertible preferred stock options (unaudited) | | $ 710 | | | | |
Common stock option share-based compensation (unaudited) | 3,332 | | | 3,332 | | |
Other comprehensive income (unaudited) | 290 | | | | 290 | |
Net loss | (15,659) | | | | | (15,659) |
Convertible preferred stock, Ending Balance at Jun. 30, 2019 | $ 561,931 | $ 561,931 | | | | |
Convertible preferred stock, Ending Balance, Shares at Jun. 30, 2019 | 93,039,737 | 93,039,737 | | | | |
Ending Balance at Jun. 30, 2019 | $ (284,374) | | $ 1 | $ 46,160 | $ 382 | $ (330,917) |
Ending Balance, Shares at Jun. 30, 2019 | | | 13,725,381 | | | |