| Commitments and Contingencies (Tables)
 | 9 Months Ended | 
| Sep. 30, 2017 | 
|---|
| Commitments and Contingencies Disclosure [Abstract] |  | 
| Future Minimum Payments Under Operating Leases | 
|  |  
|  |  |  |  |  
|   | Amount |  
|   | (in thousands) |  
| 2017 (3 months) | $ | 563 | 
 |  
| 2018 | 2,833 | 
 |  
| 2019 | 3,544 | 
 |  
| 2020 | 4,026 | 
 |  
| 2021 | 4,120 | 
 |  
| Thereafter | 1,231 | 
 |  
| Total minimum rental income | $ | 16,317 | 
 | 
As of September 30, 2017, future minimum payments under non-cancelable operating leases, inventory purchase and other obligations are as follows:
 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   | Operating Leases |   | Inventory Purchase Obligations |   | Other Obligations |   | Total |  
|   | (in thousands) |  
| 2017 (3 months) | $ | 2,868 | 
 |   | $ | 32,908 | 
 |   | $ | 2,408 | 
 |   | $ | 38,184 | 
 |  
| 2018 | 9,313 | 
 |   | — | 
 |   | 7,526 | 
 |   | 16,839 | 
 |  
| 2019 | 9,282 | 
 |   | — | 
 |   | 7,529 | 
 |   | 16,811 | 
 |  
| 2020 | 9,392 | 
 |   | — | 
 |   | 3,781 | 
 |   | 13,173 | 
 |  
| 2021 | 9,128 | 
 |   | — | 
 |   | 30 | 
 |   | 9,158 | 
 |  
| Thereafter | 5,654 | 
 |   | — | 
 |   | — | 
 |   | 5,654 | 
 |  
| Total minimum payments | $ | 45,637 | 
 |   | $ | 32,908 | 
 |   | $ | 21,274 | 
 |   | $ | 99,819 | 
 |  | 
| Future Minimum Payments Under Other Obligations | 
As of September 30, 2017, future minimum payments under non-cancelable operating leases, inventory purchase and other obligations are as follows:
 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   | Operating Leases |   | Inventory Purchase Obligations |   | Other Obligations |   | Total |  
|   | (in thousands) |  
| 2017 (3 months) | $ | 2,868 | 
 |   | $ | 32,908 | 
 |   | $ | 2,408 | 
 |   | $ | 38,184 | 
 |  
| 2018 | 9,313 | 
 |   | — | 
 |   | 7,526 | 
 |   | 16,839 | 
 |  
| 2019 | 9,282 | 
 |   | — | 
 |   | 7,529 | 
 |   | 16,811 | 
 |  
| 2020 | 9,392 | 
 |   | — | 
 |   | 3,781 | 
 |   | 13,173 | 
 |  
| 2021 | 9,128 | 
 |   | — | 
 |   | 30 | 
 |   | 9,158 | 
 |  
| Thereafter | 5,654 | 
 |   | — | 
 |   | — | 
 |   | 5,654 | 
 |  
| Total minimum payments | $ | 45,637 | 
 |   | $ | 32,908 | 
 |   | $ | 21,274 | 
 |   | $ | 99,819 | 
 |  | 
| Future Minimum Payments Under Inventory Purchase Obligations | 
As of September 30, 2017, future minimum payments under non-cancelable operating leases, inventory purchase and other obligations are as follows:
 
|  |  
|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
|   | Operating Leases |   | Inventory Purchase Obligations |   | Other Obligations |   | Total |  
|   | (in thousands) |  
| 2017 (3 months) | $ | 2,868 | 
 |   | $ | 32,908 | 
 |   | $ | 2,408 | 
 |   | $ | 38,184 | 
 |  
| 2018 | 9,313 | 
 |   | — | 
 |   | 7,526 | 
 |   | 16,839 | 
 |  
| 2019 | 9,282 | 
 |   | — | 
 |   | 7,529 | 
 |   | 16,811 | 
 |  
| 2020 | 9,392 | 
 |   | — | 
 |   | 3,781 | 
 |   | 13,173 | 
 |  
| 2021 | 9,128 | 
 |   | — | 
 |   | 30 | 
 |   | 9,158 | 
 |  
| Thereafter | 5,654 | 
 |   | — | 
 |   | — | 
 |   | 5,654 | 
 |  
| Total minimum payments | $ | 45,637 | 
 |   | $ | 32,908 | 
 |   | $ | 21,274 | 
 |   | $ | 99,819 | 
 |  |