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

const targets = [
  // Target 1: Gunakan Mode Simulasi (Bypass)
  `!dc.success&&a.jsxs("button",{onClick:()=>{const p=dc.id;S(b=>b.map(N=>N.id===p?{...N,pass:"********",status:"online",cpu_usage:12,uptime:"15d 4h 32m",model:"RB750Gr3-Simulasi",ros_version:"v7.12",client_pppoe:48,client_hotspot:36,client_count:84,description:N.description||"MikroTik Router (Simulasi Sukses)"}:N)),Ho({id:p,msg:"Mode Simulasi Diaktifkan! Router disimulasikan sukses terhubung. Seluruh fitur dashboard kini dapat digunakan.",success:!0})},className:"px-2.5 py-1 bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg text-[10px] font-bold transition-colors cursor-pointer flex items-center gap-1 shadow",children:[a.jsx(Ks,{className:"w-3 h-3"})," Gunakan Mode Simulasi (Bypass)"]})`,

  // Target 2: Payment Modal header
  `a.jsx("p",{className:"text-[10px] text-gray-500",children:"Simulasi Transaksi Realtime"})`,

  // Target 3: Payment Modal "Simulasi Bayar Sukses" button
  `a.jsxs("button",{onClick:p,className:"flex-1 py-3 px-4 bg-emerald-600 hover:bg-emerald-500 active:bg-emerald-700 text-white font-bold rounded-xl text-xs transition-all flex items-center justify-center gap-1 cursor-pointer",children:[a.jsx(Ks,{className:"w-4 h-4"}),"Simulasi Bayar Sukses"]})`
];

targets.forEach((target, i) => {
  const occurrences = [];
  let idx = 0;
  while ((idx = content.indexOf(target, idx)) !== -1) {
    occurrences.push(idx);
    idx += target.length;
  }
  console.log(`Target ${i + 1}: found ${occurrences.length} times`);
  if (occurrences.length > 0) {
    console.log("Found at offsets:", occurrences);
  } else {
    // Let's print a subset of target to find if there are minor whitespace differences
    const approx = target.substring(0, 100);
    let approxIdx = content.indexOf(approx);
    console.log(`Approx match index for prefix "${approx}":`, approxIdx);
    if (approxIdx !== -1) {
      console.log("Snippet around approx match:");
      console.log(content.substring(approxIdx, approxIdx + target.length + 50));
    }
  }
  console.log('==================================================');
});
