| Schedule of changes in Accumulated other comprehensive (loss) income | The following table shows the changes in Accumulated other comprehensive (loss) income (in thousands): 
|  |  |  |  |  |  |  |  |  |  |  
|  |  | Accumulated |  | Accumulated |  |  | Total |  
|  |  | foreign |  | unrealized |  |  | accumulated |  
|  |  | currency |  | gains (losses) on |  |  | other |  
|  |      | translation  |      | available-for-sale |  |  | comprehensive |  
|  |  | adjustments |  | debt securities |  |  | (loss) income |  
|  |  |  |  |  |  |  |  |  |  |  
| Balance at January 1, 2021 |   | $ |  (10,158) |  | $ |  110 |  | $ |  (10,048) |  
| Foreign currency translation adjustments |  |  |  (3,001) |  |  |  — |  |  |  (3,001) |  
| Foreign currency gains on intercompany loan of a long-term investment nature, net of tax of $0 |  |  |  3,048 |  |  |  — |  |  |  3,048 |  
| Unrealized holding losses on available-for-sale debt securities, net of tax of $0 |  |  |  — |  |  |  (223) |  |  |  (223) |  
| Balance at March 31, 2021 |  |  |  (10,111) |  |  |  (113) |  |  |  (10,224) |  
| Foreign currency translation adjustments |  |  |  (4,177) |  |  |  — |  |  |  (4,177) |  
| Foreign currency gains on intercompany loan of a long-term investment nature, net of tax of $0 |  |  |  3,911 |  |  |  — |  |  |  3,911 |  
| Unrealized holding gains on available-for-sale debt securities, net of tax of $0 |  |  |  — |  |  |  105 |  |  |  105 |  
| Balance at June 30, 2021 |  | $ |  (10,377) |  | $ |  (8) |  | $ |  (10,385) |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | Accumulated |  | Accumulated |  | Total |  
|  |  | foreign |  | unrealized |  | accumulated |  
|  |  | currency |  |  gains (losses) on |  | other |  
|  |      | translation  |      | available-for-sale |  | comprehensive |  
|  |  | adjustments |  | debt securities |  | (loss) income |  
|  |  |  |  |  |  |  |  |  |  |  
| Balance at January 1, 2020 |   | $ |  (7,302) |  | $ |  38 |  | $ |  (7,264) |  
| Foreign currency translation adjustments |  |  |  17,911 |  |  |  — |  |  |  17,911 |  
| Foreign currency losses on intercompany loan of a long-term investment nature, net of tax of $0 |  |  |  (19,651) |  |  |  — |  |  |  (19,651) |  
| Unrealized holding losses on available-for-sale debt securities, net of tax of $0 |  |  |  — |  |  |  (586) |  |  |  (586) |  
| Balance at March 31, 2020 |  |  |  (9,042) |  |  |  (548) |  |  |  (9,590) |  
| Foreign currency translation adjustments |  |  |  1,194 |  |  |  — |  |  |  1,194 |  
| Foreign currency losses on intercompany loan of a long-term investment nature, net of tax of $0 |  |  |  (1,108) |  |  |  — |  |  |  (1,108) |  
| Unrealized holding gains on available-for-sale debt securities, net of tax of $0 |  |  |  — |  |  |  699 |  |  |  699 |  
| Balance at June 30, 2020 |  | $ |  (8,956) |  | $ |  151 |  | $ |  (8,805) |  |