const fs = require('fs');
const content = fs.readFileSync('./dist/assets/index-D9sWWWv_.js', 'utf8');

// Find where [k, O] or equivalent is defined.
// Let's search for "useState" and find the state that corresponds to the vouchers.
// We know that "O" is the setter for vouchers (since O(Ct=>[...D,...Ct]) in onSubmit for Admin generate adds vouchers).
// Let's search for occurrences of ",O]=C.useState(" or "O]=useState(".
const index = content.indexOf(",O]=C.useState(");
if (index !== -1) {
    console.log("Found ,O]=C.useState( at:", index);
    console.log(content.substring(index - 500, index + 500));
} else {
    // Let's search for O]=C.useState
    const index2 = content.indexOf("O]=C.useState");
    if (index2 !== -1) {
        console.log("Found O]=C.useState at:", index2);
        console.log(content.substring(index2 - 500, index2 + 500));
    } else {
        console.log("Not found");
    }
}
