```ts
export function explodeKit(catalog: Record<string, { makes: number; parts: [string, number][] }>, kit: string, want: number): Record<string, number> {
    if (want < 0) throw new Error("want must be a non-negative integer");

    const counts: Record<string, number> = {};
    let currentKit = kit;
    let remainingWant = want;

    while (remainingWant > 0) {
        const recipe = catalog[currentKit];
        if (!recipe) throw new Error(`"${currentKit}" is not a valid kit name`);

        const runsNeeded = Math.ceil(remainingWant / recipe.makes);
        counts[currentKit] += runsNeeded * recipe.makes;

        remainingWant -= runsNeeded * recipe.makes;
        for (const [component, count] of recipe.parts) {
            const totalNeeded = runsNeeded * count;
            if (totalNeeded <= 0) continue;

            if (!counts[component]) counts[component] = 0;
            counts[component] += totalNeeded;

            if (catalog.hasOwnProperty(component)) {
                const componentRecipe = catalog[component];
                for (let i = 0; i < runsNeeded; i++) {
                    let subRunsNeeded = Math.ceil(totalNeeded / componentRecipe.makes);
                    counts[component] -= subRunsNeeded * componentRecipe.makes;
                    totalNeeded -= subRunsNeeded * componentRecipe.makes;
                    currentKit = component;
                }
            } else {
                throw new Error(`"${component}" is not a valid kit name`);
            }
        }

        if (remainingWant > 0) {
            currentKit = kit; // Reset to the original kit if want is still not met
        }
    }

    return counts;
}
```