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

const targetIdx = 990820;
const sub = content.substring(targetIdx - 20000, targetIdx);
const pos = sub.lastIndexOf('Omset Hari Ini');
console.log('Found Omset Hari Ini relative position:', pos);
if (pos !== -1) {
  const absolutePos = targetIdx - 20000 + pos;
  console.log('Absolute pos:', absolutePos);
  // print from 1500 chars before Omset Hari Ini
  console.log(content.substring(absolutePos - 1500, absolutePos));
}
