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 pos = targetIdx;
  // Let's search backward for 'function' or '=>'
  const startIdx = Math.max(0, targetIdx - 20000);
  const block = content.substring(startIdx, targetIdx);
  
  // Find occurrences of arrow functions or standard functions
  const arrowIdx = block.lastIndexOf('=>');
  const funcIdx = block.lastIndexOf('function');
  
  console.log("arrowIdx backward offset:", arrowIdx);
  console.log("funcIdx backward offset:", funcIdx);
  
  // Let's print the last 2000 characters to see the variables
  console.log("=== Last 2000 characters before target ===");
  console.log(block.substring(block.length - 2000));
} else {
  console.log("saas_licenses not found");
}
