OwlCyberSecurity - MANAGER
Edit File: Main.LMh4VQbw.js
import{a as L,g as k,f as M,D as m}from"./links.Ce9S4kjc.js";import{l as f}from"./license.4lyTI3li.js";import{G as R}from"./GoogleSearchConsole.D8YwhXgf.js";import{C as v,_ as A}from"./Caret.BthVBOwE.js";import{_ as S}from"./_plugin-vue_export-helper.BN1snXvA.js";import{v as h,o as a,k as r,l as n,a as _,t as u,b as c,c as d,B as y,C as p,q as D,F as O}from"./runtime-dom.esm-bundler.tPRhSV4q.js";import{B as U}from"./DatePicker.XUt7yief.js";import{C as G}from"./Blur.CvHKqkVq.js";import{C as J}from"./Index.CuJTco3t.js";import P from"./ContentRankings.DHy7OFPn.js";import{C as F}from"./Index.Dq9-2wXY.js";import N from"./Dashboard.BTKeHlbi.js";import V from"./KeywordRankings.-kpIJIjY.js";import z from"./SeoStatistics.Pd8Qf-0l.js";import"./default-i18n.DXRQgkn2.js";import"./helpers.CXsRrhc8.js";import"./upperFirst.yVnsg4QL.js";import"./_stringToArray.DnK4tKcY.js";import"./toString.zLSwYOtv.js";import"./Calendar.CIqx63em.js";import"./pick.E0dwuk96.js";import"./_baseSet.rYV3oc6X.js";import"./_getTag.BWQxgJie.js";import"./debounce.CMPzYXJX.js";import"./toNumber.BAPajc32.js";import"./_baseTrim.BYZhh0MR.js";import"./isEqual.DkU1ezAe.js";import"./_baseIsEqual.MNbeg0L2.js";import"./allowed.CMMScaL-.js";/* empty css */import"./params.B3T1WKlC.js";import"./Ellipse.Bp5Bh3uu.js";import"./Header.BO9_DOpi.js";import"./addons.DW40jBC1.js";import"./ScrollAndHighlight.BHk77_UZ.js";import"./LogoGear.BbumEdXr.js";import"./AnimatedNumber.DeYVxHDv.js";import"./numbers.BT5e8rgb.js";import"./Logo.bX-u9KVJ.js";import"./index.B6JTtDta.js";import"./Support.DcbjlfoT.js";import"./Tabs.B_xDIDmi.js";import"./TruSeoScore.DmC22Awy.js";import"./ProBadge.CVd2ImKm.js";import"./Information.Bv8uKEyF.js";import"./Slide.fjAuzpC8.js";import"./Url.C2Kwu4F0.js";import"./Date.POMBhYKD.js";import"./constants.CPpKID74.js";import"./Exclamation.DGJubTNT.js";import"./Gear.DwDaVskn.js";import"./Row.DRnp1mVs.js";import"./PostsTable.DLGoehKd.js";import"./WpTable.aGv2G4lv.js";import"./ScoreButton.BV7psxHV.js";import"./Table.vI2Sprsc.js";import"./Tooltip.DhkkBQWW.js";import"./LicenseConditions.DhdYCq3P.js";import"./_baseClone.DejpcsWN.js";import"./_arrayEach.Fgt6pfHj.js";import"./IndexStatus.BjMK9kJ5.js";import"./CheckSolid.CDvG9IOI.js";import"./Mobile.CAgFd5PM.js";import"./Checkmark.DOG99yeO.js";import"./ExclamationSolid.BrF8E3jp.js";import"./Link.tEuvygox.js";import"./PostTypes.Cef6XkQ_.js";import"./RequiredPlans.DXcIqsat.js";import"./Card.CfeVpmnZ.js";import"./Overview.Cn-UCoXN.js";import"./DonutChartWithLegend.B20yT2Df.js";import"./KeywordsGraph.CBzX1-Xj.js";import"./SeoStatisticsOverview.WnRc2YxT.js";import"./List.BD2nBGnT.js";import"./Statistics.CLG-MarI.js";const I={setup(){return{optionsStore:L(),searchStatisticsStore:k()}},components:{CoreAlert:v},data(){return{error:this.$t.__("Your connection with Google Search Console has expired or is invalid. Please check that your site is verified in Google Search Console and try to reconnect. If the problem persists, please contact our support team.",this.$td)}},computed:{invalidAuthentication(){var t,e;return this.searchStatisticsStore.unverifiedSite||typeof((e=(t=this.optionsStore.internalOptions.internal)==null?void 0:t.searchStatistics)==null?void 0:e.profile)!="object"}}};function E(t,e,o,l,i,s){const g=h("core-alert");return s.invalidAuthentication?(a(),r(g,{key:0,class:"aioseo-input-error aioseo-search-statistics-authentication-alert",type:"red"},{default:n(()=>[_("strong",null,u(i.error),1)]),_:1})):c("",!0)}const q=S(I,[["render",E]]),H={};function j(t,e){return a(),d("div")}const K=S(H,[["render",j]]),Y={};function Z(t,e){return a(),d("div")}const Q=S(Y,[["render",Z]]),W={setup(){return{licenseStore:M(),searchStatisticsStore:k()}},emits:["rolling"],components:{AuthenticationAlert:q,BaseButton:A,BaseDatePicker:U,CoreAlert:v,CoreBlur:G,CoreMain:J,ContentRankings:P,Cta:F,Dashboard:N,KeywordRankings:V,PostDetail:K,Settings:Q,SeoStatistics:z},mixins:[R],data(){return{maxDate:null,minDate:null,strings:{pageName:this.$t.__("Search Statistics",this.$td),sampleDataAlert:this.$t.__("Sample data is available for you to explore. Connect your site to Google Search Console to receive insights on how content is being discovered. Identify areas for improvement and drive traffic to your website.",this.$td),ctaHeaderText:this.$t.__("Connect your website to Google Search Console",this.$td),ctaDescription:this.$t.__("Connect your site to Google Search Console to receive insights on how content is being discovered. Identify areas for improvement and drive traffic to your website.",this.$td),ctaButtonText:this.$t.__("Connect to Google Search Console",this.$td),ctaUnlockButtonText:this.$t.__("Unlock Search Statistics",this.$td),ctaSecondButtonText:this.$t.__("Explore Sample Reports",this.$td),feature1:this.$t.__("Search traffic insights",this.$td),feature2:this.$t.__("Improved visibility",this.$td),feature3:this.$t.__("Track page and keyword rankings",this.$td),feature4:this.$t.__("Speed tests for individual pages/posts",this.$td)}}},computed:{defaultRange(){const t=new Date(`${this.searchStatisticsStore.range.start} 00:00:00`),e=new Date(`${this.searchStatisticsStore.range.end} 00:00:00`);return[t,e]},excludeTabs(){const t=["post-detail"];return(this.licenseStore.isUnlicensed||!f.hasCoreFeature("search-statistics"))&&t.push("settings"),t},isSettings(){return this.$route.name==="settings"},showSampleDataUnlockCta(){return f.hasCoreFeature("search-statistics")&&!this.searchStatisticsStore.isConnected||this.searchStatisticsStore.unverifiedSite},showConnectCta(){return(f.hasCoreFeature("search-statistics")&&!this.searchStatisticsStore.isConnected||this.searchStatisticsStore.unverifiedSite)&&!this.isSettings},showDatePicker(){const t=this.searchStatisticsStore.isConnected&&!this.searchStatisticsStore.unverifiedSite,e=this.searchStatisticsStore.range.start&&this.searchStatisticsStore.range.end;return!["settings","content-rankings"].includes(this.$route.name)&&t&&e},containerClasses(){const t=[];return this.searchStatisticsStore.fetching&&t.push("aioseo-blur"),t},getOriginalMaxDate(){return this.searchStatisticsStore.latestAvailableDate?m.fromFormat(this.searchStatisticsStore.latestAvailableDate,"yyyy-MM-dd").setZone(m.zone)||m.local().plus({days:-2}):m.local().plus({days:-2})},datepickerShortcuts(){return[{text:this.$t.__("Last 7 Days",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last7Days"),[this.getOriginalMaxDate.plus({days:-6}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:this.$t.__("Last 28 Days",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last28Days"),[this.getOriginalMaxDate.plus({days:-27}).toJSDate(),this.getOriginalMaxDate.toJSDate()])},{text:this.$t.__("Last 3 Months",this.$td),value:()=>(window.aioseoBus.$emit("rolling","last3Months"),[this.getOriginalMaxDate.plus({days:-89}).toJSDate(),this.getOriginalMaxDate.toJSDate()])}]}},methods:{isDisabledDate(t){return this.minDate===null?!0:t.getTime()<this.minDate.getTime()||t.getTime()>this.maxDate.getTime()},onDateChange(t,e){this.searchStatisticsStore.setDateRange({dateRange:t,rolling:e})},highlightShortcut(t){if(!t)return;document.querySelectorAll(".el-picker-panel__shortcut").forEach(o=>{switch(o.innerText){case this.$t.__("Last 7 Days",this.$td):t==="last7Days"?o.classList.add("active"):o.classList.remove("active");break;case this.$t.__("Last 28 Days",this.$td):t==="last28Days"?o.classList.add("active"):o.classList.remove("active");break;case this.$t.__("Last 3 Months",this.$td):t==="last3Months"?o.classList.add("active"):o.classList.remove("active");break;case this.$t.__("Last 6 Months",this.$td):t==="last6Months"?o.classList.add("active"):o.classList.remove("active");break;default:o.classList.remove("active")}})}},mounted(){this.minDate=m.now().plus({months:-16}).toJSDate(),this.maxDate=this.getOriginalMaxDate.toJSDate()}},X=_("br",null,null,-1),tt=_("br",null,null,-1),et={key:1,class:"connect-cta"};function st(t,e,o,l,i,s){const g=h("base-date-picker"),b=h("authentication-alert"),C=h("base-button"),x=h("core-alert"),w=h("core-blur"),$=h("cta"),B=h("core-main");return a(),r(B,{"page-name":i.strings.pageName,"exclude-tabs":s.excludeTabs,showTabs:!s.excludeTabs.includes(t.$route.name),containerClasses:s.containerClasses},{extra:n(()=>[s.showDatePicker?(a(),r(g,{key:0,onChange:s.onDateChange,onUpdated:e[0]||(e[0]=T=>s.highlightShortcut(T)),clearable:!1,defaultValue:s.defaultRange,defaultRolling:l.searchStatisticsStore.rolling,isDisabledDate:s.isDisabledDate,shortcuts:s.datepickerShortcuts,size:"small"},null,8,["onChange","defaultValue","defaultRolling","isDisabledDate","shortcuts"])):c("",!0)]),default:n(()=>[_("div",null,[y(b),l.searchStatisticsStore.shouldShowSampleReports?(a(),d(O,{key:0},[y(x,{class:"description sample-data-alert",type:"yellow",onCloseAlert:()=>{}},{default:n(()=>[p(u(i.strings.sampleDataAlert)+" ",1),X,tt,s.showSampleDataUnlockCta?(a(),r(C,{key:0,type:"green",size:"small",onClick:t.connect,loading:t.loading},{default:n(()=>[p(u(i.strings.ctaButtonText),1)]),_:1},8,["onClick","loading"])):c("",!0),s.showSampleDataUnlockCta?c("",!0):(a(),r(C,{key:1,tag:"a",href:t.$links.getPricingUrl("search-statistics","search-statistics-demo-upsell",t.$route.name),target:"_blank",type:"green",size:"small",onClick:l.searchStatisticsStore.showSampleReports,loading:t.loading},{default:n(()=>[p(u(i.strings.ctaUnlockButtonText),1)]),_:1},8,["href","onClick","loading"]))]),_:1}),(a(),r(D(t.$route.name)))],64)):c("",!0),s.showConnectCta?(a(),d("div",et,[l.searchStatisticsStore.shouldShowSampleReports?c("",!0):(a(),r(w,{key:0},{default:n(()=>[(a(),r(D(t.$route.name)))]),_:1})),l.searchStatisticsStore.shouldShowSampleReports?c("",!0):(a(),r($,{key:1,"cta-button-action":"","cta-second-button-action":"",onCtaButtonClick:t.connect,onCtaSecondButtonClick:l.searchStatisticsStore.showSampleReports,"cta-button-loading":t.loading,"show-link":!1,"button-text":i.strings.ctaButtonText,"second-button-text":i.strings.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"",alignTop:!0,hideBonus:!0,"feature-list":[i.strings.feature1,i.strings.feature2,i.strings.feature3,i.strings.feature4]},{"header-text":n(()=>[p(u(i.strings.ctaHeaderText),1)]),description:n(()=>[p(u(i.strings.ctaDescription),1)]),_:1},8,["onCtaButtonClick","onCtaSecondButtonClick","cta-button-loading","button-text","second-button-text","feature-list"]))])):c("",!0),!s.showConnectCta&&!l.searchStatisticsStore.shouldShowSampleReports?(a(),r(D(t.$route.name),{key:2})):c("",!0)])]),_:1},8,["page-name","exclude-tabs","showTabs","containerClasses"])}const be=S(W,[["render",st]]);export{be as default};