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

const target = `X=z.reduce((acc,Oe)=>{const prof=Je.find(P=>P.name===Oe.profileName&&P.agentId===Oe.agentId)||Je.find(P=>P.name===Oe.profileName&&!P.agentId)||$;return acc+(prof?prof.price:Oe.price||0)},0)`;

let count = 0;
let idx = 0;
while (true) {
    idx = content.indexOf(target, idx);
    if (idx === -1) break;
    count++;
    idx += target.length;
}
console.log("Count of occurrences:", count);
