function generateClickRef() {
  const ts = Math.floor(Date.now() / 1e3).toString(16);
  const rand = Math.random().toString(36).substring(2, 8);
  return `sp_${ts}_${rand}`;
}
function hashIP(ip) {
  let hash = 0;
  for (let i = 0; i < ip.length; i++) {
    const char = ip.charCodeAt(i);
    hash = (hash << 5) - hash + char;
    hash |= 0;
  }
  return hash.toString(16);
}

export { generateClickRef as g, hashIP as h };
