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

const targetIdx = content.indexOf('saas_licenses",r?Me:[]');
if (targetIdx !== -1) {
  // Let's search back 40000 chars for the start of the component
  const startIdx = Math.max(0, targetIdx - 30000);
  const block = content.substring(startIdx, targetIdx);
  // Find any function declarations or arrows
  const lines = block.split('\n');
  console.log("=== Backward Search lines containing function or component name ===");
  // Let's print out the first 1000 characters of the block to see what variables or props are passed
  console.log(content.substring(startIdx, startIdx + 3000));
} else {
  console.log("Not found");
}
