OwlCyberSecurity - MANAGER
Edit File: App.pJjvMZ-i.js
/* empty css */import{E as ct,b as E,g as M,a as dt,u as q,ah as rt,ai as $e,H as mt,F as Zt,aj as Pe,N as j,a8 as J,ab as _t,f as N,q as Ee,ak as Te,_ as xe,d as Ae,p as Xt,L as Le,e as Jt,O as et,A as st,al as Qt,Q as te,t as He,k as Ie}from"./links.w575jfOL.js";import{a as z}from"./allowed.jlDmxPN2.js";import{g as nt,r as Tt}from"./params.B3T1WKlC.js";import{C as F,a as ft,S as xt,f as St,c as At,e as Me,b as Lt,d as wt,h as Re}from"./Caret.B8YmKvEY.js";import{C as V}from"./SettingsRow.CSjiqnfy.js";import{B as Be}from"./Checkbox.dOnSakMX.js";import{G as Oe,a as De}from"./Row.Depn1REx.js";import{_ as v}from"./_plugin-vue_export-helper.BN1snXvA.js";import{v as d,o as r,c as f,C as l,l as c,x as w,t as m,a,k as _,b as g,G as T,E as I,K as ee,L as se,Y as Ue,h as Ve,H as Ht,F as R,J as Q,m as G,T as at,i as ot,f as it,u as P,q as O}from"./runtime-dom.esm-bundler.CWn9hmRK.js";import{C as Ke,a as Ne,S as Fe}from"./ScrollAndHighlight.CgbfptKH.js";import{C as tt}from"./Tabs.qjdtP0a-.js";import{C as W}from"./Index.Sx0bRfob.js";import{_ as D}from"./default-i18n.DXRQgkn2.js";import{u as oe,T as ie}from"./TruSeoScore.DmC22Awy.js";import{S as Ge,a as ze}from"./Mobile.DlhK7U8A.js";import{M as It}from"./MaxCounts.DHV7qSQX.js";import{S as re,a as qe}from"./Ellipse.Br8hAdqt.js";import{T as Mt}from"./Tags.BU74BX7Y.js";import{r as We,o as je,p as Ye,q as Ct,t as $t}from"./postSlug.DR-r-K_I.js";import{d as Pt}from"./debounce.CMPzYXJX.js";import{V as Ze,h as Xe}from"./helpers.CXsRrhc8.js";import{t as Ft}from"./toFinite.CI1EsaWS.js";import{C as K}from"./Tooltip.u2Cos2P_.js";import{S as Je}from"./Statistics.B2x6g7QK.js";import{S as yt,a as Rt,f as Qe,g as ts,h as es,i as ss,c as os,j as is,k as rs,m as ns,n as as,o as ls,e as cs,p as ds,q as hs,r as us,s as ps,t as gs,u as ms,v as _s,w as fs,x as Ss,y as ys,z as ks,A as vs,C as bs,D as ws,E as Cs}from"./index.vo0_cz49.js";import{S as Bt}from"./Plus.B44fv6Ya.js";import{S as ht}from"./Eye.YAQl-Tp6.js";import{B as ne}from"./RadioToggle.wKAtzkuu.js";import{C as $s}from"./GoogleSearchPreview.BT7aiH-w.js";import{C as Ot}from"./HtmlTagsEditor.CEWHUS3E.js";import{T as Ps}from"./Slide.DwUOEoDg.js";import{C as Es}from"./ProBadge.CeTQI5Mm.js";import{p as Gt}from"./popup.6pJEdp0g.js";import{l as Y}from"./license.BWlasdzY.js";import{u as Ts}from"./vue3-apexcharts.EA6uzAM7.js";import{C as xs}from"./ConnectCta.BLOUWz1L.js";import{C as lt}from"./Blur.DIwtbD0z.js";import{C as Dt}from"./Index.BLcpDwVY.js";import{G as gt}from"./Graph.WtVg2p4K.js";import{W as ae}from"./WpTable.CVGg_b1u.js";import{C as le}from"./Table.eZ8iPnsH.js";import{R as ce}from"./RequiredPlans.DbYABcJ7.js";import{a as de}from"./addons.CJ8lJt9v.js";import{P as As}from"./PostTypes.Cef6XkQ_.js";import{S as he}from"./External.htlge_um.js";import{S as Ls,a as Hs,b as Is}from"./InternalOutbound.DN1Qj9Y0.js";import{I as ue,a as pe}from"./Image.CErBif13.js";import{t as ge}from"./Editor.Cvkhfn-n.js";import{C as Ms}from"./FacebookPreview.CJCWxahb.js";import{C as me}from"./ImageUploader.DpyquSeA.js";import{C as Rs}from"./TwitterPreview.v4phknfG.js";import{S as _e}from"./Settings.zUS2xYiw.js";import{a as fe,S as Bs}from"./Build.DSrZcn3-.js";import{R as Os}from"./Redirects.CQeMuBf0.js";import{U as Ds,S as Us}from"./Upsell.CBPYtA4A.js";var Vs=Math.floor,Ks=Math.random;function Ns(t,e){return t+Vs(Ks()*(e-t+1))}var Fs=parseFloat,Gs=Math.min,zs=Math.random;function qs(t,e,i){if(i&&typeof i!="boolean"&&Ze(t,e,i)&&(e=i=void 0),i===void 0&&(typeof e=="boolean"?(i=e,e=void 0):typeof t=="boolean"&&(i=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=Ft(t),e===void 0?(e=t,t=0):e=Ft(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var o=zs();return Gs(t+o*(e-t+Fs("1e-"+((o+"").length-1))),e)}return Ns(t,e)}const Ws={data(){return{updatingSeoRevisions:!1}},methods:{updateSeoRevisions(){if(window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()){this.updatingSeoRevisions=!0;const t=this,e=ct();setTimeout(()=>{e.fetch().finally(()=>{t.updatingSeoRevisions=!1})},2500)}},async watchObjectRevisionsOnSavePost(){await this.$nextTick(),window.wp.data.subscribe(()=>{this.updatingSeoRevisions||this.updateSeoRevisions()})}}},js={setup(){return{postEditorStore:E()}},components:{BaseCheckbox:Be,GridColumn:Oe,GridRow:De},data(){return{strings:{useDefaultSettings:this.$t.__("Use Default Settings",this.$td),robotsMeta:this.$t.__("Robots meta:",this.$td),maxSnippet:this.$t.__("Max Snippet",this.$td),maxVideoPreview:this.$t.__("Max Video Preview",this.$td),maxImagePreview:this.$t.__("Max Image Preview",this.$td),standard:this.$t.__("Standard",this.$td),none:this.$t.__("None",this.$td),large:this.$t.__("Large",this.$td),noindex:this.$t.__("No Index",this.$td),nofollow:this.$t.__("No Follow",this.$td),noarchive:this.$t.__("No Archive",this.$td),notranslate:this.$t.__("No Translate",this.$td),noimageindex:this.$t.__("No Image Index",this.$td),nosnippet:this.$t.__("No Snippet",this.$td),noodp:this.$t.__("No ODP",this.$td)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(t){return this.imagePreviewOptions.find(e=>e.value===t)},saveImagePreview(t){this.postEditorStore.currentPost.maxImagePreview=t,this.postEditorStore.isDirty=!0}}},Ys={class:"aioseo-robots-meta"},Zs={key:0,class:"global-robots-settings aioseo-description"},Xs={class:"robots-meta-title"},Js={class:"global-robots-settings-options"},Qs={key:0,class:"aioseo-description max-snippet"},to={class:"aioseo-description max-video-preview"},eo={key:1,class:"aioseo-description max-image-preview"};function so(t,e,i,s,o,n){const u=d("base-toggle"),h=d("base-checkbox"),p=d("grid-column"),S=d("grid-row"),C=d("base-input"),$=d("base-select");return r(),f("div",Ys,[l(u,{modelValue:s.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=k=>s.postEditorStore.currentPost.default=k),e[1]||(e[1]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),s.postEditorStore.currentPost.default?g("",!0):(r(),f("div",Zs,[a("span",Xs,m(o.strings.robotsMeta),1),l(S,{class:"settings"},{default:c(()=>[s.postEditorStore.currentPost.isHomePage?g("",!0):(r(),_(p,{key:0,xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=k=>s.postEditorStore.currentPost.noindex=k),e[3]||(e[3]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=k=>s.postEditorStore.currentPost.nofollow=k),e[5]||(e[5]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=k=>s.postEditorStore.currentPost.noarchive=k),e[7]||(e[7]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=k=>s.postEditorStore.currentPost.notranslate=k),e[9]||(e[9]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=k=>s.postEditorStore.currentPost.noimageindex=k),e[11]||(e[11]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=k=>s.postEditorStore.currentPost.nosnippet=k),e[13]||(e[13]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:c(()=>[l(h,{size:"medium",modelValue:s.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=k=>s.postEditorStore.currentPost.noodp=k),e[15]||(e[15]=k=>s.postEditorStore.isDirty=!0)]},{default:c(()=>[w(m(o.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),a("div",Js,[s.postEditorStore.currentPost.nosnippet?g("",!0):(r(),f("div",Qs,[a("span",null,m(o.strings.maxSnippet),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=k=>s.postEditorStore.currentPost.maxSnippet=k),e[17]||(e[17]=k=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),a("div",to,[a("span",null,m(o.strings.maxVideoPreview),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=k=>s.postEditorStore.currentPost.maxVideoPreview=k),e[19]||(e[19]=k=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),s.postEditorStore.currentPost.noimageindex?g("",!0):(r(),f("div",eo,[a("span",null,m(o.strings.maxImagePreview),1),l($,{size:"medium",options:n.imagePreviewOptions,modelValue:n.getImagePreview(s.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=k=>n.saveImagePreview(k.value))},null,8,["options","modelValue"])]))])]))])}const oo=v(js,[["render",so]]),io={setup(){return{licenseStore:M(),optionsStore:dt(),postEditorStore:E()}},components:{CoreAlert:F,CoreSettingsRow:V,CoreSingleRobotsMeta:oo},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:this.$t.__("Advanced",this.$td),robotsSetting:this.$t.__("Robots Setting",this.$td),robotsToggle:this.$t.__("Use Default Settings",this.$td),canonicalUrl:this.$t.__("Canonical URL",this.$td),placeholder:this.$t.__("Enter a URL to change the default Canonical URL",this.$td),priorityScore:this.$t.__("Priority Score",this.$td),priority:this.$t.__("Priority",this.$td),frequency:this.$t.__("Frequency",this.$td),priorityFrequencyUpsell:this.$t.sprintf(this.$t.__("Priority Score is a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"priority-frequency",!0)),keywords:this.$t.__("Keywords",this.$td),tagPlaceholder:this.$t.__("Press enter to create a keyword",this.$td)}}},computed:{getPriorityOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.PRIORITY_OPTIONS)},getFrequencyOptions(){return[{label:this.$t.__("default",this.$td),value:"default"}].concat(this.$constants.FREQUENCY_OPTIONS)}},methods:{getPriority(t){return t=t!=="default"?parseFloat(t):t,this.getPriorityOptions.find(e=>e.value===t)},savePriority(t){this.postEditorStore.currentPost.priority=t,this.postEditorStore.isDirty=!0},getFrequency(t){return this.getFrequencyOptions.find(e=>e.value===t)},saveFrequency(t){this.postEditorStore.currentPost.frequency=t,this.postEditorStore.isDirty=!0}}},ro={class:"aioseo-tab-content aioseo-post-advanced"},no={class:"selectbox-row"},ao={class:"select"},lo=a("div",{class:"separator"},[a("span"),w(" - ")],-1),co={class:"select"},ho=["innerHTML"];function uo(t,e,i,s,o,n){const u=d("core-single-robots-meta"),h=d("core-settings-row"),p=d("base-input"),S=d("base-select"),C=d("core-alert");return r(),f("div",ro,[l(h,{id:"aioseo-post-robots-setting",name:o.strings.robotsSetting,align:""},{content:c(()=>[l(u)]),_:1},8,["name"]),l(h,{id:"aioseo-post-canonical-url",name:o.strings.canonicalUrl,align:""},{content:c(()=>[l(p,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=$=>s.postEditorStore.currentPost.canonicalUrl=$),e[1]||(e[1]=$=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),l(h,{name:o.strings.priorityScore,align:""},{content:c(()=>[a("div",no,[a("div",ao,[a("span",null,m(o.strings.priority),1),l(S,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:n.getPriorityOptions,modelValue:s.licenseStore.isUnlicensed?n.getPriority("default"):n.getPriority(s.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=$=>s.licenseStore.isUnlicensed?null:n.savePriority($.value))},null,8,["disabled","options","modelValue"])]),lo,a("div",co,[a("span",null,m(o.strings.frequency),1),l(S,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:n.getFrequencyOptions,modelValue:s.licenseStore.isUnlicensed?n.getFrequency("default"):n.getFrequency(s.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=$=>s.licenseStore.isUnlicensed?null:n.saveFrequency($.value))},null,8,["disabled","options","modelValue"])])]),s.licenseStore.isUnlicensed?(r(),_(C,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[a("div",{innerHTML:o.strings.priorityFrequencyUpsell},null,8,ho)]),_:1})):g("",!0)]),_:1},8,["name"]),s.optionsStore.options.searchAppearance.advanced.useKeywords?(r(),_(h,{key:0,name:o.strings.keywords,align:""},{content:c(()=>[l(S,{multiple:"",taggable:"",options:s.postEditorStore.currentPost.keywords||[],modelValue:s.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=$=>s.postEditorStore.currentPost.keywords=$),"tag-placeholder":o.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):g("",!0)])}const po=v(io,[["render",uo]]),go={setup(){return{licenseStore:M(),rootStore:q()}},components:{CoreApiBar:Ke,CoreLicenseKeyBar:Ne}};function mo(t,e,i,s,o,n){const u=d("core-api-bar"),h=d("core-license-key-bar");return r(),f("div",null,[s.rootStore.pong?g("",!0):(r(),_(u,{key:0})),t.$isPro&&s.licenseStore.isUnlicensed&&s.rootStore.pong?(r(),_(h,{key:1})):g("",!0)])}const Se=v(go,[["render",mo]]),_o={setup(){return{truSeoHighlighterStore:rt()}},emits:["next","previous"],components:{SvgEllipse:re,SvgCaret:ft,SvgClose:xt},data(){return{error:this.truSeoHighlighterStore.highlightAnalyzerHasError,order:this.truSeoHighlighterStore.highlightMarks.findIndex(t=>t.active)+1,total:this.truSeoHighlighterStore.highlightMarks.length}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},fo=t=>(ee("data-v-966cf3f9"),t=t(),se(),t),So={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},yo={class:"tru-seo-highlight-popover__count"},ko=fo(()=>a("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),vo={class:"tru-seo-highlight-popover__nav"},bo=["disabled"],wo=["disabled"],Co={class:"tru-seo-highlight-popover__close"};function $o(t,e,i,s,o,n){const u=d("svg-ellipse"),h=d("svg-caret"),p=d("svg-close");return r(),f("div",So,[a("div",{class:T(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":o.error}])},[l(u,{width:"8"})],2),a("div",yo,[a("span",null,m(o.order)+"/"+m(o.total),1)]),ko,a("div",vo,[a("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:o.order===1,onClick:e[0]||(e[0]=I(S=>t.$emit("previous"),["stop","exact"]))},[l(h,{width:"20"})],8,bo),a("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:o.order===o.total,onClick:e[1]||(e[1]=I(S=>t.$emit("next"),["stop","exact"]))},[l(h,{width:"20"})],8,wo)]),a("div",Co,[a("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=I((...S)=>n.close&&n.close(...S),["stop","exact"]))},[l(p,{width:"10"})],32)])])}const Po=v(_o,[["render",$o],["__scopeId","data-v-966cf3f9"]]),Eo={setup(){return{truSeoHighlighterStore:rt()}},computed:{...$e(rt)},data(){var t,e,i,s;return{editorObserver:null,editorWrapperRect:{},isBlockEditor:mt(),isClassicEditor:Zt(),tinymceEditor:null,selectBlockEditor:(e=(t=window==null?void 0:window.wp)==null?void 0:t.data)==null?void 0:e.select("core/block-editor"),selectEditPost:(s=(i=window==null?void 0:window.wp)==null?void 0:i.data)==null?void 0:s.select("core/edit-post")}},methods:{annotateBlock(t){var i,s,o,n,u,h;let e="content";(s=(i=t.block)==null?void 0:i.attributes)!=null&&s.caption?e="caption":(n=(o=t.block)==null?void 0:o.attributes)!=null&&n.value?e="value":(h=(u=t.block)==null?void 0:u.attributes)!=null&&h.citation&&(e="citation"),this.truSeoHighlighterStore.dispatchAnnotations.__experimentalAddAnnotation({id:t.id,range:t.range,source:this.truSeoHighlighterStore.source,blockClientId:t.block.clientId,richTextIdentifier:e})},annotateTinyMce(t,e){if(!e)return!1;!e.hasFocus()&&this.isBlockEditor&&e.focus();let i=e.selection.win.getSelection();i.selectAllChildren(t.parent);const s=i.toString().length;if(t.range.end<s)for(let o=t.range.end;o<s;o++)i.modify("extend","backward","character");if(0<t.range.start){i=We(i);for(let o=t.range.start;0<o;o--)i.modify("extend","forward","character")}e.undoManager.ignore(()=>{e.annotator.annotate(this.truSeoHighlighterStore.source,{uid:t.id})}),i.empty()},appendHighlightPopover(){if(this.truSeoHighlighterStore.clearHighlightPopover(),this.truSeoHighlighterStore.sanitizeHighlightMarks(),!this.truSeoHighlighterStore.activeMark)return!1;const t=this,e=Ue({name:"TruSeoHighlightPopover",render(){return Ve(Po,{onNext(){t.incrementActiveMark(1)},onPrevious(){t.incrementActiveMark(-1)}})}}),i=je(),s=new ResizeObserver(Pt(this.repositionHighlightPopover,750)),o=this.getEditorNode("wrapper");if(!o)return!1;o.parentElement.appendChild(i),e.mount(i),s.observe(this.getEditorNode("wrapper"),{box:"border-box"}),this.truSeoHighlighterStore.highlightPopover.app=e,this.truSeoHighlighterStore.highlightPopover.node=i,this.truSeoHighlighterStore.highlightPopover.observer=s,this.repositionHighlightPopover()},disallowHighlighting(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),this.truSeoHighlighterStore.allowHighlighting=!1},formatBlockContent({block:t,node:e}){var s,o,n,u;let i="";return e?i=e.outerText.replace(/\n\n/g,` `):t&&(i=((s=t==null?void 0:t.attributes)==null?void 0:s.content)||((o=t==null?void 0:t.attributes)==null?void 0:o.caption)||((n=t==null?void 0:t.attributes)==null?void 0:n.value)||((u=t==null?void 0:t.attributes)==null?void 0:u.citation)||"",i=i.replace(/<br[^>]*>/gi,` `),i=Pe(i)),Ye(i)},getEditorNode(t){var e;if(t==="closest-relative")return Ct({element:this.getEditorNode("wrapper").parentElement,property:"position",value:"relative"});if(t==="navigable")return Ct({element:this.getEditorNode("wrapper").parentElement,property:"overflow-y",value:"auto"});if(this.isClassicEditor){if(t==="wrapper")return document.getElementById("content_ifr");if(t==="first-block")return((e=this.tinymceEditor.getBody())==null?void 0:e.firstElementChild)||{}}if(this.isBlockEditor){if(t==="wrapper")return document.querySelector(".editor-styles-wrapper");if(t==="first-block"){const i=this.selectBlockEditor.getBlocks()[0];return document.getElementById(`block-${i==null?void 0:i.clientId}`)||{}}}},highlightBlockEditor(){var t;for(const e of this.selectBlockEditor.getBlocks()||[]){if(e.name==="core/freeform"){const i=window.tinymce.get(`editor-${e.clientId}`),s=((t=i.getBody())==null?void 0:t.children)||[];if(!s.length)continue;this.registerTinyMceAnnotator(i);for(const o of s)this.setHighlightMarks({block:e,node:o});continue}this.setHighlightMarks({block:e,node:null})}for(const[e,i]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(i.parent,parseInt(e)===this.truSeoHighlighterStore.highlightMarks.length-1),i.block.name==="core/freeform"?this.annotateTinyMce(i,window.tinymce.get(`editor-${i.block.clientId}`)):this.annotateBlock(i)},highlightClassicEditor(){var e;const t=((e=this.tinymceEditor.getBody())==null?void 0:e.children)||[];if(!t.length)return!1;this.registerTinyMceAnnotator(this.tinymceEditor);for(const i of t)this.setHighlightMarks({block:null,node:i});for(const[i,s]of Object.entries(this.truSeoHighlighterStore.highlightMarks))this.observeMarkParent(s.parent,parseInt(i)===this.truSeoHighlighterStore.highlightMarks.length-1),this.annotateTinyMce(s,this.tinymceEditor)},incrementActiveMark(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>i.active);if(!this.truSeoHighlighterStore.highlightMarks[e+t])return!1;this.truSeoHighlighterStore.allowScrolling=!0,this.truSeoHighlighterStore.highlightMarks[e].active=!1,this.truSeoHighlighterStore.highlightMarks[e+t].active=!0,this.appendHighlightPopover()},listenWindowCopy(t){var n,u;const e=()=>{t.preventDefault(),t.clipboardData.setData("text/html",window.getSelection().toString())},i=window.getSelection()||{};if(!(i!=null&&i.rangeCount))return!1;const s=((n=t.clipboardData)==null?void 0:n.getData("text/html"))||"";if(s&&s.indexOf(this.truSeoHighlighterStore.source)!==-1)return e(),!1;const o=i.getRangeAt(0)||{};for(const h of Object.values(((u=o==null?void 0:o.cloneContents())==null?void 0:u.children)||[]))if(Object.values((h==null?void 0:h.classList)||[]).some(p=>p.endsWith(this.truSeoHighlighterStore.source)))return e(),!1},listenWindowKeyup(t){var n,u;const e=(h,p)=>{h.collapse(p.firstChild,p.firstChild.length),h.deleteFromDocument()};if(["Delete","Backspace"].indexOf(t.key)===-1)return!1;const i=window.getSelection()||null;if(!(i!=null&&i.toString()))return!1;const s=((n=i==null?void 0:i.anchorNode)==null?void 0:n.parentElement)||null,o=((u=i==null?void 0:i.anchorNode)==null?void 0:u.nextElementSibling)||null;Object.values((s==null?void 0:s.classList)||[]).some(h=>h.endsWith(this.truSeoHighlighterStore.source))?e(i,s):Object.values((o==null?void 0:o.classList)||[]).some(h=>h.endsWith(this.truSeoHighlighterStore.source))&&e(i,o)},observeEditor(){var e;this.editorObserver=new MutationObserver(i=>{let s=!1;for(const o of i)for(const n of(o==null?void 0:o.removedNodes)||[])(this.truSeoHighlighterStore.highlightMarks.some(u=>n.isEqualNode(u.parent))||Object.values((n==null?void 0:n.classList)||[]).some(u=>u.endsWith(this.truSeoHighlighterStore.source)))&&(s=!0);s&&this.reset()});const t=(e=this.getEditorNode("first-block"))==null?void 0:e.parentElement;if(typeof t!="object")return!1;this.editorObserver.observe(t,{attributes:!1,childList:!0,subtree:!0})},observeMarkParent(t,e=!1){const i=(o,n)=>{var u;n.disconnect();for(const h of o){if(Object.values(((u=h==null?void 0:h.target)==null?void 0:u.classList)||[]).some(p=>p.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(h.target);continue}for(const p of(h==null?void 0:h.addedNodes)||[])if(Object.values((p==null?void 0:p.classList)||[]).some(S=>S.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(p);break}}e&&this.$nextTick().then(()=>Pt(this.appendHighlightPopover,250)())};if(typeof(t==null?void 0:t.parentElement)!="object")return!1;new MutationObserver(i).observe(t,{attributes:!0,childList:!0,subtree:!0})},observeWpBodyContent(){const t=e=>{var i,s,o;for(const n of e){if((n==null?void 0:n.type)!=="attributes")continue;if(!Ct({element:(i=this.getEditorNode("wrapper"))==null?void 0:i.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement))return this.disallowHighlighting(),!1;if(this.isBlockEditor&&(this.selectEditPost.getEditorMode()!=="visual"||this.selectBlockEditor.getBlockMode((s=this.selectBlockEditor.getSelectedBlock())==null?void 0:s.clientId)==="html"))return this.disallowHighlighting(),!1;if(this.isClassicEditor&&(this.setTinymceEditor(),((o=document.getElementById("content"))==null?void 0:o.nodeName)==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return this.disallowHighlighting(),!1;this.truSeoHighlighterStore.allowHighlighting=!0}};this.wpBodyContentObserver=new MutationObserver(Pt(t,250)),this.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},registerTinyMceAnnotator(t){t.annotator.register(this.truSeoHighlighterStore.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${this.truSeoHighlighterStore.source}`]})})},repositionHighlightPopover(t=[]){var S;if(!this.truSeoHighlighterStore.activeMark||!this.truSeoHighlighterStore.highlightPopover.node)return!1;for(const C of t)if(JSON.stringify(C.contentRect)===JSON.stringify(this.editorWrapperRect))return!1;t.length&&(this.editorWrapperRect=((S=t[0])==null?void 0:S.contentRect)||this.editorWrapperRect,this.truSeoHighlighterStore.allowScrolling=!1);const e=this.truSeoHighlighterStore.activeMark.node.getBoundingClientRect(),i=this.getEditorNode("wrapper").getBoundingClientRect(),s=this.getEditorNode("closest-relative").getBoundingClientRect(),o=this.getEditorNode("first-block").getBoundingClientRect(),[n,u]=[140,32];let h=e.top,p=o.left-s.left;n<p?(this.truSeoHighlighterStore.highlightPopover.node.style.top=h-s.top+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(-105%, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(h=h-u-s.top,h=this.isClassicEditor?h+i.top:h,p=this.isClassicEditor?p+i.left:p,this.truSeoHighlighterStore.highlightPopover.node.style.top=h+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(0, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),this.truSeoHighlighterStore.highlightPopover.node.style.left=p+"px",this.scrollToHighlightMark()},reset(){var t;window.removeEventListener("copy",this.listenWindowCopy),window.removeEventListener("keyup",this.listenWindowKeyup),(t=this.editorObserver)==null||t.disconnect(),this.truSeoHighlighterStore.clearAll(),this.$nextTick().then(()=>{if(!this.truSeoHighlighterStore.highlightSentences)return this.truSeoHighlighterStore.toggleHighlightAnalyzer(null),!1;this.isBlockEditor&&this.highlightBlockEditor(),this.isClassicEditor&&this.highlightClassicEditor(),this.observeEditor(),window.addEventListener("copy",this.listenWindowCopy),window.addEventListener("keyup",this.listenWindowKeyup)})},scrollToHighlightMark(){this.$nextTick().then(()=>{var i,s,o,n;if(!this.truSeoHighlighterStore.allowScrolling)return!1;this.truSeoHighlighterStore.activeMark.node.scrollIntoView();let t=this.getEditorNode("navigable"),e=t.scrollTop-60;this.isClassicEditor&&(e-=((s=(i=document.querySelector("#wp-content-editor-tools"))==null?void 0:i.getBoundingClientRect())==null?void 0:s.height)||0,e-=((n=(o=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:o.getBoundingClientRect())==null?void 0:n.height)||0),t.isEqualNode(document.documentElement)&&(t=window),t.scrollTo({top:e}),this.truSeoHighlighterStore.allowScrolling=!1})},setHighlightMarkNode(t){const e=this.truSeoHighlighterStore.highlightMarks.findIndex(i=>t.hasAttribute("data-mce-annotation-uid")?t.dataset.mceAnnotationUid.indexOf(i.id)!==-1:t.id.indexOf(i.id)!==-1);e!==-1&&(this.truSeoHighlighterStore.highlightMarks[e].node=t,t.style.backgroundColor="#cce0ff")},setHighlightMarks({block:t,node:e}){const i=this.formatBlockContent({block:t,node:e});if(i)for(const[s,o]of Object.entries(this.truSeoHighlighterStore.highlightSentences||{})){const n=new RegExp(j(o),"g");let u;for(;(u=n.exec(i))!==null&&!this.truSeoHighlighterStore.highlightMarks.find(S=>S.sentenceIndex===s);){const h={start:u.index,end:u.index+u[0].length||1};this.truSeoHighlighterStore.highlightMarks.find(S=>e?(S.range.start===h.start||S.range.end===h.end)&&S.parent.isEqualNode(e):(S.range.start===h.start||S.range.end===h.end)&&S.block.clientId===t.clientId)||this.truSeoHighlighterStore.highlightMarks.push({id:qs(1,999999999),range:h,block:t,parent:e||document.getElementById(`block-${t.clientId}`),node:null,active:this.truSeoHighlighterStore.highlightMarks.length===0,sentenceIndex:s})}}if(t)for(const s of(t==null?void 0:t.innerBlocks)||[])this.setHighlightMarks({block:s,node:null})},setTinymceEditor(){if(this.tinymceEditor)return!1;const t=window.setInterval(()=>{var e;if(this.tinymceEditor=((e=window==null?void 0:window.tinymce)==null?void 0:e.get("content"))||null,!this.tinymceEditor)return!1;window.clearInterval(t),this.tinymceEditor.dom.addStyle(` span.annotation-text.annotation-text-${this.truSeoHighlighterStore.source} { background-color: #CCE0FF; border-radius: 4px; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},watchHighlightSentences(t,e){const i=JSON.stringify(t),s=JSON.stringify(e);i!==s&&this.reset()}},beforeMount(){if((J()||!this.isBlockEditor&&!this.isClassicEditor)&&(this.truSeoHighlighterStore.enabled=!1),this.isBlockEditor&&(!this.truSeoHighlighterStore.dispatchAnnotations||!this.selectBlockEditor||!this.selectEditPost)&&(this.truSeoHighlighterStore.enabled=!1),!this.truSeoHighlighterStore.enabled)return!1},mounted(){var e;this.wpBodyContentObserver&&((e=this.wpBodyContentObserver)==null||e.disconnect());const t=window.setInterval(()=>{typeof this.getEditorNode("wrapper")=="object"&&(window.clearInterval(t),this.observeWpBodyContent())},1e3)}},To={setup(){return{keywordRankTrackerStore:_t()}},emits:["selectedKeyphrase","deleted","saved"],components:{CoreTooltip:K,SvgPencil:St,SvgStatistics:Je,SvgTrash:yt},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:this.$t.__("Delete",this.$td)}}},computed:{scoreClass(){return 80<this.score?"score-green":50<this.score?"score-orange":1<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(t){this.edit=!0,this.$emit("selectedKeyphrase",t)},deleteKeyphraseEv(t){this.edit=!1,this.$emit("deleted",t)},toggleKeyphrasesPanel(t){this.$emit("selectedKeyphrase",t)},closeEdit(t){var s;const e=(s=t.target)==null?void 0:s.value.trim(),i=this.index;e?(this.edit=!1,this.$emit("saved",{index:i,value:e})):this.deleteKeyphraseEv(i)},pressEnter(t){t.preventDefault(),t.target.blur(),this.edit=!1}}},xo={class:"aioseo-keyphrase-tag"},Ao={key:0,class:"aioseo-edit-keyphrase-tag"},Lo=["value"];function Ho(t,e,i,s,o,n){const u=d("svg-pencil"),h=d("svg-statistics"),p=d("svg-trash"),S=d("core-tooltip");return r(),f("div",xo,[a("span",{class:T(["aioseo-add-keyphrase-tag",o.edit?"hidden":""])},[a("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=C=>n.toggleKeyphrasesPanel(i.index))},m(i.keyphrase),1),a("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=C=>n.editKeyphraseEv(i.index))},[l(u)]),a("a",{href:"#",onClick:e[2]||(e[2]=I(C=>s.keywordRankTrackerStore.modalOpenPostEdit=!0,["prevent","exact"])),class:"btn-keyword-rank-tracker"},[l(h,{width:"20"})]),a("span",{class:T(["keyphrase-score",n.scoreClass]),onClick:e[3]||(e[3]=C=>n.toggleKeyphrasesPanel(i.index))},m(i.score)+"/100",3)],2),o.edit?(r(),f("span",Ao,[a("input",{value:i.keyphrase,onBlur:e[4]||(e[4]=(...C)=>n.closeEdit&&n.closeEdit(...C)),onKeydown:e[5]||(e[5]=Ht((...C)=>n.pressEnter&&n.pressEnter(...C),["enter"]))},null,40,Lo),a("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=C=>n.deleteKeyphraseEv(i.index))},[l(S,{type:"action"},{tooltip:c(()=>[w(m(o.strings.delete),1)]),default:c(()=>[l(p)]),_:1})])])):g("",!0)])}const ye=v(To,[["render",Ho]]),Io={},Mo={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},Ro=a("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),Bo=[Ro];function Oo(t,e){return r(),f("svg",Mo,Bo)}const Do=v(Io,[["render",Oo]]),Uo={setup(){return{truSeoHighlighterStore:rt()}},components:{CoreTooltip:K,SvgEye:ht,SvgEyeFilled:Do},props:{analyzer:String},data(){return{strings:{highlightSections:this.$t.__("Highlight sections in the Editor",this.$td),highlightingIsDisabled:this.$t.__("Highlighting is disabled for current view",this.$td)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},Vo=["disabled"];function Ko(t,e,i,s,o,n){const u=d("svg-eye"),h=d("core-tooltip"),p=d("svg-eye-filled");return s.truSeoHighlighterStore.enabled?(r(),f("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!s.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=I(S=>n.onClickBtnToggleHighlighter(),["stop","exact"]))},[s.truSeoHighlighterStore.highlightAnalyzer!==i.analyzer?(r(),_(h,{key:0,offset:t.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:c(()=>[w(m(s.truSeoHighlighterStore.allowHighlighting?o.strings.highlightSections:o.strings.highlightingIsDisabled),1)]),default:c(()=>[l(u,{width:"16",height:"16"})]),_:1},8,["offset"])):(r(),_(p,{key:1,width:"16",height:"16"}))],8,Vo)):g("",!0)}const No=v(Uo,[["render",Ko]]),Fo={components:{SvgCaret:ft,SvgCircleCheck:At,SvgCircleClose:Me,TruSeoToggleHighlighter:No},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")}}},Go={class:"aioseo-analysis-detail"},zo={key:0},qo={class:"title__text"},Wo={class:"description"};function jo(t,e,i,s,o,n){const u=d("svg-circle-check"),h=d("svg-circle-close"),p=d("tru-seo-toggle-highlighter"),S=d("svg-caret");return r(),f("ul",Go,[(r(!0),f(R,null,Q(i.analysisItems,(C,$)=>{var k;return r(),f(R,{key:$},[C.title?(r(),f("li",zo,[a("p",{class:T(["title",C.error===0?"toggled":""])},[C.error===0?(r(),_(u,{key:0,width:"16"})):g("",!0),C.error===1?(r(),_(h,{key:1,width:"16"})):g("",!0),a("span",qo,m(C.title),1),(k=C==null?void 0:C.highlightSentences)!=null&&k.length?(r(),_(p,{key:2,analyzer:$},null,8,["analyzer"])):g("",!0),l(S,{width:"16",role:"button",onClick:I(n.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),a("p",Wo,m(C.description),1)])):g("",!0)],64)}),128))])}const kt=v(Fo,[["render",jo]]),Yo={setup(){return{licenseStore:M(),postEditorStore:E()}},components:{CoreAlert:F,CoreKeyphrase:ye,CoreLoader:Lt,SvgCirclePlus:Bt,metaboxAnalysisDetail:kt},data(){return{selectedKeyphrase:0,strings:{additional:this.$t.__("Additional Keyphrases",this.$td),addKeyphrase:this.$t.__("Add Additional Keyphrases",this.$td),keyphraseDocumentation:this.$t.__("Improve your SEO rankings with additional keyphrases.",this.$td),upsell:this.$t.sprintf(this.$t.__("Additional Keyphrases are a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings",this.$constants.GLOBAL_STRINGS.learnMore,"additional-keywords",!0))}}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},methods:{onSelectedKeyphrase(t){this.selectedKeyphrase=t},onSaved(t){const{index:e,value:i}=t;this.postEditorStore.currentPost.keyphrases.additional[e].keyphrase=i,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(t){const e=[...this.postEditorStore.currentPost.keyphrases.additional];e.splice(t,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 i;const e=document.getElementsByClassName(`add-keyphrase-${this.$root.$data.screenContext}-input`)[0].querySelector(".medium");if(e.value){const s={keyphrase:e.value,score:0},o=this.postEditorStore.currentPost.keyphrases.additional.push(s),n=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(i=n[o])==null||i.click(),this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost})}},pressEnter(t){const e=document.getElementById("add-additional-keyphrase");t.preventDefault(),e.click()},created(){this.postEditorStore.currentPost.keyphrases.forEach((t,e)=>{this.postEditorStore.currentPost.loading.additional[e]=!1})}}},Zo={class:"additional-keyphrases-panel"},Xo={key:0},Jo={class:"analysis-wrapper"},Qo={class:"aioseo-description additional-keyphrases-description"},ti=["innerHTML"];function ei(t,e,i,s,o,n){const u=d("core-keyphrase"),h=d("core-loader"),p=d("metaboxAnalysisDetail"),S=d("base-input"),C=d("svg-circle-plus"),$=d("base-button"),k=d("core-alert");return r(),f("div",Zo,[s.postEditorStore.currentPost.keyphrases.additional&&s.postEditorStore.currentPost.keyphrases.additional.length&&t.$isPro&&s.licenseStore.license.isActive?(r(),f("div",Xo,[(r(!0),f(R,null,Q(s.postEditorStore.currentPost.keyphrases.additional,(b,y)=>(r(),_(u,{key:y,index:y,keyphrase:b.keyphrase,score:b.score,onSaved:n.onSaved,onDeleted:n.onDeleted,onSelectedKeyphrase:n.onSelectedKeyphrase,class:T(["aioseo-keyphrase-tag additional-keyphrase",o.selectedKeyphrase===y?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),a("div",Jo,[s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(r(),_(h,{key:0,class:"analysis-loading",dark:""})):g("",!0),!s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(r(),_(p,{key:1,analysisItems:s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].analysis},null,8,["analysisItems"])):g("",!0)])])):g("",!0),t.$isPro&&s.licenseStore.license.isActive?(r(),_(S,{key:1,size:"medium",class:T(`add-keyphrase-${this.$root.$data.screenContext}-input`),onKeydown:Ht(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),t.$isPro&&s.licenseStore.license.isActive?(r(),_($,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:c(()=>[l(C,{width:"14",height:"14"}),w(" "+m(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):g("",!0),!t.$isPro||!s.licenseStore.license.isActive?(r(),f(R,{key:3},[a("div",Qo,m(o.strings.keyphraseDocumentation),1),l(k,{class:"inline-upsell",type:"blue"},{default:c(()=>[a("div",{innerHTML:o.strings.upsell},null,8,ti)]),_:1})],64)):g("",!0)])}const si=v(Yo,[["render",ei],["__scopeId","data-v-e5c5ea64"]]),oi=""+window.__aioseoDynamicImportPreload__("images/open-ai.Du2ac8yQ.png"),ii={setup(){return{getAssetUrl:Xe,settingsStore:N()}},components:{CoreModal:W},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:oi,strings:{upgradeToPro:this.$t.__("Unlock AI Generator",this.$td),learnMoreLink:this.$t.sprintf('<a class="feature-link" href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a> %3$s',this.$links.getUpsellUrl("post-settings","general","open-ai"),this.$t.__("Learn more about all the features",this.$td),this.$links.getUpsellLink("post-settings","","general",!0))}}},computed:{headerTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generate New SEO %1$s",this.$td),this.$t.__("Title",this.$td)):this.$t.sprintf(this.$t.__("Generate New SEO %1$s",this.$td),this.$t.__("Description",this.$td))},ctaHeaderTitle(){return this.type==="title"?this.$t.sprintf(this.$t.__("Generating SEO %1$s is a Pro Feature",this.$td),this.$t.__("Titles",this.$td)):this.$t.sprintf(this.$t.__("Generating SEO %1$s is a Pro Feature",this.$td),this.$t.__("Descriptions",this.$td))},ctaDescription(){return this.type==="title"?this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("titles",this.$td),this.$t.__("title",this.$td)):this.$t.sprintf(this.$t.__("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.",this.$td),this.$t.__("meta descriptions",this.$td),this.$t.__("description",this.$td))}}},ri={class:"cta"},ni=["src"],ai={class:"bottom"},li={class:"title"},ci=["innerHTML"];function di(t,e,i,s,o,n){const u=d("base-button"),h=d("core-modal");return r(),_(h,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=p=>s.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:c(()=>[w(m(n.headerTitle),1)]),body:c(()=>[a("div",ri,[a("img",{src:s.getAssetUrl(o.OpenAiImage),alt:"open-ai-upsell"},null,8,ni),a("div",ai,[a("div",null,[a("p",li,m(n.ctaHeaderTitle),1),a("p",null,m(n.ctaDescription),1)]),a("div",null,[l(u,{type:"green",size:"medium",tag:"a",href:t.$links.getPricingUrl("post-settings","general","open-ai"),target:"_blank"},{default:c(()=>[w(m(o.strings.upgradeToPro),1)]),_:1},8,["href"]),a("span",{innerHTML:o.strings.learnMoreLink},null,8,ci)])])])]),_:1})}const hi=v(ii,[["render",di]]),ui={},pi={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},gi=a("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),mi=[gi];function _i(t,e){return r(),f("svg",pi,mi)}const fi=v(ui,[["render",_i]]),Si={setup(){return{settingsStore:N()}},components:{AiModal:hi,CoreTooltip:K,SvgAiRobot:fi},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:this.$t.__("Use AI Generator",this.$td)}}}},yi={class:"aioseo-ai-generator"};function ki(t,e,i,s,o,n){const u=d("svg-ai-robot"),h=d("core-tooltip"),p=d("ai-modal");return r(),f("div",yi,[l(h,{type:"action",offset:"-30px,0"},{tooltip:c(()=>[w(m(o.strings.useAiGenerator),1)]),default:c(()=>[a("button",{type:"button",onClick:e[1]||(e[1]=S=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))},[l(u,{onClick:e[0]||(e[0]=S=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))})])]),_:1}),l(p,{show:s.settingsStore.modals.aiGenerator===i.type,type:i.type},null,8,["show","type"])])}const vi=v(Si,[["render",ki]]),bi={setup(){const{strings:t}=oe();return{settingsStore:N(),strings:t}},components:{CoreTooltip:K,SvgCaret:ft,SvgCircleCheck:At,SvgCircleQuestionMark:Rt,SvgEllipse:re,TransitionSlide:Ps},mixins:[ie],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(t){this.$root.$data.screenContext==="sidebar"&&this.openCard(t.card)}}},methods:{openCard(t){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:t})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},wi={class:"aioseo-card aioseo-sidebar-card"},Ci={class:"text"},$i={key:0,class:"content"},Pi={key:1,class:"content"};function Ei(t,e,i,s,o,n){const u=d("svg-ellipse"),h=d("svg-circle-check"),p=d("svg-circle-question-mark"),S=d("core-tooltip"),C=d("svg-caret"),$=d("transition-slide");return r(),f("div",wi,[i.hideHeader?g("",!0):(r(),f("div",{key:0,class:"header",onClick:e[0]||(e[0]=k=>s.settingsStore.toggleCard({slug:i.slug,shouldSave:i.saveToggleStatus}))},[a("div",Ci,[G(t.$slots,"header",{},()=>[w(m(i.headerText),1)]),i.focusScore>=0?G(t.$slots,"alt",{key:0},()=>[i.focusScore!==null?(r(),f("span",{key:0,class:T(["card-score",t.getScoreClass(i.focusScore)])},m(i.focusScore)+"/100 ",3)):g("",!0)]):g("",!0),i.trueSeoScore>=0?G(t.$slots,"alt",{key:1},()=>[a("span",{class:T(["card-score",t.getErrorClass(i.trueSeoScore)])},[0<i.trueSeoScore?(r(),_(u,{key:0,width:"6"})):g("",!0),i.trueSeoScore===0?(r(),_(h,{key:1,width:"12"})):g("",!0),w(" "+m(t.getErrorDisplay(i.trueSeoScore)),1)],2)]):g("",!0),t.$slots.tooltip?(r(),_(S,{key:2},{tooltip:c(()=>[G(t.$slots,"tooltip")]),default:c(()=>[l(p)]),_:3})):g("",!0)]),i.toggles&&s.settingsStore.settings.toggledCards?(r(),_(C,{key:0,class:T({rotated:!s.settingsStore.settings.toggledCards[i.slug]})},null,8,["class"])):g("",!0)])),s.settingsStore.settings.toggledCards||i.noSlide?(r(),_($,{key:1,active:s.settingsStore.settings.toggledCards[i.slug]&&i.toggles||i.noSlide},{default:c(()=>[t.$slots["before-tabs"]?(r(),f("div",$i,[G(t.$slots,"before-tabs")])):g("",!0),G(t.$slots,"tabs"),t.$slots.default?(r(),f("div",Pi,[G(t.$slots,"default")])):g("",!0)]),_:3},8,["active"])):g("",!0)])}const Ti=v(bi,[["render",Ei]]),xi={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const t=Math.max(...this.data.map(o=>o.x)),e=Math.max(...this.data.map(o=>o.y)),i=this.height-this.strokeWidth,s=this.data.map(o=>{const n=o.x===0?0:o.x/t,u=o.y===0?0:o.y/e,h=n*this.width,p=i-u*i+this.strokeWidth;return`${h},${p}`}).join(" ");return`0,${i+this.strokeWidth} `+s+` ${this.width},${i+this.strokeWidth}`}}},Ai=["width","height","viewBox"],Li=["fill","points"],Hi=["stroke","strokeWidth","points"];function Ii(t,e,i,s,o,n){return r(),f("svg",{width:i.width,height:i.height,viewBox:n.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[a("polygon",{fill:i.fillColor,points:n.polylinePoints},null,8,Li),a("polyline",{fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:n.polylinePoints},null,8,Hi)],8,Ai)}const Mi=v(xi,[["render",Ii]]),Ri={},Bi={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},Oi=a("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),Di=a("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),Ui=[Oi,Di];function Vi(t,e){return r(),f("svg",Bi,Ui)}const Ki=v(Ri,[["render",Vi]]),Ni={setup(){return{connectStore:Ee(),licenseStore:M(),optionsStore:dt(),postEditorStore:E(),rootStore:q(),semrushStore:Te()}},components:{CoreAlert:F,CoreKeyphrase:ye,CoreLoader:Lt,CoreModal:W,CoreTooltip:K,SvgAreaChart:Mi,SvgCircleCheck:At,SvgCirclePlus:Bt,SvgLogoSemrush:Ki,SvgTrash:yt,metaboxAnalysisDetail:kt},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:{value:"US",label:"United States of America - US"},strings:{modalTitle:this.$t.sprintf(this.$t.__("Additional Keyphrases by %1$s",this.$td),"Semrush"),addKeyphrase:this.$t.__("Add Focus Keyphrase",this.$td),getAdditionalKeyphrases:this.$t.__("Get Additional Keyphrases",this.$td),showResultsFor:this.$t.__("Show Results For:",this.$td),keyphrase:this.$t.__("Keyphrase",this.$td),volume:this.$t.__("Volume",this.$td),trend:this.$t.__("Trend",this.$td),addAdditionalKeyphrase:this.$t.__("Add Keyphrase",this.$td),removeAdditionalKeyphrase:this.$t.__("Remove Keyphrase",this.$td),noResults:this.$t.__("No results",this.$td),upsell:this.$t.sprintf(this.$t.__("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",this.$td),"Semrush","<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("semrush-keywords",this.$constants.GLOBAL_STRINGS.learnMore,null,!0)),semrushGetAdditionalKeyphrases:this.$t.sprintf(this.$t.__("%1$s integrates directly with %2$s to provide you with actionable keyphrases to help you write better content.",this.$td),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:this.$t.__("To use this feature, first add a focus keyphrase.",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),delete:this.$t.__("Delete",this.$td),semrushTooltip:this.$t.sprintf(this.$t.__("Get Additional Keyphrases with %1$s!",this.$td),"Semrush"),semrushTooltipLicenseKey:this.$t.sprintf(this.$t.__("%1$sA valid license key is required%2$s in order to connect with %3$s.",this.$td),'<a href="'+this.rootStore.aioseo.urls.aio.settings+'">',"</a>","Semrush"),youHaveExceededSemrush:this.$t.sprintf(this.$t.__("You have exceeded the number of requests allowed by your %1$s plan.",this.$td),"Semrush"),inOrderToUpgradeSemrush:this.$t.sprintf(this.$t.__("In order to continue searching for additional keyphrases, you'll need to upgrade. %1$s",this.$td),this.$links.getUpsellLink("semrush-pricing",this.$constants.GLOBAL_STRINGS.learnMore,"semrushPricing",!0))}}},watch:{semrushCountry:{deep:!0,handler(){this.getKeyphrases()}}},computed:{semrushError(){return this.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?this.$t.__("You have exceeded the limit for requests. Please try again later.",this.$td):this.$t.__("An error occurred while fetching keyphrases. Please try again later.",this.$td)},semrushDatabase(){return this.$constants.COUNTRY_LIST.map(t=>(t.value==="GB"&&(t.value="UK",t.label="United Kingdom"),t.value==="KR"&&(t.label="South Korea"),t)).filter(t=>this.$constants.SEMRUSH_DATABASE.includes(t.value.toLowerCase())).map(t=>(t.label=t.label+" - "+t.value.toUpperCase(),t))}},methods:{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(t){return t.split(",").map((i,s)=>({x:s,y:parseFloat(i)}))},openConnectPopup(t){Gt(t,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(t){Gt(t,"Semrush Oauth",450,570,!0,["code"],this.completedCallback,this.closedCallback,this.postMessageCallback)},async completedCallback(t){return this.semrushStore.authenticate(t.code)},completedConnectCallback(t){return this.connectStore.saveConnectToken(t.token)},openModal(){this.semrushShowModal=!0,!this.semrushStore.error&&this.getKeyphrases()},getKeyphrases(){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(t){t&&this.openModal()},closedConnectCallback(t){if(t){if(this.semrushStore.hasValidTokens){this.$nextTick(this.getAdditionalKeyphrases);return}this.showSemrushTooltip=!0}},async postMessageCallback(t,e,i){const{data:s,source:o,origin:n}=t;if(!(n!=="https://oauth.semrush.com"||e!==o)){if(s.type==="semrush:oauth:success"){window.removeEventListener("message",i,!1);let u={};try{const h=new URL(s.url);u=nt(h.search)}catch{}this.completedCallback(u).then(()=>{e.close(),e=null,this.closedCallback(!0)})}s.type==="semrush:oauth:denied"&&(e.close(),window.removeEventListener("message",i,!1),e=null,this.closedCallback())}},onSaved(t){const{value:e}=t;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"),i=e==null?void 0:e.value.trim();i&&(this.postEditorStore.currentPost.keyphrases.focus={keyphrase:i,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(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.filter(i=>i.keyphrase.toLowerCase()===t).length},getAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases;return e.find(i=>i.keyphrase.toLowerCase()===t)},scoreClass(t){return 80<t?"score-green":50<t?"score-orange":1<t?"score-red":"score-none"},async addAdditionalKeyphrase(t,e){this.addingAdditionalKeyphrase=e;const{additional:i}=this.postEditorStore.currentPost.keyphrases,s=i.push({keyphrase:t,score:0}),o=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.keyphrases.additional=i,this.postEditorStore.isDirty=!0,await this.$truSeo.runAnalysis({postId:this.postEditorStore.currentPost.id,postData:this.postEditorStore.currentPost}),await this.$nextTick(),o[s]&&o[s].click(),this.addingAdditionalKeyphrase=!1},goToAdditionalKeyphrase(t){const{additional:e}=this.postEditorStore.currentPost.keyphrases,i=e.findIndex(s=>s.keyphrase.toLowerCase()===t);if(i!==-1){const s=document.getElementsByClassName("keyphrase-name");s[i+1]&&s[i+1].click(),this.semrushShowModal=!1}},removeAdditionalKeyphrase(t,e){this.removingAdditionalKeyphrase=e;const{additional:i}=this.postEditorStore.currentPost.keyphrases,s=i.findIndex(o=>o.keyphrase.toLowerCase()===t);if(s!==-1){i.splice(s,1),this.postEditorStore.currentPost.keyphrases.additional=i;const o=document.getElementsByClassName("keyphrase-name");o[0]&&o[0].click()}this.$nextTick(()=>{this.removingAdditionalKeyphrase=!1})},toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")},pressEnter(t){const e=document.getElementById("add-focus-keyphrase");t.preventDefault(),e.click()}},mounted(){const t=[];this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&t.push(this.semrushStore.refresh())}},Fi={class:"aioseo-focus-keyphrase-panel"},Gi={class:"disabled-button gray medium"},zi={class:"disabled-button gray"},qi=["innerHTML"],Wi={class:"aioseo-modal-content has-padding"},ji={class:"aioseo-settings-row"},Yi={class:"settings-name"},Zi={class:"name"},Xi={class:"results"},Ji={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Qi={class:"keyphrases-header"},tr={class:"keyphrase"},er={class:"keyphrase-volume"},sr={class:"keyphrase-trend"},or={key:0,class:"keyphrase-actions"},ir={class:"keyphrases-rows"},rr={class:"keyphrase"},nr={class:"keyphrase-volume"},ar={class:"keyphrase-trend"},lr={key:0,class:"keyphrase-actions"},cr={key:0,class:"focus-keyphrase"},dr={key:1},hr={key:1,class:"remove-keyphrase"},ur=["onClick"],pr={key:1,class:"keyphrase-row"},gr=["colspan"],mr={key:1},_r={class:"semrush-logo"},fr={class:"semrush-upsell"},Sr=["innerHTML"],yr=["innerHTML"];function kr(t,e,i,s,o,n){const u=d("base-input"),h=d("svg-circle-plus"),p=d("base-button"),S=d("core-tooltip"),C=d("core-keyphrase"),$=d("core-loader"),k=d("metaboxAnalysisDetail"),b=d("core-alert"),y=d("base-select"),H=d("svg-area-chart"),L=d("svg-circle-check"),Z=d("svg-trash"),vt=d("svg-logo-semrush"),ut=d("core-modal");return r(),f("div",Fi,[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),_(u,{key:0,size:"medium",class:T(`add-focus-keyphrase-${this.$root.$data.screenContext}-input`),onKeydown:Ht(n.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),a("div",{class:T(`add-focus-keyphrase-${this.$root.$data.screenContext}-button`)},[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),_(p,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:n.addKeyphraseEv},{default:c(()=>[l(h,{width:"14",height:"14"}),w(" "+m(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):g("",!0),!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),_(S,{key:1},{tooltip:c(()=>[a("span",null,m(o.strings.semrushGetAdditionalKeyphrases)+" "+m(o.strings.pleaseAddFocusKeyphrase),1)]),default:c(()=>[a("div",Gi,[l(h,{width:"14",height:"14"}),w(" "+m(o.strings.getAdditionalKeyphrases),1)])]),_:1})):g("",!0)],2),s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),_(C,{key:1,index:0,keyphrase:s.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:s.postEditorStore.currentPost.keyphrases.focus.score,onSaved:n.onSaved,onDeleted:n.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):g("",!0),s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus?(r(),_($,{key:2,class:"analysis-loading",dark:""})):g("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(r(),_(k,{key:3,analysisItems:s.postEditorStore.currentPost.keyphrases.focus.analysis},null,8,["analysisItems"])):g("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&t.$isPro&&s.licenseStore.isUnlicensed?(r(),_(S,{key:4},{tooltip:c(()=>[a("span",{innerHTML:o.strings.semrushTooltipLicenseKey},null,8,qi)]),default:c(()=>[a("div",zi,[l(h,{width:"14",height:"14"}),w(" "+m(o.strings.getAdditionalKeyphrases),1)])]),_:1})):g("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase&&(!t.$isPro||!s.licenseStore.isUnlicensed)?(r(),_(S,{key:5,disabled:!o.showSemrushTooltip||t.$isPro,"force-show":o.showSemrushTooltip&&!t.$isPro},{tooltip:c(()=>[a("span",null,m(o.strings.semrushTooltip),1)]),default:c(()=>[l(p,{class:"add-keyphrase gray medium",onClick:n.getAdditionalKeyphrases},{default:c(()=>[l(h,{width:"14",height:"14"}),w(" "+m(o.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):g("",!0),l(ut,{show:o.semrushShowModal,onClose:e[1]||(e[1]=x=>o.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:c(()=>[w(m(o.strings.modalTitle),1)]),body:c(()=>[a("div",Wi,[s.licenseStore.isUnlicensed?(r(),_(b,{key:0,type:"blue",innerHTML:o.strings.upsell},null,8,["innerHTML"])):g("",!0),a("div",ji,[a("div",Yi,[a("div",Zi,m(o.strings.showResultsFor),1)]),l(y,{class:"semrush-country-selector",size:"medium",options:n.semrushDatabase,placeholder:o.strings.selectPriceIndicator,modelValue:o.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=x=>o.semrushCountry=x)},null,8,["options","placeholder","modelValue"])]),a("div",Xi,[a("table",Ji,[a("thead",null,[a("tr",Qi,[a("th",tr,m(o.strings.keyphrase),1),a("th",er,m(o.strings.volume),1),a("th",sr,m(o.strings.trend),1),s.licenseStore.isUnlicensed?g("",!0):(r(),f("th",or))])]),a("tbody",ir,[s.semrushStore.results.length&&!o.loadingResults?(r(!0),f(R,{key:0},Q(s.semrushStore.results,(x,B)=>(r(),f("tr",{class:T(["keyphrase-row",{even:B%2===0}]),key:B},[a("td",rr,m(x[0]),1),a("td",nr,m(x[1]),1),a("td",ar,[l(H,{width:66,height:24,data:n.transformTrendDataToChartPoints(x[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.licenseStore.isUnlicensed?g("",!0):(r(),f("td",lr,[x[0]===s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(r(),f("div",cr,[l(L),w(" "+m(o.strings.focusKeyphrase),1)])):g("",!0),x[0]!==s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(r(),f("div",dr,[B!==o.removingAdditionalKeyphrase&&(B===o.addingAdditionalKeyphrase||!n.hasAdditionalKeyphrase(x[0]))?(r(),_(p,{key:0,type:"gray",size:"medium",onClick:pt=>n.addAdditionalKeyphrase(x[0],B),loading:B===o.addingAdditionalKeyphrase},{default:c(()=>[w(m(o.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):g("",!0),n.getAdditionalKeyphrase(x[0])&&B!==o.addingAdditionalKeyphrase&&(B===o.removingAdditionalKeyphrase||n.hasAdditionalKeyphrase(x[0]))?(r(),f("div",hr,[a("span",{class:T(["keyphrase-score",n.scoreClass(n.getAdditionalKeyphrase(x[0]).score)]),onClick:pt=>n.goToAdditionalKeyphrase(x[0])},m(n.getAdditionalKeyphrase(x[0]).score)+"/100",11,ur),l(S,{type:"action"},{tooltip:c(()=>[w(m(o.strings.delete),1)]),default:c(()=>[l(Z,{onClick:pt=>n.removeAdditionalKeyphrase(x[0],B)},null,8,["onClick"])]),_:2},1024)])):g("",!0)])):g("",!0)]))],2))),128)):g("",!0),!s.semrushStore.results.length||o.loadingResults?(r(),f("tr",pr,[a("td",{colspan:s.licenseStore.isUnlicensed?3:4,class:"no-results"},[a("div",null,[o.loadingResults?(r(),_($,{key:0,dark:""})):g("",!0),!o.loadingResults&&!s.semrushStore.error?(r(),f("span",mr,m(o.strings.noResults),1)):g("",!0),s.semrushStore.error&&!s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(r(),_(b,{key:2,type:"red"},{default:c(()=>[w(m(n.semrushError),1)]),_:1})):g("",!0),s.semrushStore.error&&s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(r(),f(R,{key:3},[a("div",_r,[l(vt)]),a("div",fr,[a("span",null,[a("strong",{innerHTML:o.strings.youHaveExceededSemrush},null,8,Sr)]),w(" "+m(" ")+" "),a("span",{innerHTML:o.strings.inOrderToUpgradeSemrush},null,8,yr)])],64)):g("",!0)])],8,gr)])):g("",!0)])])])])]),_:1},8,["show"])])}const vr=v(Ni,[["render",kr]]),br={setup(){return{postEditorStore:E(),rootStore:q()}},components:{CoreAlert:F,CoreMainTabs:tt,metaboxAnalysisDetail:kt},data(){return{initTab:"basic",tabs:[{slug:"basic",name:this.$t.__("Basic SEO",this.$td)},{slug:"title",name:this.$t.__("Title",this.$td)},{slug:"readability",name:this.$t.__("Readability",this.$td)}]}},computed:{parseTabs(){return this.tabs.map(t=>(t.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[t.slug].errors,t))},pageBuilderAlert(){if(!mt()||!["elementor","divi"].includes(this.rootStore.aioseo.integration))return!1;const t=this.rootStore.aioseo.integration.charAt(0).toUpperCase()+this.rootStore.aioseo.integration.slice(1);return this.$t.sprintf(this.$t.__("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.",this.$td),t,'<a href="'+this.postEditorStore.currentPost.editlink+'">',"</a>")}},methods:{processChangeTab(t){this.initTab=t}}},wr={class:"page-analysis-panel"},Cr=["innerHTML"];function $r(t,e,i,s,o,n){const u=d("core-alert"),h=d("core-main-tabs"),p=d("metaboxAnalysisDetail");return r(),f("div",wr,[n.pageBuilderAlert?(r(),_(u,{key:0,type:"yellow"},{default:c(()=>[a("span",{innerHTML:n.pageBuilderAlert},null,8,Cr)]),_:1})):g("",!0),l(h,{tabs:n.parseTabs,showSaveButton:!1,active:this.initTab,internal:"",onChanged:e[0]||(e[0]=S=>n.processChangeTab(S))},null,8,["tabs","active"]),l(at,{mode:"out-in"},{default:c(()=>[s.postEditorStore.currentPost.page_analysis?(r(),_(p,{key:0,analysisItems:s.postEditorStore.currentPost.page_analysis.analysis[this.initTab]},null,8,["analysisItems"])):g("",!0)]),_:1})])}const Pr=v(br,[["render",$r]]),Er={setup(){return{licenseStore:M(),postEditorStore:E(),hasRequiredFeature:Y.hasCoreFeature("general","cornerstone-content")}},components:{CoreAlert:F},emits:["changeTab"],data(){return{license:Y,strings:{description:this.$t.__("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",this.$td),linkingRecommendations:this.$t.__("internal linking recommendations in Link Assistant.",this.$td),upsell:this.$t.sprintf(this.$t.__("Cornerstone Content is a %1$s feature. %2$s",this.$td),"PRO",this.$links.getUpsellLink("post-settings-general",this.$constants.GLOBAL_STRINGS.learnMore,"cornerstone-content",!0)),markAsCornerstone:this.$t.__("Mark as Cornerstone",this.$td)}}}},Tr={class:"cornerstone-content-panel"},xr={class:"cornerstone-content-text"},Ar=["innerHTML"],Lr=["innerHTML"];function Hr(t,e,i,s,o,n){const u=d("base-toggle"),h=d("core-alert");return r(),f("div",Tr,[a("p",xr,[a("span",null,m(o.strings.description),1),a("a",{href:"#",onClick:e[0]||(e[0]=I(p=>t.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},m(o.strings.linkingRecommendations),1),a("span",{innerHTML:this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Ar)]),l(u,{modelValue:s.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":[e[1]||(e[1]=p=>s.postEditorStore.currentPost.pillar_content=p),e[2]||(e[2]=p=>s.postEditorStore.isDirty=!0)],disabled:!s.hasRequiredFeature},{default:c(()=>[w(m(o.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),s.licenseStore.isUnlicensed||!s.hasRequiredFeature?(r(),_(h,{key:0,class:"inline-upsell",type:"blue"},{default:c(()=>[a("div",{innerHTML:o.strings.upsell},null,8,Lr)]),_:1})):g("",!0)])}const Ir=v(Er,[["render",Hr]]),Mr={setup(){const{strings:t}=oe();return{licenseStore:M(),optionsStore:dt(),postEditorStore:E(),rootStore:q(),seoPreviewStore:xe(),settingsStore:N(),tagsStore:Ae(),truSeoHighlighterStore:rt(),composableStrings:t}},emits:["changeTab"],mixins:[It,qe,Mt,ie,Eo],components:{AdditionalKeyphrases:si,AiGenerator:vi,BaseRadioToggle:ne,CoreAlert:F,CoreGoogleSearchPreview:$s,CoreHtmlTagsEditor:Ot,CoreSettingsRow:V,CoreSidebarCard:Ti,CoreTooltip:K,CoreProBadge:Es,FocusKeyphrase:vr,MetaboxAnalysisDetail:kt,PageAnalysis:Pr,CornerstoneContent:Ir,SvgCircleQuestionMark:Rt,SvgDesktop:Ge,SvgMobile:ze,SvgPencil:St},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:Y,allowed:z,separator:void 0,isPageBuilderEditor:J,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:Xt(this.composableStrings,{pageName:this.$t.__("General",this.$td),serpPreview:this.$t.__("SERP Preview",this.$td),serpPreviewDocumentation:this.$t.__("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.",this.$td),editSnippet:this.$t.__("Edit Snippet",this.$td),clickToAddTitle:this.$t.__("Click on the tags below to insert variables into your title.",this.$td),metaDescription:this.$t.__("Meta Description",this.$td),clickToAddDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),cornerstoneContent:this.$t.__("Cornerstone Content",this.$td),focusKeyphrase:this.$t.__("Focus Keyphrase",this.$td),additionalKeyphrases:this.$t.__("Additional Keyphrases",this.$td),pageAnalysis:this.$t.__("Page Analysis",this.$td),basicSeo:this.$t.__("Basic SEO",this.$td),title:this.$t.__("Title",this.$td),readability:this.$t.__("Readability",this.$td),lookingForMetaKeywords:this.$t.__("Looking for meta keywords?",this.$td),goToAdvancedTab:this.$t.__("Go to the Advanced tab to add/edit meta keywords",this.$td),autogenerateDescriptionsAlert:this.$t.sprintf(this.$t.__("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.",this.$td),"AIOSEO",this.$links.getPlainLink(this.$t.__("Search Appearance > Advanced",this.$td),this.rootStore.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:this.$t.sprintf(this.$t.__("Not sure what keyphrases are used for? Check out our documentation for more information. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"useKeyphrasesTooltip",!0))})}},watch:{"postEditorStore.currentPost.title"(){wt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){wt(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(t,e){wt(()=>this.watchHighlightSentences(t,e))}},computed:{title(){return this.$t.sprintf(this.$t.__("%1$s Title",this.$td),this.postEditorStore.currentPost.type)},toggled:function(){return this.postEditorStore.currentPost.pillar_content===1},displayTruSeoMetaboxCard(){return $t()&&this.$root.$data.screenContext==="metabox"&&this.postEditorStore.currentPost.context==="post"&&this.parentComponentContext!=="modal"&&z("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return $t()&&this.$root.$data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&z("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return $t()&&this.$root.$data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&z("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(t){this.postEditorStore.changeGeneralPreview(t)},editSnippetEv(){this.editSnippet=!this.editSnippet,this.settingsStore.changeTabSettings({setting:"modal",value:"general"}),this.postEditorStore.currentPost.modalOpen=!0},getDefaultTags(t){switch(t){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 Le()?"-15px,0":J()?"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)})}},Rr={class:"aioseo-tab-content aioseo-post-general"},Br=["innerHTML"],Or=["innerHTML"],Dr=["innerHTML"],Ur={key:0},Vr=["innerHTML"],Kr=["innerHTML"];function Nr(t,e,i,s,o,n){const u=d("svg-circle-question-mark"),h=d("core-tooltip"),p=d("svg-desktop"),S=d("svg-mobile"),C=d("base-radio-toggle"),$=d("core-google-search-preview"),k=d("svg-pencil"),b=d("base-button"),y=d("core-settings-row"),H=d("ai-generator"),L=d("core-html-tags-editor"),Z=d("core-alert"),vt=d("core-pro-badge"),ut=d("cornerstone-content"),x=d("focus-keyphrase"),B=d("additional-keyphrases"),pt=d("page-analysis"),X=d("core-sidebar-card"),bt=d("metabox-analysis-detail");return r(),f("div",Rr,[o.allowed("aioseo_page_general_settings")?(r(),_(y,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:c(()=>[a("div",null,[a("span",null,m(o.strings.serpPreview),1),l(h,{offset:t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:c(()=>[w(m(o.strings.serpPreviewDocumentation),1)]),default:c(()=>[l(u)]),_:1},8,["offset"])]),t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),_(C,{key:0,modelValue:s.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":n.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:c(()=>[l(p)]),mobile:c(()=>[l(S)]),_:1},8,["modelValue","onUpdate:modelValue"])):g("",!0)]),content:c(()=>{var A,Kt,Nt;return[l($,{"focus-keyphrase":((Nt=(Kt=(A=s.postEditorStore.currentPost)==null?void 0:A.keyphrases)==null?void 0:Kt.focus)==null?void 0:Nt.keyphrase)??"",device:t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext==="metabox"||s.postEditorStore.currentPost.generalMobilePrev?"mobile":"desktop",url:s.tagsStore.liveTags.permalink,title:t.parseTags(s.postEditorStore.currentPost.title||s.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title"),description:t.parseTags(s.postEditorStore.currentPost.description||s.postEditorStore.currentPost.tags.description||"#post_content"),"rich-results":s.seoPreviewStore.richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),t.$root.$data.screenContext==="sidebar"&&i.parentComponentContext!=="modal"?(r(),_(b,{key:0,class:"edit-snippet gray small",onClick:n.editSnippetEv},{default:c(()=>[l(k),w(" "+m(o.strings.editSnippet),1)]),_:1},8,["onClick"])):g("",!0)]}),_:1})):g("",!0),(t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(r(),_(y,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:n.title,key:o.titleKey},{content:c(()=>[l(L,{modelValue:s.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=A=>s.postEditorStore.currentPost.title=A),e[2]||(e[2]=A=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=A=>t.updateCount(A,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("title")},{"tags-description":c(()=>[w(m(o.strings.clickToAddTitle),1)]),"append-button":c(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(r(),_(H,{key:0,type:"title"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,60)},null,8,Br)]),_:1},8,["name"])):g("",!0),(t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(r(),_(y,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:o.strings.metaDescription,key:o.descriptionKey},{content:c(()=>[n.showAutogenerateDescriptionsAlert?(r(),_(Z,{key:0,type:"yellow"},{default:c(()=>[a("span",{innerHTML:o.strings.autogenerateDescriptionsAlert},null,8,Or)]),_:1})):g("",!0),l(L,{modelValue:s.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=A=>s.postEditorStore.currentPost.description=A),e[5]||(e[5]=A=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=A=>t.updateCount(A,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":n.getDefaultTags("description")},{"tags-description":c(()=>[w(m(o.strings.clickToAddDescription),1)]),"append-button":c(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(r(),_(H,{key:0,type:"description"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,160)},null,8,Dr)]),_:1},8,["name"])):g("",!0),t.$root.$data.screenContext==="metabox"&&s.postEditorStore.currentPost.context==="post"&&s.postEditorStore.currentPost.postType!=="attachment"&&!o.isPageBuilderEditor()?(r(),_(y,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:c(()=>[w(m(o.strings.cornerstoneContent)+" ",1),s.licenseStore.isUnlicensed?(r(),_(vt,{key:0})):g("",!0)]),content:c(()=>[l(ut,{onChangeTab:e[6]||(e[6]=A=>t.$emit("changeTab",A))})]),_:1})):g("",!0),n.displayTruSeoMetaboxCard?(r(),f(R,{key:4},[s.optionsStore.options.searchAppearance.advanced.useKeywords&&s.optionsStore.options.searchAppearance.advanced.keywordsLooking?(r(),f("div",Ur,[l(Z,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:n.hideKeywordsLooking},{default:c(()=>[w(m(o.strings.lookingForMetaKeywords)+" ",1),a("a",{href:"#",onClick:e[7]||(e[7]=I(A=>t.$emit("changeTab","advanced"),["prevent"]))},m(o.strings.goToAdvancedTab),1),a("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=I(A=>t.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):g("",!0),l(y,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:c(()=>[a("span",null,m(o.strings.focusKeyphrase),1),l(h,{offset:"25px,0"},{tooltip:c(()=>[a("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Vr)]),default:c(()=>[l(u)]),_:1})]),content:c(()=>[l(x)]),_:1}),l(y,{name:o.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:c(()=>[l(B)]),_:1},8,["name"])],64)):g("",!0),n.displayTruSeoMetaboxCard&&s.postEditorStore.currentPost.page_analysis?(r(),_(y,{key:5,name:o.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:c(()=>[l(pt)]),_:1},8,["name"])):g("",!0),t.$root.$data.screenContext==="sidebar"&&!o.isPageBuilderEditor()&&this.parentComponentContext!=="modal"?(r(),_(X,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":o.strings.cornerstoneContent},{default:c(()=>[l(ut,{onChangeTab:e[9]||(e[9]=A=>t.$emit("changeTab",A))})]),_:1},8,["header-text"])):g("",!0),n.displayTruSeoSidebarKeyphraseCard?(r(),_(X,{key:7,slug:"focus",focusScore:n.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:c(()=>[a("span",null,m(o.strings.focusKeyphrase),1),l(h,{offset:n.getFocusKeyphraseTooltipOffset()},{tooltip:c(()=>[a("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,Kr)]),default:c(()=>[l(u)]),_:1},8,["offset"])]),default:c(()=>[l(x)]),_:1},8,["focusScore"])):g("",!0),n.displayTruSeoSidebarKeyphraseCard?(r(),_(X,{key:8,slug:"additional","header-text":o.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:c(()=>[l(B)]),_:1},8,["header-text"])):g("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),_(X,{key:9,slug:"basicseo","header-text":o.strings.basicSeo,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:c(()=>[l(bt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),_(X,{key:10,slug:"title","header-text":o.strings.title,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:c(()=>[l(bt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),n.displayTruSeoSidebarAnalysisCard?(r(),_(X,{key:11,slug:"readability","header-text":o.strings.readability,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:c(()=>[l(bt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0)])}const ke=v(Mr,[["render",Nr]]),Fr={setup(){const t=_t();return{keywordRankTrackerStore:t,rootStore:q(),settingsStore:N(),fetchData:t.fetchKeywords}},emits:[],components:{CoreLoader:Lt,CoreTooltip:K,CoreWpTable:le,Graph:gt,SvgEye:ht},mixins:[ae],props:{keywords:Object},computed:{tableBulkOptions(){return[{label:this.$constants.GLOBAL_STRINGS.delete,value:"delete"},{label:this.strings.addToGroup,value:"assignGroup"}]},tableColumns(){return[{slug:"name",label:this.$t.__("Keyword",this.$td),sortable:!0,sortDir:this.orderBy==="name"?this.orderDir:"asc",sorted:this.orderBy==="name"},{slug:"position",label:this.$t.__("Position",this.$td),sortable:!0,sortDir:this.orderBy==="position"?this.orderDir:"asc",sorted:this.orderBy==="position",width:"100px"},{slug:"history",label:this.$t.__("Position History",this.$td),width:"150px"},{slug:"tracking",label:this.$t.__("Tracking",this.$td),width:"100px"},{slug:"view",label:"",width:"40px"}]}},data(){return{tableId:"keyword-rank-tracker-keywords-table",changeItemsPerPageSlug:"searchStatisticsKeywordRankTracker",selectedRows:null,btnTrackingLoading:[],strings:{openInKeywordRankTracker:this.$t.__("Open in Keyword Rank Tracker",this.$td),position:this.$t.__("Position",this.$td),openInKrt:this.$t.__("Open in Keyword Rank Tracker",this.$td)}}},methods:{formatRowStatistic(t,e){var s;let i=((s=t.statistics)==null?void 0:s[e])??"";switch(e){case"position":i=i!==""?Math.round(i).toFixed(0):i;break}return i},positionHistorySeries(t){var e;return(e=t.statistics)!=null&&e.history?[{name:this.strings.position,data:t.statistics.history.map(i=>({x:i.date,y:i.position,label:i.position}))}]:[]},viewUrl(t){return this.rootStore.aioseo.urls.aio.searchStatistics+`&search=${t.name}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`},async toggleTracking(t,e,i){this.btnTrackingLoading[e]=!0,t.tracking=!t.tracking;try{t.id?await this.keywordRankTrackerStore.deleteKeywords([t.id]):await this.keywordRankTrackerStore.insertKeywords({keywords:[t.name]}),await this.keywordRankTrackerStore.fetchKeywords().then(()=>{this.keywordRankTrackerStore.maybeFetchStatistics({context:"keywords"})})}catch(s){t.tracking=!i,console.error(s)}finally{this.btnTrackingLoading=[]}}}},Gr={class:"post-title"},zr={key:1},qr={key:1},Wr={class:"tracking"},jr={key:0,class:"btn-view"},Yr=["href"];function Zr(t,e,i,s,o,n){const u=d("core-loader"),h=d("graph"),p=d("base-toggle"),S=d("svg-eye"),C=d("core-tooltip"),$=d("core-wp-table");return r(),_($,{ref:"table",id:o.tableId,"additional-filters":[],"bulk-options":n.tableBulkOptions,columns:n.tableColumns,filters:[],"initial-items-per-page":s.settingsStore.settings.tablePagination[o.changeItemsPerPageSlug],"initial-page-number":t.pageNumber,"initial-search-term":t.searchTerm,key:t.wpTableKey,loading:t.wpTableLoading,rows:i.keywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:t.processFilterTable,onPaginate:t.processPagination,onProcessAdditionalFilters:t.processAdditionalFilters,onProcessBulkAction:k=>({}),onProcessChangeItemsPerPage:t.processChangeItemsPerPage,onSearch:t.processSearch,onSortColumn:t.processSort},{name:c(({row:k})=>[a("div",Gr,[a("b",null,m(k.name),1)])]),position:c(({row:k})=>[k.statistics===null?(r(),_(u,{key:0,dark:""})):(r(),f("div",zr,m(n.formatRowStatistic(k,"position")),1))]),history:c(({row:k})=>[k.statistics===null?(r(),_(u,{key:0,dark:""})):(r(),f("div",qr,[n.positionHistorySeries(k).length?(r(),_(h,{key:0,series:n.positionHistorySeries(k),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:b=>parseFloat(b).toFixed(2)}}}},null,8,["series","chart-overrides"])):g("",!0)]))]),tracking:c(({row:k,index:b})=>[a("div",Wr,[o.btnTrackingLoading[b]?(r(),_(u,{key:0,dark:""})):g("",!0),l(p,{modelValue:k.tracking,"onUpdate:modelValue":[y=>k.tracking=y,y=>n.toggleTracking(k,b,y)],disabled:!!o.btnTrackingLoading[b]},null,8,["modelValue","onUpdate:modelValue","disabled"])])]),view:c(({row:k})=>[k.id?(r(),f("div",jr,[a("a",{href:n.viewUrl(k),target:"_blank"},[l(C,{type:"action",offset:"-80px,0"},{tooltip:c(()=>[w(m(o.strings.openInKrt),1)]),default:c(()=>[l(S)]),_:1})],8,Yr)])):g("",!0)]),_:1},8,["id","bulk-options","columns","initial-items-per-page","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}const Et=v(Fr,[["render",Zr]]),Xr={class:"keyword-rank-tracker-container"},Jr=["innerHTML"],Qr={class:"keyword-rank-tracker-container__card"},tn={class:"keyword-rank-tracker-container__card__header"},en={class:"keyword-rank-tracker-container__card__body"},sn=["innerHTML"],on={class:"keyword-rank-tracker-container__card"},rn={class:"keyword-rank-tracker-container__card__header"},nn={class:"keyword-rank-tracker-container__card__body"},an=["innerHTML"],ln={class:"keyword-rank-tracker-container__card"},cn={class:"keyword-rank-tracker-container__card__header"},dn={class:"keyword-rank-tracker-container__card__body"},hn={__name:"KeywordRankTracker",setup(t){const e=ot("$t"),i=ot("$td"),s=ot("$links"),o=_t(),n=M(),u=Jt(),h=s.getDocLink(e.__("Learn More",i),"keywordRankTracker",!0),p={...Ts().strings,withAioseo:e.__("Below you can track how your page is performing in search results based on your keyword(s).",i),keywordPositions:e.__("Keyword Positions",i)};it(()=>Y.hasCoreFeature("search-statistics")&&!u.isConnected||u.unverifiedSite);const S=it(()=>({rows:o.keywords.all.rows.slice(0,3).map($=>({...$,tracking:!0}))})),C=it(()=>{var b;const $={};for(const y of S.value.rows)(b=y==null?void 0:y.statistics)!=null&&b.history&&($[y.name]=y);const k=[];for(const y in $)k.push({name:y,data:$[y].statistics.history.map(H=>({x:H.date,y:H.position}))});return k});return($,k)=>(r(),f("div",null,[P(u).shouldShowSampleReports?(r(),f(R,{key:0},[a("div",Xr,[a("div",null,[a("span",null,m(p.withAioseo),1),w(),a("span",{innerHTML:P(h)},null,8,Jr)]),a("div",Qr,[a("div",tn,m(p.keywordPositions),1),a("div",en,[l(P(gt),{height:320,series:C.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:b=>parseFloat(b).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),l(P(Et),{keywords:S.value},null,8,["keywords"])]),P(u).shouldShowSampleReports?g("",!0):(r(),f(R,{key:0},[l(P(lt),{class:"keyword-rank-tracker-container"},{default:c(()=>[a("div",null,[a("span",null,m(p.withAioseo),1),w(),a("span",{innerHTML:P(h)},null,8,sn)]),a("div",on,[a("div",rn,m(p.keywordPositions),1),a("div",nn,[l(P(gt),{height:320,series:C.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:b=>parseFloat(b).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),l(P(Et),{keywords:S.value},null,8,["keywords"])]),_:1}),l(P(xs))],64))],64)):(r(),f(R,{key:1},[P(u).shouldShowSampleReports?g("",!0):(r(),_(P(lt),{key:0,class:"keyword-rank-tracker-container"},{default:c(()=>[a("div",null,[a("span",null,m(p.withAioseo),1),w(),a("span",{innerHTML:P(h)},null,8,an)]),a("div",ln,[a("div",cn,m(p.keywordPositions),1),a("div",dn,[l(P(gt),{height:320,series:C.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:b=>parseFloat(b).toFixed(2)}}}},null,8,["series","chart-overrides"])])]),l(P(Et),{keywords:S.value},null,8,["keywords"])]),_:1})),P(u).shouldShowSampleReports?g("",!0):(r(),_(P(Dt),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:P(u).showSampleReports,"cta-link":P(s).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker"),"button-text":p.ctaButtonText,"second-button-text":p.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":P(s).getUpsellUrl("search-statistics","keyword-rank-tracker",$.$isPro?"pricing":"liteUpgrade"),"feature-list":[p.feature1,p.feature2,p.feature3,p.feature4],"align-top":"","hide-bonus":!P(n).isUnlicensed},{"header-text":c(()=>[w(m(p.ctaHeader),1)]),description:c(()=>[l(P(ce),{"core-feature":["search-statistics"]}),w(" "+m(p.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))]))}},zt=v(hn,[["__scopeId","data-v-20006f61"]]),un={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(t){const e=ot("$t"),i=ot("$td"),s=M(),o=Jt(),n={headerTitle:e.__("Keyword Performance Tracking",i)},u=it(()=>Y.hasCoreFeature("search-statistics")&&!o.isConnected||o.unverifiedSite);return(h,p)=>(r(),_(P(W),{show:t.modalOpen,onClose:p[0]||(p[0]=S=>h.$emit("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:c(()=>[w(m(n.headerTitle),1)]),body:c(()=>[a("div",{class:T(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":P(o).shouldShowSampleReports}])},[!P(s).isUnlicensed&&P(Y).hasCoreFeature("search-statistics","keyword-rank-tracker")&&!u.value?(r(),_(P(zt),{key:0})):(r(),_(P(zt),{key:1}))],2)]),_:1},8,["show"]))}},pn={},gn={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},mn=a("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),_n=[mn];function fn(t,e){return r(),f("svg",gn,_n)}const Ut=v(pn,[["render",fn]]),Sn={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:V,SvgRightArrowShort:Ut},data(){return{strings:{title:this.$t.__("Link Assistant",this.$td),description:this.$t.__("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.",this.$td),button:this.$t.__("Open Link Assistant",this.$td)}}}},yn={class:"aioseo-link-assistant-sidebar"},kn={class:"aioseo-sidebar-content-title"};function vn(t,e,i,s,o,n){const u=d("svg-right-arrow-short"),h=d("base-button"),p=d("core-settings-row");return r(),f("div",yn,[t.$root.$data.screenContext==="sidebar"?(r(),_(p,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:c(()=>[a("div",kn,m(o.strings.title),1),a("p",null,m(o.strings.description),1),l(h,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:c(()=>[l(u),w(" "+m(o.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const bn=v(Sn,[["render",vn]]),U="all-in-one-seo-pack",wn=()=>{const t={frontPage:D("Front Page",U),deleteLink:D("Delete Link",U)},e={areYouSureSingle:D("Are you sure you want to delete this link?",U),areYouSureMultiple:D("Are you sure you want to delete these links?",U),areYouSureAll:D("Are you sure you want to delete all links?",U),actionCannotBeUndone:D("This action cannot be undone.",U),yesSingle:D("Yes, I want to delete this link",U),yesMultiple:D("Yes, I want to delete these links",U),yesAll:D("Yes, I want to delete all links",U),noChangedMind:D("No, I changed my mind",U)};return{bulkOptions:[{label:D("Delete",U),value:"delete"}],modalStrings:e,strings:t}},Cn={methods:{findTargetBlock(t,e){const i=j(e);let s=null;return t.forEach(o=>{if(s||!o.attributes)return;if(o.attributes.content&&o.attributes.content.search(i)!==-1){s=o.clientId;return}if(!o.innerBlocks)return;const n=this.findTargetBlock(o.innerBlocks,e);n&&(s=n)}),s}}},$n={emits:["updatingLinks","linksUpdated"],mixins:[Cn],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}}},beforeMount(){window.aioseoBus.$on("updatingLinks",e=>{this.wpTableLoading=e});const t=et();this.pageNumber=this.linkType?t.postReport[this.linkType].totals.page:1},data(){return{changeItemsPerPageSlug:"linkAssistantPostsReport",action:"",showModal:!1,selectedRows:[]}},computed:{rows(){if(!this.metabox)return this.post.links[this.linkType].rows;const t=this.pageNumber===1?0:(this.pageNumber-1)*10;return this.post.links[this.linkType].rows.slice(t,t+10)}},methods:{fetchData(t){const e=E();window.aioseoBus.$emit("updatingLinks",!0);const i={...t,additionalFilters:{postId:this.post.ID||e.currentPost.id,postIndex:this.postIndex,type:this.linkType}},s=et(),o=this.postReport?"fetchPostReport":"fetchLinksReportInner";return s[o](i).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},openPostReport(t){window.location.href=`#/post-report?postId=${this.postId}&postIndex=${this.postIndex}&initialTab=${t}`},maybeDoBulkAction({action:t,selectedRows:e}){!e.length||!t||(this.action=t,this.selectedRows=e,this.showModal=!0)},doBulkAction(){if(this.showModal=!1,this.selectedRows===!1||typeof this.selectedRows>"u"||!this.selectedRows.length)return;if(typeof this.selectedRows=="number"){this.doDeleteLink(this.selectedRows);return}if(this.metabox&&this.linkType!=="inboundInternal"){this.idsToIndexes(this.selectedRows).forEach(s=>{this.editorRemoveLink(s)});return}window.aioseoBus.$emit("updatingLinks",!0);const t=et(),e=E();t.linksBulk({postIndex:this.postIndex,postId:this.post.ID||e.currentPost.id,action:this.action,linkType:this.linkType,linkIds:this.selectedRows,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},doDeleteLink(t){const e=this.post.links[this.linkType].rows[t].id;if(!e)return;if(this.metabox&&this.linkType!=="inboundInternal"){this.editorRemoveLink(t);return}window.aioseoBus.$emit("updatingLinks",!0);const i=et(),s=E();i.linkDelete({postIndex:this.postIndex,postId:this.post.ID||s.currentPost.id,linkId:e,linksReport:this.linksReport,postReport:this.postReport}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated"),this.refreshTable()})},editorRemoveLink(t){mt()&&(window.aioseoBus.$emit("updatingLinks",!1),this.blockEditorRemoveLink(t),window.aioseoBus.$emit("updatingLinks",!1)),Zt()&&this.classicEditorRemoveLink(t)},blockEditorRemoveLink(t){const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i)return;window.aioseoBus.$emit("updatingLinks",!0);const s=j(i.anchor.trim()),o=i.phrase_html.trim(),n=j(o),u=window.wp.data.select("core/block-editor").getBlocks(),h=this.findTargetBlock(u,o);if(!h){window.aioseoBus.$emit("updatingLinks",!1);return}const p=window.wp.data.select("core/block-editor").getBlock(h);if(!p){window.aioseoBus.$emit("updatingLinks",!1);return}let S=new RegExp(`(<t?a[^<>]*>)(.*)?(${s})(.*)?(</t?a[^<>]*>)`,"i");const C=o.replace(S,"$2$3$4");S=new RegExp(`${n}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(h,{content:p.attributes.content.replace(S,C)}).then(()=>{this.post.links[this.linkType].rows.splice(t,1)}).catch($=>{console.error(`Couldn delete link with type "${this.linkType}" and index ${t}:`,$)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},classicEditorRemoveLink(t){var k;const i=E().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let s="",o=null,n=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(o=window.tinyMCE.get("content"),s=o.getContent({format:"raw"})):(n=document.querySelector("textarea#content"),s=n?n.value:""),!s){window.aioseoBus.$emit("updatingLinks",!1);return}let u=i.phrase_html.trim();o||(u=u.replace(/(\sdata-mce-href=".*")/gi,""));const h=j(i.anchor.trim());let p=new RegExp(`(<t?a[^<>]*>)(.*)?(${h})(.*)?(</t?a[^<>]*>)`,"i");const S=u.replace(p,"$2$3$4"),C=j(u);p=new RegExp(`${C}`,"i"),s=s.replace(p,S),o?o.setContent(s):n.value=s,this.post.links[this.linkType].rows.splice(t,1),(k=et().postSettingsUpdate({postContent:s}))==null||k.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},idsToIndexes(t){let e,i=[];return Array.isArray(t)&&(e=t.map(Number)),e&&this.post.links[this.linkType].rows.forEach((s,o)=>{e.includes(s.id)&&i.push(o)}),t==="all"&&(i=this.post.links[this.linkType].rows.map((s,o)=>o)),i.sort(function(s,o){return o-s})}}},Pn={emits:["closeModal","doBulkAction"],components:{CoreModal:W,SvgClose:xt},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}}},En={class:"aioseo-modal-body"},Tn=["innerHTML"];function xn(t,e,i,s,o,n){const u=d("svg-close"),h=d("base-button"),p=d("core-modal");return r(),_(p,{show:i.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=S=>t.$emit("closeModal",!0))},{body:c(()=>[a("div",En,[a("button",{class:"close",onClick:e[1]||(e[1]=I(S=>t.$emit("closeModal",!0),["stop"]))},[l(u,{onClick:e[0]||(e[0]=S=>t.$emit("closeModal",!0))})]),a("h3",null,m(n.areYouSure),1),a("div",{class:"reset-description",innerHTML:i.strings.actionCannotBeUndone},null,8,Tn),l(h,{type:"blue",size:"medium",onClick:e[2]||(e[2]=S=>t.$emit("doBulkAction",S))},{default:c(()=>[w(m(n.confirmation),1)]),_:1}),l(h,{type:"gray",size:"medium",onClick:e[3]||(e[3]=S=>t.$emit("closeModal",!0))},{default:c(()=>[w(m(i.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const An=v(Pn,[["render",xn]]),Ln={components:{CoreTooltip:K},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 t=st.decode(this.anchor),e=j(t);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return st.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return st.decode(this.stripTags(this.getPart(2)))},lastPart(){return st.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(t){const i=st.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return i?i[t]:""},stripTags(t,e=!1){return t=t.replace(/<br\s?\/?>/gi," "),e?t.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):t.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},Hn={class:"phrase"},In={key:0,class:"first"},Mn=["href"],Rn={key:2},Bn={class:"anchor"},On={key:3,class:"last"};function Dn(t,e,i,s,o,n){const u=d("core-tooltip");return r(),f("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=h=>t.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=h=>t.$emit("mouseLeave"))},[a("span",Hn,[n.firstPart?(r(),f("span",In,m(n.firstPart),1)):g("",!0),i.tooltip?(r(),_(u,{key:1,type:"action"},{tooltip:c(()=>[a("a",{class:"tooltip-url",href:i.url,target:"_blank"},m(i.url),9,Mn)]),default:c(()=>[a("span",{class:"anchor",onClick:e[0]||(e[0]=(...h)=>n.maybeOpenLink&&n.maybeOpenLink(...h))},m(n.linkAnchor),1)]),_:1})):g("",!0),i.tooltip?g("",!0):(r(),f("div",Rn,[a("span",Bn,m(n.linkAnchor),1)])),n.lastPart?(r(),f("span",On,m(n.lastPart),1)):g("",!0)]),G(t.$slots,"icons")],32)}const Un=v(Ln,[["render",Dn]]),Vn={},Kn={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Nn=a("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),Fn=[Nn];function Gn(t,e){return r(),f("svg",Kn,Fn)}const Vt=v(Vn,[["render",Gn]]),zn={setup(){const{strings:t,modalStrings:e,bulkOptions:i}=wn();return{rootStore:q(),settingsStore:N(),composableStrings:t,bulkOptions:i,modalStrings:e}},emits:["openSuggestions"],components:{CoreTooltip:K,CoreWpTable:le,LinkAssistantConfirmationModal:An,LinkAssistantPhrase:Un,SvgLinkExternal:he,SvgLinkSuggestion:Vt,SvgTrash:yt},mixins:[$n,As,ae],data(){return{tableId:"aioseo-post-report-inbound-internal",linkType:"inboundInternal",strings:Xt(this.composableStrings,{deleteAllLinks:this.$t.sprintf(this.$t.__("Delete All %1$s Links",this.$td),this.$t.__("Inbound Internal",this.$td)),outboundSuggestions:this.$t.sprintf(this.$t.__("%1$s Link Suggestions",this.$td),this.$t.__("Inbound",this.$td))})}},computed:{columns(){return[{slug:"post_title",label:this.$t.__("Post Title",this.$td)},{slug:"phrase",label:this.$t.__("Phrase",this.$td)},{slug:"delete",width:"50px"}]},seeAllLinks(){return this.$t.sprintf(this.$t.__("See All %1$s %2$s Links",this.$td),this.post.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))}},methods:{processPagination(t){this.pageNumber=t,!this.metabox&&(this.wpTableLoading=!0,this.processFetchTableData().then(()=>this.wpTableLoading=!1))}}},qn={key:0},Wn={key:0,class:"row-actions"},jn={class:"view"},Yn=["href"],Zn={class:"edit"},Xn=["href"],Jn={key:0,class:"links-bottom"},Qn={class:"links-bottom-left"},ta={key:1},ea={class:"links-bottom-right"};function sa(t,e,i,s,o,n){const u=d("link-assistant-phrase"),h=d("svg-trash"),p=d("core-tooltip"),S=d("core-wp-table"),C=d("svg-link-suggestion"),$=d("base-button"),k=d("svg-link-external"),b=d("link-assistant-confirmation-modal");return r(),f("div",null,[(r(),_(S,{id:o.tableId,key:t.wpTableKey,class:T({"link-assistant-inner-table":!t.postReport}),columns:n.columns,loading:t.wpTableLoading,rows:t.rows,totals:t.post.links.inboundInternal.totals,"bulk-options":s.bulkOptions,"initial-items-per-page":s.settingsStore.settings.tablePagination.linkAssistantPostsReport,"initial-page-number":t.pageNumber,"show-pagination":!t.linksReport,"show-search":!1,"show-table-footer":t.postReport,"show-items-per-page":"",onPaginate:n.processPagination,onProcessBulkAction:t.maybeDoBulkAction,onProcessChangeItemsPerPage:t.processChangeItemsPerPage},{post_title:c(({row:y})=>{var H,L;return[a("span",null,[w(m(y.context.postTitle)+" ",1),((L=(H=y.context)==null?void 0:H.permalink)==null?void 0:L.replace(/\/$/,""))===s.rootStore.aioseo.urls.home?(r(),f("span",qn,"("+m(o.strings.frontPage)+")",1)):g("",!0)]),y.context?(r(),f("div",Wn,[a("span",jn,[a("a",{href:y.context.permalink,target:"_blank"},m(t.viewPost(y.context.postType.singular)),9,Yn),w(" | ")]),a("span",Zn,[a("a",{href:y.context.editLink,target:"_blank"},m(t.editPost(y.context.postType.singular)),9,Xn)])])):g("",!0)]}),phrase:c(({row:y})=>[l(u,{phrase:y.phrase,phraseHtml:y.phrase_html||"",anchor:y.anchor,url:y.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:c(({index:y})=>[l(p,{type:"action"},{tooltip:c(()=>[w(m(o.strings.deleteLink),1)]),default:c(()=>[l(h,{onClick:H=>t.maybeDoBulkAction({action:"delete",selectedRows:y})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["id","class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onPaginate","onProcessBulkAction","onProcessChangeItemsPerPage"])),t.postReport?g("",!0):(r(),f("div",Jn,[a("div",Qn,[t.post.links.inboundInternal.rows.length?(r(),_($,{key:0,type:"blue",tag:"button",onClick:e[0]||(e[0]=y=>t.$emit("openSuggestions"))},{default:c(()=>[l(C),w(" "+m(o.strings.outboundSuggestions),1)]),_:1})):g("",!0),t.post.links.inboundInternal.totals.total>5&&t.linksReport?(r(),f("div",ta,[l(k),a("a",{class:"link-view",href:"#",onClick:e[1]||(e[1]=I(y=>t.openPostReport("inbound-internal"),["prevent"]))},m(n.seeAllLinks),1)])):g("",!0)]),a("div",ea,[t.post.links.inboundInternal.rows.length?(r(),f("a",{key:0,class:"link-delete",onClick:e[2]||(e[2]=I(y=>t.maybeDoBulkAction({action:"delete",selectedRows:"all"}),["prevent"]))},m(o.strings.deleteAllLinks),1)):g("",!0)])])),l(b,{show:t.showModal,selectedRows:t.selectedRows,strings:s.modalStrings,onDoBulkAction:t.doBulkAction,onCloseModal:e[3]||(e[3]=y=>t.showModal=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}const oa=v(zn,[["render",sa]]),ia={setup(){return{licenseStore:M(),postEditorStore:E()}},components:{CoreAlert:F,CoreBlur:lt,CoreMainTabs:tt,CoreModal:W,Cta:Dt,LinkAssistantInboundInternal:oa,LinksSideBar:bn,SvgLinkAffiliate:Ls,SvgLinkExternal:he,SvgLinkInternalInbound:Hs,SvgLinkInternalOutbound:Is,SvgLinkSuggestion:Vt,RequiredPlans:ce},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:this.$t.__("Unlock Link Assistant",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Link Assistant is a %1$s Feature",this.$td),"PRO"),linkAssistantDescription:this.$t.__("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",this.$td),thisFeatureRequires:this.$t.__("This feature requires one of the following plans:",this.$td),linkOpportunities:this.$t.__("Actionable Link Suggestions",this.$td),orphanedPosts:this.$t.__("See Orphaned Posts",this.$td),affiliateLinks:this.$t.__("See Affiliate Links",this.$td),domainReports:this.$t.__("Top Domain Reports",this.$td)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,this.$t.__("Inbound Internal",this.$td))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,this.$t.__("Outbound Internal",this.$td))},{slug:"affiliate",icon:"svg-link-affiliate",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,this.$t.__("Affiliate",this.$td))},{slug:"external",icon:"svg-link-external",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.external.totals.total,this.$t.__("External",this.$td))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:this.$t.sprintf("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,this.$t.__("Link Suggestions",this.$td))}]},modalHeader(){return this.$t.sprintf(this.$t.__('Links & Suggestions for "%1$s"',this.$td),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},ra={class:"aioseo-tab-content aioseo-link-assistant"},na={key:0};function aa(t,e,i,s,o,n){const u=d("core-main-tabs"),h=d("link-assistant-inbound-internal"),p=d("core-blur"),S=d("required-plans"),C=d("cta"),$=d("core-modal"),k=d("links-side-bar");return r(),f("div",ra,[t.$root.$data.screenContext==="metabox"?(r(),f("div",na,[l(p,null,{default:c(()=>[l(u,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:b})=>[(r(),_(O(b.icon),{class:T([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(r(),_(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):g("",!0)]),_:1}),l(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":c(()=>[w(m(o.strings.ctaHeader),1)]),description:c(()=>[l(S,{addon:"aioseo-link-assistant"}),w(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):g("",!0),l($,{show:s.postEditorStore.currentPost.linkAssistant.modalOpen&&t.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=b=>s.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:c(()=>[w(m(n.modalHeader),1)]),body:c(()=>[l(p,null,{default:c(()=>[l(u,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":c(({tab:b})=>[(r(),_(O(b.icon),{class:T([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(r(),_(h,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):g("",!0)]),_:1}),l(C,{"cta-link":t.$links.getPricingUrl("link-assistant","link-assistant-upsell","metabox"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("link-assistant","metabox",t.$isPro?"pricing":"liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!s.licenseStore.isUnlicensed},{"header-text":c(()=>[w(m(o.strings.ctaHeader),1)]),description:c(()=>[l(S,{addon:"aioseo-link-assistant"}),w(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),this.parentComponentContext!=="modal"?(r(),_(k,{key:1})):g("",!0)])}const qt=v(ia,[["render",aa]]),la={};function ca(t,e){return r(),f("div")}const da=v(la,[["render",ca]]),ha={setup(){return{addons:de,licenseStore:M()}},components:{Links:qt,LinksActivate:da,LinksLite:qt},props:{parentComponentContext:String}},ua={class:"aioseo-tab-content aioseo-link-assistant"};function pa(t,e,i,s,o,n){const u=d("Links",!0),h=d("LinksLite"),p=d("LinksActivate");return r(),f("div",ua,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(r(),_(u,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-link-assistant")?(r(),_(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-link-assistant")&&s.addons.canActivate("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(r(),_(p,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const ga=v(ha,[["render",pa]]),ma={computed:{objectTypeOptions(){return[{groupLabel:this.$t.__("Default",this.$td),options:[{label:this.$t.__("Default Object Type (Set in Social Networks)",this.$td),value:"default"}]}].concat(this.$constants.OG_TYPE_OPTIONS)}},methods:{getObjectTypeLabelByOption(t){let e="";return this.objectTypeOptions.forEach(i=>{const s=i.options.find(o=>o.value===t);s&&(e=(s==null?void 0:s.label)||"")}),e}}},_a={computed:{twitterCardOptions(){return[{label:this.$t.__("Default (Set under Social Networks)",this.$td),value:"default"},{label:this.$t.__("Summary",this.$td),value:"summary"},{label:this.$t.__("Summary with Large Image",this.$td),value:"summary_large_image"}]}},methods:{getTwitterCardLabelByOption(t){var e;return((e=this.twitterCardOptions.find(i=>i.value===t))==null?void 0:e.label)||""}}},fa={setup(){return{optionsStore:dt(),postEditorStore:E(),rootStore:q()}},components:{CoreAlert:F,CoreFacebookPreview:Ms,CoreHtmlTagsEditor:Ot,CoreImageUploader:me,CoreSettingsRow:V},mixins:[ue,pe,It,Mt,ma],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ge,separator:void 0,titleCount:0,descriptionCount:0,strings:{tabName:this.$t.__("Facebook Preview",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),video:this.$t.__("Video URL",this.$td),width:this.$t.__("Width",this.$td),height:this.$t.__("Height",this.$td),facebookObjectType:this.$t.__("Object Type",this.$td),facebookImage:this.$t.__("Facebook Image",this.$td),facebookTitle:this.$t.__("Facebook Title",this.$td),facebookDescription:this.$t.__("Facebook Description",this.$td),minimumSize:this.$t.__("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.",this.$td),clickToAddSiteName:this.$t.__("Click on the tags below to insert variables into your site name.",this.$td),clickToAddHomePageDescription:this.$t.__("Click on the tags below to insert variables into your meta description.",this.$td),articleSection:this.$t.__("Article Section",this.$td),articleTags:this.$t.__("Article Tags",this.$td),tagPlaceholder:this.$t.__("Press enter to create an article tag",this.$td),facebookDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("Open Graph",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",this.$t.__("Go to Social Networks",this.$td)))}}},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(){const t=this.postEditorStore.currentPost.context==="term"?"taxonomies":"postTypes";return this.postEditorStore.currentPost.og_object_type==="article"||this.postEditorStore.currentPost.og_object_type==="default"&&this.optionsStore.dynamicOptions.social.facebook.general[t][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType].objectType==="article"}},methods:{scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveImageType(t){this.postEditorStore.currentPost.og_image_type=t,this.postEditorStore.isDirty=!0},getObjectTypeOptions(t){let e=null;return this.objectTypeOptions.forEach(i=>{const s=i.options.find(o=>o.value===t);s&&(e=s)}),e},setObjectType(t){this.postEditorStore.currentPost.og_object_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.og_image_custom_url=t,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("facebook")}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},Sa={class:"tab-facebook"},ya={id:"aioseo-post-settings-facebook"},ka=["innerHTML"],va=["innerHTML"];function ba(t,e,i,s,o,n){const u=d("core-alert"),h=d("core-facebook-preview"),p=d("core-settings-row"),S=d("core-html-tags-editor"),C=d("base-select"),$=d("base-input"),k=d("core-image-uploader");return r(),f("div",Sa,[l(p,{class:"snippet-preview-row"},{name:c(()=>[a("span",null,m(o.strings.tabName),1)]),content:c(()=>[s.optionsStore.options.social.facebook.general.enable?g("",!0):(r(),_(u,{key:0,class:"facebook-disabled-warning",innerHTML:o.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),l(h,{description:n.previewDescription,image:t.imageUrl,loading:t.loading,title:n.previewTitle},null,8,["description","image","loading","title"])]),_:1}),a("div",ya,[l(p,{name:o.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:c(()=>[l(S,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_title,"onUpdate:modelValue":[e[0]||(e[0]=b=>s.postEditorStore.currentPost.og_title=b),e[2]||(e[2]=b=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=b=>t.updateCount(b,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":c(()=>[w(m(o.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,95)},null,8,ka)]),_:1},8,["name"]),l(p,{name:o.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:c(()=>[l(S,{class:"facebook-meta-input",modelValue:s.postEditorStore.currentPost.og_description,"onUpdate:modelValue":[e[3]||(e[3]=b=>s.postEditorStore.currentPost.og_description=b),e[5]||(e[5]=b=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=b=>t.updateCount(b,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":c(()=>[w(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,va)]),_:1},8,["name"]),l(p,{class:"facebook-image-source",name:o.strings.imageSource,align:""},{content:c(()=>[l(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=b=>n.saveImageType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.og_image_type==="custom"?(r(),_(p,{key:0,name:o.strings.customFieldsName,align:""},{content:c(()=>[l($,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":[e[7]||(e[7]=b=>s.postEditorStore.currentPost.og_image_custom_fields=b),e[8]||(e[8]=b=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):g("",!0),s.postEditorStore.currentPost.og_image_type==="custom_image"?(r(),_(p,{key:1,class:"facebook-image",name:o.strings.facebookImage},{content:c(()=>[l(k,{description:o.strings.minimumSize,modelValue:s.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[9]||(e[9]=b=>s.postEditorStore.currentPost.og_image_custom_url=b)},null,8,["description","modelValue"])]),_:1},8,["name"])):g("",!0),l(p,{class:"facebook-video",name:o.strings.video,align:""},{content:c(()=>[l($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[10]||(e[10]=b=>s.postEditorStore.currentPost.og_video=b)},null,8,["modelValue"])]),_:1},8,["name"]),l(p,{class:"facebook-object-type",name:o.strings.facebookObjectType,align:""},{content:c(()=>[l(C,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:n.getObjectTypeOptions(s.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=b=>n.setObjectType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),n.shouldShowArticleSection?(r(),_(p,{key:2,name:o.strings.articleSection,align:""},{content:c(()=>[l($,{type:"text",size:"medium",modelValue:s.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[12]||(e[12]=b=>s.postEditorStore.currentPost.og_article_section=b)},null,8,["modelValue"])]),_:1},8,["name"])):g("",!0),n.shouldShowArticleSection?(r(),_(p,{key:3,name:o.strings.articleTags,align:""},{content:c(()=>[l(C,{multiple:"",taggable:"",options:[],modelValue:s.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[13]||(e[13]=b=>s.postEditorStore.currentPost.og_article_tags=b),"tag-placeholder":o.strings.tagPlaceholder},null,8,["modelValue","tag-placeholder"])]),_:1},8,["name"])):g("",!0)])])}const wa=v(fa,[["render",ba]]),Ca={setup(){return{optionsStore:dt(),postEditorStore:E(),rootStore:q()}},components:{CoreAlert:F,CoreHtmlTagsEditor:Ot,CoreImageUploader:me,CoreSettingsRow:V,CoreTwitterPreview:Rs},mixins:[ue,pe,It,Mt,_a],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:ge,separator:void 0,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:this.$t.__("X (Twitter) Preview",this.$td),twitterPreviewDescription:this.$t.__("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.",this.$td),useFB:this.$t.__("Use Data from Facebook Tab",this.$td),imageSource:this.$t.__("Image Source",this.$td),customFieldsName:this.$t.__("Custom Field Name",this.$td),twitterImage:this.$t.__("X Image",this.$td),twitterTitle:this.$t.__("X Title",this.$td),twitterDescription:this.$t.__("X Description",this.$td),twitterCardType:this.$t.__("X Card Type",this.$td),minimumSizeSummary:this.$t.__("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),minimumSizeSummaryWithLarge:this.$t.__("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",this.$td),twitterDisabled:this.$t.sprintf(this.$t.__("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",this.$td),this.$t.__("X (Twitter)",this.$td),this.$t.sprintf('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",this.$t.__("Go to Social Networks",this.$td)))}}},computed:{previewTitle(){const t=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_title?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(t||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const t=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_description?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(t||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(t){return this.twitterCardOptions.find(e=>e.value===t)},cardSelect(t){this.postEditorStore.currentPost.twitter_card=t,this.postEditorStore.isDirty=!0},scrollToElement(){const t=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{t&&(t.firstChild.scrollTop=0)},10)},saveTwitterImageType(t){this.postEditorStore.currentPost.twitter_image_type=t,this.postEditorStore.isDirty=!0},updateImage(t){this.postEditorStore.currentPost.twitter_image_custom_url=t,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(t){t.social==="facebook"&&(this.facebookImageUrl=t.image)}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},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)}},$a={class:"tab-twitter"},Pa={id:"aioseo-post-settings-twitter"},Ea=["innerHTML"],Ta=["innerHTML"];function xa(t,e,i,s,o,n){const u=d("core-alert"),h=d("core-twitter-preview"),p=d("core-settings-row"),S=d("base-toggle"),C=d("core-html-tags-editor"),$=d("base-select"),k=d("base-input"),b=d("core-image-uploader");return r(),f("div",$a,[l(p,{class:"snippet-preview-row"},{name:c(()=>[a("span",null,m(o.strings.twitterPreview),1)]),description:c(()=>[a("i",null,m(o.strings.twitterPreviewDescription),1)]),content:c(()=>[s.optionsStore.options.social.twitter.general.enable?g("",!0):(r(),_(u,{key:0,class:"twitter-disabled-warning",innerHTML:o.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),l(h,{card:s.postEditorStore.currentPost.twitter_card,description:n.previewDescription,image:n.previewImage,loading:t.loading,title:n.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),a("div",Pa,[l(p,{name:o.strings.useFB,class:"use-facebook"},{content:c(()=>[l(S,{modelValue:s.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=y=>s.postEditorStore.currentPost.twitter_use_og=y),e[1]||(e[1]=y=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(r(),_(p,{key:0,name:o.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:c(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=y=>s.postEditorStore.currentPost.twitter_title=y),e[4]||(e[4]=y=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=y=>t.updateCount(y,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,70)},null,8,Ea)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(r(),_(p,{key:1,name:o.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:c(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=y=>s.postEditorStore.currentPost.twitter_description=y),e[7]||(e[7]=y=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=y=>t.updateCount(y,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,"default-tags":o.tags.getDefaultTags(s.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":c(()=>[w(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),a("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,Ta)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(r(),_(p,{key:2,class:"twitter-image-source",name:o.strings.imageSource,align:""},{content:c(()=>[l($,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=y=>n.saveTwitterImageType(y.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom"?(r(),_(p,{key:3,class:"twitter-custom-field",name:o.strings.customFieldsName,align:""},{content:c(()=>[l(k,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=y=>s.postEditorStore.currentPost.twitter_image_custom_fields=y),e[10]||(e[10]=y=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):g("",!0),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom_image"?(r(),_(p,{key:4,class:"twitter-image",name:o.strings.twitterImage},{content:c(()=>[l(b,{description:n.twitterImageUploaderDescription,modelValue:s.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=y=>s.postEditorStore.currentPost.twitter_image_custom_url=y)},null,8,["description","modelValue"])]),_:1},8,["name"])):g("",!0),l(p,{class:"twitter-card-type",name:o.strings.twitterCardType,align:""},{content:c(()=>[l($,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:n.getCardOptions(s.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=y=>n.cardSelect(y.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Aa=v(Ca,[["render",xa]]),La={setup(){return{postEditorStore:E(),settingsStore:N()}},components:{CoreSettingsRow:V,SvgPencil:St},data(){return{strings:{title:this.$t.__("Social Media",this.$td),sidebarCopy:this.$t.__("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.",this.$td),editSnippet:this.$t.__("Preview & Edit",this.$td)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},Ha={class:"aioseo-sidebar-content-title"};function Ia(t,e,i,s,o,n){const u=d("svg-pencil"),h=d("base-button"),p=d("core-settings-row");return t.$root.$data.screenContext==="sidebar"?(r(),_(p,{key:0,name:o.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:c(()=>[a("div",Ha,m(o.strings.title),1),a("p",null,m(o.strings.sidebarCopy),1),l(h,{class:"open-social-modal gray small",onClick:n.openModalEv},{default:c(()=>[l(u),w(" "+m(o.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):g("",!0)}const Ma=v(La,[["render",Ia]]),Ra={setup(){return{postEditorStore:E(),settingsStore:N()}},components:{BaseRadioToggle:ne,CoreMainTabs:tt,CoreSettingsRow:V,Facebook:wa,Twitter:Aa,SocialSideBar:Ma},props:{parentComponentContext:String},data(){return{strings:{pageName:this.$t.__("Social",this.$td)},tabs:[{slug:"facebook",name:this.$t.__("Facebook",this.$td)},{slug:"twitter",name:this.$t.__("X (Twitter)",this.$td)}]}},computed:{initTab:function(){let t=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(t=this.settingsStore.metaBoxTabs.socialModal),t}},mounted(){nt()["social-tab"]&&(this.processChangeTab(nt()["social-tab"]),setTimeout(()=>{Tt("social-tab")},500))},methods:{processChangeTab(t){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:t}):this.settingsStore.changeTabSettings({setting:"social",value:t})}}},Ba={class:"aioseo-tab-content aioseo-post-social"};function Oa(t,e,i,s,o,n){const u=d("core-main-tabs"),h=d("core-settings-row"),p=d("social-side-bar");return r(),f("div",Ba,[t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),_(h,{key:0,"no-border":""},{content:c(()=>[l(u,{tabs:o.tabs,showSaveButton:!1,active:n.initTab,internal:"",onChanged:e[0]||(e[0]=S=>n.processChangeTab(S)),disableMobile:""},null,8,["tabs","active"])]),_:1})):g("",!0),t.$root.$data.screenContext==="metabox"||i.parentComponentContext==="modal"?(r(),_(at,{key:1,name:"route-fade",mode:"out-in"},{default:c(()=>[(r(),_(O(n.initTab)))]),_:1})):g("",!0),this.parentComponentContext!=="modal"?(r(),_(p,{key:2})):g("",!0)])}const ve=v(Ra,[["render",Oa]]),Da={setup(){return{settingsStore:N()}},components:{CoreMainTabs:tt,CoreSettingsRow:V,General:ke,Social:ve,SvgSettings:_e,SvgShare:fe},data(){return{strings:{pageName:this.$t.__("Modal Content",this.$td)},tabs:[{slug:"general",icon:"svg-settings",name:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)}]}},computed:{getTabs(){return this.tabs.filter(t=>z(`aioseo_page_${t.slug}_settings`))}},methods:{processChangeTab(t){this.settingsStore.changeTabSettings({setting:"modal",value:t})}}},Ua={class:"aioseo-modal-content"},Va={class:"mobile-radio-buttons"},Ka={class:"component-wrapper"};function Na(t,e,i,s,o,n){const u=d("core-main-tabs");return r(),f("div",Ua,[a("div",Va,[l(u,{tabs:n.getTabs,showSaveButton:!1,active:s.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=h=>n.processChangeTab(h))},null,8,["tabs","active"])]),a("div",Ka,[l(at,{name:"route-fade",mode:"out-in"},{default:c(()=>[(r(),_(O(s.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Fa=v(Da,[["render",Na]]),Ga={setup(){return{postEditorStore:E()}},components:{CoreSettingsRow:V,SvgRightArrowShort:Ut},data(){return{strings:{title:this.$t.__("Redirects",this.$td),description:this.$t.__("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",this.$td),button:this.$t.__("Open Redirects",this.$td)}}}},za={class:"aioseo-redirects-sidebar"},qa={class:"aioseo-sidebar-content-title"};function Wa(t,e,i,s,o,n){const u=d("svg-right-arrow-short"),h=d("base-button"),p=d("core-settings-row");return r(),f("div",za,[t.$root.$data.screenContext==="sidebar"?(r(),_(p,{key:0,class:"snippet-description-row open-redirects-copy"},{content:c(()=>[a("div",qa,m(o.strings.title),1),a("p",null,m(o.strings.description),1),l(h,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:c(()=>[l(u),w(" "+m(o.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const ja=v(Ga,[["render",Wa],["__scopeId","data-v-cc3eda3b"]]),Ya={setup(){return{postEditorStore:E()}},components:{CoreModal:W,RedirectsSideBar:ja,RedirectsLite:Os},props:{parentComponentContext:String},data(){return{strings:{modalHeader:this.$t.__("Redirects",this.$td)}}}},Za={class:"bd"};function Xa(t,e,i,s,o,n){const u=d("redirects-lite"),h=d("core-modal"),p=d("redirects-side-bar");return r(),f("div",null,[t.$root.$data.screenContext==="metabox"?(r(),_(u,{key:0,noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),l(h,{show:s.postEditorStore.currentPost.redirects.modalOpen&&t.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=S=>s.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:c(()=>[w(m(o.strings.modalHeader),1)]),body:c(()=>[a("div",Za,[l(u,{noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),this.parentComponentContext!=="modal"?(r(),_(p,{key:1})):g("",!0)])}const Wt=v(Ya,[["render",Xa]]),Ja={};function Qa(t,e){return r(),f("div")}const tl=v(Ja,[["render",Qa]]),el={setup(){return{addons:de,licenseStore:M()}},components:{Redirects:Wt,RedirectsActivate:tl,RedirectsLite:Wt},props:{parentComponentContext:String}},sl={class:"aioseo-tab-content"};function ol(t,e,i,s,o,n){const u=d("Redirects",!0),h=d("RedirectsLite"),p=d("RedirectsActivate");return r(),f("div",sl,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(r(),_(u,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-redirects")?(r(),_(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),!s.licenseStore.isUnlicensed&&!s.addons.isActive("aioseo-redirects")&&s.addons.canActivate("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(r(),_(p,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const il=v(el,[["render",ol]]),rl={};function nl(t,e){return r(),f("div")}const al=v(rl,[["render",nl]]),ll={};function cl(t,e){return r(),f("div")}const dl=v(ll,[["render",cl]]),hl={};function ul(t,e){return r(),f("div")}const pl=v(hl,[["render",ul]]),gl={};function ml(t,e){return r(),f("div")}const _l=v(gl,[["render",ml]]),fl={};function Sl(t,e){return r(),f("div")}const yl=v(fl,[["render",Sl]]),kl={};function vl(t,e){return r(),f("div")}const bl=v(kl,[["render",vl]]),wl={};function Cl(t,e){return r(),f("div")}const $l=v(wl,[["render",Cl]]),Pl={};function El(t,e){return r(),f("div")}const Tl=v(Pl,[["render",El]]),xl={};function Al(t,e){return r(),f("div")}const Ll=v(xl,[["render",Al]]),Hl={};function Il(t,e){return r(),f("div")}const Ml=v(Hl,[["render",Il]]),Rl={};function Bl(t,e){return r(),f("div")}const Ol=v(Rl,[["render",Bl]]),Dl={};function Ul(t,e){return r(),f("div")}const Vl=v(Dl,[["render",Ul]]),Kl={};function Nl(t,e){return r(),f("div")}const Fl=v(Kl,[["render",Nl]]),Gl={};function zl(t,e){return r(),f("div")}const ql=v(Gl,[["render",zl]]),Wl={};function jl(t,e){return r(),f("div")}const Yl=v(Wl,[["render",jl]]),Zl={};function Xl(t,e){return r(),f("div")}const Jl=v(Zl,[["render",Xl]]),Ql={};function tc(t,e){return r(),f("div")}const ec=v(Ql,[["render",tc]]),sc={};function oc(t,e){return r(),f("div")}const ic=v(sc,[["render",oc]]),rc={};function nc(t,e){return r(),f("div")}const ac=v(rc,[["render",nc]]),lc={};function cc(t,e){return r(),f("div")}const dc=v(lc,[["render",cc]]),hc={},uc={viewBox:"0 0 11 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-trash"},pc=a("path",{d:"M8.0013 4V10.6667H2.66797V4H8.0013ZM7.0013 0H3.66797L3.0013 0.666667H0.667969V2H10.0013V0.666667H7.66797L7.0013 0ZM9.33463 2.66667H1.33464V10.6667C1.33464 11.4 1.93464 12 2.66797 12H8.0013C8.73464 12 9.33463 11.4 9.33463 10.6667V2.66667Z",fill:"currentColor"},null,-1),gc=[pc];function mc(t,e){return r(),f("svg",uc,gc)}const _c=v(hc,[["render",mc]]),be={components:{Article:al,Book:dl,Car:pl,Course:_l,Dataset:yl,Event:bl,FAQPage:$l,FactCheck:Tl,HowTo:Ll,JobPosting:Ml,Movie:Ol,Music:Vl,Person:Fl,Product:ql,ProductReview:Yl,Recipe:Jl,Service:ec,SoftwareApplication:ic,Video:ac,WebPage:dc,SvgArticle:Qe,SvgBook:ts,SvgCar:es,SvgCircleQuestionMark:Rt,SvgCustomSchema:ss,SvgCopy:os,SvgCourse:is,SvgDataset:rs,SvgEvent:ns,SvgEye:ht,SvgFaqPage:as,SvgFactCheck:ls,SvgFile:cs,SvgFileEdit:ds,SvgGoogleSmall:hs,SvgHowTo:us,SvgJobPosting:ps,SvgMovie:gs,SvgMusic:ms,SvgPencil:St,SvgPerson:_s,SvgProduct:fs,SvgProductReview:Ss,SvgRecipe:ys,SvgService:ks,SvgSoftwareApplication:vs,SvgTerminal:bs,SvgTrash:_c,SvgVideo:ws,SvgWebPage:Cs}},fc={mixins:[be],props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(){const{childGraphs:t,graphs:e}=Qt();return{childGraphs:t,graphs:e}},computed:{graphLabel(){var i,s,o,n;if(this.customGraph)return this.$t.__("Custom Schema",this.$td)+" - "+this.graph.graphName;if(this.defaultGraph)return this.formatDefaultGraphName(this.defaultGraph);if((i=this.graph)!=null&&i.label)return this.graph.label;const t=(o=(s=this.graph)==null?void 0:s.slug)==null?void 0:o.toLowerCase();return((n=this.graphs.find(u=>u.slug===t))==null?void 0:n.label)||this.$t.__("Parsing Block Data...",this.$td)},graphIcon(){if(this.customGraph)return"svg-custom-schema";if(this.defaultGraph){const t=this.getParentGraphSlug(this.defaultGraph);return t?"svg-"+t:"svg-custom-schema"}return"svg-"+this.graph.slug}},methods:{getParentGraphSlug(t){Object.entries(this.childGraphs).forEach(i=>{const s=i[0];i[1].forEach(o=>{t===o.childGraphName&&(t=s)})});let e="";return this.graphs.forEach(i=>{i.graphName===t&&(e=i.slug)}),e},formatDefaultGraphName(t){let e="",i=t;return Object.entries(this.childGraphs).forEach(s=>{const o=s[0];s[1].forEach(n=>{e||t===n.childGraphName&&(e=o,i=n.label,this.graphs.forEach(u=>{u.graphName===o&&(e=u.label)}))})}),e?e+" - "+i+" "+this.$t.__("(Default)",this.$td):t+" "+this.$t.__("(Default)",this.$td)}}},Sc={class:"graph-container"},yc={class:"graph"},kc={class:"left"},vc=["title"],bc={class:"right action-buttons"};function wc(t,e,i,s,o,n){return r(),f("div",Sc,[a("div",yc,[a("div",kc,[(r(),_(O(n.graphIcon))),a("span",{title:n.graphLabel},m(n.graphLabel),9,vc)]),a("div",bc,[G(t.$slots,"buttons")])])])}const we=v(fc,[["render",wc]]),Cc={emits:["close"],mixins:[be],components:{CoreBlur:lt,CoreMainTabs:tt,CoreModal:W,CoreTooltip:K,Cta:Dt,GraphCard:we,SvgCirclePlus:Bt},setup(){const{graphs:t}=Qt();return{graphs:t}},data(){return{strings:{schemaGenerator:this.$t.__("Schema Generator",this.$td),headerTooltip:this.$t.sprintf(this.$t.__("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",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)),searchSchema:this.$t.__("Search Schema",this.$td),ctaDescription:this.$t.__("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.",this.$td),ctaButtonText:this.$t.__("Unlock Schema Generator",this.$td),ctaHeader:this.$t.sprintf(this.$t.__("Schema Generator is a %1$s Feature",this.$td),"PRO")},features:[this.$t.__("Unlimited Schema",this.$td),this.$t.__("Validate with Google",this.$td),this.$t.__("Increase Rankings",this.$td),this.$t.__("Additional Schema Types",this.$td)],tabs:[{slug:"schema-templates",icon:"svg-file",name:this.$t.__("Schema Templates",this.$td),component:"templates"},{slug:"custom-schema",icon:"svg-file-edit",name:this.$t.__("Custom Schema",this.$td),component:"custom"},{slug:"schema-validation",icon:"svg-terminal",name:this.$t.__("Schema Validation",this.$td),component:"validation"}],templatesTabs:[{slug:"schema-catalog",name:this.$t.__("Schema Catalog",this.$td)},{slug:"your-templates",name:this.$t.__("Your Templates",this.$td)}]}}},$c={class:"title"},Pc=["innerHTML"],Ec={class:"schema-templates"},Tc={class:"main"},xc={class:"schema-catalog"},Ac={class:"graphs"};function Lc(t,e,i,s,o,n){const u=d("svg-circle-question-mark"),h=d("core-tooltip"),p=d("core-main-tabs"),S=d("base-input"),C=d("svg-circle-plus"),$=d("base-button"),k=d("graph-card"),b=d("core-blur"),y=d("cta"),H=d("core-modal");return r(),_(H,{classes:["aioseo-post-schema-modal-cta"],onClose:e[0]||(e[0]=L=>t.$emit("close"))},{headerTitle:c(()=>[a("div",$c,m(o.strings.schemaGenerator),1),l(h,null,{tooltip:c(()=>[a("span",{innerHTML:o.strings.headerTooltip},null,8,Pc)]),default:c(()=>[l(u)]),_:1})]),body:c(()=>[l(b,null,{default:c(()=>[l(p,{tabs:o.tabs,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":c(({tab:L})=>[(r(),_(O(L.icon)))]),_:1},8,["tabs"]),a("div",Ec,[l(p,{tabs:o.templatesTabs,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":c(({tab:L})=>[(r(),_(O(L.icon)))]),_:1},8,["tabs"]),a("div",Tc,[l(S,{class:"search",size:"medium",prependIcon:"search",placeholder:o.strings.searchSchema},null,8,["placeholder"]),a("div",xc,[a("div",Ac,[(r(!0),f(R,null,Q(s.graphs,(L,Z)=>(r(),_(k,{key:L.graphName+Z,graph:L},{buttons:c(()=>[l($,{class:"small",type:"gray"},{default:c(()=>[l(C)]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),l(y,{"cta-link":t.$links.getPricingUrl("schema-generator","schema-generator-upsell"),"button-text":o.strings.ctaButtonText,"learn-more-link":t.$links.getUpsellUrl("schema-generator",null,t.$isPro?"pricing":"liteUpgrade"),"feature-list":o.features},{"header-text":c(()=>[w(m(o.strings.ctaHeader),1)]),description:c(()=>[w(m(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const Hc=v(Cc,[["render",Lc]]),Ic={setup(){return{postEditorStore:E()}},components:{CoreAlert:F,CoreSettingsRow:V,CoreTooltip:K,CtaModal:Hc,GraphCard:we,SvgEye:ht},props:{parentComponentContext:String},data(){return{modalOpenMetabox:!1,modalOpenSidebar:!1,strings:{sidebarDescription:this.$t.__("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",this.$td),noGraphs:this.$t.__("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",this.$td),schemaInUse:this.$t.__("Schema In Use",this.$td),generateSchema:this.$t.__("Generate Schema",this.$td),validateSchema:this.$t.__("Validate Schema",this.$td),defaultGraphTooltip:this.$t.__("This is the default graph for this post type. All data for this graph will be automatically generated.",this.$td)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return J()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},Mc={class:"graphs"},Rc={key:0,class:"sidebar-description"},Bc={class:"description"},Oc=["innerHTML"],Dc=["innerHTML"],Uc={class:"buttons"};function Vc(t,e,i,s,o,n){const u=d("svg-eye"),h=d("base-button"),p=d("core-tooltip"),S=d("graph-card"),C=d("core-alert"),$=d("cta-modal"),k=d("core-settings-row");return r(),f("div",{class:T(["aioseo-tab-content aioseo-post-schema",[{sidebar:n.isSidebar}]])},[l(k,{name:o.strings.schemaInUse},{content:c(()=>[a("div",Mc,[n.isSidebar?(r(),f("div",Rc,[a("p",Bc,m(o.strings.sidebarDescription),1),a("p",{class:"description",innerHTML:t.$links.getDocLink(t.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,Oc)])):g("",!0),s.postEditorStore.currentPost.schema.default.graphName&&s.postEditorStore.currentPost.schema.default.isEnabled?(r(),_(S,{key:1,defaultGraph:s.postEditorStore.currentPost.schema.default.graphName},{buttons:c(()=>[l(p,{offset:n.getDefaultSchemaTooltipOffset()},{tooltip:c(()=>[a("span",{innerHTML:o.strings.defaultGraphTooltip},null,8,Dc)]),default:c(()=>[l(h,{class:"small no-hover",type:"gray"},{default:c(()=>[l(u)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):g("",!0)]),a("div",Uc,[!s.postEditorStore.currentPost.schema.default.graphName||!s.postEditorStore.currentPost.schema.default.isEnabled?(r(),_(C,{key:0,class:"no-graphs",type:"yellow"},{default:c(()=>[w(m(o.strings.noGraphs),1)]),_:1})):g("",!0),l(h,{class:"medium",type:"blue",onClick:e[0]||(e[0]=b=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:c(()=>[w(m(o.strings.generateSchema),1)]),_:1}),l(h,{class:"medium",type:"gray",onClick:e[1]||(e[1]=b=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:c(()=>[w(m(o.strings.validateSchema),1)]),_:1})]),l($,{show:!n.isSidebar&&o.modalOpenMetabox,onClose:e[2]||(e[2]=b=>o.modalOpenMetabox=!1)},null,8,["show"]),l($,{show:n.isSidebar&&o.modalOpenSidebar,onClose:e[3]||(e[3]=b=>o.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const jt=v(Ic,[["render",Vc]]),Kc={setup(){return{licenseStore:M()}},components:{Schema:jt,SchemaLite:jt},props:{parentComponentContext:String}},Nc={class:"aioseo-post-schema-view"};function Fc(t,e,i,s,o,n){const u=d("schema",!0),h=d("schema-lite");return r(),f("div",Nc,[s.licenseStore.isUnlicensed?g("",!0):(r(),_(u,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])),s.licenseStore.isUnlicensed?(r(),_(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const Gc=v(Kc,[["render",Fc]]),Ce=t=>(ee("data-v-20175fdb"),t=t(),se(),t),zc={class:"aioseo-seo-revision-list-item"},qc={class:"aioseo-seo-revision-list-item__author"},Wc={class:"aioseo-seo-revision-list-item__author__avatar"},jc={class:"aioseo-seo-revision-list-item__author__name"},Yc=Ce(()=>a("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Zc={class:"aioseo-seo-revision-list-item__action"},Xc=Ce(()=>a("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),Jc={class:"aioseo-seo-revision-list-item__action__view"},Qc={class:"aioseo-seo-revision-list-item__action__delete"},td={__name:"ListItem",setup(t){const{currentUser:e}=te(ct());return(i,s)=>(r(),f("div",zc,[a("div",qc,[a("span",Wc,[l(P(Ds),{src:P(e).avatar.url,size:P(e).avatar.size},null,8,["src","size"])]),a("span",jc,m(P(He)(P(e).display_name,30)),1)]),Yc,a("div",Zc,[Xc,a("span",Jc,[l(P(ht),{width:"18"})]),a("span",Qc,[l(P(yt),{width:"18"})])])]))}},ed=v(td,[["__scopeId","data-v-20175fdb"]]),sd={components:{SeoRevisionListItem:ed}},od={class:"aioseo-seo-revisions-list"};function id(t,e,i,s,o,n){const u=d("seo-revision-list-item");return r(),f("div",od,[(r(),f(R,null,Q(13,h=>l(u,{key:"seo-revision-list-item-"+h})),64))])}const rd=v(sd,[["render",id],["__scopeId","data-v-7b502c37"]]),nd={setup(){return{seoRevisionsStore:ct()}},components:{CoreBlur:lt,CoreModal:W,CoreSettingsRow:V,SeoRevisionsList:rd,SeoRevisionsUpsell:Us,SvgRightArrowShort:Ut},data(){return{strings:{button:this.$t.__("Open SEO Revisions",this.$td),description:this.$t.__("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.",this.$td),seoRevisions:this.$t.__("SEO Revisions",this.$td)}}}},ad={key:0,class:"aioseo-seo-revisions-metabox"},ld={key:1,class:"aioseo-seo-revisions-sidebar"},cd={class:"aioseo-seo-revisions-sidebar__modal-body"},dd={class:"description"};function hd(t,e,i,s,o,n){const u=d("seo-revisions-list"),h=d("core-blur"),p=d("seo-revisions-upsell"),S=d("core-modal"),C=d("svg-right-arrow-short"),$=d("base-button"),k=d("core-settings-row");return t.$root.$data.screenContext==="metabox"?(r(),f("div",ad,[l(h,null,{default:c(()=>[l(u)]),_:1}),l(p,{"parent-component-context":"metabox"})])):t.$root.$data.screenContext==="sidebar"?(r(),f("div",ld,[l(S,{show:s.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=b=>s.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:c(()=>[w(m(o.strings.seoRevisions),1)]),body:c(()=>[a("div",cd,[l(h,null,{default:c(()=>[l(u)]),_:1}),l(p,{"parent-component-context":"modal"})])]),_:1},8,["show"]),l(k,{align:""},{name:c(()=>[w(m(o.strings.seoRevisions),1)]),description:c(()=>[a("p",dd,m(o.strings.description),1)]),content:c(()=>[l($,{class:"gray small",onClick:e[1]||(e[1]=I(b=>s.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:c(()=>[l(C,{width:"10"}),w(" "+m(o.strings.button),1)]),_:1})]),_:1})])):g("",!0)}const Yt=v(nd,[["render",hd],["__scopeId","data-v-3e031a88"]]),ud={setup(){return{licenseStore:M()}},data(){return{license:Y}},components:{SeoRevisions:Yt,SeoRevisionsLite:Yt},props:{parentComponentContext:String}},pd={class:"aioseo-seo-revisions aioseo-tab-content"};function gd(t,e,i,s,o,n){const u=d("seo-revisions",!0),h=d("seo-revisions-lite");return r(),f("div",pd,[!s.licenseStore.isUnlicensed&&o.license.hasCoreFeature("seo-revisions")?(r(),_(u,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):(r(),_(h,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"]))])}const md=v(ud,[["render",gd],["__scopeId","data-v-5e3c402f"]]),_d={__name:"CountBadge",setup(t){const{itemsTotalCount:e}=te(ct()),i=it(()=>99<e.value?"99+":e.value);return(s,o)=>P(e)?(r(),f("span",{key:0,class:T(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":s.$root.$data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":s.$root.$data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<P(e)}])},m(i.value),3)):g("",!0)}},fd={},Sd={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},yd=a("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),kd=[yd];function vd(t,e){return r(),f("svg",Sd,kd)}const bd=v(fd,[["render",vd]]),wd={},Cd={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},$d=a("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),Pd=[$d];function Ed(t,e){return r(),f("svg",Cd,Pd)}const Td=v(wd,[["render",Ed]]),xd={},Ad={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},Ld=a("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),Hd=[Ld];function Id(t,e){return r(),f("svg",Ad,Hd)}const Md=v(xd,[["render",Id]]),Rd={},Bd={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},Od=a("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),Dd=[Od];function Ud(t,e){return r(),f("svg",Bd,Dd)}const Vd=v(Rd,[["render",Ud]]),Kd={setup(){return{licenseStore:M(),postEditorStore:E(),redirectsStore:Ie(),rootStore:q(),settingsStore:N(),seoRevisionsStore:ct(),keywordRankTrackerStore:_t()}},components:{Advanced:po,Alert:Se,CoreMainTabs:tt,CoreModal:W,General:ke,KeywordRankTracker:un,LinkAssistant:ga,ModalContent:Fa,Redirects:il,Schema:Gc,SeoRevisions:md,SeoRevisionsCountBadge:_d,Social:ve,SvgBackup:bd,SvgBuild:Bs,SvgCaret:ft,SvgCircleInformationSolid:Td,SvgClose:xt,SvgLinkSuggestion:Vt,SvgReceipt:Md,SvgRedirectCrossedArrows:Vd,SvgSettings:_e,SvgShare:fe},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:this.$t.__("Preview Snippet Editor",this.$td)},activeMainSidebarTab:"",isPageBuilderEditor:J}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){Re(this.postEditorStore.savePostState,250)}},"postEditorStore.currentPost.modalOpen"(t){this.activeTab!=="general"&&this.maybeResetActiveTab(t)},"postEditorStore.currentPost.linkAssistant.modalOpen"(t){this.maybeResetActiveTab(t)},"postEditorStore.currentPost.redirects.modalOpen"(t){this.maybeResetActiveTab(t)},"seoRevisionsStore.modalOpenSidebar"(t){this.maybeResetActiveTab(t)},"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(t){this.$root.$data.screenContext==="sidebar"&&this.activeMainSidebarTab!==t.tab&&(this.activeMainSidebarTab=t.tab,this.processChangeTab(t.tab))}}},computed:{tabs(){var e;const t=[{slug:"general",icon:"svg-settings",name:this.$t.__("General",this.$td)},{slug:"social",icon:"svg-share",name:this.$t.__("Social",this.$td)},{slug:"schema",icon:"svg-receipt",name:this.$t.__("Schema",this.$td)},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:this.$t.__("Redirects",this.$td),warning:0<this.redirectsStore.rows.filter(i=>!!i.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:this.$t.__("SEO Revisions",this.$td),badge:"seo-revisions-count-badge"},{slug:"advanced",icon:"svg-build",name:this.$t.__("Advanced",this.$td)}];return!this.rootStore.aioseo.integration&&!J()&&this.postEditorStore.currentPost.context==="post"&&!((e=this.postEditorStore.currentPost.linkAssistant)!=null&&e.isExcludedPost)&&t.splice(3,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:this.$t.__("Link Assistant",this.$td)}),t},initTab(){return this.getTabs[0].slug},getTabs(){return this.postEditorStore.currentPost.context==="term"||this.postEditorStore.currentPost.isWooCommercePageWithoutSchema?this.tabs.filter(t=>t.slug!=="schema"&&z(this.getTabPermission(t.slug))):this.tabs.filter(t=>z(this.getTabPermission(t.slug))?!0:t.slug==="general"&&(z("aioseo_page_analysis")||z(this.getTabPermission(t.slug))))}},methods:{async processChangeTab(t){if(t!==null&&typeof t=="object"){this.processChangeTab(t.main),this.$nextTick(()=>{this.settingsStore.changeTabSettings({setting:t.main,value:t.sub})});return}switch(this.$root.$data.screenContext){case"sidebar":document.querySelectorAll(".components-panel__header").forEach(e=>{const i=t===null?"sticky":"static";e.style.position=i});break;default:this.activeTab=t,this.settingsStore.changeTabSettings({setting:"main",value:t});break}if(this.$root.$data.screenContext==="sidebar"&&this.activeTab!==t)switch(this.activeTab=t,await this.$nextTick(),t){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(t){t||this.$root.$data.screenContext==="sidebar"&&this.$nextTick(()=>{this.processChangeTab(null)})},closeModal(){this.postEditorStore.currentPost.modalOpen=!1},getTabPermission(t){const e=this.tabs.find(i=>i.slug===t);return typeof e.permission<"u"?e.permission:`aioseo_page_${e.slug}_settings`},getTabName(t){const e=this.tabs.find(i=>i.slug===t);return e==null?void 0:e.name}},mixins:[Ws],created(){switch(this.modal=nt()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{Tt("aioseo-modaltab")},500)),this.$nextTick(()=>{this.settingsStore.metaBoxTabs.mainSidebar.tab&&this.processChangeTab(this.settingsStore.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",t=>{Object.keys(t).forEach(e=>{this.postEditorStore.currentPost[e]=t[e]})}),this.$root.$data.screenContext){case"sidebar":this.activeTab=null;break;default:this.activeTab=nt()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{Tt("aioseo-tab")},500);break}},beforeMount(){const t=document.querySelector(".interface-complementary-area__pin-unpin-item");t&&t!==null&&(t.style.display="block")},mounted(){mt()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},Nd={class:"aioseo-app aioseo-post-settings"},Fd={key:0,class:"aioseo-sidepanel"},Gd=["onClick"],zd={class:"name"},qd={key:0,class:"aioseo-tab-title"};function Wd(t,e,i,s,o,n){const u=d("core-main-tabs"),h=d("svg-circle-information-solid"),p=d("svg-caret"),S=d("svg-close"),C=d("alert"),$=d("modal-content"),k=d("core-modal"),b=d("keyword-rank-tracker");return r(),f("div",Nd,[t.$root.$data.screenContext!=="sidebar"?(r(),_(u,{key:0,tabs:n.getTabs,showSaveButton:!1,active:o.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=y=>n.processChangeTab(y))},{"var-tab-icon":c(({tab:y})=>[(r(),_(O(y.icon),{class:T([{warning:y.warning}])},null,8,["class"])),(r(),_(O(y.badge)))]),_:1},8,["tabs","active"])):g("",!0),l(at,{name:"route-fade",mode:"out-in"},{default:c(()=>[t.$root.$data.screenContext==="sidebar"&&o.activeTab===null?(r(),f("div",Fd,[(r(!0),f(R,null,Q(n.getTabs,(y,H)=>(r(),f("a",{key:H,class:"aioseo-sidepanel-button",href:"#",onClick:I(L=>n.processChangeTab(y.slug),["prevent"])},[(r(),_(O(y.icon),{class:"icon"})),a("div",zd,m(y.name),1),(r(),_(O(y.badge))),y.warning?(r(),_(h,{key:0,width:"15",height:"15"})):g("",!0),l(p)],8,Gd))),128))])):g("",!0)]),_:1}),l(at,{name:"route-fade",mode:"out-in"},{default:c(()=>[o.activeTab?(r(),f("div",{key:o.activeTab,class:T(["aioseo-tab",{"is-page-builder":!!s.rootStore.aioseo.integration}])},[t.$root.$data.screenContext==="sidebar"?(r(),f("div",qd,[a("span",null,m(n.getTabName(o.activeTab)),1),l(S,{onClick:e[1]||(e[1]=y=>n.processChangeTab(null))})])):g("",!0),this.$root.$data.screenContext==="sidebar"?(r(),_(C,{key:1})):g("",!0),(r(),_(O(o.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=y=>n.processChangeTab(y))},null,32))],2)):g("",!0)]),_:1}),l(k,{show:s.postEditorStore.currentPost.modalOpen&&t.$root.$data.screenContext==="sidebar",onClose:n.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:c(()=>[w(m(o.strings.modalTitle),1)]),body:c(()=>[l($)]),_:1},8,["show","onClose"]),l(b,{"modal-open":s.keywordRankTrackerStore.modalOpenPostEdit,"onUpdate:modalOpen":e[3]||(e[3]=y=>s.keywordRankTrackerStore.modalOpenPostEdit=y)},null,8,["modal-open"])])}const jd=v(Kd,[["render",Wd]]),Yd={setup(){return{postEditorStore:E()}},components:{Alert:Se,MainView:jd},mixins:[Fe],data(){return{scrollContainer:".interface-interface-skeleton__content",scrollTimeout:1e3,ScrollAndHighlightTimeout:2e3}}};function Zd(t,e,i,s,o,n){const u=d("alert"),h=d("main-view");return r(),f("div",{onClick:e[0]||(e[0]=I(()=>{},["stop"])),id:"main-settings-cont"},[this.$root.$data.screenContext!=="sidebar"?(r(),_(u,{key:0})):g("",!0),s.postEditorStore.currentPost.id?(r(),_(h,{key:1})):g("",!0)])}const Qh=v(Yd,[["render",Zd]]);export{Qh as P};