Income Taxes - Deferred Tax Assets And Liabilities (Details) - USD ($)
$ in Thousands
Dec. 31, 2018
Dec. 31, 2017
Significant components of the Company's deferred tax assets and liabilities    
Intangible assets $ 1,146 $ 1,698
Deferred revenue 9,304 8,083
Interest expense 5,239  
Other reserves and accruals 592 850
Tax credit carryforwards 3,065 2,682
Amortization of stock-based compensation 8,442 6,904
Non-Compensatory Warrants 3,597 4,555
Capitalized research & development expenditures 23,410 19,162
Net operating loss carryforwards 58,364 48,078
Total deferred tax asset 113,159 92,012
Valuation allowance (100,493) (89,758)
Net deferred tax assets 12,666 2,254
Intangible assets (37) (76)
Convertible debt (9,217)  
Property, plant and equipment and right of use assets (3,392) (1,969)
Section 382 recognized built in loss 0 (209)
Deferred tax liability (12,666) (2,254)
U.S.    
Significant components of the Company's deferred tax assets and liabilities    
Deferred revenue 9,304 8,083
Interest expense 5,239  
Other reserves and accruals 592 850
Tax credit carryforwards 1,865 1,378
Amortization of stock-based compensation 8,442 6,904
Non-Compensatory Warrants 3,597 4,555
Capitalized research & development expenditures 19,116 14,496
Net operating loss carryforwards 49,058 39,437
Total deferred tax asset 97,213 75,703
Valuation allowance (84,567) (73,564)
Net deferred tax assets 12,646 2,139
Intangible assets (37) (76)
Convertible debt (9,217)  
Property, plant and equipment and right of use assets (3,392) (1,854)
Section 382 recognized built in loss   (209)
Deferred tax liability (12,646) (2,139)
Foreign    
Significant components of the Company's deferred tax assets and liabilities    
Intangible assets 1,146 1,698
Tax credit carryforwards 1,200 1,304
Capitalized research & development expenditures 4,294 4,666
Net operating loss carryforwards 9,306 8,641
Total deferred tax asset 15,946 16,309
Valuation allowance (15,926) (16,194)
Net deferred tax assets 20 115
Property, plant and equipment and right of use assets   (115)
Deferred tax liability $ (20) $ (115)