Unaudited Interim Condensed Consolidated Statements of Cash Flows - USD ($)
$ in Thousands
9 Months Ended 12 Months Ended
Sep. 30, 2021
Sep. 30, 2020
Dec. 31, 2020
Dec. 31, 2019
Dec. 31, 2018
Cash flow from operating activities          
Net income and comprehensive income $ 89,574 $ 59,958 $ 62,999 $ 53,094 $ 10,893
Adjustments to reconcile net income and comprehensive income to net cash provided by operating activities:          
Depreciation and amortization 19,829 8,612 12,600 5,079 1,138
Depreciation and amortization included in cost of goods sold 14,396 7,424 11,542 7,992 1,968
Non-cash interest expense 2,313 2,142 2,889 849  
Loss from Sale of Property and Equipment (5) 63 63 67 46
Amortization of operating lease right of use assets 3,216 2,383 6,045 2,733  
Share-based compensation 2,217 2,208 2,765   15,020
Accretion of construction finance liability 1,097 617      
Loss on fair value of warrants   12,782 42,679 806  
Deferred income tax expense (2,111) (2,324) (4,887) (908) (546)
Changes in operating assets and liabilities:          
Inventories (33,796) (11,687) (22,534) (54,481) (18,751)
Accounts receivable (8,179)   1,109    
Prepaid expenses and other current assets (9,412) (6,915) (11,670) (5,224) (2,271)
Other assets (4,509) (5,790) (2,517) 147 (1,096)
Income tax payable / receivable (12,745) 1,911 (2,452) (6,735) 13,926
Accounts payable and accrued liabilities 17,853 1,303 1,002 13,587 1,056
Operating lease liabilities (1,906) (2,054) (4,764) (2,825)  
Deferred revenue (3,096) 2,207 4,774 977 1,412
Other long-term liabilities 344     3,915 723
Net cash provided by operating activities 75,080 72,840 99,643 19,073 23,517
Cash flow from investing activities          
Purchases of property and equipment (190,907) (61,359) (99,941) (71,834) (42,561)
Purchases of property and equipment related to construction finance liability (8,877) (27,381)      
Purchases of Property and Equipment from Construction     (41,116) (2,571)  
Cash paid for internal use software (3,587)   (887)    
Acquisitions, net of cash acquired (29,924)   (27,923) (19,825) (7,644)
Capitalized interest (4,355) (2,090) (4,803) (471) (980)
Proceeds from Sale of Property and Equipment 8 16 16 29 129
Net cash used in investing activities (237,642) (90,814) (174,654) (94,673) (51,055)
Cash flow from financing activities          
Proceeds from Issuance of Notes Payable         6,040
Proceeds from Issuance of Notes Payable—Related Party         11,357
Proceeds from Debt Financings, Net of Discounts and Accrued Interest       122,215  
Proceeds from share warrant exercise 7,672 11,459 11,459 964 1,289
Proceeds from construction finance liability 8,877 28,582 41,116 23,071  
Payments on Construction Finance Liability     (4,951) (115)  
Payments on Issuance of Shares for Reverse Transaction         (460)
Payments on Notes Payable         (6,000)
Proceeds from shares issued pursuant to private placement 217,896 83,228 83,228   47,467
Payments on finance lease obligations (4,024) (2,824)   (1,633) (454)
Payments on notes payable - related party (11) (907) (941) (1,520) (8,677)
Payments for taxes related to net share settlement of equity awards (987)        
Net cash provided by financing activities 229,423 119,538 129,911 142,982 50,561
Net increase in cash and cash equivalents 66,861 101,564 54,900 67,383 23,023
Cash and cash equivalents, beginning of period 146,713 91,813 91,813 24,430 1,407
Cash and cash equivalents, end of period 213,574 193,377 146,713 91,813 24,430
Supplemental disclosure of cash flow information          
Interest 22,653 12,798 22,135 7,417 2,948
Income taxes 120,365 70,996 105,248 43,658 8,195
Other noncash investing and financing activities          
Shares Issued for PurePenn and Solevo Acquisition 57,452   37,000    
Shares Reserved for PurePenn and Solevo Acquisition     65,000    
Purchase of Property and Equipment Financed with Notes Payable - Related Party       257 3,095
Adjustment to PurePenn, LLC and Keystone Relief Centers, LLC contingent consideration 2,800        
ASC 842 lease additions - operating and finance leases 43,748 23,096      
Shares issued for acquisitions 57,452   37,000    
Purchase of property and equipment financed with accounts payable $ 16,148 $ 7,167 13,613 6,516 4,697
Property and Equipment Acquired via Finance Leases     $ 24,165 19,883 1,406
Transfer of Shares Treated as a Debt Discount         200
Debt Discount related to Below Market Interest Debt       $ 10 $ 46