OwlCyberSecurity - MANAGER
Edit File: App.91fc1a84.js
import{n as Ge,v as p,o as i,c as k,C as d,l,x as T,t as h,a as u,k as _,b as m,G as J,E as pe,K as jt,L as Wt,g as we,y as Co,M as $t,Y as Po,h as Eo,H as kt,u as S,F as Ce,J as Ke,m as Te,T as ze,f as ke,D as xo,q as Se}from"./runtime-dom.esm-bundler.5c3c7d72.js";/* empty css */import{d as Yt,e as Q,b as Ae,h as nt,l as Z,m as _e,u as ye,B as Ye,z as Zt,X as He,Z as Ze,_ as To,k as xe,i as Ao,r as Xt,F as Lo,j as Jt,I as Io,x as Ve,J as Qt,y as Xe,o as Mo}from"./index.a87126ce.js";import{a as Oo,C as Do,u as Bo}from"./LicenseKeyBar.669e450f.js";import{a as Le}from"./allowed.ab723907.js";import{g as qe,r as ft}from"./params.af7ed354.js";import{C as ve,a as Je,S as vt,f as bt,c as Qe,e as Ro,b as Oe,d as it,h as Ho}from"./Caret.d9cc70ba.js";import{G as Ee,P as Uo,F as Ko,d as Vo,S as Fo,O as No}from"./constants.1ec71a84.js";import{C as Pe}from"./SettingsRow.9f92e269.js";import{B as Go}from"./Checkbox.6db0b9ed.js";import{G as zo,a as qo}from"./Row.df38a5f6.js";import"./translations.d159963e.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as n,s as D}from"./default-i18n.20001971.js";import{u as jo}from"./Url.e5c2ac01.js";import{C as Be}from"./Tabs.7c14121d.js";import{C as Ie}from"./Index.f71e22d2.js";import{u as wt}from"./MaxCounts.7c38e980.js";import{u as Ct}from"./Tags.ac521d15.js";import{z as eo,A as to,t as oo,B as at,C as Wo,D as $o,T as so,i as lt,E as ro}from"./helpers.fa367b69.js";import{e as De}from"./regex.8a6101c0.js";import{C as fe}from"./Tooltip.73441134.js";import{S as Pt}from"./Ellipse.e3ae0692.js";import{S as je}from"./Eye.8dc261a7.js";import{d as ct}from"./debounce.f7a8b998.js";import{V as Yo,j as Zo}from"./helpers.53868b98.js";import{t as Ot}from"./toFinite.b0a886e7.js";import{u as Et}from"./TruSeoScore.fe90f575.js";import{S as Xo}from"./Statistics.2cff8c0a.js";import{S as et,a as xt,h as dt,j as Jo,k as Qo,m as es,n as ts,o as os,p as ss,q as rs,r as ns,s as is,t as as,u as ls,v as cs,w as ds,x as us,y as ps,z as hs,A as gs,C as ms,D as _s,E as ys,e as fs,F as Ss,G as ks}from"./index.1f3cb1fa.js";import{S as Tt}from"./Plus.426117bd.js";import{B as no}from"./RadioToggle.333e7750.js";import{C as vs}from"./GoogleSearchPreview.dee77d02.js";import{C as At}from"./HtmlTagsEditor.e7779e12.js";import{T as bs}from"./Slide.39c07c03.js";import{C as ws}from"./ProBadge.751e0b85.js";import{u as Cs,p as Dt}from"./popup.cd963607.js";import{D as Bt}from"./datetime.f197aeae.js";import{l as Ue}from"./license.d747bfcd.js";import{S as Ps,a as Es}from"./Mobile.ada2591a.js";import{u as xs,S as io}from"./Settings.db203e07.js";import{u as Ts}from"./vue3-apexcharts.57b6886c.js";import{u as As}from"./GoogleSearchConsole.8734f3e0.js";import{_ as Ls}from"./ConnectCta.1288a346.js";import{C as tt}from"./Blur.edde4939.js";import{C as Lt}from"./Index.ac5cec7c.js";import{G as St}from"./Graph.53bec904.js";import{u as ao}from"./WpTable.5920faf2.js";import{n as Is}from"./numbers.9fc174f3.js";import{C as lo}from"./Table.705ec1c3.js";import{R as co}from"./RequiredPlans.1d9170ab.js";import{a as uo}from"./addons.dc226733.js";import{u as Ms}from"./PostTypes.dafa8837.js";import{S as po}from"./External.3b8c2917.js";import{S as Os,a as Ds,b as Bs}from"./InternalOutbound.8d129cbf.js";import{u as ho}from"./Image.ba059181.js";import{t as go}from"./Editor.29413d15.js";import{C as Rs}from"./FacebookPreview.9bed838b.js";import{C as mo}from"./ImageUploader.d24da2c6.js";import{C as Hs}from"./TwitterPreview.e4f6f7f5.js";import{a as _o,S as Us}from"./Build.b598c742.js";import{L as Ks}from"./Redirects.3473047f.js";import{U as Vs,S as Fs}from"./Upsell.043993be.js";var Ns=Math.floor,Gs=Math.random;function zs(o,e){return o+Ns(Gs()*(e-o+1))}var qs=parseFloat,js=Math.min,Ws=Math.random;function $s(o,e,r){if(r&&typeof r!="boolean"&&Yo(o,e,r)&&(e=r=void 0),r===void 0&&(typeof e=="boolean"?(r=e,e=void 0):typeof o=="boolean"&&(r=o,o=void 0)),o===void 0&&e===void 0?(o=0,e=1):(o=Ot(o),e===void 0?(e=o,o=0):e=Ot(e)),o>e){var t=o;o=e,e=t}if(r||o%1||e%1){var s=Ws();return js(o+s*(e-o+qs("1e-"+((s+"").length-1))),e)}return zs(o,e)}const ot=Yt("TruSeoHighlighterStore",{state:()=>{var o,e;return{allowScrolling:!1,allowHighlighting:!0,dispatchAnnotations:((e=(o=window==null?void 0:window.wp)==null?void 0:o.data)==null?void 0:e.dispatch("core/annotations"))||null,enabled:!0,highlightAnalyzer:null,highlightMarks:[],highlightPopover:{},source:"aioseo-tru-seo-highlighter",wpBodyContentObserver:null}},getters:{highlightAnalysis(){var t,s;const e=((s=(t=Q().currentPost)==null?void 0:t.page_analysis)==null?void 0:s.analysis)||{};return(Object.values(e).flat().find(a=>!!a[this.highlightAnalyzer])||{})[this.highlightAnalyzer]||{}},highlightAnalyzerHasError(){var o;return!!((o=this.highlightAnalysis)!=null&&o.error)},highlightSentences(){var e;let o=[];return Array.isArray((e=this.highlightAnalysis)==null?void 0:e.highlightSentences)&&(o=this.highlightAnalysis.highlightSentences.flat().map(r=>(r=r.replace(/&[a-zA-Z0-9#]{2,};$/,""),r=r.replace(/<br[^>]*>/gi,` `),r=eo(r),to(r))).filter(r=>!!r.trim())),o.length?o:null},activeMark(){return this.highlightMarks.length?this.highlightMarks.find(o=>o.active&&o.node):null}},actions:{clearHighlightPopover(){var o,e,r;(o=this.highlightPopover)!=null&&o.observer&&this.highlightPopover.observer.disconnect(),(e=this.highlightPopover)!=null&&e.node&&this.highlightPopover.node.remove(),(r=this.highlightPopover)!=null&&r.app&&this.highlightPopover.app.unmount(),this.highlightPopover={}},clearAnnotations(){var o,e;if(typeof((o=this.dispatchAnnotations)==null?void 0:o.__experimentalRemoveAnnotationsBySource)=="function"&&this.dispatchAnnotations.__experimentalRemoveAnnotationsBySource(this.source),typeof((e=window==null?void 0:window.tinymce)==null?void 0:e.editors)=="object")for(const r of window.tinymce.editors){const t=r.selection.win.getSelection(),s=Object.values(r.annotator.getAll(this.source)).flat();for(const a of Object.values(s))r.undoManager.ignore(()=>{t.selectAllChildren(a),t.setPosition(a,0),r.annotator.remove(this.source)})}this.highlightMarks=[]},clearAll(){this.clearHighlightPopover(),this.clearAnnotations()},sanitizeHighlightMarks(){this.highlightMarks=this.highlightMarks.filter(o=>!!o.node),this.highlightMarks.length&&!this.highlightMarks.find(o=>!!o.active)&&(this.highlightMarks[0].active=!0)},toggleHighlightAnalyzer(o){if(this.allowScrolling=!0,this.highlightAnalyzer===o)return this.highlightAnalyzer=null,!1;this.highlightAnalyzer=null,Ge().then(()=>{this.highlightAnalyzer=o})}}}),Rt="all-in-one-seo-pack",Ys=Yt("SemrushStore",{state:()=>({results:[],error:null}),getters:{expired:()=>{const o=Ae();if(!o.internalOptions.integrations.semrush.expires)return!0;const e=Bt.now(),r=Bt.fromMillis(parseInt(o.internalOptions.integrations.semrush.expires*1e3,10));return e>=r},hasValidTokens:o=>{const e=Ae();return!o.expired&&!!e.internalOptions.integrations.semrush.accessToken&&!!e.internalOptions.integrations.semrush.refreshToken}},actions:{getKeyphrases(o){this.error=null;const e=Q();return nt.post(Z.restUrl("integration/semrush/keyphrases")).send({keyphrase:e.currentPost.keyphrases.focus.keyphrase,database:o}).then(r=>{if(r.body.keyphrases.status===403){this.error=r.body.keyphrases.error;return}this.results=r.body.keyphrases.data.rows}).catch(r=>{var t,s;if(!((s=(t=r==null?void 0:r.response)==null?void 0:t.body)!=null&&s.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=r.response.body.message})},authenticate(o){return this.error=null,nt.post(Z.restUrl("integration/semrush/authenticate")).send({code:o}).then(e=>{const r=Ae();r.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:e.body.semrush},{root:!0}),r.internalOptions.integrations.semrush=e.body.semrush}).catch(e=>{var r,t;if(!((t=(r=e==null?void 0:e.response)==null?void 0:r.body)!=null&&t.message)){this.error=n("An unknown error occurred, please try again later.",Rt);return}this.error=e.response.body.message})},refresh(){return nt.post(Z.restUrl("integration/semrush/refresh")).then(o=>{const e=Ae();e.updateOption("internalOptions",{groups:["integrations"],key:"semrush",value:o.body.semrush},{root:!0}),e.internalOptions.integrations.semrush=o.body.semrush})}}}),ue="all-in-one-seo-pack",Zs={setup(){return{postEditorStore:Q()}},components:{BaseCheckbox:Go,GridColumn:zo,GridRow:qo},data(){return{strings:{useDefaultSettings:n("Use Default Settings",ue),robotsMeta:n("Robots meta:",ue),maxSnippet:n("Max Snippet",ue),maxVideoPreview:n("Max Video Preview",ue),maxImagePreview:n("Max Image Preview",ue),standard:n("Standard",ue),none:n("None",ue),large:n("Large",ue),noindex:n("No Index",ue),nofollow:n("No Follow",ue),noarchive:n("No Archive",ue),notranslate:n("No Translate",ue),noimageindex:n("No Image Index",ue),nosnippet:n("No Snippet",ue),noodp:n("No ODP",ue)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(o){return this.imagePreviewOptions.find(e=>e.value===o)},saveImagePreview(o){this.postEditorStore.currentPost.maxImagePreview=o,this.postEditorStore.isDirty=!0}}},Xs={class:"aioseo-robots-meta"},Js={key:0,class:"global-robots-settings aioseo-description"},Qs={class:"robots-meta-title"},er={class:"global-robots-settings-options"},tr={key:0,class:"aioseo-description max-snippet"},or={class:"aioseo-description max-video-preview"},sr={key:1,class:"aioseo-description max-image-preview"};function rr(o,e,r,t,s,a){const g=p("base-toggle"),c=p("base-checkbox"),f=p("grid-column"),v=p("grid-row"),E=p("base-input"),x=p("base-select");return i(),k("div",Xs,[d(g,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=P=>t.postEditorStore.currentPost.default=P),e[1]||(e[1]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?m("",!0):(i(),k("div",Js,[u("span",Qs,h(s.strings.robotsMeta),1),d(v,{class:"settings"},{default:l(()=>[t.postEditorStore.currentPost.isHomePage?m("",!0):(i(),_(f,{key:0,xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=P=>t.postEditorStore.currentPost.noindex=P),e[3]||(e[3]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=P=>t.postEditorStore.currentPost.nofollow=P),e[5]||(e[5]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=P=>t.postEditorStore.currentPost.noarchive=P),e[7]||(e[7]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=P=>t.postEditorStore.currentPost.notranslate=P),e[9]||(e[9]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=P=>t.postEditorStore.currentPost.noimageindex=P),e[11]||(e[11]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=P=>t.postEditorStore.currentPost.nosnippet=P),e[13]||(e[13]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),d(f,{xl:"3",md:"4",sm:"6"},{default:l(()=>[d(c,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=P=>t.postEditorStore.currentPost.noodp=P),e[15]||(e[15]=P=>t.postEditorStore.isDirty=!0)]},{default:l(()=>[T(h(s.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",er,[t.postEditorStore.currentPost.nosnippet?m("",!0):(i(),k("div",tr,[u("span",null,h(s.strings.maxSnippet),1),d(E,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=P=>t.postEditorStore.currentPost.maxSnippet=P),e[17]||(e[17]=P=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",or,[u("span",null,h(s.strings.maxVideoPreview),1),d(E,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=P=>t.postEditorStore.currentPost.maxVideoPreview=P),e[19]||(e[19]=P=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?m("",!0):(i(),k("div",sr,[u("span",null,h(s.strings.maxImagePreview),1),d(x,{size:"medium",options:a.imagePreviewOptions,modelValue:a.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=P=>a.saveImagePreview(P.value))},null,8,["options","modelValue"])]))])]))])}const nr=M(Zs,[["render",rr]]),he="all-in-one-seo-pack",ir={setup(){const{decodeUrl:o}=jo();return{licenseStore:_e(),optionsStore:Ae(),postEditorStore:Q(),rootStore:ye(),decodeUrl:o}},components:{CoreAlert:ve,CoreSettingsRow:Pe,CoreSingleRobotsMeta:nr},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:n("Advanced",he),robotsSetting:n("Robots Setting",he),robotsToggle:n("Use Default Settings",he),canonicalUrl:n("Canonical URL",he),validUrl:n("Please enter a valid URL.",he),placeholder:n("Enter a URL to change the default Canonical URL",he),priorityScore:n("Priority Score",he),priority:n("Priority",he),frequency:n("Frequency",he),priorityFrequencyUpsell:D(n("Priority Score is a %1$s feature. %2$s",he),"PRO",Z.getUpsellLink("post-advanced",Ee.learnMore,"priority-frequency",!0)),keywords:n("Keywords",he),tagPlaceholder:n("Press enter to create a keyword",he)},error:!1}},computed:{getPriorityOptions(){return[{label:n("default",he),value:"default"}].concat(Uo)},getFrequencyOptions(){return[{label:n("default",he),value:"default"}].concat(Ko)}},methods:{getPriority(o){return o=o!=="default"?parseFloat(o):o,this.getPriorityOptions.find(e=>e.value===o)},savePriority(o){this.postEditorStore.currentPost.priority=o,this.postEditorStore.isDirty=!0},getFrequency(o){return this.getFrequencyOptions.find(e=>e.value===o)},saveFrequency(o){this.postEditorStore.currentPost.frequency=o,this.postEditorStore.isDirty=!0},inputEventDecodeUrl(o){const e=o.target.value;this.postEditorStore.currentPost.canonicalUrl="",this.postEditorStore.currentPost.canonicalUrl=this.decodeUrl(e)}}},ar={class:"aioseo-tab-content aioseo-post-advanced"},lr={class:"selectbox-row"},cr={class:"select"},dr=u("div",{class:"separator"},[u("span"),T(" - ")],-1),ur={class:"select"},pr=["innerHTML"];function hr(o,e,r,t,s,a){const g=p("core-single-robots-meta"),c=p("core-settings-row"),f=p("base-input"),v=p("core-alert"),E=p("base-select");return i(),k("div",ar,[d(c,{id:"aioseo-post-robots-setting",name:s.strings.robotsSetting,align:""},{content:l(()=>[d(g)]),_:1},8,["name"]),d(c,{id:"aioseo-post-canonical-url",name:s.strings.canonicalUrl,align:""},{content:l(()=>[d(f,{ref:"canonicalUrlInput",type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=x=>t.postEditorStore.currentPost.canonicalUrl=x),e[1]||(e[1]=x=>t.postEditorStore.isDirty=!0)],onInput:a.inputEventDecodeUrl},null,8,["placeholder","modelValue","onInput"]),s.error?(i(),_(v,{key:0,class:"cannonical-url-error",type:"red",size:"small"},{default:l(()=>[T(h(s.strings.validUrl),1)]),_:1})):m("",!0)]),_:1},8,["name"]),d(c,{name:s.strings.priorityScore,align:""},{content:l(()=>[u("div",lr,[u("div",cr,[u("span",null,h(s.strings.priority),1),d(E,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getPriorityOptions,modelValue:t.licenseStore.isUnlicensed?a.getPriority("default"):a.getPriority(t.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=x=>t.licenseStore.isUnlicensed?null:a.savePriority(x.value))},null,8,["disabled","options","modelValue"])]),dr,u("div",ur,[u("span",null,h(s.strings.frequency),1),d(E,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:a.getFrequencyOptions,modelValue:t.licenseStore.isUnlicensed?a.getFrequency("default"):a.getFrequency(t.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=x=>t.licenseStore.isUnlicensed?null:a.saveFrequency(x.value))},null,8,["disabled","options","modelValue"])])]),t.licenseStore.isUnlicensed?(i(),_(v,{key:0,class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.priorityFrequencyUpsell},null,8,pr)]),_:1})):m("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(i(),_(c,{key:0,name:s.strings.keywords,align:""},{content:l(()=>[d(E,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.keywords||[],modelValue:t.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=x=>t.postEditorStore.currentPost.keywords=x),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])}const gr=M(ir,[["render",hr]]),mr={setup(){return{licenseStore:_e(),rootStore:ye()}},components:{CoreApiBar:Oo,CoreLicenseKeyBar:Do}};function _r(o,e,r,t,s,a){const g=p("core-api-bar"),c=p("core-license-key-bar");return i(),k("div",null,[t.rootStore.pong?m("",!0):(i(),_(g,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(i(),_(c,{key:1})):m("",!0)])}const yo=M(mr,[["render",_r]]),yr={emits:["next","previous"],setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgCaret:Je,SvgClose:vt,SvgEllipse:Pt,SvgEye:je},computed:{total(){return this.truSeoHighlighterStore.highlightMarks.length},error(){return this.truSeoHighlighterStore.highlightAnalyzerHasError},order(){return this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1},showSentence(){var o;return((o=this.truSeoHighlighterStore.activeMark)==null?void 0:o.sentence.length)&&this.truSeoHighlighterStore.activeMark.annotatorSelector==="block"},sentences(){const o=[];let e=1;return this.truSeoHighlighterStore.highlightMarks.forEach(r=>{r.node.isSameNode(this.truSeoHighlighterStore.activeMark.node)&&(o.push(`<strong>(${e})</strong> ${r.sentence}`),e++)}),oo(o.join(" "),1e3," [...]")}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},fr=o=>(jt("data-v-aa3e0f58"),o=o(),Wt(),o),Sr={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},kr={key:0,class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--sentence"},vr={class:"tru-seo-highlight-popover__sentence"},br=["innerHTML"],wr={class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--main"},Cr={class:"tru-seo-highlight-popover__count"},Pr=fr(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),Er={class:"tru-seo-highlight-popover__nav"},xr=["disabled"],Tr=["disabled"],Ar={class:"tru-seo-highlight-popover__close"};function Lr(o,e,r,t,s,a){const g=p("svg-eye"),c=p("core-tooltip"),f=p("svg-ellipse"),v=p("svg-caret"),E=p("svg-close");return i(),k("div",Sr,[a.showSentence?(i(),k("div",kr,[u("div",vr,[d(c,{offset:"120px,0"},{tooltip:l(()=>[u("span",{innerHTML:a.sentences},null,8,br)]),default:l(()=>[d(g,{width:"16",height:"16"})]),_:1})])])):m("",!0),u("div",wr,[u("div",{class:J(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":a.error}])},[d(f,{width:"8"})],2),u("div",Cr,[u("span",null,h(a.order)+"/"+h(a.total),1)]),Pr,u("div",Er,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:a.order===1,onClick:e[0]||(e[0]=pe(x=>o.$emit("previous"),["stop","exact"]))},[d(v,{width:"20"})],8,xr),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:a.order===a.total,onClick:e[1]||(e[1]=pe(x=>o.$emit("next"),["stop","exact"]))},[d(v,{width:"20"})],8,Tr)]),u("div",Ar,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=pe((...x)=>a.close&&a.close(...x),["stop","exact"]))},[d(E,{width:"10"})],32)])])])}const Ir=M(yr,[["render",Lr],["__scopeId","data-v-aa3e0f58"]]),Mr=()=>{var O,R,te,H;const o=we(null),e=we({}),r=Ye(),t=Zt(),s=(R=(O=window==null?void 0:window.wp)==null?void 0:O.data)==null?void 0:R.select("core/block-editor"),a=(H=(te=window==null?void 0:window.wp)==null?void 0:te.data)==null?void 0:H.select("core/edit-post"),g=we(null),c=ot(),f=async(y,w="range")=>{var I,K,G,F,j,Y;let C="content";(K=(I=y.block)==null?void 0:I.attributes)!=null&&K.caption?C="caption":(F=(G=y.block)==null?void 0:G.attributes)!=null&&F.value?C="value":(Y=(j=y.block)==null?void 0:j.attributes)!=null&&Y.citation&&(C="citation"),y.annotatorSelector=w;const L=w==="block"?{selector:w,source:c.source,blockClientId:y.block.clientId}:{selector:w,id:y.id,range:y.range,source:c.source,blockClientId:y.block.clientId,richTextIdentifier:C};return c.dispatchAnnotations.__experimentalAddAnnotation(L)},v=(y,w)=>{if(!w)return!1;!w.hasFocus()&&r&&w.focus();let C=w.selection.win.getSelection();C.selectAllChildren(y.parent);const L=C.toString().length;if(y.range.end<L)for(let I=y.range.end;I<L;I++)C.modify("extend","backward","character");if(0<y.range.start){C=Wo(C);for(let I=y.range.start;0<I;I--)C.modify("extend","forward","character")}w.undoManager.ignore(()=>{w.annotator.annotate(c.source,{uid:y.id})}),C.empty()},E=()=>{if(c.clearHighlightPopover(),c.sanitizeHighlightMarks(),!c.activeMark)return!1;const y=Po({name:"TruSeoHighlightPopover",render(){return Eo(Ir,{onNext(){U(1)},onPrevious(){U(-1)}})}}),w=$o(),C=new ResizeObserver(ct(ne,750)),L=b("wrapper");if(!L)return!1;L.parentElement.appendChild(w),y.mount(w),C.observe(b("wrapper"),{box:"border-box"}),c.highlightPopover.app=y,c.highlightPopover.node=w,c.highlightPopover.observer=C,ne()},x=()=>{c.toggleHighlightAnalyzer(null),c.allowHighlighting=!1},P=({block:y,node:w})=>{var L,I,K,G;let C="";return w?C=w.outerText.replace(/\n\n/g,` `):y&&(C=((L=y==null?void 0:y.attributes)==null?void 0:L.content)||((I=y==null?void 0:y.attributes)==null?void 0:I.caption)||((K=y==null?void 0:y.attributes)==null?void 0:K.value)||((G=y==null?void 0:y.attributes)==null?void 0:G.citation)||"",y.name==="core/table"&&(C=(y==null?void 0:y.originalContent)||""),C=C.replace(/<br[^>]*>/gi,` `),C=to(C)),eo(C)},b=y=>{var w;if(y==="closest-relative")return at({element:b("wrapper").parentElement,property:"position",value:"relative"});if(y==="navigable")return at({element:b("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(y==="wrapper")return document.getElementById("content_ifr");if(y==="first-block")return((w=g.value.getBody())==null?void 0:w.firstElementChild)||{}}if(r){if(y==="wrapper")return document.querySelector(".editor-styles-wrapper");if(y==="first-block"){const C=s.getBlocks()[0];return document.getElementById(`block-${C==null?void 0:C.clientId}`)||{}}}},A=()=>{var y;for(const w of s.getBlocks()||[]){if(w.name==="core/freeform"){const C=window.tinymce.get(`editor-${w.clientId}`),L=((y=C.getBody())==null?void 0:y.children)||[];if(!L.length)continue;le(C);for(const I of L)ee({block:w,node:I});continue}ee({block:w,node:null})}c.highlightMarks.forEach(async(w,C)=>{const L=C===c.highlightMarks.length-1;B(w.parent,L),w.block.name==="core/freeform"?v(w,window.tinymce.get(`editor-${w.block.clientId}`)):(await f(w),L&&setTimeout(()=>{var I;(I=c.highlightMarks.at(-1))==null||I.parent.classList.add("is-hovered")},100))})},z=()=>{var w;const y=((w=g.value.getBody())==null?void 0:w.children)||[];if(!y.length)return!1;le(g.value);for(const C of y)ee({block:null,node:C});c.highlightMarks.forEach((C,L)=>{B(C.parent,L===c.highlightMarks.length-1),v(C,g.value)})},U=y=>{const w=c.highlightMarks.findIndex(C=>C.active);if(!c.highlightMarks[w+y])return!1;c.allowScrolling=!0,c.highlightMarks[w].active=!1,c.highlightMarks[w+y].active=!0,E()},se=y=>{var K,G;const w=()=>{y.preventDefault(),y.clipboardData.setData("text/html",window.getSelection().toString())},C=window.getSelection()||{};if(!(C!=null&&C.rangeCount))return!1;const L=((K=y.clipboardData)==null?void 0:K.getData("text/html"))||"";if(L&&L.indexOf(c.source)!==-1)return w(),!1;const I=C.getRangeAt(0)||{};for(const F of Object.values(((G=I==null?void 0:I.cloneContents())==null?void 0:G.children)||[]))if(Object.values((F==null?void 0:F.classList)||[]).some(j=>j.endsWith(c.source)))return w(),!1},ae=y=>{var K,G;const w=(F,j)=>{F.collapse(j.firstChild,j.firstChild.length),F.deleteFromDocument()};if(["Delete","Backspace"].indexOf(y.key)===-1)return!1;const C=window.getSelection()||null;if(!(C!=null&&C.toString()))return!1;const L=((K=C==null?void 0:C.anchorNode)==null?void 0:K.parentElement)||null,I=((G=C==null?void 0:C.anchorNode)==null?void 0:G.nextElementSibling)||null;Object.values((L==null?void 0:L.classList)||[]).some(F=>F.endsWith(c.source))?w(C,L):Object.values((I==null?void 0:I.classList)||[]).some(F=>F.endsWith(c.source))&&w(C,I)},re=()=>{var w;o.value=new MutationObserver(C=>{let L=!1;for(const I of C)for(const K of(I==null?void 0:I.removedNodes)||[])(c.highlightMarks.some(G=>K.isEqualNode(G.parent))||Object.values((K==null?void 0:K.classList)||[]).some(G=>G.endsWith(c.source)))&&(L=!0);L&&de()});const y=(w=b("first-block"))==null?void 0:w.parentElement;if(typeof y!="object")return!1;o.value.observe(y,{attributes:!1,childList:!0,subtree:!0})},B=(y,w=!1)=>{const C=(I,K)=>{var G,F;K.disconnect();for(const j of I){if((G=j==null?void 0:j.target)!=null&&G.classList.contains("is-hovered"))break;if(Object.values(((F=j==null?void 0:j.target)==null?void 0:F.classList)||[]).some(Y=>Y.endsWith(c.source))){N(j.target);continue}for(const Y of(j==null?void 0:j.addedNodes)||[])if(Object.values((Y==null?void 0:Y.classList)||[]).some(rt=>rt.endsWith(c.source))){N(Y);break}}w&&c.highlightMarks.forEach(async(j,Y)=>{j.node||(B(j.parent),await f(j,"block")),Y===c.highlightMarks.length-1&&(await Ge(),ct(E,250)())})};if(typeof(y==null?void 0:y.parentElement)!="object")return!1;new MutationObserver(C).observe(y,{attributes:!0,childList:!0,subtree:!0})},W=()=>{const y=w=>{var C,L,I;for(const K of w){if((K==null?void 0:K.type)!=="attributes")continue;if(!at({element:(C=b("wrapper"))==null?void 0:C.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||r&&(a.getEditorMode()!=="visual"||s.getBlockMode((L=s.getSelectedBlock())==null?void 0:L.clientId)==="html")||t&&($(),((I=document.getElementById("content"))==null?void 0:I.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return x(),!1;c.allowHighlighting=!0}};c.wpBodyContentObserver=new MutationObserver(ct(y,250)),c.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},le=y=>{y.annotator.register(c.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${c.source}`]})})},ne=(y=[])=>{var Y;if(!c.activeMark||!c.highlightPopover.node)return!1;for(const rt of y)if(JSON.stringify(rt.contentRect)===JSON.stringify(e))return!1;y.length&&(e.value=((Y=y[0])==null?void 0:Y.contentRect)||e,c.allowScrolling=!1);const w=c.activeMark.node.getBoundingClientRect(),C=b("wrapper").getBoundingClientRect(),L=b("closest-relative").getBoundingClientRect(),I=b("first-block").getBoundingClientRect(),[K,G]=[140,32];let F=w.top,j=I.left-L.left;K<j?(c.highlightPopover.node.style.top=F-L.top+"px",c.highlightPopover.node.style.transform="translate(-105%, 0)",c.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(F=F-G-L.top,F=t?F+C.top:F,j=t?j+C.left:j,c.highlightPopover.node.style.top=F+"px",c.highlightPopover.node.style.transform="translate(0, 0)",c.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),c.highlightPopover.node.style.left=j+"px",q()},de=()=>{var y;window.removeEventListener("copy",se),window.removeEventListener("keyup",ae),(y=o.value)==null||y.disconnect(),c.clearAll(),Ge().then(()=>{if(!c.highlightSentences)return c.toggleHighlightAnalyzer(null),!1;r&&A(),t&&z(),re(),window.addEventListener("copy",se),window.addEventListener("keyup",ae)})},q=()=>{Ge().then(()=>{var C,L,I,K;if(!c.allowScrolling)return!1;c.activeMark.node.scrollIntoView();let y=b("navigable"),w=y.scrollTop-60;t&&(w-=((L=(C=document.querySelector("#wp-content-editor-tools"))==null?void 0:C.getBoundingClientRect())==null?void 0:L.height)||0,w-=((K=(I=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:I.getBoundingClientRect())==null?void 0:K.height)||0),y.isEqualNode(document.documentElement)&&(y=window),y.scrollTo({top:w}),c.allowScrolling=!1})},N=y=>{const w=[];c.highlightMarks.forEach((C,L)=>{if(y.hasAttribute("data-mce-annotation-uid")&&y.dataset.mceAnnotationUid.indexOf(C.id)!==-1){w.push(L);return}if(y.classList.contains(`is-annotated-by-${c.source}`)&&C.block.clientId===y.dataset.block){w.push(L);return}y.id.indexOf(C.id)!==-1&&w.push(L)}),w.length&&w.forEach(C=>{c.highlightMarks[C].node=y})},ee=({block:y,node:w})=>{const C=P({block:y,node:w});if(C)for(const[L,I]of Object.entries(c.highlightSentences||{})){const K=new RegExp(De(I),"g");let G;for(;(G=K.exec(C))!==null&&!c.highlightMarks.find(Y=>Y.sentenceIndex===L);){const F={start:G.index,end:G.index+G[0].length||1};c.highlightMarks.find(Y=>w?(Y.range.start===F.start||Y.range.end===F.end)&&Y.parent.isSameNode(w):(Y.range.start===F.start||Y.range.end===F.end)&&Y.block.clientId===y.clientId)||c.highlightMarks.push({id:$s(1,999999999),range:F,block:y,parent:w||document.getElementById(`block-${y.clientId}`),active:c.highlightMarks.length===0,sentenceIndex:L,sentence:I,node:null,annotatorSelector:null})}}if(y)for(const L of(y==null?void 0:y.innerBlocks)||[])ee({block:L,node:null})},$=()=>{if(g.value)return!1;const y=window.setInterval(()=>{var w;if(g.value=((w=window==null?void 0:window.tinymce)==null?void 0:w.get("content"))||null,!g.value)return!1;window.clearInterval(y),g.value.dom.addStyle(` span.annotation-text.annotation-text-${c.source} { background-color: #CCE0FF; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},V=(y,w)=>{const C=JSON.stringify(y),L=JSON.stringify(w);C!==L&&de()};return Co(()=>{var w;c.wpBodyContentObserver&&((w=c.wpBodyContentObserver)==null||w.disconnect());const y=window.setInterval(()=>{typeof b("wrapper")=="object"&&(window.clearInterval(y),W())},1e3)}),$t(()=>{(He()||!r&&!t)&&(c.enabled=!1),r&&(!c.dispatchAnnotations||!s||!a)&&(c.enabled=!1)}),{watchHighlightSentences:V}},Or="all-in-one-seo-pack",Dr={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Ze()}},components:{CoreTooltip:fe,SvgPencil:bt,SvgStatistics:Xo,SvgTrash:et},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:n("Delete",Or)}}},computed:{scoreClass(){return 79<this.score?"score-green":49<this.score?"score-orange":0<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(o){this.edit=!0,this.$emit("selectedKeyphrase",o)},deleteKeyphraseEv(o){this.edit=!1,this.$emit("deleted",o)},toggleKeyphrasesPanel(o){this.$emit("selectedKeyphrase",o)},closeEdit(o){var t;const e=(t=o.target)==null?void 0:t.value.trim(),r=this.index;e?(this.edit=!1,this.$emit("saved",{index:r,value:e})):this.deleteKeyphraseEv(r)},pressEnter(o){o.preventDefault(),o.target.blur(),this.edit=!1}}},Br={class:"aioseo-keyphrase-tag"},Rr={key:0,class:"aioseo-edit-keyphrase-tag"},Hr=["value"];function Ur(o,e,r,t,s,a){const g=p("svg-pencil"),c=p("svg-statistics"),f=p("svg-trash"),v=p("core-tooltip");return i(),k("div",Br,[u("span",{class:J(["aioseo-add-keyphrase-tag",s.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=E=>a.toggleKeyphrasesPanel(r.index))},h(r.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=E=>a.editKeyphraseEv(r.index))},[d(g)]),u("a",{href:"#",onClick:e[2]||(e[2]=pe(E=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:!0}),["prevent","exact"])),class:"btn-keyword-rank-tracker"},[d(c,{width:"20"})]),u("span",{class:J(["keyphrase-score",a.scoreClass]),onClick:e[3]||(e[3]=E=>a.toggleKeyphrasesPanel(r.index))},h(r.score)+"/100",3)],2),s.edit?(i(),k("span",Rr,[u("input",{value:r.keyphrase,onBlur:e[4]||(e[4]=(...E)=>a.closeEdit&&a.closeEdit(...E)),onKeydown:e[5]||(e[5]=kt((...E)=>a.pressEnter&&a.pressEnter(...E),["enter"]))},null,40,Hr),u("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=E=>a.deleteKeyphraseEv(r.index))},[d(v,{type:"action"},{tooltip:l(()=>[T(h(s.strings.delete),1)]),default:l(()=>[d(f)]),_:1})])])):m("",!0)])}const fo=M(Dr,[["render",Ur]]),Kr={},Vr={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Fr=u("path",{d:"M8.0018 8.57162C8.78938 8.57162 9.45817 8.29596 10.0082 7.74465C10.5582 7.19335 10.8332 6.5239 10.8332 5.73632C10.8332 4.94874 10.5575 4.27995 10.0062 3.72995C9.4549 3.17995 8.78546 2.90495 7.99787 2.90495C7.21029 2.90495 6.5415 3.1806 5.9915 3.73191C5.4415 4.28322 5.1665 4.95266 5.1665 5.74025C5.1665 6.52783 5.44216 7.19661 5.99347 7.74661C6.54477 8.29662 7.21422 8.57162 8.0018 8.57162ZM7.99592 7.60495C7.47631 7.60495 7.03595 7.42309 6.67484 7.05937C6.31373 6.69563 6.13317 6.25396 6.13317 5.73436C6.13317 5.21475 6.31503 4.77439 6.67875 4.41328C7.04249 4.05217 7.48415 3.87161 8.00375 3.87161C8.52337 3.87161 8.96373 4.05348 9.32484 4.4172C9.68595 4.78093 9.8665 5.2226 9.8665 5.7422C9.8665 6.26181 9.68464 6.70217 9.32092 7.06328C8.95719 7.42439 8.51552 7.60495 7.99592 7.60495ZM7.99984 10.7383C6.37762 10.7383 4.91095 10.2772 3.59984 9.35495C2.28873 8.43273 1.31095 7.22717 0.666504 5.73828C1.31095 4.24939 2.28873 3.04384 3.59984 2.12161C4.91095 1.19939 6.37762 0.738281 7.99984 0.738281C9.62206 0.738281 11.0887 1.19939 12.3998 2.12161C13.7109 3.04384 14.6887 4.24939 15.3332 5.73828C14.6887 7.22717 13.7109 8.43273 12.3998 9.35495C11.0887 10.2772 9.62206 10.7383 7.99984 10.7383Z",fill:"currentColor"},null,-1),Nr=[Fr];function Gr(o,e){return i(),k("svg",Vr,Nr)}const zr=M(Kr,[["render",Gr]]),Ht="all-in-one-seo-pack",qr={setup(){return{truSeoHighlighterStore:ot()}},components:{CoreTooltip:fe,SvgEye:je,SvgEyeFilled:zr},props:{analyzer:String},data(){return{strings:{highlightSections:n("Highlight sections in the Editor",Ht),highlightingIsDisabled:n("Highlighting is disabled for current view",Ht)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},jr=["disabled"];function Wr(o,e,r,t,s,a){const g=p("svg-eye"),c=p("core-tooltip"),f=p("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(i(),k("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=pe(v=>a.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==r.analyzer?(i(),_(c,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:l(()=>[T(h(t.truSeoHighlighterStore.allowHighlighting?s.strings.highlightSections:s.strings.highlightingIsDisabled),1)]),default:l(()=>[d(g,{width:"16",height:"16"})]),_:1},8,["offset"])):(i(),_(f,{key:1,width:"16",height:"16"}))],8,jr)):m("",!0)}const $r=M(qr,[["render",Wr]]),Yr={class:"aioseo-analysis-detail"},Zr={key:0,class:"detail detail--pl-0"},Xr={key:0,class:"detail"},Jr={class:"title__text"},Qr={class:"description"},st={__name:"MetaboxAnalysisDetail",props:{analysisItems:{type:Object}},setup(o){const r={switchToVisualEditor:n("TruSEO cannot analyze the post while you are using the Code Editor. Please switch back to the Visual Editor to view your results.","all-in-one-seo-pack")},t=s=>{s.target.parentElement.classList.toggle("toggled")};return(s,a)=>(i(),k("ul",Yr,[S(To)()?(i(),k("li",Zr,[d(S(ve),{type:"yellow"},{default:l(()=>[T(h(r.switchToVisualEditor),1)]),_:1})])):(i(!0),k(Ce,{key:1},Ke(o.analysisItems,(g,c)=>{var f;return i(),k(Ce,{key:c},[g.title?(i(),k("li",Xr,[u("p",{class:J(["title",g.error===0?"toggled":""])},[g.error===0?(i(),_(S(Qe),{key:0,width:"16"})):m("",!0),g.error===1?(i(),_(S(Ro),{key:1,width:"16"})):m("",!0),u("span",Jr,h(g.title),1),(f=g==null?void 0:g.highlightSentences)!=null&&f.length?(i(),_(S($r),{key:2,analyzer:c},null,8,["analyzer"])):m("",!0),d(S(Je),{width:"16",role:"button",onClick:pe(t,["stop"])})],2),u("p",Qr,h(g.description),1)])):m("",!0)],64)}),128))]))}},Fe="all-in-one-seo-pack",en={setup(){return{licenseStore:_e(),postEditorStore:Q(),rootStore:ye(),truSeo:new so}},components:{CoreAlert:ve,CoreKeyphrase:fo,CoreLoader:Oe,CoreTooltip:fe,SvgCirclePlus:Tt,metaboxAnalysisDetail:st},data(){return{selectedKeyphrase:0,strings:{additional:n("Additional Keyphrases",Fe),addKeyphrase:n("Add Additional Keyphrases",Fe),keyphraseDocumentation:n("Improve your SEO rankings with additional keyphrases.",Fe),upsell:D(n("Additional Keyphrases are a %1$s feature. %2$s",Fe),"PRO",Z.getUpsellLink("post-settings",Ee.learnMore,"additional-keywords",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",Fe),this.postEditorStore.currentPost.maxAdditionalKeyphrases)}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(o){this.selectedKeyphrase=o},onSaved(o){const{index:e,value:r}=o;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=r,this.postEditorStore.currentPost.keyphrases.additional[e].score=0,this.postEditorStore.currentPost.loading.additional[e]=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),this.selectedKeyphrase=e},onDeleted(o){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(o,1),this.postEditorStore.currentPost.keyphrases.additional=null,setTimeout(()=>{this.postEditorStore.currentPost.keyphrases.additional=e,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},300)},addKeyphraseEv(){var t,s,a;if(this.postEditorStore.currentPost.maxAdditionalKeyphrases<=((s=(t=this.postEditorStore.currentPost.keyphrases)==null?void 0:t.additional)==null?void 0:s.length))return;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();if(r){const g={keyphrase:r,score:0},c=this.postEditorStore.currentPost.keyphrases.additional.push(g),f=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(a=f[c])==null||a.click(),this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},pressEnter(o){const e=document.getElementById("add-additional-keyphrase");o.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((o,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}}},tn={class:"additional-keyphrases-panel"},on={key:0},sn={class:"analysis-wrapper"},rn={class:"aioseo-description additional-keyphrases-description"},nn=["innerHTML"];function an(o,e,r,t,s,a){var A,z,U,se,ae,re;const g=p("core-keyphrase"),c=p("core-loader"),f=p("metaboxAnalysisDetail"),v=p("base-input"),E=p("svg-circle-plus"),x=p("base-button"),P=p("core-tooltip"),b=p("core-alert");return i(),k("div",tn,[t.postEditorStore.currentPost.keyphrases.additional&&((z=(A=t.postEditorStore.currentPost.keyphrases)==null?void 0:A.additional)!=null&&z.length)&&t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),k("div",on,[(i(!0),k(Ce,null,Ke(t.postEditorStore.currentPost.keyphrases.additional,(B,W)=>(i(),_(g,{key:W,index:W,keyphrase:B.keyphrase,score:B.score,onSaved:a.onSaved,onDeleted:a.onDeleted,onSelectedKeyphrase:a.onSelectedKeyphrase,class:J(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===W?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",sn,[t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(c,{key:0,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase]&&t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].keyphrase?(i(),_(f,{key:1,analysisItems:t.postEditorStore.currentPost.keyphrases.additional[s.selectedKeyphrase].analysis},null,8,["analysisItems"])):m("",!0)])])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive?(i(),_(v,{key:1,size:"medium",class:J(`add-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.postEditorStore.currentPost.maxAdditionalKeyphrases>((se=(U=t.postEditorStore.currentPost.keyphrases)==null?void 0:U.additional)==null?void 0:se.length)?(i(),_(x,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:l(()=>[d(E,{width:"14",height:"14"}),T(" "+h(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),t.rootStore.isPro&&t.licenseStore.license.isActive&&t.postEditorStore.currentPost.maxAdditionalKeyphrases<=((re=(ae=t.postEditorStore.currentPost.keyphrases)==null?void 0:ae.additional)==null?void 0:re.length)?(i(),_(P,{key:3},{tooltip:l(()=>[u("span",null,h(s.strings.maxAmountReached),1)]),default:l(()=>[d(x,{id:"add-additional-keyphrase",class:"add-keyphrase gray medium",disabled:!0,onClick:a.addKeyphraseEv},{default:l(()=>[d(E,{width:"14",height:"14"}),T(" "+h(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])]),_:1})):m("",!0),!t.rootStore.isPro||!t.licenseStore.license.isActive?(i(),k(Ce,{key:4},[u("div",rn,h(s.strings.keyphraseDocumentation),1),d(b,{class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.upsell},null,8,nn)]),_:1})],64)):m("",!0)])}const ln=M(en,[["render",an],["__scopeId","data-v-ee0e3647"]]),cn=""+window.__aioseoDynamicImportPreload__("images/open-ai.eed9a73c.png"),ce="all-in-one-seo-pack",dn={setup(){return{getAssetUrl:Zo,settingsStore:xe(),links:Z}},components:{CoreModal:Ie},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:cn,strings:{upgradeToPro:n("Unlock AI Generator",ce),learnMoreLink:D('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',Z.getUpsellUrl("post-settings","general","open-ai"),n("Learn more about all the features",ce),Z.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?D(n("Generate New SEO %1$s",ce),n("Title",ce)):D(n("Generate New SEO %1$s",ce),n("Description",ce))},ctaHeaderTitle(){return this.type==="title"?D(n("Generating SEO %1$s is a Pro Feature",ce),n("Titles",ce)):D(n("Generating SEO %1$s is a Pro Feature",ce),n("Descriptions",ce))},ctaDescription(){return this.type==="title"?D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",ce),n("titles",ce),n("title",ce)):D(n("With our Pro version, you now have access to the powerful feature that generates SEO optimized %1$s with just a click of a button. Say goodbye to manual %2$s creation and hello to increased online visibility.",ce),n("meta descriptions",ce),n("description",ce))}}},un={class:"cta"},pn=["src"],hn={class:"bottom"},gn={class:"title"},mn=["innerHTML"];function _n(o,e,r,t,s,a){const g=p("base-button"),c=p("core-modal");return i(),_(c,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=f=>t.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:l(()=>[T(h(a.headerTitle),1)]),body:l(()=>[u("div",un,[u("img",{src:t.getAssetUrl(s.OpenAiImage),alt:"open-ai-upsell"},null,8,pn),u("div",hn,[u("div",null,[u("p",gn,h(a.ctaHeaderTitle),1),u("p",null,h(a.ctaDescription),1)]),u("div",null,[d(g,{type:"green",size:"medium",tag:"a",href:t.links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:l(()=>[T(h(s.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:s.strings.learnMoreLink},null,8,mn)])])])]),_:1})}const yn=M(dn,[["render",_n]]),fn={},Sn={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},kn=u("path",{d:"M2.23351 8.73334C1.73351 8.73334 1.31129 8.55996 0.966845 8.2132C0.622412 7.86644 0.450195 7.44537 0.450195 6.95C0.450195 6.45464 0.623579 6.03357 0.970345 5.6868C1.31709 5.34005 1.73815 5.16667 2.23351 5.16667V2.89999C2.23351 2.63332 2.33351 2.39999 2.53351 2.19999C2.73351 1.99999 2.96685 1.89999 3.23351 1.89999H6.21686C6.21686 1.39999 6.39024 0.977765 6.737 0.63332C7.08376 0.288876 7.50483 0.116653 8.0002 0.116653C8.49556 0.116653 8.91663 0.290037 9.2634 0.636803C9.61015 0.983559 9.78353 1.40462 9.78353 1.89999H12.7669C13.0335 1.89999 13.2669 1.99999 13.4669 2.19999C13.6669 2.39999 13.7669 2.63332 13.7669 2.89999V5.16667C14.2669 5.16667 14.6891 5.34005 15.0335 5.6868C15.378 6.03357 15.5502 6.45464 15.5502 6.95C15.5502 7.44537 15.3768 7.86644 15.0301 8.2132C14.6833 8.55996 14.2622 8.73334 13.7669 8.73334V12.2167C13.7669 12.4834 13.6669 12.7167 13.4669 12.9167C13.2669 13.1167 13.0335 13.2167 12.7669 13.2167H3.23351C2.96685 13.2167 2.73351 13.1167 2.53351 12.9167C2.33351 12.7167 2.23351 12.4834 2.23351 12.2167V8.73334ZM5.77731 7.01015C5.97615 7.01015 6.14416 6.94024 6.28136 6.80042C6.41856 6.66061 6.48716 6.48971 6.48716 6.28774C6.48716 6.08577 6.41726 5.91619 6.27745 5.77899C6.13762 5.64179 5.9683 5.57319 5.76946 5.57319C5.57063 5.57319 5.40104 5.64283 5.2607 5.78212C5.12036 5.92141 5.0502 6.09414 5.0502 6.3003C5.0502 6.49914 5.12167 6.66715 5.26463 6.80435C5.40758 6.94155 5.57848 7.01015 5.77731 7.01015ZM10.2309 7.01015C10.4298 7.01015 10.5994 6.94024 10.7397 6.80042C10.88 6.66061 10.9502 6.48971 10.9502 6.28774C10.9502 6.08577 10.8787 5.91619 10.7358 5.77899C10.5928 5.64179 10.4219 5.57319 10.2231 5.57319C10.0242 5.57319 9.85623 5.64283 9.71903 5.78212C9.58183 5.92141 9.51323 6.09414 9.51323 6.3003C9.51323 6.49914 9.58313 6.66715 9.72295 6.80435C9.86277 6.94155 10.0321 7.01015 10.2309 7.01015ZM5.30383 10.25H10.6966V9.14637H5.30383V10.25ZM3.55383 11.8964H12.4466V3.2203H3.55383V11.8964Z",fill:"currentColor"},null,-1),vn=[kn];function bn(o,e){return i(),k("svg",Sn,vn)}const wn=M(fn,[["render",bn]]),Cn="all-in-one-seo-pack",Pn={setup(){return{settingsStore:xe()}},components:{AiModal:yn,CoreTooltip:fe,SvgAiRobot:wn},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:n("Use AI Generator",Cn)}}}},En={class:"aioseo-ai-generator"};function xn(o,e,r,t,s,a){const g=p("svg-ai-robot"),c=p("core-tooltip"),f=p("ai-modal");return i(),k("div",En,[d(c,{type:"action",offset:"-30px,0"},{tooltip:l(()=>[T(h(s.strings.useAiGenerator),1)]),default:l(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=v=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))},[d(g,{onClick:e[0]||(e[0]=v=>t.settingsStore.setModalState({modalName:"aiGenerator",value:r.type}))})])]),_:1}),d(f,{show:t.settingsStore.modals.aiGenerator===r.type,type:r.type},null,8,["show","type"])])}const Tn=M(Pn,[["render",xn]]),An={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,strings:t}=Et();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:r,settingsStore:xe(),strings:t}},components:{CoreTooltip:fe,SvgCaret:Je,SvgCircleCheck:Qe,SvgCircleQuestionMark:xt,SvgEllipse:Pt,TransitionSlide:bs},props:{slug:{type:String,required:!0},headerText:String,focusScore:Number,trueSeoScore:Number,toggles:{type:Boolean,default(){return!0}},hideHeader:Boolean,noSlide:Boolean,saveToggleStatus:{type:Boolean,default(){return!0}}},watch:{"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.openCard(o.card)}}},methods:{openCard(o){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:o})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},Ln={class:"aioseo-card aioseo-sidebar-card"},In={class:"text"},Mn={key:0,class:"content"},On={key:1,class:"content"};function Dn(o,e,r,t,s,a){const g=p("svg-ellipse"),c=p("svg-circle-check"),f=p("svg-circle-question-mark"),v=p("core-tooltip"),E=p("svg-caret"),x=p("transition-slide");return i(),k("div",Ln,[r.hideHeader?m("",!0):(i(),k("div",{key:0,class:"header",onClick:e[0]||(e[0]=P=>t.settingsStore.toggleCard({slug:r.slug,shouldSave:r.saveToggleStatus}))},[u("div",In,[Te(o.$slots,"header",{},()=>[T(h(r.headerText),1)]),r.focusScore>=0?Te(o.$slots,"alt",{key:0},()=>[r.focusScore!==null?(i(),k("span",{key:0,class:J(["card-score",t.getScoreClass(r.focusScore)])},h(r.focusScore)+"/100 ",3)):m("",!0)]):m("",!0),r.trueSeoScore>=0?Te(o.$slots,"alt",{key:1},()=>[u("span",{class:J(["card-score",t.getErrorClass(r.trueSeoScore)])},[0<r.trueSeoScore?(i(),_(g,{key:0,width:"6"})):m("",!0),r.trueSeoScore===0?(i(),_(c,{key:1,width:"12"})):m("",!0),T(" "+h(t.getErrorDisplay(r.trueSeoScore)),1)],2)]):m("",!0),o.$slots.tooltip?(i(),_(v,{key:2},{tooltip:l(()=>[Te(o.$slots,"tooltip")]),default:l(()=>[d(f)]),_:3})):m("",!0)]),r.toggles&&t.settingsStore.settings.toggledCards?(i(),_(E,{key:0,class:J({rotated:!t.settingsStore.settings.toggledCards[r.slug]})},null,8,["class"])):m("",!0)])),t.settingsStore.settings.toggledCards||r.noSlide?(i(),_(x,{key:1,active:t.settingsStore.settings.toggledCards[r.slug]&&r.toggles||r.noSlide},{default:l(()=>[o.$slots["before-tabs"]?(i(),k("div",Mn,[Te(o.$slots,"before-tabs")])):m("",!0),Te(o.$slots,"tabs"),o.$slots.default?(i(),k("div",On,[Te(o.$slots,"default")])):m("",!0)]),_:3},8,["active"])):m("",!0)])}const Bn=M(An,[["render",Dn]]),Rn={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const o=Math.max(...this.data.map(s=>s.x)),e=Math.max(...this.data.map(s=>s.y)),r=this.height-this.strokeWidth,t=this.data.map(s=>{const a=s.x===0?0:s.x/o,g=s.y===0?0:s.y/e,c=a*this.width,f=r-g*r+this.strokeWidth;return`${c},${f}`}).join(" ");return`0,${r+this.strokeWidth} `+t+` ${this.width},${r+this.strokeWidth}`}}},Hn=["width","height","viewBox"],Un=["fill","points"],Kn=["stroke","strokeWidth","points"];function Vn(o,e,r,t,s,a){return i(),k("svg",{width:r.width,height:r.height,viewBox:a.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:r.fillColor,points:a.polylinePoints},null,8,Un),u("polyline",{fill:"none",stroke:r.strokeColor,strokeWidth:r.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:a.polylinePoints},null,8,Kn)],8,Hn)}const Fn=M(Rn,[["render",Vn]]),Nn={},Gn={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},zn=u("path",{d:"M108.808 8.212c0-2.579-1.586-4.456-4.628-4.456h-9.826v13.37h3.227v-4.563h3.822l3.742 4.562h3.637v-.29l-3.637-4.351c2.288-.463 3.663-2.13 3.663-4.272zm-4.985 1.653h-6.229V6.533h6.229c1.15 0 1.891.608 1.891 1.666 0 1.084-.714 1.666-1.891 1.666zM157.593 3.756h-3.029v5.078h-8.133V3.756h-3.266v13.383h3.266v-5.277h8.133v5.277h3.029V3.756zM85.72 3.756l-3.598 11.253h-.198l-3.61-11.253H72.56v13.383h3.081V6.149h.185l3.597 10.99h4.96l3.61-10.99h.185v10.99h3.174V3.756h-5.634zM50.57 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.687-1.31 3.464-1.31 2.46 0 4.721.53 6.692 1.482V4.787c-1.97-.939-4.153-1.402-6.864-1.402-3.808 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.642 3.861 1.124.12 3.028.291 4.364.397 1.454.12 1.878.569 1.878 1.23 0 .913-1.019 1.468-3.597 1.468-2.619 0-5.277-.86-7.168-2.063v3.081c1.521 1.019 4.14 1.878 7.062 1.878 4.152 0 6.824-1.6 6.824-4.47.026-2.168-1.402-3.478-4.682-3.821zM57.393 3.756v13.383h12.47V14.4h-9.389v-2.71h9.23V8.978h-9.23V6.493h9.39V3.756H57.392zM136.487 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.688-1.31 3.465-1.31 2.459 0 4.721.53 6.691 1.482V4.787c-1.97-.939-4.152-1.402-6.863-1.402-3.809 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.641 3.861 1.124.12 3.029.291 4.364.397 1.455.12 1.878.569 1.878 1.23 0 .913-1.018 1.468-3.597 1.468-2.618 0-5.276-.86-7.167-2.063v3.081c1.52 1.019 4.139 1.878 7.061 1.878 4.153 0 6.824-1.6 6.824-4.47.027-2.168-1.402-3.478-4.681-3.821zM121.742 3.756v6.85c0 2.592-1.574 4.02-3.941 4.02-2.38 0-3.941-1.402-3.941-4.06v-6.81h-3.213v6.506c0 4.853 3.028 7.26 7.207 7.26 4.007 0 7.115-2.301 7.115-7.101V3.756h-3.227z",fill:"#020202"},null,-1),qn=u("path",{d:"M30.19 10.368c0 .648-.33.753-1.15.753-.872 0-1.031-.145-1.124-.806-.172-1.68-1.309-3.108-3.213-3.267-.608-.052-.754-.277-.754-1.031 0-.7.106-1.031.648-1.031 3.306.013 5.594 2.67 5.594 5.382zm4.814 0C35.004 5.329 31.593 0 23.711 0H8.054c-.318 0-.516.159-.516.45 0 .158.119.304.225.383.568.45 1.415.952 2.525 1.508 1.085.542 1.931.899 2.777 1.243.357.145.49.304.49.502 0 .278-.199.45-.582.45H.543c-.371 0-.543.238-.543.476 0 .198.066.37.238.542 1.005 1.058 2.618 2.328 4.96 3.796a71.557 71.557 0 006.611 3.636c.344.159.45.344.45.542-.013.225-.185.41-.582.41h-5.7c-.317 0-.502.172-.502.437 0 .145.119.33.278.476 1.295 1.177 3.372 2.46 6.136 3.636C15.579 20.061 19.32 21 23.526 21c7.974 0 11.478-5.964 11.478-10.632zm-10.407 7.445c-4.073 0-7.485-3.32-7.485-7.458 0-4.074 3.399-7.353 7.485-7.353 4.179 0 7.458 3.266 7.458 7.353-.013 4.139-3.28 7.458-7.458 7.458z",fill:"#FF642D"},null,-1),jn=[zn,qn];function Wn(o,e){return i(),k("svg",Gn,jn)}const $n=M(Nn,[["render",Wn]]),X="all-in-one-seo-pack",Yn={setup(){return{connectStore:Cs(),licenseStore:_e(),optionsStore:Ae(),postEditorStore:Q(),rootStore:ye(),semrushStore:Ys(),truSeo:new so}},components:{CoreAlert:ve,CoreKeyphrase:fo,CoreLoader:Oe,CoreModal:Ie,CoreTooltip:fe,SvgAreaChart:Fn,SvgCircleCheck:Qe,SvgCirclePlus:Tt,SvgLogoSemrush:$n,SvgTrash:et,metaboxAnalysisDetail:st},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:null,settingsStore:xe(),strings:{modalTitle:D(n("Additional Keyphrases by %1$s",X),"Semrush"),addKeyphrase:n("Add Focus Keyphrase",X),getAdditionalKeyphrases:n("Get Additional Keyphrases",X),showResultsFor:n("Show Results For:",X),keyphrase:n("Keyphrase",X),volume:n("Volume",X),trend:n("Trend",X),addAdditionalKeyphrase:n("Add Keyphrase",X),removeAdditionalKeyphrase:n("Remove Keyphrase",X),noResults:n("No results",X),upsell:D(n("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",X),"Semrush","<strong>AIOSEO Pro</strong>",Z.getUpsellLink("semrush-keywords",Ee.learnMore,null,!0)),semrushGetAdditionalKeyphrases:D(n("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",X),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:n("To use this feature, first add a focus keyphrase.",X),focusKeyphrase:n("Focus Keyphrase",X),delete:n("Delete",X),semrushTooltip:D(n("Get Additional Keyphrases with %1$s!",X),"Semrush"),semrushTooltipLicenseKey:D(n("%1$sA valid license key is required%2$s in order to connect with %3$s.",X),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:D(n("You have exceeded the number of requests allowed by your %1$s plan.",X),"Semrush"),inOrderToUpgradeSemrush:D(n("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",X),Z.getUpsellLink("semrush-pricing",Ee.learnMore,"semrushPricing",!0)),maxAmountReached:D(n("You have reached the maximum of %1$s additional keyphrases.",X),this.postEditorStore.currentPost.maxAdditionalKeyphrases)}}},watch:{semrushCountry:{deep:!0,handler(){this.settingsStore.changeSemrushCountry(this.semrushCountry),this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?n("You have exceeded the limit for requests. Please try again later.",X):n("An error occurred while fetching keyphrases. Please try again later.",X)}},methods:{semrushDatabase(){return JSON.parse(JSON.stringify(Vo)).map(e=>(e.value==="GB"&&(e.value="UK",e.label="United Kingdom"),e.value==="KR"&&(e.label="South Korea"),e)).filter(e=>Fo.includes(e.value.toLowerCase())).map(e=>(e.label=e.label+" - "+e.value.toUpperCase(),e))},getAdditionalKeyphrases(){if(this.showSemrushTooltip=!1,!this.connectStore.isConnected){this.openConnectPopup(this.rootStore.aioseo.urls.connect+"&semrush=true");return}if(!this.semrushStore.hasValidTokens){this.openPopup("https://oauth.semrush.com/auth/login?client_id=aioseo&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Faioseo%2Fsuccess&ref=2190331110&response_type=code&scope=user.id");return}this.openModal()},transformTrendDataToChartPoints(o){return o.split(",").map((r,t)=>({x:t,y:parseFloat(r)}))},openConnectPopup(o){Dt(o,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(o){Dt(o,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(o){return this.semrushStore.authenticate(o.code)},completedConnectCallback(o){return this.connectStore.saveConnectToken(o.token)},openModal(){this.semrushShowModal=!0,!this.semrushStore.error&&this.getKeyphrases()},getKeyphrases(){var o,e,r;(r=(e=(o=this.postEditorStore.currentPost)==null?void 0:o.keyphrases)==null?void 0:e.focus)!=null&&r.keyphrase&&(this.loadingResults=!0,this.semrushStore.getKeyphrases(this.semrushCountry.value).then(()=>{this.loadingResults=!1}).catch(t=>{this.semrushShowModal=!1,this.loadingResults=!1,console.error(t.message)}))},closedCallback(o){o&&this.openModal()},closedConnectCallback(o){if(o){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(o,e,r){const{data:t,source:s,origin:a}=o;if(!(a!=="https://oauth.semrush.com"||e!==s)){if(t.type==="semrush:oauth:success"){window.removeEventListener("message",r,!1);let g={};try{const c=new URL(t.url);g=qe(c.search)}catch{}this.completedCallback(g).then(()=>{e.close(),e=null,this.closedCallback(!0)})}t.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",r,!1),e=null,this.closedCallback())}},onSaved(o){const{value:e}=o;this.postEditorStore.currentPost.keyphrases.focus.keyphrase=e,this.postEditorStore.currentPost.loading.focus=!0,this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},onDeleted(){this.postEditorStore.currentPost.keyphrases.focus.keyphrase="",this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})},addKeyphraseEv(){const e=document.getElementsByClassName(`add-focus-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium"),r=e==null?void 0:e.value.trim();r&&(this.postEditorStore.currentPost.keyphrases.focus={keyphrase:r,score:0,analysis:{}},this.postEditorStore.currentPost.loading.focus=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}))},hasAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(r=>r.keyphrase.toLowerCase()===o).length},getAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(r=>r.keyphrase.toLowerCase()===o)},scoreClass(o){return 79<o?"score-green":49<o?"score-orange":0<o?"score-red":"score-none"},async addAdditionalKeyphrase(o,e){var a,g;if(this.postEditorStore.currentPost.maxAdditionalKeyphrases<=((g=(a=this.postEditorStore.currentPost.keyphrases)==null?void 0:a.additional)==null?void 0:g.length))return;this.addingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.push({keyphrase:o,score:0}),s=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=r,this.postEditorStore.isDirty=!0,await this.truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),await this.$nextTick(),s[t]&&s[t].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(o){const{additional:e}=this.postEditorStore.currentPost.keyphrases,r=e.findIndex(t=>t.keyphrase.toLowerCase()===o);if(r!==-1){const t=document.getElementsByClassName("keyphrase-name");t[r+1]&&t[r+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(o,e){this.removingAdditionalKeyphrase=e;const{additional:r}=this.postEditorStore.currentPost.keyphrases,t=r.findIndex(s=>s.keyphrase.toLowerCase()===o);if(t!==-1){r.splice(t,1),this.postEditorStore.currentPost.keyphrases.additional=r;const s=document.getElementsByClassName("keyphrase-name");s[0]&&s[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(o){o.target.parentElement.classList.toggle("toggled")},pressEnter(o){const e=document.getElementById("add-focus-keyphrase");o.preventDefault(),e.click()}},mounted(){var e;const o=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&o.push(this.semrushStore.refresh()),this.semrushCountry={value:this.settingsStore.settings.semrushCountry,label:(e=this.semrushDatabase().find(r=>r.value===this.settingsStore.settings.semrushCountry))==null?void 0:e.label}}},Zn={class:"aioseo-focus-keyphrase-panel"},Xn={class:"disabled-button gray medium"},Jn={class:"disabled-button gray"},Qn=["innerHTML"],ei={class:"aioseo-modal-content has-padding"},ti={class:"aioseo-settings-row"},oi={class:"settings-name"},si={class:"name"},ri={class:"results"},ni={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},ii={class:"keyphrases-header"},ai={class:"keyphrase"},li={class:"keyphrase-volume"},ci={class:"keyphrase-trend"},di={key:0,class:"keyphrase-actions"},ui={class:"keyphrases-rows"},pi={class:"keyphrase"},hi={class:"keyphrase-volume"},gi={class:"keyphrase-trend"},mi={key:0,class:"keyphrase-actions"},_i={key:0,class:"focus-keyphrase"},yi={key:1},fi={key:2,class:"remove-keyphrase"},Si=["onClick"],ki={key:1,class:"keyphrase-row"},vi=["colspan"],bi={key:1},wi={class:"semrush-logo"},Ci={class:"semrush-upsell"},Pi=["innerHTML"],Ei=["innerHTML"];function xi(o,e,r,t,s,a){const g=p("base-input"),c=p("svg-circle-plus"),f=p("base-button"),v=p("core-tooltip"),E=p("core-keyphrase"),x=p("core-loader"),P=p("metaboxAnalysisDetail"),b=p("core-alert"),A=p("base-select"),z=p("svg-area-chart"),U=p("svg-circle-check"),se=p("svg-trash"),ae=p("svg-logo-semrush"),re=p("core-modal");return i(),k("div",Zn,[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(g,{key:0,size:"medium",class:J(`add-focus-keyphrase-${o.$root.$data.screenContext}-input`),onKeydown:kt(a.pressEnter,["enter"])},null,8,["class","onKeydown"])):m("",!0),u("div",{class:J(`add-focus-keyphrase-${o.$root.$data.screenContext}-button`)},[!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(f,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:a.addKeyphraseEv},{default:l(()=>[d(c,{width:"14",height:"14"}),T(" "+h(s.strings.addKeyphrase),1)]),_:1},8,["onClick"])):m("",!0),!t.postEditorStore.currentPost.keyphrases.focus||!t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(v,{key:1},{tooltip:l(()=>[u("span",null,h(s.strings.semrushGetAdditionalKeyphrases)+" "+h(s.strings.pleaseAddFocusKeyphrase),1)]),default:l(()=>[u("div",Xn,[d(c,{width:"14",height:"14"}),T(" "+h(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0)],2),t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(E,{key:1,index:0,keyphrase:t.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:t.postEditorStore.currentPost.keyphrases.focus.score,onSaved:a.onSaved,onDeleted:a.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):m("",!0),t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus?(i(),_(x,{key:2,class:"analysis-loading",dark:""})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase?(i(),_(P,{key:3,analysisItems:t.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.rootStore.isPro&&t.licenseStore.isUnlicensed?(i(),_(v,{key:4},{tooltip:l(()=>[u("span",{innerHTML:s.strings.semrushTooltipLicenseKey},null,8,Qn)]),default:l(()=>[u("div",Jn,[d(c,{width:"14",height:"14"}),T(" "+h(s.strings.getAdditionalKeyphrases),1)])]),_:1})):m("",!0),!t.postEditorStore.currentPost.loading.focus&&t.postEditorStore.currentPost.keyphrases.focus&&t.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.rootStore.isPro||!t.licenseStore.isUnlicensed)?(i(),_(v,{key:5,disabled:!s.showSemrushTooltip||t.rootStore.isPro,"force-show":s.showSemrushTooltip&&!t.rootStore.isPro},{tooltip:l(()=>[u("span",null,h(s.strings.semrushTooltip),1)]),default:l(()=>[d(f,{class:"add-keyphrase gray medium",onClick:a.getAdditionalKeyphrases},{default:l(()=>[d(c,{width:"14",height:"14"}),T(" "+h(s.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):m("",!0),d(re,{show:s.semrushShowModal,onClose:e[1]||(e[1]=B=>s.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:l(()=>[T(h(s.strings.modalTitle),1)]),body:l(()=>[u("div",ei,[t.licenseStore.isUnlicensed?(i(),_(b,{key:0,type:"blue",innerHTML:s.strings.upsell},null,8,["innerHTML"])):m("",!0),u("div",ti,[u("div",oi,[u("div",si,h(s.strings.showResultsFor),1)]),d(A,{class:"semrush-country-selector",size:"medium",options:a.semrushDatabase(),placeholder:s.strings.selectPriceIndicator,modelValue:s.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=B=>s.semrushCountry=B)},null,8,["options","placeholder","modelValue"])]),u("div",ri,[u("table",ni,[u("thead",null,[u("tr",ii,[u("th",ai,h(s.strings.keyphrase),1),u("th",li,h(s.strings.volume),1),u("th",ci,h(s.strings.trend),1),t.licenseStore.isUnlicensed?m("",!0):(i(),k("th",di))])]),u("tbody",ui,[t.semrushStore.results.length&&!s.loadingResults?(i(!0),k(Ce,{key:0},Ke(t.semrushStore.results,(B,W)=>{var le,ne,de,q;return i(),k("tr",{class:J(["keyphrase-row",{even:W%2===0}]),key:W},[u("td",pi,h(B[0]),1),u("td",hi,h(B[1]),1),u("td",gi,[d(z,{width:66,height:24,data:a.transformTrendDataToChartPoints(B[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),t.licenseStore.isUnlicensed?m("",!0):(i(),k("td",mi,[B[0]===t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),k("div",_i,[d(U),T(" "+h(s.strings.focusKeyphrase),1)])):m("",!0),B[0]!==t.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(i(),k("div",yi,[W!==s.removingAdditionalKeyphrase&&(W===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(B[0]))&&t.postEditorStore.currentPost.maxAdditionalKeyphrases>((ne=(le=t.postEditorStore.currentPost.keyphrases)==null?void 0:le.additional)==null?void 0:ne.length)?(i(),_(f,{key:0,type:"gray",size:"medium",onClick:N=>a.addAdditionalKeyphrase(B[0],W),loading:W===s.addingAdditionalKeyphrase},{default:l(()=>[T(h(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):m("",!0),W!==s.removingAdditionalKeyphrase&&(W===s.addingAdditionalKeyphrase||!a.hasAdditionalKeyphrase(B[0]))&&t.postEditorStore.currentPost.maxAdditionalKeyphrases<=((q=(de=t.postEditorStore.currentPost.keyphrases)==null?void 0:de.additional)==null?void 0:q.length)?(i(),_(v,{key:1},{tooltip:l(()=>[u("span",null,h(s.strings.maxAmountReached),1)]),default:l(()=>[d(f,{type:"gray",size:"medium",disabled:!0,onClick:N=>a.addAdditionalKeyphrase(B[0],W),loading:W===s.addingAdditionalKeyphrase},{default:l(()=>[T(h(s.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])]),_:2},1024)):m("",!0),a.getAdditionalKeyphrase(B[0])&&W!==s.addingAdditionalKeyphrase&&(W===s.removingAdditionalKeyphrase||a.hasAdditionalKeyphrase(B[0]))?(i(),k("div",fi,[u("span",{class:J(["keyphrase-score",a.scoreClass(a.getAdditionalKeyphrase(B[0]).score)]),onClick:N=>a.goToAdditionalKeyphrase(B[0])},h(a.getAdditionalKeyphrase(B[0]).score)+"/100",11,Si),d(v,{type:"action"},{tooltip:l(()=>[T(h(s.strings.delete),1)]),default:l(()=>[d(se,{onClick:N=>a.removeAdditionalKeyphrase(B[0],W)},null,8,["onClick"])]),_:2},1024)])):m("",!0)])):m("",!0)]))],2)}),128)):m("",!0),!t.semrushStore.results.length||s.loadingResults?(i(),k("tr",ki,[u("td",{colspan:t.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[s.loadingResults?(i(),_(x,{key:0,dark:""})):m("",!0),!s.loadingResults&&!t.semrushStore.error?(i(),k("span",bi,h(s.strings.noResults),1)):m("",!0),t.semrushStore.error&&!t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),_(b,{key:2,type:"red"},{default:l(()=>[T(h(a.semrushError),1)]),_:1})):m("",!0),t.semrushStore.error&&t.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(i(),k(Ce,{key:3},[u("div",wi,[d(ae)]),u("div",Ci,[u("span",null,[u("strong",{innerHTML:s.strings.youHaveExceededSemrush},null,8,Pi)]),T(" "+h(" ")+" "),u("span",{innerHTML:s.strings.inOrderToUpgradeSemrush},null,8,Ei)])],64)):m("",!0)])],8,vi)])):m("",!0)])])])])]),_:1},8,["show"])])}const Ti=M(Yn,[["render",xi]]),We="all-in-one-seo-pack",Ai={setup(){const{getErrorClass:o,getErrorDisplay:e,strings:r}=Et();return{postEditorStore:Q(),rootStore:ye(),getErrorClass:o,getErrorDisplay:e,strings:r}},components:{CoreAlert:ve,CoreMainTabs:Be,metaboxAnalysisDetail:st,SvgEllipse:Pt,SvgCircleCheck:Qe},data(){return{initTab:"basic",tabs:[{slug:"basic",name:n("Basic SEO",We)},{slug:"title",name:n("Title",We)},{slug:"readability",name:n("Readability",We)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){if(!Ye()||!["elementor","divi"].includes(this.rootStore.aioseo.integration))return!1;const o=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return D(n("We have detected that you are currently using the %1$s Page Builder. Please click %2$shere%3$s to use the %1$s editor for a most accurate result.",We),o,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},Li={class:"page-analysis-panel"},Ii=["innerHTML"];function Mi(o,e,r,t,s,a){const g=p("core-alert"),c=p("svg-ellipse"),f=p("svg-circle-check"),v=p("core-main-tabs"),E=p("metaboxAnalysisDetail");return i(),k("div",Li,[a.pageBuilderAlert?(i(),_(g,{key:0,type:"yellow"},{default:l(()=>[u("span",{innerHTML:a.pageBuilderAlert},null,8,Ii)]),_:1})):m("",!0),d(v,{tabs:a.parseTabs,showSaveButton:!1,active:s.initTab,internal:"",onChanged:e[0]||(e[0]=x=>a.processChangeTab(x))},{"after-label":l(({tab:x})=>[x.errorCount>=0?(i(),k("span",{key:0,class:J(["tab-score",t.getErrorClass(t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors)])},[0<t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors?(i(),_(c,{key:0,width:"6"})):m("",!0),t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors===0?(i(),_(f,{key:1,width:"12"})):m("",!0),T(" "+h(t.getErrorDisplay(t.postEditorStore.currentPost.page_analysis.analysis[x.slug].errors)),1)],2)):m("",!0)]),_:1},8,["tabs","active"]),d(ze,{mode:"out-in"},{default:l(()=>[t.postEditorStore.currentPost.page_analysis?(i(),_(E,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[s.initTab]},null,8,["analysisItems"])):m("",!0)]),_:1})])}const Oi=M(Ai,[["render",Mi]]),$e="all-in-one-seo-pack",Di={emits:["changeTab"],setup(){return{licenseStore:_e(),postEditorStore:Q(),hasRequiredFeature:Ue.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:Ee,links:Z}},components:{CoreAlert:ve},data(){return{license:Ue,strings:{description:n("Cornerstone content refers to the most important and informative articles or pages on your website that serve as the foundation for your content strategy. AIOSEO uses cornerstone content for",$e),linkingRecommendations:n("internal linking recommendations in Link Assistant.",$e),upsell:D(n("Cornerstone Content is a %1$s feature. %2$s",$e),"PRO",Z.getUpsellLink("post-settings-general",Ee.learnMore,"cornerstone-content",!0)),markAsCornerstone:n("Mark as Cornerstone",$e)}}}},Bi={class:"cornerstone-content-panel"},Ri={class:"cornerstone-content-text"},Hi=["innerHTML"],Ui=["innerHTML"];function Ki(o,e,r,t,s,a){const g=p("base-toggle"),c=p("core-alert");return i(),k("div",Bi,[u("p",Ri,[u("span",null,h(s.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=pe(f=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},h(s.strings.linkingRecommendations),1),u("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Hi)]),d(g,{modelValue:t.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=f=>t.postEditorStore.currentPost.pillar_content=f),e[2]||(e[2]=f=>t.postEditorStore.isDirty=!0)],disabled:!t.hasRequiredFeature},{default:l(()=>[T(h(s.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(i(),_(c,{key:0,class:"inline-upsell",type:"blue"},{default:l(()=>[u("div",{innerHTML:s.strings.upsell},null,8,Ui)]),_:1})):m("",!0)])}const Vi=M(Di,[["render",Ki]]),oe="all-in-one-seo-pack",Fi={emits:["changeTab"],setup(){const{parseTags:o}=Ct({separator:void 0}),{maxRecommendedCount:e}=wt(),{watchHighlightSentences:r}=Mr(),{runAnalysis:t,strings:s}=Et();return{composableStrings:s,licenseStore:_e(),maxRecommendedCount:e,optionsStore:Ae(),parseTags:o,postEditorStore:Q(),rootStore:ye(),runAnalysis:t,seoPreviewStore:xs(),settingsStore:xe(),tagsStore:Ao(),truSeoHighlighterStore:ot(),watchHighlightSentences:r}},components:{AdditionalKeyphrases:ln,AiGenerator:Tn,BaseRadioToggle:no,CoreAlert:ve,CoreGoogleSearchPreview:vs,CoreHtmlTagsEditor:At,CoreSettingsRow:Pe,CoreSidebarCard:Bn,CoreTooltip:fe,CoreProBadge:ws,FocusKeyphrase:Ti,MetaboxAnalysisDetail:st,PageAnalysis:Oi,CornerstoneContent:Vi,SvgCircleQuestionMark:xt,SvgDesktop:Ps,SvgMobile:Es,SvgPencil:bt},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:Ue,allowed:Le,isPageBuilderEditor:He,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Xt(this.composableStrings,{pageName:n("General",oe),serpPreview:n("SERP Preview",oe),serpPreviewDocumentation:n("SERP: Search Engine Results Page preview. Your site's potential appearance in Google search results. Final display may vary, but this preview closely resembles it.",oe),editSnippet:n("Edit Snippet",oe),clickToAddTitle:n("Click on the tags below to insert variables into your title.",oe),metaDescription:n("Meta Description",oe),clickToAddDescription:n("Click on the tags below to insert variables into your meta description.",oe),cornerstoneContent:n("Cornerstone Content",oe),focusKeyphrase:n("Focus Keyphrase",oe),additionalKeyphrases:n("Additional Keyphrases",oe),pageAnalysis:n("Page Analysis",oe),basicSeo:n("Basic SEO",oe),title:n("Title",oe),readability:n("Readability",oe),lookingForMetaKeywords:n("Looking for meta keywords?",oe),goToAdvancedTab:n("Go to the Advanced tab to add/edit meta keywords",oe),autogenerateDescriptionsAlert:D(n("Warning: You have disabled Autogenerate Descriptions and are using the default description format. %1$s will not output a description unless you enter a custom one. You can enable Autogenerate Descriptions under %2$s.",oe),"AIOSEO",Z.getPlainLink(n("Search Appearance > Advanced",oe),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:D(n("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",oe),Z.getDocLink(Ee.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){it(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(o,e){it(()=>this.watchHighlightSentences(o,e))}},computed:{title(){return D(n("%1$s Title",oe),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return lt()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return lt()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&Le("aioseo_page_analysis")&&!this.isForum},isForum(){return this.rootStore.aioseo.data.isBBPressActive&&(this.postEditorStore.currentPost.postType==="forum"||this.postEditorStore.currentPost.postType==="topic"||this.postEditorStore.currentPost.postType==="reply")},focusKeyphraseScore(){return this.postEditorStore.currentPost.keyphrases.focus.keyphrase?this.postEditorStore.currentPost.keyphrases.focus.score:null},showAutogenerateDescriptionsAlert(){return this.optionsStore.internalOptions.internal.deprecatedOptions.includes("autogenerateDescriptions")?(this.postEditorStore.currentPost.context==="post"?this.optionsStore.dynamicOptions.searchAppearance.postTypes[this.postEditorStore.currentPost.postType].metaDescription:this.optionsStore.dynamicOptions.searchAppearance.taxonomies[this.postEditorStore.currentPost.termType].metaDescription)===this.postEditorStore.currentPost.description&&!this.optionsStore.options.deprecated.searchAppearance.advanced.autogenerateDescriptions:!1}},methods:{hideKeywordsLooking(){this.optionsStore.options.searchAppearance.advanced.keywordsLooking=!1,this.optionsStore.saveChanges()},isMobilePreviewEv(o){this.postEditorStore.changeGeneralPreview(o)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.currentPost.modalOpen=!0},getDefaultTags(o){switch(o){case"title":return this.postEditorStore.currentPost.context==="post"?["post_title","separator_sa","site_title"]:["taxonomy_title","separator_sa","site_title"];case"description":return this.postEditorStore.currentPost.context==="post"?this.postEditorStore.currentPost.postType==="attachment"?["attachment_caption","separator_sa","site_title"]:this.postEditorStore.currentPost.postType==="product"?["post_excerpt","post_content"]:["post_excerpt","post_content","separator_sa"]:["taxonomy_title","separator_sa","taxonomy_description"]}},getFocusKeyphraseTooltipOffset(){return Lo()?"-15px,0":He()?"35px,0":"0,0"}},mounted(){this.keyphrases=this.postEditorStore.currentPost.keyphrases,this.postEditorStore.currentPost.context==="post"&&!this.postEditorStore.currentPost.keyphrases.length&&(this.selectedKeyphrase=-1),window.aioseoBus.$on("updateTitleKey",()=>{this.titleKey="title"+Math.random(0,999)}),window.aioseoBus.$on("updateDescriptionKey",()=>{this.descriptionKey="description"+Math.random(0,999)})}},Ni={class:"aioseo-tab-content aioseo-post-general"},Gi=["innerHTML"],zi=["innerHTML"],qi=["innerHTML"],ji={key:0},Wi=["innerHTML"],$i=["innerHTML"];function Yi(o,e,r,t,s,a){const g=p("svg-circle-question-mark"),c=p("core-tooltip"),f=p("svg-desktop"),v=p("svg-mobile"),E=p("base-radio-toggle"),x=p("core-google-search-preview"),P=p("svg-pencil"),b=p("base-button"),A=p("core-settings-row"),z=p("ai-generator"),U=p("core-html-tags-editor"),se=p("core-alert"),ae=p("core-pro-badge"),re=p("cornerstone-content"),B=p("focus-keyphrase"),W=p("additional-keyphrases"),le=p("page-analysis"),ne=p("core-sidebar-card"),de=p("metabox-analysis-detail");return i(),k("div",Ni,[s.allowed("aioseo_page_general_settings")?(i(),_(A,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:l(()=>[u("div",null,[u("span",null,h(s.strings.serpPreview),1),d(c,{offset:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:l(()=>[T(h(s.strings.serpPreviewDocumentation),1)]),default:l(()=>[d(g)]),_:1},8,["offset"])]),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(E,{key:0,modelValue:t.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":a.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:l(()=>[d(f)]),mobile:l(()=>[d(v)]),_:1},8,["modelValue","onUpdate:modelValue"])):m("",!0)]),content:l(()=>{var q,N,ee;return[d(x,{"focus-keyphrase":((ee=(N=(q=t.postEditorStore.currentPost)==null?void 0:q.keyphrases)==null?void 0:N.focus)==null?void 0:ee.keyphrase)??"",device:o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext==="metabox"||t.postEditorStore.currentPost.generalMobilePrev?"mobile":"desktop",url:t.tagsStore.liveTags.permalink,title:t.parseTags(t.postEditorStore.currentPost.title||t.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),description:t.parseTags(t.postEditorStore.currentPost.description||t.postEditorStore.currentPost.tags.description||"#post_content"),"rich-results":t.seoPreviewStore.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),o.$root.$data.screenContext==="sidebar"&&r.parentComponentContext!=="modal"?(i(),_(b,{key:0,class:"edit-snippet gray small",onClick:a.editSnippetEv},{default:l(()=>[d(P),T(" "+h(s.strings.editSnippet),1)]),_:1},8,["onClick"])):m("",!0)]}),_:1})):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(A,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:a.title,key:s.titleKey},{content:l(()=>[d(U,{modelValue:t.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=q=>t.postEditorStore.currentPost.title=q),e[2]||(e[2]=q=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=q=>s.titleCount=q.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":a.getDefaultTags("title")},{"tags-description":l(()=>[T(h(s.strings.clickToAddTitle),1)]),"append-button":l(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"title"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,60)},null,8,Gi)]),_:1},8,["name"])):m("",!0),(o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal")&&s.allowed("aioseo_page_general_settings")?(i(),_(A,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:s.strings.metaDescription,key:s.descriptionKey},{content:l(()=>[a.showAutogenerateDescriptionsAlert?(i(),_(se,{key:0,type:"yellow"},{default:l(()=>[u("span",{innerHTML:s.strings.autogenerateDescriptionsAlert},null,8,zi)]),_:1})):m("",!0),d(U,{modelValue:t.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=q=>t.postEditorStore.currentPost.description=q),e[5]||(e[5]=q=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=q=>s.descriptionCount=q.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:r.parentComponentContext==="modal"?"top":"bottom","default-tags":a.getDefaultTags("description")},{"tags-description":l(()=>[T(h(s.strings.clickToAddDescription),1)]),"append-button":l(()=>[t.postEditorStore.currentPost.postType&&t.postEditorStore.currentPost.postType!=="web-story"&&!s.isPageBuilderEditor()?(i(),_(z,{key:0,type:"description"})):m("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,160)},null,8,qi)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="metabox"&&t.postEditorStore.currentPost.context==="post"&&!["attachment","web-story"].includes(t.postEditorStore.currentPost.postType)&&!s.isPageBuilderEditor()?(i(),_(A,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:l(()=>[T(h(s.strings.cornerstoneContent)+" ",1),t.licenseStore.isUnlicensed?(i(),_(ae,{key:0})):m("",!0)]),content:l(()=>[d(re,{onChangeTab:e[6]||(e[6]=q=>o.$emit("changeTab",q))})]),_:1})):m("",!0),a.displayTruSeoMetaboxCard?(i(),k(Ce,{key:4},[t.optionsStore.options.searchAppearance.advanced.useKeywords&&t.optionsStore.options.searchAppearance.advanced.keywordsLooking?(i(),k("div",ji,[d(se,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:a.hideKeywordsLooking},{default:l(()=>[T(h(s.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=pe(q=>o.$emit("changeTab","advanced"),["prevent"]))},h(s.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=pe(q=>o.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):m("",!0),d(A,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:l(()=>[u("span",null,h(s.strings.focusKeyphrase),1),d(c,{offset:"25px,0"},{tooltip:l(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,Wi)]),default:l(()=>[d(g)]),_:1})]),content:l(()=>[d(B)]),_:1}),d(A,{name:s.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:l(()=>[d(W)]),_:1},8,["name"])],64)):m("",!0),a.displayTruSeoMetaboxCard&&t.postEditorStore.currentPost.page_analysis?(i(),_(A,{key:5,name:s.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:l(()=>[d(le)]),_:1},8,["name"])):m("",!0),o.$root.$data.screenContext==="sidebar"&&!s.isPageBuilderEditor()&&r.parentComponentContext!=="modal"?(i(),_(ne,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":s.strings.cornerstoneContent},{default:l(()=>[d(re,{onChangeTab:e[9]||(e[9]=q=>o.$emit("changeTab",q))})]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ne,{key:7,slug:"focus",focusScore:a.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:l(()=>[u("span",null,h(s.strings.focusKeyphrase),1),d(c,{offset:a.getFocusKeyphraseTooltipOffset()},{tooltip:l(()=>[u("div",{innerHTML:s.strings.keyphraseDocumentation},null,8,$i)]),default:l(()=>[d(g)]),_:1},8,["offset"])]),default:l(()=>[d(B)]),_:1},8,["focusScore"])):m("",!0),a.displayTruSeoSidebarKeyphraseCard?(i(),_(ne,{key:8,slug:"additional","header-text":s.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:l(()=>[d(W)]),_:1},8,["header-text"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:9,slug:"basicseo","header-text":s.strings.basicSeo,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:10,slug:"title","header-text":s.strings.title,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0),a.displayTruSeoSidebarAnalysisCard?(i(),_(ne,{key:11,slug:"readability","header-text":s.strings.readability,trueSeoScore:t.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:l(()=>[d(de,{analysisItems:t.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):m("",!0)])}const So=M(Fi,[["render",Yi]]),Zi={class:"post-title"},Xi={key:1},Ji={key:1},Qi={key:1},ea={key:1},ta={key:1},oa={key:0,class:"btn-view"},sa=["href"],Ut="keyword-rank-tracker-keywords-table",Kt={__name:"KeywordsTable",props:{paginatedKeywords:Object,itemsPerPage:Number},setup(o){const e="all-in-one-seo-pack",r=Ze(),t=ye(),s={position:n("Position",e),openInKrt:n("Open in Keyword Rank Tracker",e)},a=[{label:Ee.delete,value:"delete"},{label:s.addToGroup,value:"assignGroup"}],g=o,c=we(null),f=we([]),{orderBy:v,orderDir:E,pageNumber:x,processAdditionalFilters:P,processChangeItemsPerPage:b,processFilterTable:A,processPagination:z,processSearch:U,processSort:se,searchTerm:ae,wpTableKey:re,wpTableLoading:B}=ao({fetchData:r.fetchKeywords,tableId:Ut,tableRef:c.value,resultsPerPage:g.itemsPerPage}),W=ke(()=>[{slug:"name",label:n("Keyword",e),sortable:1<g.paginatedKeywords.rows.length,sortDir:v.value==="name"?E.value:"asc",sorted:v.value==="name"},{slug:"clicks",label:n("Clicks",e),sortable:1<g.paginatedKeywords.rows.length,sortDir:v.value==="clicks"?E.value:"asc",sorted:v.value==="clicks",width:"80px"},{slug:"ctr",label:n("CTR",e),sortable:1<g.paginatedKeywords.rows.length,sortDir:v.value==="ctr"?E.value:"asc",sorted:v.value==="ctr",width:"68px"},{slug:"impressions",label:n("Impressions",e),sortable:1<g.paginatedKeywords.rows.length,sortDir:v.value==="impressions"?E.value:"asc",sorted:v.value==="impressions",width:"110px"},{slug:"position",label:n("Position",e),sortable:1<g.paginatedKeywords.rows.length,sortDir:v.value==="position"?E.value:"asc",sorted:v.value==="position",width:"90px"},{slug:"history",label:n("Position History",e),width:"140px"},{slug:"tracking",label:n("Tracking",e),width:"85px"},{slug:"view",label:"",width:"40px"}]),le=(N,ee)=>{var V;let $=((V=N.statistics)==null?void 0:V[ee])??"";switch(ee){case"ctr":$=$!==""?parseFloat($)+"%":$;break;case"clicks":case"impressions":$=$!==""?Is.compactNumber($):$;break;case"position":$=$!==""?Math.round($).toFixed(0):$;break}return $},ne=N=>{var ee;return(ee=N.statistics)!=null&&ee.history?[{name:s.position,data:N.statistics.history.map($=>({x:$.date,y:$.position,label:$.position}))}]:[]},de=N=>t.aioseo.urls.aio.searchStatistics+`&search=${encodeURIComponent(N.name)}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`,q=async(N,ee)=>{f.value[ee]=!0;try{N.id?await r.deleteKeywords([N.id]):await r.insertKeywords({keywords:[N.name]}).then(()=>{N.tracking=!0}).catch(()=>{N.tracking=!1}),await r.fetchKeywords({rows:g.paginatedKeywords.rows}).then(()=>{r.maybeFetchStatistics({context:"keywords"})})}catch($){console.error($)}finally{f.value=[]}};return(N,ee)=>{const $=p("base-toggle");return i(),_(S(lo),{ref_key:"table",ref:c,id:Ut,"additional-filters":[],"bulk-options":a,columns:W.value,filters:[],"initial-items-per-page":100,"initial-page-number":S(x),"initial-search-term":S(ae),key:S(re),loading:S(B),rows:o.paginatedKeywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:S(A),onPaginate:S(z),onProcessAdditionalFilters:S(P),onProcessBulkAction:V=>({}),onProcessChangeItemsPerPage:S(b),onSearch:S(U),onSortColumn:S(se)},{name:l(({row:V})=>[u("div",Zi,[u("b",null,h(V.name),1)])]),clicks:l(({row:V})=>[V.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",Xi,h(le(V,"clicks")),1))]),ctr:l(({row:V})=>[V.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",Ji,h(le(V,"ctr")),1))]),impressions:l(({row:V})=>[V.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",Qi,h(le(V,"impressions")),1))]),position:l(({row:V})=>[V.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",ea,h(le(V,"position")),1))]),history:l(({row:V})=>[V.statistics===null?(i(),_(S(Oe),{key:0,dark:""})):(i(),k("div",ta,[ne(V).length?(i(),_(S(St),{key:0,series:ne(V),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:O=>parseFloat(O).toFixed(2)}}}},null,8,["series","chart-overrides"])):m("",!0)]))]),tracking:l(({row:V,index:O})=>[f.value[O]?(i(),_(S(Oe),{key:0,dark:""})):m("",!0),d($,{modelValue:V.tracking,"onUpdate:modelValue":[R=>V.tracking=R,R=>q(V,O,R)],disabled:!!f.value[O]},null,8,["modelValue","onUpdate:modelValue","disabled"])]),view:l(({row:V})=>[V.id?(i(),k("div",oa,[u("a",{href:de(V),target:"_blank"},[d(S(fe),{type:"action",offset:"-80px,0"},{tooltip:l(()=>[T(h(s.openInKrt),1)]),default:l(()=>[d(S(je))]),_:1})],8,sa)])):m("",!0)]),_:1},8,["columns","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},ra={key:0,class:"keyword-rank-tracker-container"},na=["innerHTML"],ia={class:"keyword-rank-tracker-container__card"},aa={class:"keyword-rank-tracker-container__card__header"},la={class:"keyword-rank-tracker-container__card__body"},ca=["innerHTML"],da={class:"keyword-rank-tracker-container__card"},ua={class:"keyword-rank-tracker-container__card__header"},pa={class:"keyword-rank-tracker-container__card__body"},ut="320px",ha={__name:"KeywordRankTracker",setup(o){xo(b=>({af7a239a:ut}));const e="all-in-one-seo-pack",r=Ze(),t=_e(),s=ye(),a=Jt(),g=Z.getDocLink(n("Learn More",e),"keywordRankTracker",!0),{connect:c,loading:f}=As(),v={...Ts().strings,withAioseo:n("Below you can track how your page is performing in search results based on your keyword(s).",e),keywordPositions:n("Keyword Positions",e),sampleDataAlert:n("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.",e),connectToGsc:n("Connect to Google Search Console",e),unlockSs:n("Unlock Search Statistics",e)},E=ke(()=>!t.isUnlicensed&&Ue.hasCoreFeature("search-statistics")&&(!a.isConnected||a.unverifiedSite)),x=ke(()=>({rows:r.keywords.all.rows.slice(0,3).map(b=>({...b,tracking:!0}))})),P=ke(()=>{var z;const b={};for(const U of x.value.rows)(z=U==null?void 0:U.statistics)!=null&&z.history&&(b[U.name]=U);const A=[];for(const U in b)A.push({name:U,data:b[U].statistics.history.map(se=>({x:se.date,y:se.position}))});return A});return(b,A)=>{const z=p("base-button");return i(),k("div",null,[S(a).shouldShowSampleReports?(i(),k("div",ra,[d(S(ve),{type:"yellow"},{default:l(()=>[u("span",null,h(v.sampleDataAlert),1),u("div",null,[E.value?(i(),_(z,{key:0,type:"green",size:"small",onClick:S(c),loading:S(f)},{default:l(()=>[T(h(v.connectToGsc),1)]),_:1},8,["onClick","loading"])):(i(),_(z,{key:1,tag:"a",href:S(Z).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),target:"_blank",type:"green",size:"small",loading:S(f)},{default:l(()=>[T(h(v.unlockSs),1)]),_:1},8,["href","loading"]))])]),_:1}),u("div",null,[u("span",null,h(v.withAioseo),1),T(),u("span",{innerHTML:S(g)},null,8,na)]),u("div",ia,[u("div",aa,h(v.keywordPositions),1),u("div",la,[d(S(St),{height:parseInt(ut),series:P.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:U=>parseFloat(U).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(S(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])])):(i(),k(Ce,{key:1},[d(S(tt),{class:"keyword-rank-tracker-container"},{default:l(()=>[u("div",null,[u("span",null,h(v.withAioseo),1),T(),u("span",{innerHTML:S(g)},null,8,ca)]),u("div",da,[u("div",ua,h(v.keywordPositions),1),u("div",pa,[d(S(St),{height:parseInt(ut),series:P.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:U=>parseFloat(U).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),d(S(Kt),{"paginated-keywords":x.value},null,8,["paginated-keywords"])]),_:1}),E.value?(i(),_(S(Ls),{key:0})):(i(),_(S(Lt),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:S(a).showSampleReports,"cta-link":S(Z).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),"button-text":v.ctaButtonText,"second-button-text":v.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":S(Z).getUpsellUrl("search-statistics","keyword-rank-tracker",S(s).isPro?"pricing":"liteUpgrade"),"feature-list":[v.feature1,v.feature2,v.feature3,v.feature4],"align-top":"","hide-bonus":!S(t).isUnlicensed},{"header-text":l(()=>[T(h(v.ctaHeader),1)]),description:l(()=>[d(S(co),{"core-feature":["search-statistics"]}),T(" "+h(v.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))])}}},Vt=M(ha,[["__scopeId","data-v-cfc6c999"]]),ga={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=_e(),s=Jt(),a=e,g={headerTitle:n("Keyword Performance Tracking",r)},c=ke(()=>s.isConnected&&!s.unverifiedSite);return(f,v)=>(i(),_(S(Ie),{show:o.modalOpen,onClose:v[0]||(v[0]=E=>a("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:l(()=>[T(h(g.headerTitle),1)]),body:l(()=>[u("div",{class:J(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":S(s).shouldShowSampleReports}])},[!S(t).isUnlicensed&&S(Ue).hasCoreFeature("search-statistics","keyword-rank-tracker")&&c.value?(i(),_(S(Vt),{key:0})):(i(),_(S(Vt),{key:1}))],2)]),_:1},8,["show"]))}},ma={},_a={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},ya=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),fa=[ya];function Sa(o,e){return i(),k("svg",_a,fa)}const It=M(ma,[["render",Sa]]),pt="all-in-one-seo-pack",ka={setup(){return{postEditorStore:Q()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Link Assistant",pt),description:n("Here you can view an overview of your existing links as well as find suggestions for new internal links. Click on the button below to view the Link Assistant panel.",pt),button:n("Open Link Assistant",pt)}}}},va={class:"aioseo-link-assistant-sidebar"},ba={class:"aioseo-sidebar-content-title"};function wa(o,e,r,t,s,a){const g=p("svg-right-arrow-short"),c=p("base-button"),f=p("core-settings-row");return i(),k("div",va,[o.$root.$data.screenContext==="sidebar"?(i(),_(f,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:l(()=>[u("div",ba,h(s.strings.title),1),u("p",null,h(s.strings.description),1),d(c,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=v=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:l(()=>[d(g),T(" "+h(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const Ca=M(ka,[["render",wa]]),Pa=()=>{const o=(e,r)=>{const t=De(r);let s=null;return e.forEach(a=>{if(s||!a.attributes)return;if(a.attributes.content&&a.attributes.content.search(t)!==-1){s=a.clientId;return}if(!a.innerBlocks)return;const g=o(a.innerBlocks,r);g&&(s=g)}),s};return{findTargetBlock:o}},be="all-in-one-seo-pack",Ea=(o={})=>{const{emit:e,linkType:r,linksReport:t,metabox:s,pageNumber:a,post:g,postIndex:c,postReport:f,refreshTable:v=()=>{},wpTableLoading:E}=o,x=we(""),P="linkAssistantPostsReport",b=we([]),A=we(!1),z=ke(()=>{if(!s)return g.links[r].rows;const O=a.value===1?0:(a.value-1)*10;return g.links[r].rows.slice(O,O+10)}),U={frontPage:n("Front Page",be),deleteLink:n("Delete Link",be)},se={areYouSureSingle:n("Are you sure you want to delete this link?",be),areYouSureMultiple:n("Are you sure you want to delete these links?",be),areYouSureAll:n("Are you sure you want to delete all links?",be),actionCannotBeUndone:n("This action cannot be undone.",be),yesSingle:n("Yes, I want to delete this link",be),yesMultiple:n("Yes, I want to delete these links",be),yesAll:n("Yes, I want to delete all links",be),noChangedMind:n("No, I changed my mind",be)},ae=[{label:n("Delete",be),value:"delete"}],re=Io(),B=Q(),W=O=>{window.aioseoBus.$emit("updatingLinks",!0);const R={...O,additionalFilters:{postId:g.ID||B.currentPost.id,postIndex:c,type:r}};return re[f?"fetchPostReport":"fetchLinksReportInner"](R).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},le=O=>{window.location.href=`#/post-report?postId=${g.ID}&postIndex=${c}&initialTab=${O}`},ne=({action:O,selectedRows:R})=>{!R.length||!O||(x.value=O,b.value=R,A.value=!0)},de=()=>{if(A.value=!1,!!b.value.length){if(typeof b.value=="number"){q(b.value);return}if(s&&r!=="inboundInternal"){V(b.value).forEach(R=>{N(R)});return}window.aioseoBus.$emit("updatingLinks",!0),re.linksBulk({postIndex:c,postId:g.ID||B.currentPost.id,action:x.value,linkType:r,linkIds:b.value,linksReport:t,postReport:f}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),v()})}},q=O=>{const R=g.links[r].rows[O].id;if(R){if(s&&r!=="inboundInternal"){N(O);return}window.aioseoBus.$emit("updatingLinks",!0),re.linkDelete({postIndex:c,postId:g.ID||B.currentPost.id,linkId:R,linksReport:t,postReport:f}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),v()})}},N=O=>{Ye()&&(window.aioseoBus.$emit("updatingLinks",!1),ee(O),window.aioseoBus.$emit("updatingLinks",!1)),Zt()&&$(O)},ee=O=>{const R=B.currentPost.linkAssistant.links[r].rows[O];if(!R)return;window.aioseoBus.$emit("updatingLinks",!0);const te=De(R.anchor.trim()),H=R.phrase_html.trim(),y=De(H),w=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:C}=Pa(),L=C(w,H);if(!L){window.aioseoBus.$emit("updatingLinks",!1);return}const I=window.wp.data.select("core/block-editor").getBlock(L);if(!I){window.aioseoBus.$emit("updatingLinks",!1);return}let K=new RegExp(`(<t?a[^<>]*>)(.*)?(${te})(.*)?(</t?a[^<>]*>)`,"i");const G=H.replace(K,"$2$3$4");K=new RegExp(`${y}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(L,{content:I.attributes.content.replace(K,G)}).then(()=>{g.links[r].rows.splice(O,1)}).catch(F=>{console.error(`Couldn delete link with type "${r}" and index ${O}:`,F)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},$=O=>{var G;const R=B.currentPost.linkAssistant.links[r].rows[O];if(!R||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let te="",H=null,y=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(H=window.tinyMCE.get("content"),te=H.getContent({format:"raw"})):(y=document.querySelector("textarea#content"),te=y?y.value:""),!te){window.aioseoBus.$emit("updatingLinks",!1);return}let w=R.phrase_html.trim();H||(w=w.replace(/(\sdata-mce-href=".*")/gi,""));const C=De(R.anchor.trim());let L=new RegExp(`(<t?a[^<>]*>)(.*)?(${C})(.*)?(</t?a[^<>]*>)`,"i");const I=w.replace(L,"$2$3$4"),K=De(w);L=new RegExp(`${K}`,"i"),te=te.replace(L,I),H?H.setContent(te):y.value=te,g.links[r].rows.splice(O,1),(G=re.postSettingsUpdate({postContent:te}))==null||G.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},V=O=>{let R,te=[];return Array.isArray(O)&&(R=O.map(Number)),R&&g.links[r].rows.forEach((H,y)=>{R.includes(H.id)&&te.push(y)}),O==="all"&&(te=g.links[r].rows.map((H,y)=>y)),te.sort(function(H,y){return y-H})};return $t(()=>{window.aioseoBus.$on("updatingLinks",O=>{E.value=O}),a.value=re.postReport[r].totals.page}),{bulkOptions:ae,changeItemsPerPageSlug:P,doBulkAction:de,fetchData:W,maybeDoBulkAction:ne,modalStrings:se,openPostReport:le,rows:z,selectedRows:b,showModal:A,strings:U}},xa={emits:["closeModal","doBulkAction"],components:{CoreModal:Ie,SvgClose:vt},props:{selectedRows:{required:!0},strings:{type:Object,required:!0},show:Boolean},computed:{areYouSure(){return this.selectedRows==="all"?this.strings.areYouSureAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.areYouSureMultiple:this.strings.areYouSureSingle},confirmation(){return this.selectedRows==="all"?this.strings.yesAll:Array.isArray(this.selectedRows)&&1<this.selectedRows.length?this.strings.yesMultiple:this.strings.yesSingle}}},Ta={class:"aioseo-modal-body"},Aa=["innerHTML"];function La(o,e,r,t,s,a){const g=p("svg-close"),c=p("base-button"),f=p("core-modal");return i(),_(f,{show:r.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=v=>o.$emit("closeModal",!0))},{body:l(()=>[u("div",Ta,[u("button",{class:"close",onClick:e[1]||(e[1]=pe(v=>o.$emit("closeModal",!0),["stop"]))},[d(g,{onClick:e[0]||(e[0]=v=>o.$emit("closeModal",!0))})]),u("h3",null,h(a.areYouSure),1),u("div",{class:"reset-description",innerHTML:r.strings.actionCannotBeUndone},null,8,Aa),d(c,{type:"blue",size:"medium",onClick:e[2]||(e[2]=v=>o.$emit("doBulkAction",v))},{default:l(()=>[T(h(a.confirmation),1)]),_:1}),d(c,{type:"gray",size:"medium",onClick:e[3]||(e[3]=v=>o.$emit("closeModal",!0))},{default:l(()=>[T(h(r.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const Ia=M(xa,[["render",La]]),Ma={components:{CoreTooltip:fe},props:{phrase:{type:String,required:!0},phraseHtml:{type:String,required:!0},anchor:{type:String,required:!0},url:{type:String,required:!0},tooltip:{type:Boolean,required:!1,default:!0},clickableAnchor:{type:Boolean,default(){return!1}}},computed:{partPattern(){const o=Ve.decode(this.anchor),e=De(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return Ve.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return Ve.decode(this.stripTags(this.getPart(2)))},lastPart(){return Ve.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const r=Ve.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return r?r[o]:""},stripTags(o,e=!1){return o=o.replace(/<br\s?\/?>/gi," "),e?o.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):o.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},Oa={class:"phrase"},Da={key:0,class:"first"},Ba=["href"],Ra={key:2},Ha={class:"anchor"},Ua={key:3,class:"last"};function Ka(o,e,r,t,s,a){const g=p("core-tooltip");return i(),k("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=c=>o.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=c=>o.$emit("mouseLeave"))},[u("span",Oa,[a.firstPart?(i(),k("span",Da,h(a.firstPart),1)):m("",!0),r.tooltip?(i(),_(g,{key:1,type:"action"},{tooltip:l(()=>[u("a",{class:"tooltip-url",href:r.url,target:"_blank"},h(r.url),9,Ba)]),default:l(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...c)=>a.maybeOpenLink&&a.maybeOpenLink(...c))},h(a.linkAnchor),1)]),_:1})):m("",!0),r.tooltip?m("",!0):(i(),k("div",Ra,[u("span",Ha,h(a.linkAnchor),1)])),a.lastPart?(i(),k("span",Ua,h(a.lastPart),1)):m("",!0)]),Te(o.$slots,"icons")],32)}const Va=M(Ma,[["render",Ka]]),Fa={},Na={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Ga=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.66699 7.43742H4.33366C2.95866 7.43742 1.83366 6.31242 1.83366 4.93742C1.83366 3.56242 2.95866 2.43742 4.33366 2.43742H7.66699V0.770752H4.33366C2.03366 0.770752 0.166992 2.63742 0.166992 4.93742C0.166992 7.23742 2.03366 9.10408 4.33366 9.10408H7.66699V7.43742ZM12.667 0.770752H9.33366V2.43742H12.667C14.042 2.43742 15.167 3.56242 15.167 4.93742C15.167 6.31242 14.042 7.43742 12.667 7.43742H9.33366V9.10408H12.667C14.967 9.10408 16.8337 7.23742 16.8337 4.93742C16.8337 2.63742 14.967 0.770752 12.667 0.770752ZM11.8337 4.10409H5.16699V5.77075H11.8337V4.10409Z",fill:"currentColor"},null,-1),za=[Ga];function qa(o,e){return i(),k("svg",Na,za)}const Mt=M(Fa,[["render",qa]]),ja={key:0},Wa={key:0,class:"row-actions"},$a={class:"view"},Ya=["href"],Za={class:"edit"},Xa=["href"],Ja={key:0,class:"links-bottom"},Qa={class:"links-bottom-left"},el={key:1},tl={class:"links-bottom-right"},ol="inboundInternal",Ft="aioseo-post-report-inbound-internal",sl={__name:"InboundInternal",props:{post:{type:Object,required:!0},postIndex:{type:Number,required:!1},postId:{type:Number,required:!1},linksReport:{type:Boolean,default(){return!1}},postReport:{type:Boolean,default(){return!1}},metabox:{type:Boolean,default(){return!1}}},emits:["linksUpdated","openSuggestions"],setup(o,{emit:e}){const r="all-in-one-seo-pack",t=ye(),s=xe(),a=o,g=e,c=we(1),f=we(!1),{bulkOptions:v,changeItemsPerPageSlug:E,doBulkAction:x,fetchData:P,maybeDoBulkAction:b,modalStrings:A,openPostReport:z,rows:U,selectedRows:se,showModal:ae,strings:re}=Ea({emit:g,linkType:ol,linksReport:a.linksReport,metabox:a.metabox,pageNumber:c,post:a.post,postIndex:a.postIndex,postReport:a.postReport,refreshTable:()=>de(),wpTableLoading:f}),{editPost:B,viewPost:W}=Ms(),{processChangeItemsPerPage:le,processFetchTableData:ne,refreshTable:de,wpTableKey:q}=ao({changeItemsPerPageSlug:E,fetchData:P,pageNumber:c,tableId:Ft,wpTableLoading:f}),N=Xt(re,{deleteAllLinks:D(n("Delete All %1$s Links",r),n("Inbound Internal",r)),outboundSuggestions:D(n("%1$s Link Suggestions",r),n("Inbound",r))}),ee=ke(()=>[{slug:"post_title",label:n("Post Title",r)},{slug:"phrase",label:n("Phrase",r)},{slug:"delete",width:"50px"}]),$=ke(()=>D(n("See All %1$s %2$s Links",r),a.post.links.inboundInternal.totals.total,n("Inbound Internal",r))),V=O=>{c.value=O,!a.metabox&&(f.value=!0,ne().then(()=>f.value=!1))};return(O,R)=>{const te=p("base-button");return i(),k("div",null,[(i(),_(S(lo),{id:Ft,key:S(q),class:J({"link-assistant-inner-table":!o.postReport}),columns:ee.value,loading:f.value,rows:S(U),totals:o.post.links.inboundInternal.totals,"bulk-options":S(v),"initial-items-per-page":S(s).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":c.value,"show-pagination":!o.linksReport,"show-search":!1,"show-table-footer":o.postReport,"show-items-per-page":"",onPaginate:V,onProcessBulkAction:S(b),onProcessChangeItemsPerPage:S(le)},{post_title:l(({row:H})=>{var y,w;return[u("span",null,[T(h(H.context.postTitle)+" ",1),((w=(y=H.context)==null?void 0:y.permalink)==null?void 0:w.replace(/\/$/,""))===S(t).aioseo.urls.home?(i(),k("span",ja,"("+h(S(N).frontPage)+")",1)):m("",!0)]),H.context?(i(),k("div",Wa,[u("span",$a,[u("a",{href:H.context.permalink,target:"_blank"},h(S(W)(H.context.postType.singular)),9,Ya),T(" | ")]),u("span",Za,[u("a",{href:H.context.editLink,target:"_blank"},h(S(B)(H.context.postType.singular)),9,Xa)])])):m("",!0)]}),phrase:l(({row:H})=>[d(S(Va),{phrase:H.phrase,phraseHtml:H.phrase_html||"",anchor:H.anchor,url:H.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:l(({row:H})=>[d(S(fe),{type:"action"},{tooltip:l(()=>[T(h(S(N).deleteLink),1)]),default:l(()=>[d(S(et),{onClick:y=>S(b)({action:"delete",selectedRows:[H.id]})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onProcessBulkAction","onProcessChangeItemsPerPage"])),o.postReport?m("",!0):(i(),k("div",Ja,[u("div",Qa,[o.post.links.inboundInternal.rows.length?(i(),_(te,{key:0,type:"blue",tag:"button",onClick:R[0]||(R[0]=H=>g("openSuggestions"))},{default:l(()=>[d(S(Mt)),T(" "+h(S(N).outboundSuggestions),1)]),_:1})):m("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(i(),k("div",el,[d(S(po)),u("a",{class:"link-view",href:"#",onClick:R[1]||(R[1]=pe(H=>S(z)("inbound-internal"),["prevent"]))},h($.value),1)])):m("",!0)]),u("div",tl,[o.post.links.inboundInternal.rows.length?(i(),k("a",{key:0,class:"link-delete",onClick:R[2]||(R[2]=pe(H=>S(b)({action:"delete",selectedRows:"all"}),["prevent"]))},h(S(N).deleteAllLinks),1)):m("",!0)])])),d(S(Ia),{show:S(ae),selectedRows:S(se),strings:S(A),onDoBulkAction:S(x),onCloseModal:R[3]||(R[3]=H=>ae.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},ge="all-in-one-seo-pack",rl={setup(){return{licenseStore:_e(),postEditorStore:Q(),rootStore:ye(),links:Z}},components:{CoreAlert:ve,CoreBlur:tt,CoreMainTabs:Be,CoreModal:Ie,Cta:Lt,LinkAssistantInboundInternal:sl,LinksSideBar:Ca,SvgLinkAffiliate:Os,SvgLinkExternal:po,SvgLinkInternalInbound:Ds,SvgLinkInternalOutbound:Bs,SvgLinkSuggestion:Mt,RequiredPlans:co},props:{parentComponentContext:String},data(){return{activeTab:"inbound-internal",activeSuggestionTab:"suggestions-inbound",mockedPostData:{links:{inboundInternal:{rows:[{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"AIOSEO also allows you to create video sitemaps and comes with tons of different SEO tools.",anchor:"video sitemaps",url:"#",context:{postTitle:"How to Create WordPress Image Sitemap",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"You may also want to check out how to name your image files for SEO in WordPress and write alt text for images.",anchor:"how to name your image files for SEO in WordPress",url:"#",context:{postTitle:"What’s the Best Image Format for Your Website?",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"Are you looking for an easy way to do an SEO analysis for your website?",anchor:"SEO analysis",url:"#",context:{postTitle:"How to Perform an SEO Analysis on Your WordPress Website",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"To learn more, please check out our post on image SEO: how to best optimize your images in WordPress. ",anchor:"image SEO",url:"#",context:{postTitle:"How to Write Alt Text for Images for SEO",permalink:"#",editLink:"#",postType:{singular:"Post"}}},{phrase:"So let’s now move on to showing you exactly how easy it is to import and export redirects using the best redirect plugin for WordPress.",anchor:"best redirect plugin for WordPress",url:"#",context:{postTitle:"How to Easily Import and Export Redirects in WordPress",permalink:"#",editLink:"#",postType:{singular:"Post"}}}],totals:{total:6}},outboundInternal:{totals:{total:12}},affiliate:{totals:{total:8}},external:{totals:{total:24}},suggestionsInbound:{totals:{total:9}},suggestionsOutbound:{totals:{total:9}}}},strings:{ctaButtonText:n("Unlock Link Assistant",ge),ctaHeader:D(n("Link Assistant is a %1$s Feature",ge),"PRO"),linkAssistantDescription:n("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",ge),thisFeatureRequires:n("This feature requires one of the following plans:",ge),linkOpportunities:n("Actionable Link Suggestions",ge),orphanedPosts:n("See Orphaned Posts",ge),affiliateLinks:n("See Affiliate Links",ge),domainReports:n("Top Domain Reports",ge)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:D("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,n("Inbound Internal",ge))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:D("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,n("Outbound Internal",ge))},{slug:"affiliate",icon:"svg-link-affiliate",name:D("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,n("Affiliate",ge))},{slug:"external",icon:"svg-link-external",name:D("%1$s %2$s",this.mockedPostData.links.external.totals.total,n("External",ge))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:D("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,n("Link Suggestions",ge))}]},modalHeader(){return D(n('Links & Suggestions for "%1$s"',ge),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},nl={class:"aioseo-tab-content aioseo-link-assistant"},il={key:0};function al(o,e,r,t,s,a){const g=p("core-main-tabs"),c=p("link-assistant-inbound-internal"),f=p("core-blur"),v=p("required-plans"),E=p("cta"),x=p("core-modal"),P=p("links-side-bar");return i(),k("div",nl,[o.$root.$data.screenContext==="metabox"?(i(),k("div",il,[d(f,null,{default:l(()=>[d(g,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:b})=>[(i(),_(Se(b.icon),{class:J([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(c,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(E,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":l(()=>[T(h(s.strings.ctaHeader),1)]),description:l(()=>[d(v,{addon:"aioseo-link-assistant"}),T(" "+h(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):m("",!0),d(x,{show:t.postEditorStore.currentPost.linkAssistant.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=b=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:l(()=>[T(h(a.modalHeader),1)]),body:l(()=>[d(f,null,{default:l(()=>[d(g,{class:"link-tabs",internal:"",tabs:a.tabs,active:a.initialTab,showSaveButton:!1},{"var-tab-icon":l(({tab:b})=>[(i(),_(Se(b.icon),{class:J([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),s.activeTab==="inbound-internal"?(i(),_(c,{key:0,post:s.mockedPostData,metabox:""},null,8,["post"])):m("",!0)]),_:1}),d(E,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":s.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox",t.rootStore.isPro?"pricing":"liteUpgrade"),"feature-list":[s.strings.linkOpportunities,s.strings.domainReports,s.strings.orphanedPosts,s.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":l(()=>[T(h(s.strings.ctaHeader),1)]),description:l(()=>[d(v,{addon:"aioseo-link-assistant"}),T(" "+h(s.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(P,{key:1})):m("",!0)])}const Nt=M(rl,[["render",al]]),ll={};function cl(o,e){return i(),k("div")}const dl=M(ll,[["render",cl]]),ul={setup(){return{addons:uo,licenseStore:_e()}},components:{Links:Nt,LinksActivate:dl,LinksLite:Nt},props:{parentComponentContext:String}},pl={class:"aioseo-tab-content aioseo-link-assistant"};function hl(o,e,r,t,s,a){const g=p("Links",!0),c=p("LinksLite"),f=p("LinksActivate");return i(),k("div",pl,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-link-assistant")&&t.addons.canActivate("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(i(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const gl=M(ul,[["render",hl]]),Ne="all-in-one-seo-pack",ko=()=>{const o=ke(()=>[{groupLabel:n("Default",Ne),options:[{label:n("Default Object Type (Set in Social Networks)",Ne),value:"default"}]}].concat(No)),e=[{label:n("Default (Set under Social Networks)",Ne),value:"default"},{label:n("Summary",Ne),value:"summary"},{label:n("Summary with Large Image",Ne),value:"summary_large_image"}];return{getObjectTypeLabelByOption:s=>{let a="";return o.value.forEach(g=>{const c=g.options.find(f=>f.value===s);c&&(a=(c==null?void 0:c.label)||"")}),a},getTwitterCardLabelByOption:s=>{var a;return((a=e.find(g=>g.value===s))==null?void 0:a.label)||""},objectTypeOptions:o,twitterCardOptions:e}},ie="all-in-one-seo-pack",ml={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,setImageUrl:a}=ho(),{maxRecommendedCount:g}=wt(),{objectTypeOptions:c}=ko(),{parseTags:f}=Ct({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:r,imageUrl:t,loading:s,maxRecommendedCount:g,objectTypeOptions:c,optionsStore:Ae(),parseTags:f,postEditorStore:Q(),rootStore:ye(),setImageUrl:a}},components:{CoreAlert:ve,CoreFacebookPreview:Rs,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,strings:{tabName:n("Facebook Preview",ie),imageSource:n("Image Source",ie),customFieldsName:n("Custom Field Name",ie),video:n("Video URL",ie),width:n("Width",ie),height:n("Height",ie),facebookObjectType:n("Object Type",ie),facebookImage:n("Facebook Image",ie),facebookTitle:n("Facebook Title",ie),facebookDescription:n("Facebook Description",ie),minimumSize:n("Minimum size: 200px x 200px, ideal ratio 1.91:1, 5MB max. (eg: 1640px x 856px or 3280px x 1712px for Retina screens). JPG, PNG, WEBP and GIF formats only.",ie),clickToAddSiteName:n("Click on the tags below to insert variables into your site name.",ie),clickToAddHomePageDescription:n("Click on the tags below to insert variables into your meta description.",ie),articleSection:n("Article Section",ie),articleTags:n("Article Tags",ie),tagPlaceholder:n("Press enter to create an article tag",ie),facebookDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",ie),n("Open Graph",ie),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",n("Go to Social Networks",ie)))}}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){return this.parseTags(this.postEditorStore.currentPost.og_title||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){return this.parseTags(this.postEditorStore.currentPost.og_description||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},shouldShowArticleSection(){var e;const o=this.postEditorStore.currentPost.context==="term"?"taxonomies":"postTypes";return this.postEditorStore.currentPost.og_object_type==="article"||this.postEditorStore.currentPost.og_object_type==="default"&&((e=this.optionsStore.dynamicOptions.social.facebook.general[o][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType])==null?void 0:e.objectType)==="article"}},methods:{scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveImageType(o){this.postEditorStore.currentPost.og_image_type=o,this.postEditorStore.isDirty=!0},getObjectTypeOptions(o){let e=null;return this.objectTypeOptions.forEach(r=>{const t=r.options.find(s=>s.value===o);t&&(e=t)}),e},setObjectType(o){this.postEditorStore.currentPost.og_object_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.og_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("facebook")}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},_l={class:"tab-facebook"},yl={id:"aioseo-post-settings-facebook"},fl=["innerHTML"],Sl=["innerHTML"];function kl(o,e,r,t,s,a){const g=p("core-alert"),c=p("core-facebook-preview"),f=p("core-settings-row"),v=p("core-html-tags-editor"),E=p("base-select"),x=p("base-input"),P=p("core-image-uploader");return i(),k("div",_l,[d(f,{class:"snippet-preview-row"},{name:l(()=>[u("span",null,h(s.strings.tabName),1)]),content:l(()=>[t.optionsStore.options.social.facebook.general.enable?m("",!0):(i(),_(g,{key:0,class:"facebook-disabled-warning",innerHTML:s.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),d(c,{description:a.previewDescription,image:t.imageUrl,loading:t.loading,title:a.previewTitle},null,8,["description","image","loading","title"])]),_:1}),u("div",yl,[d(f,{name:s.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:l(()=>[d(v,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=b=>t.postEditorStore.currentPost.og_title=b),e[2]||(e[2]=b=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=b=>s.titleCount=b.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":l(()=>[T(h(s.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,95)},null,8,fl)]),_:1},8,["name"]),d(f,{name:s.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:l(()=>[d(v,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=b=>t.postEditorStore.currentPost.og_description=b),e[5]||(e[5]=b=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=b=>s.descriptionCount=b.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[T(h(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,Sl)]),_:1},8,["name"]),d(f,{class:"facebook-image-source",name:s.strings.imageSource,align:""},{content:l(()=>[d(E,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=b=>a.saveImageType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.og_image_type==="custom"?(i(),_(f,{key:0,name:s.strings.customFieldsName,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=b=>t.postEditorStore.currentPost.og_image_custom_fields=b),e[8]||(e[8]=b=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),t.postEditorStore.currentPost.og_image_type==="custom_image"?(i(),_(f,{key:1,class:"facebook-image",name:s.strings.facebookImage},{content:l(()=>[d(P,{description:s.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=b=>t.postEditorStore.currentPost.og_image_custom_url=b)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(f,{class:"facebook-video",name:s.strings.video,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=b=>t.postEditorStore.currentPost.og_video=b)},null,8,["modelValue"])]),_:1},8,["name"]),d(f,{class:"facebook-object-type",name:s.strings.facebookObjectType,align:""},{content:l(()=>[d(E,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:a.getObjectTypeOptions(t.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=b=>a.setObjectType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),a.shouldShowArticleSection?(i(),_(f,{key:2,name:s.strings.articleSection,align:""},{content:l(()=>[d(x,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=b=>t.postEditorStore.currentPost.og_article_section=b)},null,8,["modelValue"])]),_:1},8,["name"])):m("",!0),a.shouldShowArticleSection?(i(),_(f,{key:3,name:s.strings.articleTags,align:""},{content:l(()=>[d(E,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=b=>t.postEditorStore.currentPost.og_article_tags=b),"tag-placeholder":s.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):m("",!0)])])}const vl=M(ml,[["render",kl]]),me="all-in-one-seo-pack",bl={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,setImageUrl:s}=ho(),{maxRecommendedCount:a}=wt(),{twitterCardOptions:g}=ko(),{parseTags:c}=Ct({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:r,loading:t,maxRecommendedCount:a,optionsStore:Ae(),parseTags:c,postEditorStore:Q(),rootStore:ye(),setImageUrl:s,twitterCardOptions:g}},components:{CoreAlert:ve,CoreHtmlTagsEditor:At,CoreImageUploader:mo,CoreSettingsRow:Pe,CoreTwitterPreview:Hs},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:go,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:n("X (Twitter) Preview",me),twitterPreviewDescription:n("X cards by default will use the data defined below. If no data is set, X will instead pick up the data set on the Facebook tab.",me),useFB:n("Use Data from Facebook Tab",me),imageSource:n("Image Source",me),customFieldsName:n("Custom Field Name",me),twitterImage:n("X Image",me),twitterTitle:n("X Title",me),twitterDescription:n("X Description",me),twitterCardType:n("X Card Type",me),minimumSizeSummary:n("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",me),minimumSizeSummaryWithLarge:n("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",me),twitterDisabled:D(n("No %1$s markup will be output for your post because it is currently disabled. You can enable %1$s markup in the Social Networks settings. %2$s",me),n("X (Twitter)",me),D('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",n("Go to Social Networks",me)))}}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_title?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(o||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_description?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(o||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},previewImage(){return this.postEditorStore.currentPost.twitter_use_og||!this.imageUrl?this.facebookImageUrl:this.imageUrl},twitterImageUploaderDescription(){return this.postEditorStore.currentPost.twitter_card==="summary"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary"?this.strings.minimumSizeSummary:this.postEditorStore.currentPost.twitter_card==="summary_large_image"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?this.strings.minimumSizeSummaryWithLarge:""}},methods:{getCardOptions(o){return this.twitterCardOptions.find(e=>e.value===o)},cardSelect(o){this.postEditorStore.currentPost.twitter_card=o,this.postEditorStore.isDirty=!0},scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveTwitterImageType(o){this.postEditorStore.currentPost.twitter_image_type=o,this.postEditorStore.isDirty=!0},updateImage(o){this.postEditorStore.currentPost.twitter_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(o){o.social==="facebook"&&(this.facebookImageUrl=o.image)}},mounted(){window.aioseoBus.$on("updateSocialImagePreview",this.updateImagePreview),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate),this.scrollToElement(),this.setImageUrl("facebook").then(()=>{this.setImageUrl("twitter")})},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate),window.aioseoBus.$off("updateSocialImagePreview",this.updateImagePreview)}},wl={class:"tab-twitter"},Cl={id:"aioseo-post-settings-twitter"},Pl=["innerHTML"],El=["innerHTML"];function xl(o,e,r,t,s,a){const g=p("core-alert"),c=p("core-twitter-preview"),f=p("core-settings-row"),v=p("base-toggle"),E=p("core-html-tags-editor"),x=p("base-select"),P=p("base-input"),b=p("core-image-uploader");return i(),k("div",wl,[d(f,{class:"snippet-preview-row"},{name:l(()=>[u("span",null,h(s.strings.twitterPreview),1)]),description:l(()=>[u("i",null,h(s.strings.twitterPreviewDescription),1)]),content:l(()=>[t.optionsStore.options.social.twitter.general.enable?m("",!0):(i(),_(g,{key:0,class:"twitter-disabled-warning",innerHTML:s.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),d(c,{card:t.postEditorStore.currentPost.twitter_card,description:a.previewDescription,image:a.previewImage,loading:t.loading,title:a.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),u("div",Cl,[d(f,{name:s.strings.useFB,class:"use-facebook"},{content:l(()=>[d(v,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=A=>t.postEditorStore.currentPost.twitter_use_og=A),e[1]||(e[1]=A=>t.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(f,{key:0,name:s.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:l(()=>[d(E,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=A=>t.postEditorStore.currentPost.twitter_title=A),e[4]||(e[4]=A=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=A=>s.titleCount=A.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.titleCount,70)},null,8,Pl)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(f,{key:1,name:s.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:l(()=>[d(E,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=A=>t.postEditorStore.currentPost.twitter_description=A),e[7]||(e[7]=A=>t.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=A=>s.descriptionCount=A.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":s.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":l(()=>[T(h(s.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(s.descriptionCount,200)},null,8,El)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?m("",!0):(i(),_(f,{key:2,class:"twitter-image-source",name:s.strings.imageSource,align:""},{content:l(()=>[d(x,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=A=>a.saveTwitterImageType(A.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom"?(i(),_(f,{key:3,class:"twitter-custom-field",name:s.strings.customFieldsName,align:""},{content:l(()=>[d(P,{type:"text",size:"medium",placeholder:s.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=A=>t.postEditorStore.currentPost.twitter_image_custom_fields=A),e[10]||(e[10]=A=>t.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):m("",!0),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom_image"?(i(),_(f,{key:4,class:"twitter-image",name:s.strings.twitterImage},{content:l(()=>[d(b,{description:a.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=A=>t.postEditorStore.currentPost.twitter_image_custom_url=A)},null,8,["description","modelValue"])]),_:1},8,["name"])):m("",!0),d(f,{class:"twitter-card-type",name:s.strings.twitterCardType,align:""},{content:l(()=>[d(x,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:a.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=A=>a.cardSelect(A.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Tl=M(bl,[["render",xl]]),ht="all-in-one-seo-pack",Al={setup(){return{postEditorStore:Q(),settingsStore:xe()}},components:{CoreSettingsRow:Pe,SvgPencil:bt},data(){return{strings:{title:n("Social Media",ht),sidebarCopy:n("Here you can view and edit the thumbnail, title and description that will be displayed when your site is shared on social media. Click on the button below to view and edit the preview.",ht),editSnippet:n("Preview & Edit",ht)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},Ll={class:"aioseo-sidebar-content-title"};function Il(o,e,r,t,s,a){const g=p("svg-pencil"),c=p("base-button"),f=p("core-settings-row");return o.$root.$data.screenContext==="sidebar"?(i(),_(f,{key:0,name:s.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:l(()=>[u("div",Ll,h(s.strings.title),1),u("p",null,h(s.strings.sidebarCopy),1),d(c,{class:"open-social-modal gray small",onClick:a.openModalEv},{default:l(()=>[d(g),T(" "+h(s.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):m("",!0)}const Ml=M(Al,[["render",Il]]),gt="all-in-one-seo-pack",Ol={setup(){return{postEditorStore:Q(),settingsStore:xe()}},components:{BaseRadioToggle:no,CoreMainTabs:Be,CoreSettingsRow:Pe,Facebook:vl,Twitter:Tl,SocialSideBar:Ml},props:{parentComponentContext:String},data(){return{strings:{pageName:n("Social",gt)},tabs:[{slug:"facebook",name:n("Facebook",gt)},{slug:"twitter",name:n("X (Twitter)",gt)}]}},computed:{initTab:function(){let o=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(o=this.settingsStore.metaBoxTabs.socialModal),o}},methods:{processChangeTab(o){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:o}):this.settingsStore.changeTabSettings({setting:"social",value:o})}},mounted(){qe()["social-tab"]&&(this.processChangeTab(qe()["social-tab"]),setTimeout(()=>{ft("social-tab")},500))}},Dl={class:"aioseo-tab-content aioseo-post-social"};function Bl(o,e,r,t,s,a){const g=p("core-main-tabs"),c=p("core-settings-row"),f=p("social-side-bar");return i(),k("div",Dl,[o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(c,{key:0,"no-border":""},{content:l(()=>[d(g,{tabs:s.tabs,showSaveButton:!1,active:a.initTab,internal:"",onChanged:e[0]||(e[0]=v=>a.processChangeTab(v)),disableMobile:""},null,8,["tabs","active"])]),_:1})):m("",!0),o.$root.$data.screenContext==="metabox"||r.parentComponentContext==="modal"?(i(),_(ze,{key:1,name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(Se(a.initTab)))]),_:1})):m("",!0),r.parentComponentContext!=="modal"?(i(),_(f,{key:2})):m("",!0)])}const vo=M(Ol,[["render",Bl]]),mt="all-in-one-seo-pack",Rl={setup(){return{settingsStore:xe()}},components:{CoreMainTabs:Be,CoreSettingsRow:Pe,General:So,Social:vo,SvgSettings:io,SvgShare:_o},data(){return{strings:{pageName:n("Modal Content",mt)},tabs:[{slug:"general",icon:"svg-settings",name:n("General",mt)},{slug:"social",icon:"svg-share",name:n("Social",mt)}]}},computed:{getTabs(){return this.tabs.filter(o=>Le(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},Hl={class:"aioseo-modal-content"},Ul={class:"mobile-radio-buttons"},Kl={class:"component-wrapper"};function Vl(o,e,r,t,s,a){const g=p("core-main-tabs");return i(),k("div",Hl,[u("div",Ul,[d(g,{tabs:a.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=c=>a.processChangeTab(c))},null,8,["tabs","active"])]),u("div",Kl,[d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[(i(),_(Se(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Fl=M(Rl,[["render",Vl]]),_t="all-in-one-seo-pack",Nl={setup(){return{postEditorStore:Q()}},components:{CoreSettingsRow:Pe,SvgRightArrowShort:It},data(){return{strings:{title:n("Redirects",_t),description:n("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",_t),button:n("Open Redirects",_t)}}}},Gl={class:"aioseo-redirects-sidebar"},zl={class:"aioseo-sidebar-content-title"};function ql(o,e,r,t,s,a){const g=p("svg-right-arrow-short"),c=p("base-button"),f=p("core-settings-row");return i(),k("div",Gl,[o.$root.$data.screenContext==="sidebar"?(i(),_(f,{key:0,class:"snippet-description-row open-redirects-copy"},{content:l(()=>[u("div",zl,h(s.strings.title),1),u("p",null,h(s.strings.description),1),d(c,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=v=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:l(()=>[d(g),T(" "+h(s.strings.button),1)]),_:1})]),_:1})):m("",!0)])}const jl=M(Nl,[["render",ql],["__scopeId","data-v-1754537e"]]),Wl="all-in-one-seo-pack",$l={setup(){return{postEditorStore:Q()}},components:{CoreModal:Ie,RedirectsSideBar:jl,RedirectsLite:Ks},props:{parentComponentContext:String},data(){return{strings:{modalHeader:n("Redirects",Wl)}}}},Yl={class:"bd"};function Zl(o,e,r,t,s,a){const g=p("redirects-lite"),c=p("core-modal"),f=p("redirects-side-bar");return i(),k("div",null,[o.$root.$data.screenContext==="metabox"?(i(),_(g,{key:0,noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),d(c,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=v=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:l(()=>[T(h(s.strings.modalHeader),1)]),body:l(()=>[u("div",Yl,[d(g,{noCoreCard:!0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),r.parentComponentContext!=="modal"?(i(),_(f,{key:1})):m("",!0)])}const Gt=M($l,[["render",Zl]]),Xl={};function Jl(o,e){return i(),k("div")}const Ql=M(Xl,[["render",Jl]]),ec={setup(){return{addons:uo,licenseStore:_e()}},components:{Redirects:Gt,RedirectsActivate:Ql,RedirectsLite:Gt},props:{parentComponentContext:String}},tc={class:"aioseo-tab-content"};function oc(o,e,r,t,s,a){const g=p("Redirects",!0),c=p("RedirectsLite"),f=p("RedirectsActivate");return i(),k("div",tc,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-redirects")&&t.addons.canActivate("aioseo-redirects")&&!t.addons.requiresUpgrade("aioseo-redirects")?(i(),_(f,{key:2,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const sc=M(ec,[["render",oc]]),rc={class:"graph-container"},nc={class:"graph"},ic={class:"left"},ac=["title"],lc={class:"right action-buttons"},bo={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",r=o,{childGraphs:t,graphs:s}=ro(),a=ke(()=>{var P,b,A,z;if(r.customGraph)return n("Custom Schema",e)+" - "+r.graph.graphName;if(r.defaultGraph)return f(r.defaultGraph);if((P=r.graph)!=null&&P.label)return r.graph.label;const E=(A=(b=r.graph)==null?void 0:b.slug)==null?void 0:A.toLowerCase();return((z=s.find(U=>U.slug===E))==null?void 0:z.label)||n("Parsing Block Data...",e)}),g=ke(()=>{if(r.customGraph)return dt;if(r.defaultGraph){const E=c(r.defaultGraph);return E?v(E):dt}return v(r.graph.slug)}),c=E=>{Object.entries(t).forEach(P=>{const b=P[0];P[1].forEach(A=>{E===A.childGraphName&&(E=b)})});let x="";return s.forEach(P=>{P.graphName===E&&(x=P.slug)}),x},f=E=>{let x="",P=E;return Object.entries(t).forEach(b=>{const A=b[0];b[1].forEach(z=>{x||E===z.childGraphName&&(x=A,P=z.label,s.forEach(U=>{U.graphName===A&&(x=U.label)}))})}),x?x+" - "+P+" "+n("(Default)",e):E+" "+n("(Default)",e)},v=E=>{switch(E){case"article":return ys;case"book":return _s;case"car":return ms;case"course":return gs;case"dataset":return hs;case"event":return ps;case"faq-page":return us;case"fact-check":return ds;case"how-to":return cs;case"job-posting":return ls;case"movie":return as;case"music":return is;case"person":return ns;case"product":return rs;case"product-review":return ss;case"recipe":return os;case"service":return ts;case"software-application":return es;case"video":return Qo;case"web-page":return Jo;default:return dt}};return(E,x)=>(i(),k("div",rc,[u("div",nc,[u("div",ic,[(i(),_(Se(g.value))),u("span",{title:a.value},h(a.value),9,ac)]),u("div",lc,[Te(E.$slots,"buttons")])])]))}},cc={class:"title"},dc=["innerHTML"],uc={class:"schema-templates"},pc={class:"main"},hc={class:"schema-catalog"},gc={class:"graphs"},mc={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:r}=ro(),t=ye(),s={schemaGenerator:n("Schema Generator",e),headerTooltip:D(n("Use our powerful Schema Generator to configure Schema Markup for your content. Search Engines use structured data to better understand what your site is about as well as to display rich snippets in search results. %1$s",e),Z.getDocLink(Ee.learnMore,"schema",!0)),searchSchema:n("Search Schema",e),ctaDescription:n("Easily generate unlimited schema markup for your content to help you rank higher in search results. Our schema validator ensures your schema works out of the box.",e),ctaButtonText:n("Unlock Schema Generator",e),ctaHeader:D(n("Schema Generator is a %1$s Feature",e),"PRO")},a=[n("Unlimited Schema",e),n("Validate with Google",e),n("Increase Rankings",e),n("Additional Schema Types",e)],g=[{slug:"schema-templates",icon:fs,name:n("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:Ss,name:n("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:ks,name:n("Schema Validation",e),component:"validation"}],c=[{slug:"schema-catalog",name:n("Schema Catalog",e)},{slug:"your-templates",name:n("Your Templates",e)}];return(f,v)=>{const E=p("base-input"),x=p("base-button");return i(),_(S(Ie),{classes:["aioseo-post-schema-modal-cta"],onClose:v[0]||(v[0]=P=>f.$emit("close"))},{headerTitle:l(()=>[u("div",cc,h(s.schemaGenerator),1),d(S(fe),null,{tooltip:l(()=>[u("span",{innerHTML:s.headerTooltip},null,8,dc)]),default:l(()=>[d(S(xt))]),_:1})]),body:l(()=>[d(S(tt),null,{default:l(()=>[d(S(Be),{tabs:g,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":l(({tab:P})=>[(i(),_(Se(P.icon)))]),_:1}),u("div",uc,[d(S(Be),{tabs:c,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":l(({tab:P})=>[(i(),_(Se(P.icon)))]),_:1}),u("div",pc,[d(E,{class:"search",size:"medium",prependIcon:"search",placeholder:s.searchSchema},null,8,["placeholder"]),u("div",hc,[u("div",gc,[(i(!0),k(Ce,null,Ke(S(r),(P,b)=>(i(),_(S(bo),{key:P.graphName+b,graph:P},{buttons:l(()=>[d(x,{class:"small",type:"gray"},{default:l(()=>[d(S(Tt))]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),d(S(Lt),{"cta-link":S(Z).getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":s.ctaButtonText,"learn-more-link":S(Z).getUpsellUrl("schema-generator",null,S(t).isPro?"pricing":"liteUpgrade"),"feature-list":a},{"header-text":l(()=>[T(h(s.ctaHeader),1)]),description:l(()=>[T(h(s.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},Re="all-in-one-seo-pack",_c={setup(){return{postEditorStore:Q(),GLOBAL_STRINGS:Ee,links:Z}},components:{CoreAlert:ve,CoreSettingsRow:Pe,CoreTooltip:fe,CtaModal:mc,GraphCard:bo,SvgEye:je},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:n("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",Re),noGraphs:n("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",Re),schemaInUse:n("Schema In Use",Re),generateSchema:n("Generate Schema",Re),validateSchema:n("Validate Schema",Re),defaultGraphTooltip:n("This is the default graph for this post type. All data for this graph will be automatically generated.",Re)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return He()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},yc={class:"graphs"},fc={key:0,class:"sidebar-description"},Sc={class:"description"},kc=["innerHTML"],vc=["innerHTML"],bc={class:"buttons"};function wc(o,e,r,t,s,a){const g=p("svg-eye"),c=p("base-button"),f=p("core-tooltip"),v=p("graph-card"),E=p("core-alert"),x=p("cta-modal"),P=p("core-settings-row");return i(),k("div",{class:J(["aioseo-tab-content aioseo-post-schema",[{sidebar:a.isSidebar}]])},[d(P,{name:s.strings.schemaInUse},{content:l(()=>[u("div",yc,[a.isSidebar?(i(),k("div",fc,[u("p",Sc,h(s.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,kc)])):m("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(v,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:l(()=>[d(f,{offset:a.getDefaultSchemaTooltipOffset()},{tooltip:l(()=>[u("span",{innerHTML:s.strings.defaultGraphTooltip},null,8,vc)]),default:l(()=>[d(c,{class:"small no-hover",type:"gray"},{default:l(()=>[d(g)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):m("",!0)]),u("div",bc,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(i(),_(E,{key:0,class:"no-graphs",type:"yellow"},{default:l(()=>[T(h(s.strings.noGraphs),1)]),_:1})):m("",!0),d(c,{class:"medium",type:"blue",onClick:e[0]||(e[0]=b=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:l(()=>[T(h(s.strings.generateSchema),1)]),_:1}),d(c,{class:"medium",type:"gray",onClick:e[1]||(e[1]=b=>{s.modalOpenMetabox=!0,s.modalOpenSidebar=!0})},{default:l(()=>[T(h(s.strings.validateSchema),1)]),_:1})]),d(x,{show:!a.isSidebar&&s.modalOpenMetabox,onClose:e[2]||(e[2]=b=>s.modalOpenMetabox=!1)},null,8,["show"]),d(x,{show:a.isSidebar&&s.modalOpenSidebar,onClose:e[3]||(e[3]=b=>s.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const zt=M(_c,[["render",wc]]),Cc={setup(){return{licenseStore:_e()}},components:{Schema:zt,SchemaLite:zt},props:{parentComponentContext:String}},Pc={class:"aioseo-post-schema-view"};function Ec(o,e,r,t,s,a){const g=p("schema",!0),c=p("schema-lite");return i(),k("div",Pc,[t.licenseStore.isUnlicensed?m("",!0):(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):m("",!0)])}const xc=M(Cc,[["render",Ec]]),wo=o=>(jt("data-v-20175fdb"),o=o(),Wt(),o),Tc={class:"aioseo-seo-revision-list-item"},Ac={class:"aioseo-seo-revision-list-item__author"},Lc={class:"aioseo-seo-revision-list-item__author__avatar"},Ic={class:"aioseo-seo-revision-list-item__author__name"},Mc=wo(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Oc={class:"aioseo-seo-revision-list-item__action"},Dc=wo(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Bc={class:"aioseo-seo-revision-list-item__action__view"},Rc={class:"aioseo-seo-revision-list-item__action__delete"},Hc={__name:"ListItem",setup(o){const{currentUser:e}=Qt(Xe());return(r,t)=>(i(),k("div",Tc,[u("div",Ac,[u("span",Lc,[d(S(Vs),{src:S(e).avatar.url,size:S(e).avatar.size},null,8,["src","size"])]),u("span",Ic,h(S(oo)(S(e).display_name,30)),1)]),Mc,u("div",Oc,[Dc,u("span",Bc,[d(S(je),{width:"18"})]),u("span",Rc,[d(S(et),{width:"18"})])])]))}},Uc=M(Hc,[["__scopeId","data-v-20175fdb"]]),Kc={components:{SeoRevisionListItem:Uc}},Vc={class:"aioseo-seo-revisions-list"};function Fc(o,e,r,t,s,a){const g=p("seo-revision-list-item");return i(),k("div",Vc,[(i(),k(Ce,null,Ke(13,c=>d(g,{key:"seo-revision-list-item-"+c})),64))])}const Nc=M(Kc,[["render",Fc],["__scopeId","data-v-7b502c37"]]),yt="all-in-one-seo-pack",Gc={setup(){return{seoRevisionsStore:Xe()}},components:{CoreBlur:tt,CoreModal:Ie,CoreSettingsRow:Pe,SeoRevisionsList:Nc,SeoRevisionsUpsell:Fs,SvgRightArrowShort:It},data(){return{strings:{button:n("Open SEO Revisions",yt),description:n("With our powerful revisions feature for all your SEO data, never lose the exact SEO title or description (and more!) that helped you rank higher in search results and restore it back in a single click.",yt),seoRevisions:n("SEO Revisions",yt)}}}},zc={key:0,class:"aioseo-seo-revisions-metabox"},qc={key:1,class:"aioseo-seo-revisions-sidebar"},jc={class:"aioseo-seo-revisions-sidebar__modal-body"},Wc={class:"description"};function $c(o,e,r,t,s,a){const g=p("seo-revisions-list"),c=p("core-blur"),f=p("seo-revisions-upsell"),v=p("core-modal"),E=p("svg-right-arrow-short"),x=p("base-button"),P=p("core-settings-row");return o.$root.$data.screenContext==="metabox"?(i(),k("div",zc,[d(c,null,{default:l(()=>[d(g)]),_:1}),d(f,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(i(),k("div",qc,[d(v,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=b=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:l(()=>[T(h(s.strings.seoRevisions),1)]),body:l(()=>[u("div",jc,[d(c,null,{default:l(()=>[d(g)]),_:1}),d(f,{"parent-component-context":"modal"})])]),_:1},8,["show"]),d(P,{align:""},{name:l(()=>[T(h(s.strings.seoRevisions),1)]),description:l(()=>[u("p",Wc,h(s.strings.description),1)]),content:l(()=>[d(x,{class:"gray small",onClick:e[1]||(e[1]=pe(b=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:l(()=>[d(E,{width:"10"}),T(" "+h(s.strings.button),1)]),_:1})]),_:1})])):m("",!0)}const qt=M(Gc,[["render",$c],["__scopeId","data-v-eda67d56"]]),Yc={setup(){return{licenseStore:_e()}},components:{SeoRevisions:qt,SeoRevisionsLite:qt},props:{parentComponentContext:String},data(){return{license:Ue}}},Zc={class:"aioseo-seo-revisions aioseo-tab-content"};function Xc(o,e,r,t,s,a){const g=p("seo-revisions",!0),c=p("seo-revisions-lite");return i(),k("div",Zc,[!t.licenseStore.isUnlicensed&&s.license.hasCoreFeature("seo-revisions")?(i(),_(g,{key:0,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"])):(i(),_(c,{key:1,parentComponentContext:r.parentComponentContext},null,8,["parentComponentContext"]))])}const Jc=M(Yc,[["render",Xc],["__scopeId","data-v-463f2e4b"]]),Qc={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=Qt(Xe()),r=ke(()=>99<e.value?"99+":e.value);return(t,s)=>S(e)?(i(),k("span",{key:0,class:J(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":t.$root.$data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":t.$root.$data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<S(e)}])},h(r.value),3)):m("",!0)}},ed={},td={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},od=u("path",{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"},null,-1),sd=[od];function rd(o,e){return i(),k("svg",td,sd)}const nd=M(ed,[["render",rd]]),id={},ad={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},ld=u("path",{d:"M7.00016 0.833334C3.32016 0.833334 0.333496 3.82 0.333496 7.5C0.333496 11.18 3.32016 14.1667 7.00016 14.1667C10.6802 14.1667 13.6668 11.18 13.6668 7.5C13.6668 3.82 10.6802 0.833334 7.00016 0.833334ZM7.66683 10.8333H6.3335V9.5H7.66683V10.8333ZM7.66683 8.16667H6.3335V4.16667H7.66683V8.16667Z",fill:"currentColor"},null,-1),cd=[ld];function dd(o,e){return i(),k("svg",ad,cd)}const ud=M(id,[["render",dd]]),pd={},hd={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},gd=u("path",{d:"M11 1.83325L10 0.833252L9 1.83325L8 0.833252L7 1.83325L6 0.833252L5 1.83325L4 0.833252L3 1.83325L2 0.833252L1 1.83325L0 0.833252V14.1666L1 13.1666L2 14.1666L3 13.1666L4 14.1666L5 13.1666L6 14.1666L7 13.1666L8 14.1666L9 13.1666L10 14.1666L11 13.1666L12 14.1666V0.833252L11 1.83325ZM1.33333 12.2266V2.77328H10.6667V12.2266H1.33333ZM10 10.8333V9.49992H2V10.8333H10ZM10 6.83325V8.16659H2V6.83325H10ZM10 5.49992V4.16658H2V5.49992H10Z",fill:"currentColor"},null,-1),md=[gd];function _d(o,e){return i(),k("svg",hd,md)}const yd=M(pd,[["render",_d]]),fd={},Sd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},kd=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.26625 4.7737L1.73375 0.249954L0.5 1.4837L5.02375 6.00745L6.26625 4.7737ZM9.6875 0.249954L11.4725 2.03495L0.5 13.0162L1.73375 14.25L12.715 3.27745L14.5 5.06245V0.249954H9.6875ZM8.74251 9.71747L9.97626 8.48372L12.715 11.2225L14.5 9.43746V14.25H9.68751L11.4813 12.4562L8.74251 9.71747Z",fill:"currentColor"},null,-1),vd=[kd];function bd(o,e){return i(),k("svg",Sd,vd)}const wd=M(fd,[["render",bd]]),Me="all-in-one-seo-pack",Cd={setup(){const o=Xe(),e=we(!1),r=()=>{window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()&&(e.value=!0,setTimeout(()=>{o.fetch().finally(()=>{e.value=!1})},2500))},t=async()=>{await Ge(),window.wp.data.subscribe(()=>{e.value||r()})};return{keywordRankTrackerStore:Ze(),licenseStore:_e(),postEditorStore:Q(),redirectsStore:Mo(),rootStore:ye(),seoRevisionsStore:o,settingsStore:xe(),watchObjectRevisionsOnSavePost:t}},components:{Advanced:gr,Alert:yo,CoreMainTabs:Be,CoreModal:Ie,General:So,KeywordRankTracker:ga,LinkAssistant:gl,ModalContent:Fl,Redirects:sc,Schema:xc,SeoRevisions:Jc,SeoRevisionsCountBadge:Qc,Social:vo,SvgBackup:nd,SvgBuild:Us,SvgCaret:Je,SvgCircleInformationSolid:ud,SvgClose:vt,SvgLinkSuggestion:Mt,SvgReceipt:yd,SvgRedirectCrossedArrows:wd,SvgSettings:io,SvgShare:_o},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:n("Preview Snippet Editor",Me)},activeMainSidebarTab:"",isPageBuilderEditor:He}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Ho(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(o){this.activeTab!=="general"&&this.maybeResetActiveTab(o)},"postEditorStore.currentPost.linkAssistant.modalOpen"(o){this.maybeResetActiveTab(o)},"postEditorStore.currentPost.redirects.modalOpen"(o){this.maybeResetActiveTab(o)},"seoRevisionsStore.modalOpenSidebar"(o){this.maybeResetActiveTab(o)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.activeMainSidebarTab!==o.tab&&(this.activeMainSidebarTab=o.tab,this.processChangeTab(o.tab))}}},computed:{tabs(){var e;const o=[{slug:"general",icon:"svg-settings",name:n("General",Me)},{slug:"social",icon:"svg-share",name:n("Social",Me)},{slug:"schema",icon:"svg-receipt",name:n("Schema",Me)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:n("Redirects",Me),warning:0<this.redirectsStore.rows.filter(r=>!!r.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:n("SEO Revisions",Me),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:n("Advanced",Me)}];return!this.rootStore.aioseo.integration&&!He()&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&o.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:n("Link Assistant",Me)}),o},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(o=>o.slug!=="schema"&&Le(this.getTabPermission(o.slug))):this.tabs.filter(o=>Le(this.getTabPermission(o.slug))?!0:o.slug==="general"&&(Le("aioseo_page_analysis")||Le(this.getTabPermission(o.slug))))}},methods:{async processChangeTab(o){if(o!==null&&typeof o=="object"){this.processChangeTab(o.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:o.main,value:o.sub})});return}switch(this.$root.$data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const r=o===null?"sticky":"static";e.style.position=r});break;default:this.activeTab=o,this.settingsStore.changeTabSettings({setting:"main",value:o});break}if(this.$root.$data.screenContext==="sidebar"&&this.activeTab!==o)switch(this.activeTab=o,await this.$nextTick(),o){case"social":this.postEditorStore.currentPost.modalOpen||(this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0);break;case"linkAssistant":this.postEditorStore.currentPost.linkAssistant&&!this.postEditorStore.currentPost.linkAssistant.modalOpen&&(this.postEditorStore.currentPost.linkAssistant.modalOpen=!0);break;case"redirects":this.postEditorStore.currentPost.redirects&&!this.postEditorStore.currentPost.redirects.modalOpen&&(this.postEditorStore.currentPost.redirects.modalOpen=!0);break;case"seoRevisions":await this.$nextTick(),!this.seoRevisionsStore.modalOpenSidebar&&(this.licenseStore.isUnlicensed||this.seoRevisionsStore.itemsLimit===0)&&(this.seoRevisionsStore.modalOpenSidebar=!0);break}},maybeResetActiveTab(o){o||this.$root.$data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.currentPost.modalOpen=!1},getTabPermission(o){const e=this.tabs.find(r=>r.slug===o);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(o){const e=this.tabs.find(r=>r.slug===o);return e==null?void 0:e.name}},created(){switch(this.modal=qe()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{ft("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",o=>{Object.keys(o).forEach(e=>{this.postEditorStore.currentPost[e]=o[e]})}),this.$root.$data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=qe()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{ft("aioseo-tab")},500);break}},beforeMount(){const o=document.querySelector(".interface-complementary-area__pin-unpin-item");o&&o!==null&&(o.style.display="block")},mounted(){Ye()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},Pd={class:"aioseo-app aioseo-post-settings"},Ed={key:0,class:"aioseo-sidepanel"},xd=["onClick"],Td={class:"name"},Ad={key:0,class:"aioseo-tab-title"};function Ld(o,e,r,t,s,a){const g=p("core-main-tabs"),c=p("svg-circle-information-solid"),f=p("svg-caret"),v=p("svg-close"),E=p("alert"),x=p("modal-content"),P=p("core-modal"),b=p("keyword-rank-tracker");return i(),k("div",Pd,[o.$root.$data.screenContext!=="sidebar"?(i(),_(g,{key:0,tabs:a.getTabs,showSaveButton:!1,active:s.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=A=>a.processChangeTab(A))},{"var-tab-icon":l(({tab:A})=>[(i(),_(Se(A.icon),{class:J([{warning:A.warning}])},null,8,["class"])),(i(),_(Se(A.badge)))]),_:1},8,["tabs","active"])):m("",!0),d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[o.$root.$data.screenContext==="sidebar"&&s.activeTab===null?(i(),k("div",Ed,[(i(!0),k(Ce,null,Ke(a.getTabs,(A,z)=>(i(),k("a",{key:z,class:"aioseo-sidepanel-button",href:"#",onClick:pe(U=>a.processChangeTab(A.slug),["prevent"])},[(i(),_(Se(A.icon),{class:"icon"})),u("div",Td,h(A.name),1),(i(),_(Se(A.badge))),A.warning?(i(),_(c,{key:0,width:"15",height:"15"})):m("",!0),d(f)],8,xd))),128))])):m("",!0)]),_:1}),d(ze,{name:"route-fade",mode:"out-in"},{default:l(()=>[s.activeTab?(i(),k("div",{key:s.activeTab,class:J(["aioseo-tab",{"is-page-builder":!!t.rootStore.aioseo.integration}])},[o.$root.$data.screenContext==="sidebar"?(i(),k("div",Ad,[u("span",null,h(a.getTabName(s.activeTab)),1),d(v,{onClick:e[1]||(e[1]=A=>a.processChangeTab(null))})])):m("",!0),o.$root.$data.screenContext==="sidebar"?(i(),_(E,{key:1})):m("",!0),(i(),_(Se(s.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=A=>a.processChangeTab(A))},null,32))],2)):m("",!0)]),_:1}),d(P,{show:t.postEditorStore.currentPost.modalOpen&&o.$root.$data.screenContext==="sidebar",onClose:a.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:l(()=>[T(h(s.strings.modalTitle),1)]),body:l(()=>[d(x)]),_:1},8,["show","onClose"]),d(b,{"modal-open":t.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=A=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:A}))},null,8,["modal-open"])])}const Id=M(Cd,[["render",Ld]]),Fu={__name:"App",setup(o){Bo({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const e=Q();return(r,t)=>(i(),k("div",{onClick:t[0]||(t[0]=pe(()=>{},["stop"])),id:"main-settings-cont"},[r.$root.$data.screenContext!=="sidebar"?(i(),_(S(yo),{key:0})):m("",!0),S(e).currentPost.id?(i(),_(S(Id),{key:1})):m("",!0)]))}};export{Fu as _};