Loan payable | Long-term debt As of March 31, 2019 and December 31, 2018 , long-term debt consisted of the following (in thousands): March 31, 2019 December 31, 2018 Term Loans Term Loan A - 6.9% interest $ — $ 7,619 Term Loan B - 6.9% interest — 7,619 Term Loan C - 7.4% interest — 12,000 Term Loan D - 8.8% interest — 663 Term Loan E - 8.8% interest — 7,098 Term Loan - 8.4% interest 50,000 — Final fee obligation 2,975 3,288 Unamortized issuance costs (5,154 ) (2,245 ) Total debt, net 47,821 36,042 Current portion of long-term debt — — Long-term debt $ 47,821 $ 36,042 Term Loans In January 2015, the Company entered into a Loan and Security Agreement, or the LSA, with Solar Capital Partners (as successor-in-interest to General Electric Capital Corporation), and certain other financial institutions party thereto, as lenders. and certain other financial institutions party thereto, as lenders. Pursuant to the LSA and its subsequent amendments, the Company borrowed $42,762,000 in a series of term loans and had the ability to borrow against a revolving loan in the maximum amount of $5,000,000 . During the term of the LSA, the term loans thereunder accrued interest at a rate equal to ( a) the greater of 1.00% or the three year treasury rate in effect at the time of funding, plus (b) an applicable margin between 4.95% and 5.90% per annum. The Company borrowed al l $42,762,000 under the term loans as provided in the LSA, and the Company did not borrow any of the $5,000,000 available under the revolving loan. On February 1, 2019, or the Effective Date, the Company entered into a new Loan and Security Agreement, or the New LSA, with Solar Capital Ltd. and certain other financial institutions, or, collectively, the Lenders. Pursuant to the New LSA, the Lenders are providing the Company with up to $65,000,000 in a series of term loans, or, collectively, the Term Loans, of which $50,000,000 , or the Tranche 1 Loan, was funded on the Effective Date. An additional $15,000,000 , or the Tranche 2 Loan, is available to be funded at the Company's option, but no later than December 31, 2019 , provided that the Company achieves a designated amount of product revenues on a trailing six-month basis. On the Effective Date, approximately $38,800,000 of the proceeds from the Tranche 1 Loan were used by the Company to repay all outstanding principal, interest, related fees, and other obligations under the LSA, with the remaining borrowings to be used to satisfy the Company's working capital needs and for other general business purposes. The Company accounted for the repayment of its obligations under the LSA as a debt modification. The Company has capitalized the issuance costs it incurred when entering into the New LSA, which are being amortized over the remaining term of the New LSA. The Term Loans will accrue interest at a floating per annum rate in effect from time-to-time equal to (a) the greater of 2.51% or the one-month LIBOR rate then in effect as of the applicable payment date, plus (b) 5.90% per annum . The Company is only required to make interest payments on amounts borrowed pursuant to the Term Loans from the applicable funding date until February 28, 2021 , or the Interest Only Period. If the Company exercises its option to borrow the Tranche 2 Loan and the Company achieves an additional designated amount of product revenues on a trailing six-month basis on or before December 31, 2020 , then the Interest Only Period may, at the Company’s election, be extended for both Term Loans through February 28, 2022 . Following the Interest Only Period (as the same may be extended pursuant to the terms of the New LSA), monthly installments of principal and interest under the Term Loans will be due until the original principal amount and applicable interest is fully repaid by February 1, 2023 , or the Final Maturity Date. Under the New LSA, the Company is required to comply with certain affirmative and negative covenants, including, without limitation, delivering reports and notices relating to the Company’s financial condition and certain regulatory events and intellectual property matters, as well as limiting the creation of liens, the incurrence of indebtedness, and the making of certain investments, dividends, payments and acquisitions, other than as specifically permitted by the New LSA. As of March 31, 2019 , the Company was in compliance with all covenants under the LSA. The New LSA also contains customary events of default (subject, in certain instances, to specified cure periods), including, but not limited to, the failure to make payments of interest or premium when due, the failure to comply with certain covenants and agreements specified in the New LSA, and the occurrence of a material adverse change, certain regulatory events, or certain insolvency events. Upon the occurrence of an event of default, the Lenders may declare all outstanding principal and accrued but unpaid interest under the New LSA immediately due and payable and may exercise the other rights and remedies as set forth in the New LSA. Debt Issuance Costs As of March 31, 2019 and December 31, 2018 , the Company had $5,154,000 and $2,245,000 , respectively, of unamortized debt issuance discount, which is offset against borrowings in long-term and short-term debt. Amortization of debt issuance costs was $366,000 and $290,000 for the three months ended March 31, 2019 and 2018 , respectively. Amortization of debt issuance costs is included in interest expense in the Company's unaudited condensed consolidated statements of comprehensive loss for the periods presented. Letter of Credit In September 2012, the Company provided a $758,000 letter of credit issued by Banc of California to the landlord of its executive office facility in Carlsbad, California. This letter of credit was secured with $758,000 of restricted cash as of March 31, 2019 . |