OwlCyberSecurity - MANAGER
Edit File: Header.BO9_DOpi.js
import{e as $,R as U,f as M,M as T,i as V,u as E}from"./links.Ce9S4kjc.js";import{a as S}from"./addons.DW40jBC1.js";import{C as F,a as q,S as D}from"./ScrollAndHighlight.BHk77_UZ.js";import{U as G}from"./AnimatedNumber.DeYVxHDv.js";import{v as i,o as s,c as a,B as l,l as h,a as u,T as b,C as w,t as f,m as O,G as W,k as g,b as c,E as v}from"./runtime-dom.esm-bundler.tPRhSV4q.js";import{_}from"./_plugin-vue_export-helper.BN1snXvA.js";import{S as A}from"./Caret.BthVBOwE.js";import{S as Y}from"./LogoGear.BbumEdXr.js";import{S as R}from"./Logo.bX-u9KVJ.js";import{a as Z}from"./index.B6JTtDta.js";const j={components:{UtilAnimatedNumber:G},props:{percentage:Number},data(){return{fromNumber:0,number:0}},watch:{percentage:{deep:!0,handler(e){e!==this.number&&(this.fromNumber=this.number,this.number=e)}}},mounted(){this.number=this.percentage}},z={class:"aioseo-percent-circle"},I={class:"aioseo-seo-site-score-svg",viewBox:"0 0 33.83098862 33.83098862",xmlns:"http://www.w3.org/2000/svg"},K=u("circle",{class:"aioseo-percent-circle-score__background",stroke:"#BFD6F7","stroke-width":"2",fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"},null,-1),Q=["stroke-dasharray"],J={class:"aioseo-percent-circle-percent"};function X(e,r,o,t,d,n){const p=i("util-animated-number");return s(),a("div",z,[l(b,{name:"fill-percent-circle"},{default:h(()=>[(s(),a("svg",I,[K,u("circle",{class:"aioseo-percent-circle-score__circle",stroke:"#005AE0","stroke-width":"2","stroke-dasharray":`${o.percentage},100`,fill:"none",cx:"16.91549431",cy:"16.91549431",r:"15.91549431"},null,8,Q)]))]),_:1}),u("div",J,[u("div",null,[l(p,{number:d.number,"from-number":d.fromNumber},null,8,["number","from-number"]),w("% ")])])])}const B=_(j,[["render",X]]),ee={emits:["close"],components:{CorePercentCircle:B,SvgClose:A},props:{strings:Object,percentage:Number}},te={class:"aioseo-processing-popup"},se=u("br",null,null,-1);function oe(e,r,o,t,d,n){const p=i("core-percent-circle"),m=i("svg-close");return s(),a("div",te,[l(p,{percentage:o.percentage},null,8,["percentage"]),u("div",null,[u("strong",null,f(o.strings.header),1),se,w(f(o.strings.description),1)]),l(m,{onClick:r[0]||(r[0]=C=>e.$emit("close"))})])}const ne=_(ee,[["render",oe]]),re={setup(){return{settingsStore:$()}},components:{SvgAioseoLogoGear:Y,SvgClose:A},data(){return{strings:{boldText:this.$t.sprintf("<strong>%1$s %2$s</strong>","All in One SEO",this.$t.__("Free",this.$td)),url:this.$links.utmUrl("lite-upgrade-bar"),linkText:this.$t.sprintf(this.$t.__("upgrading to %1$s",this.$td),"Pro")}}},computed:{link(){return this.$t.sprintf('<strong><a href="%1$s" target="_blank" class="text-white">%2$s</a> <a href="%1$s" target="_blank" class="text-white upgrade-arrow">→</a></strong>',this.strings.url,this.strings.linkText)},upgradeText(){return this.$t.sprintf(this.$t.__("You're using %1$s. To unlock more features, consider %2$s",this.$td),this.strings.boldText,this.link)}},methods:{processHideUpgradeBar(){document.body.classList.remove("aioseo-has-bar"),this.settingsStore.hideUpgradeBar()}},mounted(){document.body.classList.add("aioseo-has-bar")}},ie={class:"aioseo-upgrade-bar"},ae={class:"upgrade-text"},ce=["innerHTML"];function le(e,r,o,t,d,n){const p=i("svg-aioseo-logo-gear"),m=i("svg-close");return s(),a("div",ie,[u("div",ae,[l(p),u("div",{innerHTML:n.upgradeText},null,8,ce)]),l(m,{onClick:n.processHideUpgradeBar},null,8,["onClick"])])}const ue=_(re,[["render",le]]),de={props:{hero:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},fullWidth:Boolean,small:Boolean},computed:{classes(){let e=this.fluid?"aioseo-container-fluid ":"aioseo-container ";return e+=this.hero?"aioseo-hero ":"",e+=this.fullWidth?"full-width ":"",e+=this.small?"small ":"",e}}};function pe(e,r,o,t,d,n){return s(),a("div",{class:W(n.classes)},[O(e.$slots,"default")],2)}const ge=_(de,[["render",pe]]),_e={},me={viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-notifications"},he=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.8333 2.5H4.16667C3.25 2.5 2.5 3.25 2.5 4.16667V15.8333C2.5 16.75 3.24167 17.5 4.16667 17.5H15.8333C16.75 17.5 17.5 16.75 17.5 15.8333V4.16667C17.5 3.25 16.75 2.5 15.8333 2.5ZM15.8333 15.8333H4.16667V13.3333H7.13333C7.70833 14.325 8.775 15 10.0083 15C11.2417 15 12.3 14.325 12.8833 13.3333H15.8333V15.8333ZM11.675 11.6667H15.8333V4.16667H4.16667V11.6667H8.34167C8.34167 12.5833 9.09167 13.3333 10.0083 13.3333C10.925 13.3333 11.675 12.5833 11.675 11.6667Z",fill:"currentColor"},null,-1),fe=[he];function ke(e,r){return s(),a("svg",me,fe)}const Se=_(_e,[["render",ke]]),ve={setup(){return{helpPanelStore:U(),licenseStore:M(),linkAssistantStore:T(),notificationsStore:V(),rootStore:E(),settingsStore:$()}},components:{CoreApiBar:F,CoreLicenseKeyBar:q,CorePercentCircle:B,CoreProcessingPopup:ne,CoreUpgradeBar:ue,GridContainer:ge,SvgAioseoLogo:R,SvgCircleQuestionMark:Z,SvgNotifications:Se},mixins:[D],props:{fullWidth:Boolean,small:Boolean,pageName:String,actions:{type:Boolean,default(){return!0}},upgradeBar:{type:Boolean,default(){return!0}}},data(){return{activeScan:null,strings:{linkAssistantPopup:{header:this.$t.__("Link suggestions are being processed.",this.$td),description:this.$t.__("Depending on the number of posts being scanned, this process can take some time. You can safely leave this page and check back later.",this.$td)},searchStatisticsPopup:{header:this.$t.__("Search statistics are being fetched.",this.$td),description:this.$t.__("Depending on the amount of content on your site, this process can take some time. You can safely leave this page and check back later.",this.$td)}}}},computed:{percentage(){switch(this.activeScan){case"linkAssistant":return this.linkAssistantStore.suggestionsScan.percent;default:return null}},showPopup(){switch(this.activeScan){case"linkAssistant":return this.linkAssistantStore.suggestionsScan.showProcessingPopup&&this.linkAssistantStore.suggestionsScan.percent!==100;default:return null}},popupStrings(){switch(this.activeScan){case"linkAssistant":return this.strings.linkAssistantPopup;default:return null}}},methods:{debounce(e){let r;return(...o)=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{e(...o)})}},storeScroll(){document.documentElement.dataset.scroll=window.scrollY},toggleModal(){document.getElementById("aioseo-help-modal").classList.toggle("visible"),document.body.classList.toggle("modal-open")},checkForActiveScan(){this.rootStore.aioseo.page==="link-assistant"&&S.isActive("aioseo-link-assistant")&&!S.requiresUpgrade("aioseo-link-assistant")&&S.hasMinimumVersion("aioseo-link-assistant")&&(this.$route.name==="links-report"||this.$route.name==="overview")&&this.linkAssistantStore.suggestionsScan.percent!==100&&(this.activeScan="linkAssistant")},toggleCirclePopup(){switch(this.activeScan){case"linkAssistant":return this.linkAssistantStore.toggleProcessingPopup();default:return null}}},mounted(){this.storeScroll(),document.addEventListener("scroll",this.debounce(this.storeScroll),{passive:!0}),this.checkForActiveScan()}},be={class:"aioseo-header"},Ce={class:"aioseo-header-content"},ye=["href"],$e={key:2,class:"spacer"},we={key:3,class:"page-name"},Ae={key:4,class:"header-actions"},Be={key:0,class:"round number"};function xe(e,r,o,t,d,n){const p=i("core-upgrade-bar"),m=i("core-license-key-bar"),C=i("core-api-bar"),y=i("svg-aioseo-logo"),x=i("core-percent-circle"),P=i("core-processing-popup"),N=i("svg-notifications"),H=i("svg-circle-question-mark"),L=i("grid-container");return s(),a("div",be,[!e.$isPro&&t.settingsStore.settings.showUpgradeBar&&o.upgradeBar&&t.rootStore.pong?(s(),g(p,{key:0})):c("",!0),e.$isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(s(),g(m,{key:1})):c("",!0),t.rootStore.pong?c("",!0):(s(),g(C,{key:2})),l(L,{"full-width":o.fullWidth,small:o.small},{default:h(()=>[u("div",Ce,[t.licenseStore.isUnlicensed?(s(),a("a",{key:0,href:e.$links.utmUrl("header-logo"),target:"_blank"},[l(y)],8,ye)):c("",!0),t.licenseStore.isUnlicensed?c("",!0):(s(),g(y,{key:1})),o.pageName?(s(),a("span",$e)):c("",!0),o.pageName?(s(),a("span",we,f(o.pageName),1)):c("",!0),o.actions?(s(),a("div",Ae,[l(b,{name:"fade-percent-circle"},{default:h(()=>[d.activeScan&&n.percentage!==100?(s(),g(x,{key:0,percentage:n.percentage,onClick:n.toggleCirclePopup},null,8,["percentage","onClick"])):c("",!0)]),_:1}),l(b,{name:"fade-processing-popup"},{default:h(()=>[n.showPopup?(s(),g(P,{key:0,strings:n.popupStrings,percentage:n.percentage,onClose:n.toggleCirclePopup},null,8,["strings","percentage","onClose"])):c("",!0)]),_:1}),u("span",{class:"round",onClick:r[0]||(r[0]=v((...k)=>t.notificationsStore.toggleNotifications&&t.notificationsStore.toggleNotifications(...k),["stop"]))},[t.notificationsStore.activeNotificationsCount?(s(),a("span",Be,f(t.notificationsStore.activeNotificationsCount>9?"!":t.notificationsStore.activeNotificationsCount),1)):c("",!0),l(N,{onClick:v(t.notificationsStore.toggleNotifications,["stop"])},null,8,["onClick"])]),t.helpPanelStore.docs&&Object.keys(t.helpPanelStore.docs).length?(s(),a("span",{key:0,class:"round",onClick:r[1]||(r[1]=v((...k)=>n.toggleModal&&n.toggleModal(...k),["stop"]))},[l(H)])):c("",!0)])):c("",!0)])]),_:1},8,["full-width","small"])])}const qe=_(ve,[["render",xe]]);export{qe as C,ge as G,ne as a,ue as b};