Debt | 10. Debt Current debt obligations reflected in the condensed consolidated balance sheets as of June 30, 2023 and December 31, 2022 consisted of the following: June 30, December 31, 2023 2022 Current liabilities: Original Term Loans $ 5,036 $ 226,009 Superpriority Term Loans 1,870 — Current portion of long-term debt 6,906 226,009 Unamortized debt issuance costs, current portion ( 557 ) ( 848 ) Current portion of long-term debt, net of unamortized debt issuance costs $ 6,349 $ 225,161 Non-current liabilities: Superpriority Term Loans $ 185,841 $ — Unamortized debt issuance costs, net of current portion ( 13,923 ) — Long-term debt, net of current portion and unamortized debt issuance costs $ 171,918 $ — As of June 30, 2023, aggregate minimum future principal payments of the Company's debt are summarized as follows: Year Ending December 31, Remainder of 2023 $ 5,973 2024 1,861 2025 1,842 2026 1,824 2027 181,247 $ 192,747 On December 20, 2016, the Company entered into a credit agreement (the "Original Credit Agreement") with JPMorgan Chase Bank, N.A., as administrative agent, various lenders, JPMorgan Chase Bank, N.A. and Barclays Bank PLC providing for (i) a term loan facility of $ 300,000 (the “Original Term Loans”), due to mature on December 20, 2023 , and (ii) a revolving credit facility (the "Original Revolving Loan") of up to $ 25,000 in revolving credit loans and letters of credit, which matured on December 20, 2021 . On June 15, 2023 (the “Effective Date”), the Borrower and certain of the Lenders entered into various agreements to effectively exchange $ 218,848 of the Original Term Loans, representing approximately 97.8 % of the then outstanding principal balance, for loans of an equal principal amount having a first priority security interest in all or substantially all of the Company's and its domestic subsidiaries' assets, subject to permitted liens (the “Superpriority Credit Agreement” or “Superpriority Term Loans”), whereby the maturity date would be extended to December 20, 2027 in exchange for the Company paying down $ 40,000 of its exchanged Original Term Loans (as part of an early principal repayment), providing certain Warrants to the Lenders and paying certain in-kind fees, amongst other changes (the “Exchange”), and with $ 5,036 of the Original Term Loans principal remaining outstanding and still due to mature on December 20, 2023 . The Exchange was deemed to be an exchange of debt with substantially different terms under ASC Subtopic 470-50, “Modifications and Extinguishments,” and the Company recorded a loss on extinguishment of debt of approximately $ 28,956 in the condensed consolidated statement of operations for the three months ended June 30, 2023. In applying extinguishment accounting, the Company recorded the Superpriority Term Loans at fair value. Therefore, the current carrying value of the loans approximates fair value as of June 30, 2023. The Superpriority Term Loans bear interest at the Adjusted Term SOFR Rate (as defined in the Superpriority Credit Agreement) (subject to a 2.00 % per annum floor) or Base Rate (as defined in the Superpriority Credit Agreement), as applicable, plus (x) in the case of SOFR Rate Loans (as defined in the Superpriority Credit Agreement), 6.50 % per annum or (y) in the case of Base Rate Loans (as defined in the Superpriority Credit Agreement), 5.50 % per annum, provided that, the foregoing interest rate margin in respect of both SOFR Rate Loans and Base Rate Loans shall be increased (i) by 0.50 % per annum on July 1, 2024 and (ii) by 1.00 % per annum on and after January 1, 2025 (for a total increase of 1.50 % per annum), if, in each case, the outstanding amount of Superpriority Term Loans on such date is in excess of $ 125,000 (with continuing effect from such date regardless of the outstanding amount of Superpriority Term Loans at any time after such date of determination); and any time after June 30, 2025, with respect to Superpriority Term Loans (x) in the case of SOFR Rate Loans, 13.00 % per annum or (y) in the case of Base Rate Loans, 12.00 % per annum. As of June 30, 2023 , the interest rate on the Superpriority Term Loans was 12.22 % per annum. The Superpriority Term Loans are prepayable at par between the closing of the Superpriority Credit Agreement through December 31, 2023; thereafter, the Superpriority Term Loans are prepayable at any time and from time to time, subject to an exit fee increasing over time ranging from 3.0 % to 20.0 % through maturity. In the event the Superpriority Term Loans are accelerated prior to their maturity following any event of default, the maximum exit fee will be payable in connection therewith. The Superpriority Term Loans are expected to mature on December 20, 2027 (subject to a springing maturity of December 20, 2025 if, unless otherwise waived by holders collectively owning or controlling at least 75 % of the Superpriority Term Loans on the date of determination, (x)(1) the Total Net First Lien Leverage Ratio (as defined in the Superpriority Credit Agreement) is greater than 1.00 :1.00, or (2) the Total Net Leverage Ratio (as defined in the Superpriority Credit Agreement) is greater than 1.50 :1.00, in each case, as of September 30, 2025, or (y) a Default (as defined in the Superpriority Credit Agreement) or Event of Default (as defined in the Superpriority Credit Agreement) has occurred and is continuing under the Superpriority Credit Agreement as of December 20, 2025), unless earlier repaid or accelerated. The Superpriority Term Loans will amortize in equal quarterly installments, resulting in an aggregate annual amount equal to 1.0 % of the principal amount of the Superpriority Term Loans outstanding on the date of the Term Loan Exchange (after giving effect to the Closing Date Prepayment). The Superpriority Term Loans are subject to mandatory prepayments, including 75 % of Excess Cash Flow, as defined by the Superpriority Credit Agreement, and the proceeds from certain non-ordinary course asset dispositions, the issuance of certain equity interests by Casa and the incurrence of certain indebtedness by Casa and its subsidiaries. Such prepayments shall be subject to the exit fee described above (to the extent otherwise then applicable). The Superpriority Credit Agreement also allows for the Company to retain up to $ 25,000 of proceeds from issuances of equity or subordinated debt, once the principal balance of the Superpriority Term Loans has been paid down by $ 20,000 . The Superpriority Credit Agreement contains customary representations and warranties, conditions, affirmative and negative covenants, liquidity-based financial covenants, events of default, and indemnification obligations. As of June 30, 2023, the Company was in compliance with the terms of the Superpriority Credit Agreement. As a result of the Exchange, $ 5,036 principal remains outstanding under the Original Term Loans. As a result of the Exchange, the Company, certain lenders party to the Original Credit Agreement and JPMorgan Chase Bank, N.A., as agent, entered into Amendment No. 1 thereto (“Amendment No. 1”) which, among other things, permitted the transaction contemplated by the Exchange and eliminated all mandatory prepayments (other than at maturity) and representations and warranties and most affirmative and negative covenants and events of default previously applicable to the Original Term Loans. The interest rates applicable to the Original Term Loans remain unchanged. Borrowings under the Original Term Loans bear interest at a floating rate, which could be either a synthetic Eurodollar rate plus an applicable margin or, at the Company’s option, a base rate (defined as the highest of (x) the JPMorgan Chase Bank, N.A. prime rate, (y) the federal funds effective rate, plus one-half percent ( 0.50 %) per annum and (z) a one-month Eurodollar rate plus 1.00 % per annum) plus an applicable margin. The applicable margin for borrowings under the Original Term Loans is 4.00 % per annum for Eurodollar rate loans (subject to a 1.00 % per annum interest rate floor) and 3.00 % per annum for base rate loans. The interest rate payable under the Original Term Loans is subject to an increase of 2.00 % per annum during the continuance of any payment default. For Eurodollar rate loans, the Company may select interest periods of one, three or six months or, with the consent of all relevant affected lenders, twelve months. Interest is payable at the end of the selected interest period, but no less frequently than every three months within the selected interest period. Interest on any base rate loan is not set for any specified period and is payable quarterly. The Company has the right to convert Eurodollar rate loans into base rate loans and the right to convert base rate loans into Eurodollar rate loans at its option, subject, in the case of Eurodollar rate loans, to breakage costs if the conversion was effected prior to the end of the applicable interest period. As of June 30, 2023 and December 31, 2022 , the interest rate on the Original Term Loans was 9.65 % and 8.38 % per annum, respectively, which was based on a three-month and one-month Eurodollar rate of 5.65 % and 4.38 % per annum plus the applicable margin of 4.00 % per annum for Eurodollar rate loans. Upon entering into the Original Term Loans, the Company incurred debt issuance costs of $ 7,811 , which were initially recorded as a reduction of the debt liability and were amortized to interest expense using the effective interest method from the issuance date of the Original Term Loans until the Effective Date. Upon entering into the Superpriority Term Loan, the remaining $ 509 of debt issuance costs from the Original Term Loans was included in the loss on extinguishment of debt in the condensed consolidated statement of operations. The Company also incurred additional debt issuance costs of $ 13,279 upon entering into the Superpriority Term Loan, which were recorded as a reduction of the debt liability and will be amortized to interest expense using the effective interest method from the issuance date of the Superpriority Term Loan until the maturity date. The Company made principal payments of $ 40,751 and $ 1,500 during the six months ended June 30, 2023 and 2022 , respectively, in addition to the repurchase as discussed below. Interest expense, including the amortization of debt issuance costs, totaled $ 6,046 and $ 3,797 for the three months ended June 30, 2023 and 2022 , respectively, and totaled $ 10,955 and $ 7,574 for the six months ended June 30, 2023 and 2022, respectively. On October 27, 2022, the Company's board of directors authorized the use of up to $ 50,000 of cash to fund the partial repurchase of debt outstanding under the Original Term Loans. Subsequent to this authorization and prior to the Superiority Term Loan refinancing on June 15, 2023, the Company repurchased a portion of its outstanding Original Term Loans from certain of its debt holders. During the six months ended June 30, 2023 but prior to the June 15, 2023 refinancing, the Company made a payment of $ 1,237 to retire $ 1,375 of its outstanding debt. The Company recognized a gain on extinguishment of debt, net of fees, of $ 133 , and also recognized $ 4 of interest expense for the pro-rata portion of unamortized debt issuance costs attributed to the debt repurchased. Total payments made under this authorization from October 27, 2022 through June 30, 2023 amounted to $ 47,116 , which were paid using funds included in cash and cash equivalents in the condensed consolidated balance sheets. Based on the applicable fair value of debt repurchased, the amount of outstanding principal of the Original Term Loans that was retired was $ 50,591 . The Original Term Loans, with a remaining principal balance of $ 5,036 as of June 30, 2023 , are scheduled to mature on December 20, 2023 and is subject to amortization in equal quarterly installments, which commenced on March 31, 2017, in an annual aggregate amount equal to 1.0 % of the original principal amount of the Original Term Loans of $ 300,000 , with any remaining outstanding balance payable at the original date of maturity on December 20, 2023. Voluntary prepayments of principal amounts outstanding under the Original Term Loans are permitted at any time; however, if a prepayment of principal is made with respect to a Eurodollar loan on a date other than the last day of the applicable interest period, the Company is required to compensate the lenders thereunder for any funding losses and expenses incurred as a result of the prepayment. The Original Term Loans, which are now subordinated to the Superpriority Term Loans, is secured by, among other things, a second priority security interest, subject to permitted liens, in substantially all of the Company’s assets and a pledge of certain of the stock of certain of its subsidiaries, in each case subject to specified exceptions. The Company was in compliance with all the terms of the Original Credit Agreement June 30, 2023 and December 31, 2022 . |