import{G as z}from"./constants.fe8bda37.js";import{n as k,j as L,a as x,u as H,c as w}from"./index.681f720c.js";import{C as S}from"./Card.9816f16f.js";import{_ as N}from"./Analyze.95edd772.js";import{C as B}from"./Tooltip.418c677c.js";import{u as D}from"./vue-router.ad00dfec.js";import{C as O}from"./Tabs.6e7f902f.js";import{e as M}from"./Caret.202f7c21.js";import{_ as $}from"./iphone-frame.68daa2c8.js";import{g as E}from"./utils.26be7a3a.js";import"./translations.d159963e.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import{g as T,f as A,u as t,o as r,c as h,H as s,l as y,m as a,a as f,K as G,v as q,t as g,b as v,x as I,y as U}from"./runtime-dom.esm-bundler.5d5e6b71.js";import{_ as b}from"./default-i18n.20001971.js";import{S as j}from"./Refresh.f1edec25.js";import{S as K}from"./index.e5bcd650.js";import"./helpers.e8ba8937.js";import"./Slide.a525748d.js";import"./popup.92105c51.js";import"./params.af7ed354.js";import"./SeoSiteScore.6514ce11.js";import"./Blur.4fe4b9a3.js";import"./DonutChart.d528c6ed.js";import"./AnimatedNumber.cc7d07cd.js";import"./numbers.9fc174f3.js";import"./Index.3aa1039e.js";import"./Loading.28c36947.js";import"./Book.a4f504a3.js";import"./Lab.377f83d0.js";import"./ConnectStore.1aaccbd1.js";import"./SetupWizardStore.f030492a.js";import"./ProBadge.aeac9858.js";import"./Information.3b2ed489.js";import"./SchemaStore.3c45ce4c.js";import"./metabox.4ef08012.js";import"./contentHasAssets.394bde62.js";import"./toString.6346a2b4.js";import"./_baseSet.4599153a.js";import"./regex.8a6101c0.js";import"./GoogleSearchPreview.ff5a08b3.js";import"./Url.b0b6e9e3.js";const P={key:0,class:"loading-container"},Q={key:1},F={class:"label"},J={key:2},W={__name:"HomepageAuditTabList",setup(R){const l="all-in-one-seo-pack",e=k(),c=D(),u=T(!1),i=A(()=>{var C;const n=E({error:e.homeResults.score?e.criticalCount("homepage"):0,warning:e.homeResults.score?e.recommendedCount("homepage"):0,good:e.homeResults.score?e.goodCount("homepage"):0}).filter(_=>0<_.analyze.count),o=(C=c==null?void 0:c.query)==null?void 0:C.tab;return o&&n.find(_=>_.slug===o)?e.changeHomepageAuditTab(o):n.length&&e.changeHomepageAuditTab(n[0].slug),n}),m={noResults:b("No results found.",l)};function p(d){u.value||(u.value=!0,e.changeHomepageAuditTab(d),setTimeout(()=>{u.value=!1},50))}return(d,n)=>t(e).analyzing?(r(),h("div",P,[s(t(M),{dark:""})])):(r(),h("div",Q,[i.value.length?(r(),y(t(O),{key:0,tabs:i.value,showSaveButton:!1,active:t(e).homepageAudit.activeTab,internal:"",onChanged:p,"skinny-tabs":""},{"var-tab":a(({tab:o})=>[f("span",{class:G(["icon",o.analyze.classColor])},[(r(),y(q(o.icon)))],2),f("span",F,g(o.label)+" ("+g(o.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):v("",!0),t(e).homeResults.results&&i.value.length?(r(),y(t($),{key:1,section:t(e).homepageAudit.activeTab,"all-results":t(e).homeResults.results,"show-instructions":""},null,8,["section","all-results"])):v("",!0),i.value.length?v("",!0):(r(),h("div",J,[f("span",null,g(m.noResults),1)]))]))}},X=V(W,[["__scopeId","data-v-db3edc20"]]),Y={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],qe={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=k(),c=L(),u=x(),i=H(),m=T(!1),p={completeSeoChecklist:b("Complete SEO Checklist",l),refreshResults:b("Refresh Results",l),cardDescription:b("These are the results our SEO Analzyer has generated after analyzing the homepage of your website.",l)+" "+w.getDocLink(z.learnMore,"seoAnalyzer",!0)},d=A(()=>!c.isUnlicensed||i.aioseo.data.isNetworkLicensed);async function n(){m.value=!0,await e.runSiteAnalyzer({refresh:!0}),m.value=!1}return(o,C)=>{const _=I("base-button");return r(),h("div",Y,[s(t(S),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[s(t(N))]),_:1}),(d.value||t(u).internalOptions.internal.siteAnalysis.connectToken)&&!t(e).analyzeError&&t(e).homeResults.score&&!t(e).analyzing?(r(),y(t(S),{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:a(()=>[f("span",null,g(p.completeSeoChecklist),1),s(t(B),null,{tooltip:a(()=>[f("span",{innerHTML:p.cardDescription},null,8,Z)]),default:a(()=>[s(t(K))]),_:1})]),"header-extra":a(()=>[s(_,{class:"refresh-results",type:"gray",size:"small",onClick:n,loading:m.value},{default:a(()=>[s(t(j)),U(" "+g(p.refreshResults),1)]),_:1},8,["loading"])]),default:a(()=>[s(t(X))]),_:1})):v("",!0)])}}};export{qe as default};
