TikTok preparing a US copy of the app’s core algorithm, sources say