← Back
Editing: Index.b8f45ea3.js
import{d as ct}from"./vue-router.f667265d.js";import{m as tt,l as H,n as et,u as W,L as ot,i as M,b as it,t as lt}from"./index.44a18132.js";import{l as dt}from"./license.9147c6fd.js";import{a as ut}from"./allowed.180ff3d9.js";/* empty css */import{g as ft,r as mt}from"./params.af7ed354.js";import{C as gt,u as _t}from"./Tabs.f8a7d298.js";import{S as X,d as pt,_ as st,c as J,e as nt,C as ht}from"./Caret.c1ae0fd1.js";import{_ as vt,G as yt}from"./Header.a599b1db.js";import{a as bt,C as kt}from"./LicenseKeyBar.1e135846.js";import{S as St}from"./LogoGear.a6d9ae06.js";import"./translations.d159963e.js";import{_ as N}from"./_plugin-vue_export-helper.eefbdd86.js";import{s as w,_ as c}from"./default-i18n.20001971.js";import{x as f,o as a,c as d,a as i,C as u,l as v,b as m,E as y,F as P,J as x,t as l,G as I,m as p,y as k,g as Ct,f as V,v as rt,q as Y,T as K}from"./runtime-dom.esm-bundler.647fa2bb.js";import{S as wt}from"./Logo.99f25797.js";import{S as Nt}from"./Support.37aa6d16.js";import{j as Tt}from"./helpers.a876ae70.js";import{c as Lt}from"./date.b0ec3539.js";import{u as Dt}from"./Url.d567dae5.js";import{S as Pt}from"./Exclamation.18010e5b.js";import{S as At}from"./Gear.3527950c.js";import{T as E}from"./Slide.44995a8e.js";const R="all-in-one-seo-pack",Bt={setup(){return{settingsStore:tt()}},components:{SvgAioseoLogoGear:St,SvgClose:X},data(){return{strings:{boldText:w("<strong>%1$s %2$s</strong>","All in One SEO",c("Free",R)),url:H.utmUrl("lite-upgrade-bar"),linkText:w(c("upgrading to %1$s",R),"Pro")}}},computed:{link(){return w('<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 w(c("You're using %1$s. To unlock more features, consider %2$s",R),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")}},xt={class:"aioseo-upgrade-bar"},Mt={class:"upgrade-text"},It=["innerHTML"];function Ht(e,t,r,o,s,n){const g=f("svg-aioseo-logo-gear"),h=f("svg-close");return a(),d("div",xt,[i("div",Mt,[u(g),i("div",{innerHTML:n.upgradeText},null,8,It)]),u(h,{onClick:n.processHideUpgradeBar},null,8,["onClick"])])}const Ut=N(Bt,[["render",Ht]]),Ot={},Et={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-description"},zt=i("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),qt=i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z",fill:"currentColor"},null,-1),Vt=[zt,qt];function Rt(e,t){return a(),d("svg",Et,Vt)}const Gt=N(Ot,[["render",Rt]]),jt={},Ft={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-folder-open"},Yt=i("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),Kt=i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",fill:"currentColor"},null,-1),Wt=[Yt,Kt];function Xt(e,t){return a(),d("svg",Ft,Wt)}const Jt=N(jt,[["render",Xt]]),C="all-in-one-seo-pack",Qt={setup(){return{licenseStore:et(),rootStore:W(),helpPanelStore:ot(),settingsStore:tt(),links:H}},components:{CoreApiBar:bt,CoreLicenseKeyBar:kt,CoreUpgradeBar:Ut,SvgAioseoLogo:wt,SvgClose:X,SvgDescription:Gt,SvgFolderOpen:Jt,SvgSupport:Nt},data(){return{searchItem:null,strings:{close:c("Close",C),search:c("Search",C),viewAll:c("View All",C),docs:c("Docs",C),viewDocumentation:c("View Documentation",C),browseDocumentation:w(c("Browse documentation, reference material, and tutorials for %1$s.",C),"AIOSEO"),viewAllDocumentation:c("View All Documentation",C),getSupport:c("Get Support",C),submitTicket:c("Submit a ticket and our world class support team will be in touch soon.",C),submitSupportTicket:c("Submit a Support Ticket",C),upgradeToPro:c("Upgrade to Pro",C)}}},computed:{filteredDocs(){return this.searchItem!==""?Object.values(this.helpPanelStore.docs).filter(e=>this.searchItem!==null?e.title.toLowerCase().includes(this.searchItem.toLowerCase()):null):null}},methods:{inputSearch:function(e){pt(()=>{this.searchItem=e},1e3)},toggleSection:function(e){e.target.parentNode.parentNode.classList.toggle("opened")},toggleDocs:function(e){e.target.previousSibling.classList.toggle("opened"),e.target.style.display="none"},toggleModal(){document.getElementById("aioseo-help-modal").classList.toggle("visible"),document.body.classList.toggle("modal-open")},getCategoryDocs(e){return Object.values(this.helpPanelStore.docs).filter(t=>t.categories.flat().includes(e)?t:null)}}},Zt={id:"aioseo-help-modal",class:"aioseo-help"},$t={class:"aioseo-help-header"},te={class:"logo"},ee=["href"],oe=["title"],ie={class:"help-content"},se={id:"aioseo-help-search"},ne={id:"aioseo-help-result"},re={class:"aioseo-help-docs"},ae={class:"icon"},ce=["href"],le={id:"aioseo-help-categories"},de={class:"aioseo-help-categories-toggle"},ue={class:"folder-open"},fe={class:"title"},me=i("span",{class:"dashicons dashicons-arrow-right-alt2"},null,-1),ge={class:"aioseo-help-docs"},_e={class:"icon"},pe=["href"],he={class:"aioseo-help-additional-docs"},ve={class:"icon"},ye=["href"],be={id:"aioseo-help-footer"},ke={class:"aioseo-help-footer-block"},Se=["href"],Ce={class:"aioseo-help-footer-block"},we=["href"];function Ne(e,t,r,o,s,n){const g=f("core-upgrade-bar"),h=f("core-license-key-bar"),_=f("core-api-bar"),b=f("svg-aioseo-logo"),U=f("svg-close"),z=f("base-input"),B=f("svg-description"),Q=f("svg-folder-open"),O=f("base-button"),at=f("svg-support");return a(),d("div",Zt,[!o.rootStore.isPro&&o.settingsStore.settings.showUpgradeBar&&o.rootStore.pong?(a(),v(g,{key:0})):m("",!0),o.rootStore.isPro&&o.licenseStore.isUnlicensed&&o.rootStore.pong?(a(),v(h,{key:1})):m("",!0),o.rootStore.pong?m("",!0):(a(),v(_,{key:2})),i("div",$t,[i("div",te,[o.licenseStore.isUnlicensed?(a(),d("a",{key:0,href:o.links.utmUrl("header-logo"),target:"_blank"},[u(b,{id:"aioseo-help-logo"})],8,ee)):m("",!0),o.licenseStore.isUnlicensed?m("",!0):(a(),v(b,{key:1,id:"aioseo-help-logo"}))]),i("div",{id:"aioseo-help-close",title:s.strings.close,onClick:t[0]||(t[0]=y((...T)=>n.toggleModal&&n.toggleModal(...T),["stop"]))},[u(U)],8,oe)]),i("div",ie,[i("div",se,[u(z,{type:"text",size:"medium",placeholder:s.strings.search,"onUpdate:modelValue":t[1]||(t[1]=T=>n.inputSearch(T))},null,8,["placeholder"])]),i("div",ne,[i("ul",re,[(a(!0),d(P,null,x(n.filteredDocs,(T,A)=>(a(),d("li",{key:A},[i("span",ae,[u(B)]),i("a",{href:o.links.utmUrl("help-panel-doc","",T.url),rel:"noopener noreferrer",target:"_blank"},l(T.title),9,ce)]))),128))])]),i("div",le,[i("ul",de,[(a(!0),d(P,null,x(o.helpPanelStore.categories,(T,A)=>(a(),d("li",{key:A,class:I(["aioseo-help-category",{opened:A==="getting-started"}])},[i("header",{onClick:t[2]||(t[2]=y(L=>n.toggleSection(L),["stop"]))},[i("span",ue,[u(Q)]),i("span",fe,l(T),1),me]),i("ul",ge,[(a(!0),d(P,null,x(n.getCategoryDocs(A).slice(0,5),(L,q)=>(a(),d("li",{key:q},[i("span",_e,[u(B)]),i("a",{href:o.links.utmUrl("help-panel-doc","",L.url),rel:"noopener noreferrer",target:"_blank"},l(L.title),9,pe)]))),128)),i("div",he,[(a(!0),d(P,null,x(n.getCategoryDocs(A).slice(5,n.getCategoryDocs(A).length),(L,q)=>(a(),d("li",{key:q},[i("span",ve,[u(B)]),i("a",{href:o.links.utmUrl("help-panel-doc","",L.url),rel:"noopener noreferrer",target:"_blank"},l(L.title),9,ye)]))),128))]),n.getCategoryDocs(A).length>=5?(a(),v(O,{key:0,class:"aioseo-help-docs-viewall gray medium",onClick:t[3]||(t[3]=y(L=>n.toggleDocs(L),["stop"]))},{default:p(()=>[k(l(s.strings.viewAll)+" "+l(T)+" "+l(s.strings.docs),1)]),_:2},1024)):m("",!0)])],2))),128))])]),i("div",be,[i("div",ke,[i("a",{href:o.links.utmUrl("help-panel-all-docs","","https://aioseo.com/docs/"),rel:"noopener noreferrer",target:"_blank"},[u(B),i("h3",null,l(s.strings.viewDocumentation),1),i("p",null,l(s.strings.browseDocumentation),1),u(O,{class:"aioseo-help-docs-viewall gray small"},{default:p(()=>[k(l(s.strings.viewAllDocumentation),1)]),_:1})],8,Se)]),i("div",Ce,[i("a",{href:!o.rootStore.isPro||!o.licenseStore.license.isActive?o.links.getUpsellUrl("help-panel","get-support","liteUpgrade"):o.links.utmUrl("help-panel-support","","https://aioseo.com/account/support/"),rel:"noopener noreferrer",target:"_blank"},[u(at),i("h3",null,l(s.strings.getSupport),1),i("p",null,l(s.strings.submitTicket),1),o.rootStore.isPro&&o.licenseStore.license.isActive?(a(),v(O,{key:0,class:"aioseo-help-docs-support blue small"},{default:p(()=>[k(l(s.strings.submitSupportTicket),1)]),_:1})):m("",!0),!o.rootStore.isPro||!o.licenseStore.license.isActive?(a(),v(O,{key:1,class:"aioseo-help-docs-support green small"},{default:p(()=>[k(l(s.strings.upgradeToPro),1)]),_:1})):m("",!0)],8,we)])])])])}const Te=N(Qt,[["render",Ne]]),G="all-in-one-seo-pack",Le=()=>{const e={notifications:c("Notifications",G),newNotifications:c("New Notifications",G),activeNotifications:c("Active Notifications",G)},t=Ct(!1),r=M(),o=V(()=>t.value?r.dismissedNotificationsCount:r.activeNotificationsCount),s=V(()=>t.value?r.dismissedNotifications:r.activeNotifications),n=V(()=>t.value?e.notifications:e.newNotifications);return{dismissed:t,notificationTitle:n,notifications:s,notificationsCount:o,strings:e}},De=""+window.__aioseoDynamicImportPreload__("images/dannie-detective.b4823250.png"),Pe="all-in-one-seo-pack",Ae={emits:["dismissed-notification"],setup(){const{button1Loading:e,button2Loading:t,getHref:r,getTagType:o,getTarget:s,processButtonClick:n}=Dt();return{button1Loading:e,button2Loading:t,getHref:r,getTagType:o,getTarget:s,notificationsStore:M(),processButtonClick:n}},components:{BaseButton:st,SvgCircleCheck:J,SvgCircleClose:nt,SvgCircleExclamation:Pt,SvgGear:At,TransitionSlide:E},props:{notification:{type:Object,required:!0}},data(){return{active:!0,strings:{dismiss:c("Dismiss",Pe)}}},computed:{getIcon(){switch(this.notification.type){case"warning":return"svg-circle-exclamation";case"error":return"svg-circle-close";case"info":return"svg-gear";case"success":default:return"svg-circle-check"}},getDate(){return Lt(this.notification.start)}},methods:{processDismissNotification(){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug]),this.$emit("dismissed-notification")},getButtonType(e){switch(this.notification.notification_name){case"search-console-site-not-connected":case"search-console-site-not-verified":case"email-reports-enable-reminder":return e===1?"blue":"gray";default:return"gray"}}}},Be={class:"icon"},xe={class:"body"},Me={class:"title"},Ie={class:"date"},He=["innerHTML"],Ue={class:"actions"};function Oe(e,t,r,o,s,n){const g=f("base-button"),h=f("transition-slide");return a(),v(h,{class:I(["aioseo-notification",[`aioseo-notification-${r.notification.notification_name}`]]),active:s.active},{default:p(()=>[i("div",null,[i("div",Be,[(a(),v(rt(n.getIcon),{class:I(r.notification.type)},null,8,["class"]))]),i("div",xe,[i("div",Me,[i("div",null,l(r.notification.title),1),i("div",Ie,l(n.getDate),1)]),i("div",{class:"notification-content",innerHTML:r.notification.content},null,8,He),i("div",Ue,[r.notification.button1_label&&r.notification.button1_action?(a(),v(g,{key:0,size:"small",type:n.getButtonType(1),class:"aioseo-button1",tag:o.getTagType(r.notification.button1_action),href:o.getHref(r.notification.button1_action),target:o.getTarget(r.notification.button1_action),onClick:t[0]||(t[0]=_=>o.processButtonClick(r.notification.button1_action,1)),loading:o.button1Loading},{default:p(()=>[k(l(r.notification.button1_label),1)]),_:1},8,["type","tag","href","target","loading"])):m("",!0),r.notification.button2_label&&r.notification.button2_action?(a(),v(g,{key:1,size:"small",type:n.getButtonType(2),class:"aioseo-button2",tag:o.getTagType(r.notification.button2_action),href:o.getHref(r.notification.button2_action),target:o.getTarget(r.notification.button2_action),onClick:t[1]||(t[1]=_=>o.processButtonClick(r.notification.button2_action,2)),loading:o.button2Loading},{default:p(()=>[k(l(r.notification.button2_label),1)]),_:1},8,["type","tag","href","target","loading"])):m("",!0),r.notification.dismissed?m("",!0):(a(),d("a",{key:2,href:"#",class:"dismiss",onClick:t[2]||(t[2]=y((..._)=>n.processDismissNotification&&n.processDismissNotification(..._),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["class","active"])}const Ee=N(Ae,[["render",Oe]]),S="all-in-one-seo-pack",ze={emits:["dismissed-notification"],setup(){return{licenseStore:et(),notificationsStore:M(),optionsStore:it(),rootStore:W()}},components:{SvgCircleCheck:J,TransitionSlide:E},props:{notification:{type:Object,required:!0}},data(){return{step:1,active:!0,strings:{dismiss:c("Dismiss",S),yesILoveIt:c("Yes, I love it!",S),notReally:c("Not Really...",S),okYouDeserveIt:c("Ok, you deserve it",S),nopeMaybeLater:c("Nope, maybe later",S),giveFeedback:c("Give feedback",S),noThanks:c("No thanks",S)}}},computed:{title(){switch(this.step){case 2:return c("That's Awesome!",S);case 3:return c("Help us improve",S);default:return w(c("Are you enjoying %1$s?",S),"AIOSEO")}},content(){switch(this.step){case 2:return c("Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?",S);case 3:return w(c("We're sorry to hear you aren't enjoying %1$s. We would love a chance to improve. Could you take a minute and let us know what we can do better?",S),"All in One SEO");default:return""}},feedbackUrl(){const e=this.optionsStore.options.general&&this.licenseStore.licenseKey?this.licenseStore.licenseKey:"",t=this.rootStore.isPro?"pro":"lite";return H.utmUrl("notification-review-notice",this.rootStore.aioseo.version,"https://aioseo.com/plugin-feedback/?wpf7528_24="+encodeURIComponent(this.rootStore.aioseo.urls.home)+"&wpf7528_26="+e+"&wpf7528_27="+t+"&wpf7528_28="+this.rootStore.aioseo.version)}},methods:{processDismissNotification(e=!1){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug+(e?"-delay":"")]),this.$emit("dismissed-notification")}}},qe={class:"icon"},Ve={class:"body"},Re={class:"title"},Ge=["innerHTML"],je={class:"actions"};function Fe(e,t,r,o,s,n){const g=f("svg-circle-check"),h=f("base-button"),_=f("transition-slide");return a(),v(_,{class:"aioseo-notification",active:s.active},{default:p(()=>[i("div",null,[i("div",qe,[u(g,{class:"success"})]),i("div",Ve,[i("div",Re,[i("div",null,l(n.title),1)]),i("div",{class:"notification-content",innerHTML:n.content},null,8,Ge),i("div",je,[s.step===1?(a(),d(P,{key:0},[u(h,{size:"small",type:"blue",onClick:t[0]||(t[0]=y(b=>s.step=2,["stop"]))},{default:p(()=>[k(l(s.strings.yesILoveIt),1)]),_:1}),u(h,{size:"small",type:"gray",onClick:t[1]||(t[1]=y(b=>s.step=3,["stop"]))},{default:p(()=>[k(l(s.strings.notReally),1)]),_:1})],64)):m("",!0),s.step===2?(a(),d(P,{key:1},[u(h,{tag:"a",href:"https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/?filter=5#new-post",size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[2]||(t[2]=b=>n.processDismissNotification(!1))},{default:p(()=>[k(l(s.strings.okYouDeserveIt),1)]),_:1}),u(h,{size:"small",type:"gray",onClick:t[3]||(t[3]=y(b=>n.processDismissNotification(!0),["stop","prevent"]))},{default:p(()=>[k(l(s.strings.nopeMaybeLater),1)]),_:1})],64)):m("",!0),s.step===3?(a(),d(P,{key:2},[u(h,{tag:"a",href:n.feedbackUrl,size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[4]||(t[4]=b=>n.processDismissNotification(!1))},{default:p(()=>[k(l(s.strings.giveFeedback),1)]),_:1},8,["href"]),u(h,{size:"small",type:"gray",onClick:t[5]||(t[5]=y(b=>n.processDismissNotification(!1),["stop","prevent"]))},{default:p(()=>[k(l(s.strings.noThanks),1)]),_:1})],64)):m("",!0),r.notification.dismissed?m("",!0):(a(),d("a",{key:3,class:"dismiss",href:"#",onClick:t[6]||(t[6]=y(b=>n.processDismissNotification(!1),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["active"])}const Ye=N(ze,[["render",Fe]]),D="all-in-one-seo-pack",Ke={emits:["dismissed-notification"],setup(){return{notificationsStore:M()}},components:{BaseButton:st,SvgCircleCheck:J,TransitionSlide:E},props:{notification:{type:Object,required:!0}},data(){return{active:!0,strings:{dismiss:c("Dismiss",D),yesILoveIt:c("Yes, I love it!",D),notReally:c("Not Really...",D),okYouDeserveIt:c("Ok, you deserve it",D),nopeMaybeLater:c("Nope, maybe later",D),giveFeedback:c("Give feedback",D),noThanks:c("No thanks",D)}}},computed:{title(){return w(c("Are you enjoying %1$s?",D),"AIOSEO")},content(){return w(c("Hey, we noticed you have been using %1$s for some time - that’s awesome! Could you please do us a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?",D),"<strong>All in One SEO</strong>")}},methods:{processDismissNotification(e=!1){this.active=!1,this.notificationsStore.dismissNotifications([this.notification.slug+(e?"-delay":"")]),this.$emit("dismissed-notification")}}},We={class:"icon"},Xe={class:"body"},Je={class:"title"},Qe=["innerHTML"],Ze={class:"actions"};function $e(e,t,r,o,s,n){const g=f("svg-circle-check"),h=f("base-button"),_=f("transition-slide");return a(),v(_,{class:"aioseo-notification",active:s.active},{default:p(()=>[i("div",null,[i("div",We,[u(g,{class:"success"})]),i("div",Xe,[i("div",Je,[i("div",null,l(n.title),1)]),i("div",{class:"notification-content",innerHTML:n.content},null,8,Qe),i("div",Ze,[u(h,{tag:"a",href:"https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/?filter=5#new-post",size:"small",type:"blue",target:"_blank",rel:"noopener noreferrer",onClick:t[0]||(t[0]=b=>n.processDismissNotification(!1))},{default:p(()=>[k(l(s.strings.okYouDeserveIt),1)]),_:1}),u(h,{size:"small",type:"gray",onClick:t[1]||(t[1]=y(b=>n.processDismissNotification(!0),["stop","prevent"]))},{default:p(()=>[k(l(s.strings.nopeMaybeLater),1)]),_:1}),r.notification.dismissed?m("",!0):(a(),d("a",{key:0,class:"dismiss",href:"#",onClick:t[2]||(t[2]=y(b=>n.processDismissNotification(!1),["stop","prevent"]))},l(s.strings.dismiss),1))])])])]),_:1},8,["active"])}const to=N(Ke,[["render",$e]]),j="all-in-one-seo-pack",eo={components:{SvgCircleClose:nt,TransitionSlide:E},props:{notification:{type:Object,required:!0}},data(){return{links:H,active:!0,strings:{title:w(c("%1$s Addons Not Configured Properly",j),"AIOSEO"),learnMore:c("Learn More",j),upgrade:c("Upgrade",j)}}},computed:{content(){let e="<ul>";return this.notification.addons.forEach(t=>{e+="<li><strong>AIOSEO - "+t.name+"</strong></li>"}),e+="</ul>",this.notification.message+e}}},oo={class:"icon"},io={class:"body"},so={class:"title"},no=["innerHTML"],ro={class:"actions"};function ao(e,t,r,o,s,n){const g=f("svg-circle-close"),h=f("base-button"),_=f("transition-slide");return a(),v(_,{class:"aioseo-notification",active:s.active},{default:p(()=>[i("div",null,[i("div",oo,[u(g,{class:"error"})]),i("div",io,[i("div",so,[i("div",null,l(s.strings.title),1)]),i("div",{class:"notification-content",innerHTML:n.content},null,8,no),i("div",ro,[u(h,{size:"small",type:"green",tag:"a",href:s.links.utmUrl("notification-unlicensed-addons"),target:"_blank"},{default:p(()=>[k(l(s.strings.upgrade),1)]),_:1},8,["href"])])])])]),_:1},8,["active"])}const co=N(eo,[["render",ao]]),F="all-in-one-seo-pack",lo={emits:["toggle-dismissed","dismissed-notification"],components:{CoreNotification:Ee,NotificationsReview:Ye,NotificationsReview2:to,NotificationsUnlicensedAddons:co},props:{dismissedCount:{type:Number,required:!0},notifications:{type:Array,required:!0}},data(){return{dannieDetectiveImg:De,strings:{greatScott:c("Great Scott! Where'd they all go?",F),noNewNotifications:c("You have no new notifications.",F),seeDismissed:c("See Dismissed Notifications",F)}}},methods:{getAssetUrl:Tt}},uo={class:"aioseo-notification-cards"},fo={key:"no-notifications"},mo={class:"no-notifications"},go=["src"],_o={class:"great-scott"},po={class:"no-new-notifications"};function ho(e,t,r,o,s,n){return a(),d("div",uo,[r.notifications.length?(a(!0),d(P,{key:0},x(r.notifications,g=>(a(),v(rt(g.component?g.component:"core-notification"),{key:g.slug,notification:g,ref_for:!0,ref:"notification",onDismissedNotification:t[0]||(t[0]=h=>e.$emit("dismissed-notification"))},null,40,["notification"]))),128)):m("",!0),r.notifications.length?m("",!0):(a(),d("div",fo,[Y(e.$slots,"no-notifications",{},()=>[i("div",mo,[i("img",{alt:"Dannie the Detective",src:n.getAssetUrl(s.dannieDetectiveImg)},null,8,go),i("div",_o,l(s.strings.greatScott),1),i("div",po,l(s.strings.noNewNotifications),1),r.dismissedCount?(a(),d("a",{key:0,href:"#",class:"dismiss",onClick:t[1]||(t[1]=y(g=>e.$emit("toggle-dismissed"),["stop","prevent"]))},l(s.strings.seeDismissed),1)):m("",!0)])])]))])}const vo=N(lo,[["render",ho]]),Z="all-in-one-seo-pack",yo={setup(){const{dismissed:e,notificationTitle:t,notifications:r,notificationsCount:o,strings:s}=Le();return{composableStrings:s,dismissed:e,notificationsStore:M(),notificationTitle:t,notifications:r,notificationsCount:o}},components:{CoreNotificationCards:vo,SvgClose:X},data(){return{maxNotifications:Number.MAX_SAFE_INTEGER,currentPage:0,totalPages:1,strings:lt(this.composableStrings,{dismissedNotifications:c("Dismissed Notifications",Z),dismissAll:c("Dismiss All",Z)})}},watch:{"notificationsStore.showNotifications"(e){e?(this.currentPage=0,this.setMaxNotifications(),this.addBodyClass()):this.removeBodyClass()},dismissed(){this.setMaxNotifications()},notifications(){this.setMaxNotifications()}},computed:{filteredNotifications(){return[...this.notifications].splice(this.currentPage===0?0:this.currentPage*this.maxNotifications,this.maxNotifications)},pages(){if(typeof this.totalPages!="number"||!isFinite(this.totalPages)||0>=this.totalPages)return 1;const e=[];for(let t=0;t<this.totalPages;t++)e.push({number:t+1});return e}},methods:{escapeListener(e){e.key==="Escape"&&this.notificationsStore.showNotifications&&this.notificationsStore.toggleNotifications()},addBodyClass(){document.body.classList.add("aioseo-show-notifications")},removeBodyClass(){document.body.classList.remove("aioseo-show-notifications")},documentClick(e){if(!this.notificationsStore.showNotifications)return;const t=e&&e.target?e.target:null,r=document.querySelector("#wp-admin-bar-aioseo-notifications");if(r&&(r===t||r.contains(t)))return;const o=document.querySelector("#toplevel_page_aioseo .wp-first-item"),s=document.querySelector("#toplevel_page_aioseo .wp-first-item .aioseo-menu-notification-indicator");if(o&&o.contains(s)&&(o===t||o.contains(t)))return;const n=this.$refs["aioseo-notifications"];n&&(n===t||n.contains(t))||this.notificationsStore.toggleNotifications()},notificationsLinkClick(e){e.preventDefault(),this.notificationsStore.toggleNotifications()},processDismissAllNotifications(){const e=[];this.notifications.forEach(t=>{e.push(t.slug)}),this.notificationsStore.dismissNotifications(e).then(()=>{this.setMaxNotifications()})},setMaxNotifications(){const e=this.currentPage;this.currentPage=0,this.totalPages=1,this.maxNotifications=Number.MAX_SAFE_INTEGER,this.$nextTick(async()=>{const r=Array.from(document.querySelectorAll(".notification-menu .aioseo-notification")).map(s=>{const n=window.getComputedStyle?getComputedStyle(s,null):s.currentStyle,g=parseInt(n.marginTop)||0,h=parseInt(n.marginBottom)||0;return s.offsetHeight+g+h}),o=document.querySelector(".notification-menu .aioseo-notification-cards");if(o&&0<r.length){let s=0,n=0;for(const g of r){if(n+=g,n>o.offsetHeight)break;s++}this.maxNotifications=s||1,isFinite(s)&&0<s&&(this.totalPages=Math.ceil(r.length/s))}this.currentPage=e>this.totalPages-1?this.totalPages-1:e})}},mounted(){document.addEventListener("keydown",this.escapeListener),document.addEventListener("mousedown",this.documentClick);const e=document.querySelector("#wp-admin-bar-aioseo-notifications .ab-item");e&&e.addEventListener("mousedown",this.notificationsLinkClick);const t=document.querySelector("#toplevel_page_aioseo .wp-first-item"),r=document.querySelector("#toplevel_page_aioseo .wp-first-item .aioseo-menu-notification-indicator");t&&r&&t.addEventListener("mousedown",this.notificationsLinkClick)}},bo={class:"aioseo-notifications",ref:"aioseo-notifications"},ko={key:0,class:"notification-menu"},So={class:"notification-header"},Co={class:"new-notifications"},wo={class:"dismissed-notifications"},No={key:0,class:"notification-footer"},To={class:"pagination"},Lo=["onClick"],Do={key:0,class:"dismiss-all"};function Po(e,t,r,o,s,n){const g=f("svg-close"),h=f("core-notification-cards");return a(),d("div",bo,[u(K,{name:"notifications-slide"},{default:p(()=>[o.notificationsStore.showNotifications?(a(),d("div",ko,[i("div",So,[i("span",Co,"("+l(o.notificationsCount)+") "+l(o.notificationTitle),1),i("div",wo,[!o.dismissed&&o.notificationsStore.dismissedNotificationsCount?(a(),d("a",{key:0,href:"#",onClick:t[0]||(t[0]=y(_=>o.dismissed=!0,["stop","prevent"]))},l(s.strings.dismissedNotifications),1)):m("",!0),o.dismissed&&o.notificationsStore.dismissedNotificationsCount?(a(),d("a",{key:1,href:"#",onClick:t[1]||(t[1]=y(_=>o.dismissed=!1,["stop","prevent"]))},l(s.strings.activeNotifications),1)):m("",!0)]),i("div",{onClick:t[2]||(t[2]=y((..._)=>o.notificationsStore.toggleNotifications&&o.notificationsStore.toggleNotifications(..._),["stop"]))},[u(g)])]),u(h,{class:"notification-cards",notifications:n.filteredNotifications,dismissedCount:o.notificationsStore.dismissedNotificationsCount,onToggleDismissed:t[3]||(t[3]=_=>o.dismissed=!o.dismissed)},null,8,["notifications","dismissedCount"]),s.totalPages>1||!o.dismissed&&o.notifications.length?(a(),d("div",No,[i("div",To,[s.totalPages>1?(a(!0),d(P,{key:0},x(n.pages,(_,b)=>(a(),d("div",{class:I(["page-number",{active:_.number===1+s.currentPage}]),key:b,onClick:y(U=>s.currentPage=_.number-1,["stop"])},l(_.number),11,Lo))),128)):m("",!0)]),o.dismissed?m("",!0):(a(),d("div",Do,[o.notifications.length?(a(),d("a",{key:0,href:"#",class:"dismiss",onClick:t[4]||(t[4]=y((..._)=>n.processDismissAllNotifications&&n.processDismissAllNotifications(..._),["stop","prevent"]))},l(s.strings.dismissAll),1)):m("",!0)]))])):m("",!0)])):m("",!0)]),_:1}),u(K,{name:"notifications-fade"},{default:p(()=>[o.notificationsStore.showNotifications?(a(),d("div",{key:0,onClick:t[5]||(t[5]=(..._)=>o.notificationsStore.toggleNotifications&&o.notificationsStore.toggleNotifications(..._)),class:"overlay"})):m("",!0)]),_:1})],512)}const Ao=N(yo,[["render",Po]]),$="all-in-one-seo-pack",Bo={setup(){const e=ct(),{processSaveChanges:t}=_t();return{helpPanelStore:ot(),notificationsStore:M(),optionsStore:it(),processSaveChanges:t,rootStore:W(),route:e}},components:{CoreAlert:ht,CoreHeader:vt,CoreHelp:Te,CoreMainTabs:gt,CoreNotifications:Ao,GridContainer:yt},props:{pageName:{type:String,required:!0},showTabs:{type:Boolean,default(){return!0}},showSaveButton:{type:Boolean,default(){return!0}},excludeTabs:{type:Array,default(){return[]}},containerClasses:{type:Array,default(){return[]}}},data(){return{tabsKey:0,strings:{saveChanges:c("Save Changes",$)}}},watch:{excludeTabs(){this.tabsKey+=1}},computed:{tabs(){return this.$router.options.routes.filter(e=>e.name&&e.meta&&e.meta.name).filter(e=>ut(e.meta.access)).filter(e=>!e.meta.license||dt.hasMinimumLevel(e.meta.license)).filter(e=>!(e.meta.display==="lite"&&this.rootStore.isPro||e.meta.display==="pro"&&!this.rootStore.isPro)).filter(e=>!this.excludeTabs.includes(e.name)).map(e=>({slug:e.name,name:e.meta.name,url:{name:e.name},access:e.meta.access,label:e.meta.label}))},shouldShowSaveButton(){if(this.$route&&this.$route.name){const e=this.$router.options.routes.find(t=>t.name===this.$route.name);if(e&&e.meta&&e.meta.hideSaveButton)return!1}return this.showSaveButton},errorSaving(){const e=this.roootStore.isPro?"https://aioseo.com/plugin/pro-support":"https://aioseo.com/plugin/lite-support";return w(c("Oops! It looks like an error occurred while saving the changes. Please try again or %1$scontact our support team%2$s.",$),'<a href="'+H.utmUrl("error-saving",this.rootStore.aioseo.page,e)+'" target="_blank">',"</a>")}},mounted(){ft().notifications&&(this.notificationsStore.showNotifications||this.notificationsStore.toggleNotifications(),setTimeout(()=>{mt("notifications")},500)),this.notificationsStore.force&&this.notificationsStore.active.length&&(this.notificationsStore.force=!1,this.notificationsStore.toggleNotifications())}},xo={class:"aioseo-main"},Mo=["innerHTML"],Io={key:2,class:"save-changes"};function Ho(e,t,r,o,s,n){const g=f("core-notifications"),h=f("core-header"),_=f("core-alert"),b=f("core-main-tabs"),U=f("base-button"),z=f("grid-container"),B=f("core-help");return a(),d("div",null,[u(g),i("div",xo,[u(h,{"page-name":r.pageName},null,8,["page-name"]),u(z,{class:I(r.containerClasses)},{default:p(()=>[o.optionsStore.saveError?(a(),v(_,{key:0,type:"red"},{default:p(()=>[i("div",{innerHTML:n.errorSaving},null,8,Mo)]),_:1})):m("",!0),r.showTabs?(a(),v(b,{key:s.tabsKey,tabs:n.tabs,showSaveButton:n.shouldShowSaveButton},{extra:p(()=>[Y(e.$slots,"extra")]),_:3},8,["tabs","showSaveButton"])):m("",!0),u(K,{name:"route-fade",mode:"out-in"},{default:p(()=>[Y(e.$slots,"default")]),_:3}),n.shouldShowSaveButton?(a(),d("div",Io,[u(U,{type:"blue",size:"medium",loading:o.rootStore.loading,onClick:t[0]||(t[0]=Q=>o.processSaveChanges(o.route.name))},{default:p(()=>[k(l(s.strings.saveChanges),1)]),_:1},8,["loading"])])):m("",!0)]),_:3},8,["class"])]),o.helpPanelStore.docs&&Object.keys(o.helpPanelStore.docs).length?(a(),v(B,{key:0})):m("",!0)])}const ni=N(Bo,[["render",Ho]]);export{ni as C,vo as a,Le as u};
Save File
Cancel