["sociallinkscraper.com","demo.sociallinkscraper.com","app.sociallinkscraper.com"].includes(window.location.hostname)?(window.addEventListener("message",(e=>{if(e.source!==window||"EXT_SCRAPER_MESSAGE"!==e.data.type)return;const{tool:o,url:a,queue:t,query:r,page:s,sourceDomain:n}=e.data,i={tool:o};switch(o){case"socialLinkExtractor":i.searchUrl=a;break;case"scrapeLocalServices":i.query=r,i.page=s,i.sourceDomain=n;break;default:i.url=a}chrome.runtime.sendMessage(i,(e=>{const n={type:"EXT_SCRAPER_RESPONSE",queue:t,originalUrl:a};if("captcha"===e.error)return n.error="captcha",n.searchUrl=e.searchUrl,void window.postMessage(n,"*");switch(o){case"findEmails":n.emails=e.emails;break;case"scrapeLocalServices":n.query=r,n.data=e.data||e,n.page=s,void 0!==e.total&&(n.total=e.total);break;case"decisionMaker":n.data=e;break;default:Object.assign(n,e)}window.postMessage(n,"*")}))})),chrome.runtime.onMessage.addListener(((e,o,a)=>{"scrapeLocalServices"===e.action&&a({data:function(){const e="demo.sociallinkscraper.com"===window.location.hostname,o=document.querySelectorAll("div[jscontroller='xkZ6Lb']"),a=/^[+()?\d\s-]+$/;let t=[];if(o.forEach((e=>{if(e.querySelector("span.uDmIZc"))return;const o=e.querySelector("div.rgnuSb.xYjf2e"),r=o?o.innerText.trim():"N/A";let s="N/A";const n=e.querySelector('span[jsname="V67aGc"].VfPpkd-vQzf8d');if(n){const e=n.closest("a");e&&e.href&&!e.href.includes("maps.google.com")&&(s=e.href.trim())}let i="N/A",c="N/A",d="N/A",l=!1,m=!1,u=!1;e.querySelectorAll("span.hGz87c").forEach((e=>{const o=e.innerText.trim(),t=o.toLowerCase();t.includes("closed")||t.includes("open")||(!l&&a.test(o)?(i=o,l=!0):m?u||(d=o,u=!0):(c=o,m=!0))}));let p="N/A";const g=e.querySelector("div.leIgTe");g&&(p=g.innerText.replace(/[()]/g,"").trim());const h=e.querySelector("div.rGaJuf"),w=h?h.innerText.trim():"N/A";t.push({name:r,phone:i,category:c,address:d,website:s,reviews:p,rating:w,page:1,keyword:query||"N/A"})})),e){const e=Math.min(t.length,40);let o=t.slice(0,e);const a=40-o.length;for(let e=0;e<a;e++)o.push({name:"Hidden (Demo)",phone:"Hidden (Demo)",category:"Hidden (Demo)",address:"Hidden (Demo)",website:"Hidden (Demo)",reviews:"Hidden (Demo)",rating:"Hidden (Demo)",page:"-",keyword:"Hidden (Demo)",dummy:!0});t=o}return t}()})}))):console.warn("Content script loaded on disallowed host:",window.location.hostname);