const e=async(e,t)=>{let n=[],r=!1,i=null,a=!0;try{let o=`${e}/robots.txt`,s=await fetch(o,{method:`GET`,headers:{"User-Agent":`Mozilla/5.0 (compatible; SEO-Audit-Bot/1.0)`}});if(s.ok){if(r=!0,i=await s.text(),i&&t.size>0){let e=[],r=i.split(`
`);for(let t of r){let n=t.trim().toLowerCase();if(n.startsWith(`disallow:`)){let t=n.substring(9).trim();e.push(t)}}for(let r of t)for(let t of e)(t===`/${r}`||t===`/${r}/`)&&(a=!1,n.push(`Locale path "${r}" appears to be blocked in robots.txt: ${t}`))}}else n.push(`robots.txt not found (HTTP ${s.status})`)}catch(e){n.push(`Failed to fetch robots.txt: ${e instanceof Error?e.message:`Unknown error`}`)}return{robotsPresent:r,robotsContent:i,noLocalizedUrlsForgotten:a,errors:n}};export{e as analyzeRobots};
//# sourceMappingURL=analyzeRobots.mjs.map