const e=async(e,t,n)=>{let r=e(`html`).attr(`lang`),i=e(`html`).attr(`dir`)||null,a=!!r,o=!!i;return n({type:`url_htmlLang\\${t}`,status:a?`success`:`error`,data:{successDetails:a?r:void 0,errorsDetails:a?void 0:`Missing html lang attribute`}}),n({type:`url_currentLocale\\${t}`,status:r?`success`:`warning`,data:{successDetails:r,warningsDetails:r?void 0:`No locale detected`}}),n({type:`url_htmlDir\\${t}`,status:o?`success`:`warning`,data:{successDetails:o?i:void 0,warningsDetails:o?void 0:`Missing html dir attribute`}}),{langTag:r,dirTag:i}},t=async(e,t,n)=>{let r=e(`title`).text(),i=e(`meta[name='description']`).attr(`content`)??``,a=e(`meta[property='og:image']`).attr(`content`),o=``;if(a)try{o=new URL(a,t).href}catch{o=a}n({domainData:{title:r,image:o,description:i}})};export{e as checkHtmlAttributes,t as extractPageMetadata};
//# sourceMappingURL=pageChecker.mjs.map