OwlCyberSecurity - MANAGER
Edit File: App.BdbY6rtd.js
/* empty css */import{B as dt,b as $,f as O,a as ct,u as Z,ac as nt,ad as Ve,z as _t,C as de,ae as Ue,J,W as gt,e as Y,p as Ne,af as Ke,Y as Fe,d as Ge,o as ce,K as ot,y as it,ag as ue,N as he,t as ze,k as qe}from"./links.cMjoa9mX.js";import{a as j}from"./allowed.CIWIyN0m.js";import{g as at,r as Ht}from"./params.B3T1WKlC.js";import{C as F,a as ft,S as Rt,f as St,c as Ot,e as We,b as pe,d as Ct,h as je}from"./Caret.iRBf3wcH.js";import{C as U}from"./SettingsRow.DQldd-1Z.js";import{B as Ye}from"./Checkbox.D2dfpbIi.js";import{G as Ze,a as Xe}from"./Row.CzuhYwfs.js";import{x as a,o as n,c as _,C as l,m as d,D as w,t as m,a as u,l as f,d as g,H as P,G as H,L as ge,M as me,X as Je,h as Qe,I as Dt,F as K,K as et,q,T as lt,v as B,u as W,g as ts}from"./vue.esm-bundler.CWQFYt9y.js";import{_ as y}from"./_plugin-vue_export-helper.BN1snXvA.js";import{C as es,a as ss,S as os}from"./ScrollAndHighlight.Dmz_zsgp.js";import{C as st}from"./Tabs.D42knyjl.js";import{C as X}from"./Index.DsuOvVx_.js";import{_ as D}from"./default-i18n.Bd0Z306Z.js";import{u as _e,T as fe}from"./TruSeoScore.TjofuHRQ.js";import{a as is,b as rs,S as Se}from"./Settings.BkZvT8m4.js";import{M as Vt}from"./MaxCounts.DHV7qSQX.js";import{S as ye,a as ns}from"./Ellipse.ajMtnCZF.js";import{T as Ut}from"./Tags.DsiuS2Z3.js";import{r as as,l as ls,n as ds,o as Et,t as $t}from"./postSlug.XW1wPUFy.js";import{d as Pt}from"./debounce.DX0w6jjQ.js";import{Q as cs,k as us}from"./helpers.D2xRWOvn.js";import{t as Yt}from"./toFinite.Dixv5Z_k.js";import{C as G}from"./Tooltip.DiN2Zjvc.js";import{S as yt,a as Nt,f as hs,g as ps,h as gs,c as ms,i as _s,j as fs,k as Ss,m as ys,n as bs,e as vs,o as ks,p as ws,q as Cs,r as Es,s as $s,t as Ps,u as Ts,v as xs,w as As,x as Ls,y as Ms,z as Hs,A as Is,C as Bs}from"./index.BB7B6rSp.js";import{S as Kt}from"./Plus.DrDYrwHh.js";import{S as bt}from"./Eye.xo0i1Doh.js";import{B as be}from"./RadioToggle.BLVmJ7Zx.js";import{C as Rs}from"./GoogleSearchPreview.DfWUGO2R.js";import{C as Ft}from"./HtmlTagsEditor.nHVKntJb.js";import{T as Os}from"./Slide.CRIn0kdn.js";import{C as Ds}from"./ProBadge.WwPkDor4.js";import{p as Zt}from"./popup.6pJEdp0g.js";import{l as mt}from"./license.ctOGGUd5.js";import{a as ve}from"./addons.CjB9Xv4t.js";import{C as Gt}from"./Blur.DNVDismY.js";import{C as ke}from"./Index.DUPzmxCE.js";import{W as Vs}from"./WpTable._80JLonk.js";import{C as Us}from"./Table.Dk4a_ubM.js";import{P as Ns}from"./PostTypes.Cef6XkQ_.js";import{a as we,S as Ks,b as Fs,c as Gs}from"./InternalOutbound.C_4tKmQU.js";import{R as zs}from"./RequiredPlans.DAdiEWvO.js";import{I as Ce,a as Ee}from"./Image.J_eZiLlI.js";import{t as $e}from"./Editor.DPdoRvzJ.js";import{C as qs}from"./FacebookPreview.YPFdm22Y.js";import{C as Pe}from"./ImageUploader.D6Q-hb5k.js";import{C as Ws}from"./TwitterPreview.CiLnvQ2i.js";import{a as Te,S as js}from"./Build.CPuT4khC.js";import{R as Ys}from"./Redirects.Dj4HEf5o.js";import{U as Zs,S as Xs}from"./Upsell.Dv6WnNQM.js";var Js=Math.floor,Qs=Math.random;function to(t,e){return t+Js(Qs()*(e-t+1))}var eo=parseFloat,so=Math.min,oo=Math.random;function io(t,e,i){if(i&&typeof i!="boolean"&&cs(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=Yt(t),e===void 0?(e=t,t=0):e=Yt(e)),t>e){var s=t;t=e,e=s}if(i||t%1||e%1){var o=oo();return so(t+o*(e-t+eo("1e-"+((o+"").length-1))),e)}return to(t,e)}const ro={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=dt();setTimeout(()=>{e.fetch().finally(()=>{t.updatingSeoRevisions=!1})},2500)}},async watchObjectRevisionsOnSavePost(){await this.$nextTick(),window.wp.data.subscribe(()=>{this.updatingSeoRevisions||this.updateSeoRevisions()})}}},no={setup(){return{postEditorStore:$()}},components:{BaseCheckbox:Ye,GridColumn:Ze,GridRow:Xe},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}}},ao={class:"aioseo-robots-meta"},lo={key:0,class:"global-robots-settings aioseo-description"},co={class:"robots-meta-title"},uo={class:"global-robots-settings-options"},ho={key:0,class:"aioseo-description max-snippet"},po={class:"aioseo-description max-video-preview"},go={key:1,class:"aioseo-description max-image-preview"};function mo(t,e,i,s,o,r){const h=a("base-toggle"),c=a("base-checkbox"),p=a("grid-column"),S=a("grid-row"),C=a("base-input"),E=a("base-select");return n(),_("div",ao,[l(h,{modelValue:s.postEditorStore.currentPost.default,"onUpdate:modelValue":[e[0]||(e[0]=v=>s.postEditorStore.currentPost.default=v),e[1]||(e[1]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),s.postEditorStore.currentPost.default?g("",!0):(n(),_("div",lo,[u("span",co,m(o.strings.robotsMeta),1),l(S,{class:"settings"},{default:d(()=>[s.postEditorStore.currentPost.isHomePage?g("",!0):(n(),f(p,{key:0,xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.noindex,"onUpdate:modelValue":[e[2]||(e[2]=v=>s.postEditorStore.currentPost.noindex=v),e[3]||(e[3]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":[e[4]||(e[4]=v=>s.postEditorStore.currentPost.nofollow=v),e[5]||(e[5]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":[e[6]||(e[6]=v=>s.postEditorStore.currentPost.noarchive=v),e[7]||(e[7]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":[e[8]||(e[8]=v=>s.postEditorStore.currentPost.notranslate=v),e[9]||(e[9]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":[e[10]||(e[10]=v=>s.postEditorStore.currentPost.noimageindex=v),e[11]||(e[11]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":[e[12]||(e[12]=v=>s.postEditorStore.currentPost.nosnippet=v),e[13]||(e[13]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),l(p,{xl:"3",md:"4",sm:"6"},{default:d(()=>[l(c,{size:"medium",modelValue:s.postEditorStore.currentPost.noodp,"onUpdate:modelValue":[e[14]||(e[14]=v=>s.postEditorStore.currentPost.noodp=v),e[15]||(e[15]=v=>s.postEditorStore.isDirty=!0)]},{default:d(()=>[w(m(o.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),u("div",uo,[s.postEditorStore.currentPost.nosnippet?g("",!0):(n(),_("div",ho,[u("span",null,m(o.strings.maxSnippet),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":[e[16]||(e[16]=v=>s.postEditorStore.currentPost.maxSnippet=v),e[17]||(e[17]=v=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])])),u("div",po,[u("span",null,m(o.strings.maxVideoPreview),1),l(C,{type:"number",size:"medium",modelValue:s.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":[e[18]||(e[18]=v=>s.postEditorStore.currentPost.maxVideoPreview=v),e[19]||(e[19]=v=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),s.postEditorStore.currentPost.noimageindex?g("",!0):(n(),_("div",go,[u("span",null,m(o.strings.maxImagePreview),1),l(E,{size:"medium",options:r.imagePreviewOptions,modelValue:r.getImagePreview(s.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[20]||(e[20]=v=>r.saveImagePreview(v.value))},null,8,["options","modelValue"])]))])]))])}const _o=y(no,[["render",mo]]),fo={setup(){return{licenseStore:O(),optionsStore:ct(),postEditorStore:$()}},components:{CoreAlert:F,CoreSettingsRow:U,CoreSingleRobotsMeta:_o},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}}},So={class:"aioseo-tab-content aioseo-post-advanced"},yo={class:"selectbox-row"},bo={class:"select"},vo=u("div",{class:"separator"},[u("span"),w(" - ")],-1),ko={class:"select"},wo=["innerHTML"];function Co(t,e,i,s,o,r){const h=a("core-single-robots-meta"),c=a("core-settings-row"),p=a("base-input"),S=a("base-select"),C=a("core-alert");return n(),_("div",So,[l(c,{id:"aioseo-post-robots-setting",name:o.strings.robotsSetting,align:""},{content:d(()=>[l(h)]),_:1},8,["name"]),l(c,{id:"aioseo-post-canonical-url",name:o.strings.canonicalUrl,align:""},{content:d(()=>[l(p,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":[e[0]||(e[0]=E=>s.postEditorStore.currentPost.canonicalUrl=E),e[1]||(e[1]=E=>s.postEditorStore.isDirty=!0)]},null,8,["placeholder","modelValue"])]),_:1},8,["name"]),l(c,{name:o.strings.priorityScore,align:""},{content:d(()=>[u("div",yo,[u("div",bo,[u("span",null,m(o.strings.priority),1),l(S,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:r.getPriorityOptions,modelValue:s.licenseStore.isUnlicensed?r.getPriority("default"):r.getPriority(s.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[2]||(e[2]=E=>s.licenseStore.isUnlicensed?null:r.savePriority(E.value))},null,8,["disabled","options","modelValue"])]),vo,u("div",ko,[u("span",null,m(o.strings.frequency),1),l(S,{disabled:s.licenseStore.isUnlicensed,size:"medium",options:r.getFrequencyOptions,modelValue:s.licenseStore.isUnlicensed?r.getFrequency("default"):r.getFrequency(s.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[3]||(e[3]=E=>s.licenseStore.isUnlicensed?null:r.saveFrequency(E.value))},null,8,["disabled","options","modelValue"])])]),s.licenseStore.isUnlicensed?(n(),f(C,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.priorityFrequencyUpsell},null,8,wo)]),_:1})):g("",!0)]),_:1},8,["name"]),s.optionsStore.options.searchAppearance.advanced.useKeywords?(n(),f(c,{key:0,name:o.strings.keywords,align:""},{content:d(()=>[l(S,{multiple:"",taggable:"",options:[],modelValue:s.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[4]||(e[4]=E=>s.postEditorStore.currentPost.keywords=E),"tag-placeholder":o.strings.tagPlaceholder},null,8,["modelValue","tag-placeholder"])]),_:1},8,["name"])):g("",!0)])}const Eo=y(fo,[["render",Co]]),$o={setup(){return{licenseStore:O(),rootStore:Z()}},components:{CoreApiBar:es,CoreLicenseKeyBar:ss}};function Po(t,e,i,s,o,r){const h=a("core-api-bar"),c=a("core-license-key-bar");return n(),_("div",null,[s.rootStore.pong?g("",!0):(n(),f(h,{key:0})),t.$isPro&&s.licenseStore.isUnlicensed&&s.rootStore.pong?(n(),f(c,{key:1})):g("",!0)])}const xe=y($o,[["render",Po]]);var To={grad:.9,turn:360,rad:360/(2*Math.PI)},z=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},A=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=Math.pow(10,e)),Math.round(i*t)/i+0},R=function(t,e,i){return e===void 0&&(e=0),i===void 0&&(i=1),t>i?i:t>e?t:e},Ae=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Xt=function(t){return{r:R(t.r,0,255),g:R(t.g,0,255),b:R(t.b,0,255),a:R(t.a)}},Tt=function(t){return{r:A(t.r),g:A(t.g),b:A(t.b),a:A(t.a,3)}},xo=/^#([0-9a-f]{3,8})$/i,pt=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Le=function(t){var e=t.r,i=t.g,s=t.b,o=t.a,r=Math.max(e,i,s),h=r-Math.min(e,i,s),c=h?r===e?(i-s)/h:r===i?2+(s-e)/h:4+(e-i)/h:0;return{h:60*(c<0?c+6:c),s:r?h/r*100:0,v:r/255*100,a:o}},Me=function(t){var e=t.h,i=t.s,s=t.v,o=t.a;e=e/360*6,i/=100,s/=100;var r=Math.floor(e),h=s*(1-i),c=s*(1-(e-r)*i),p=s*(1-(1-e+r)*i),S=r%6;return{r:255*[s,c,h,h,p,s][S],g:255*[p,s,s,c,h,h][S],b:255*[h,h,p,s,s,c][S],a:o}},Jt=function(t){return{h:Ae(t.h),s:R(t.s,0,100),l:R(t.l,0,100),a:R(t.a)}},Qt=function(t){return{h:A(t.h),s:A(t.s),l:A(t.l),a:A(t.a,3)}},te=function(t){return Me((i=(e=t).s,{h:e.h,s:(i*=((s=e.l)<50?s:100-s)/100)>0?2*i/(s+i)*100:0,v:s+i,a:e.a}));var e,i,s},rt=function(t){return{h:(e=Le(t)).h,s:(o=(200-(i=e.s))*(s=e.v)/100)>0&&o<200?i*s/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,i,s,o},Ao=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lo=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mo=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ho=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,It={string:[[function(t){var e=xo.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?A(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?A(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Mo.exec(t)||Ho.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Xt({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Ao.exec(t)||Lo.exec(t);if(!e)return null;var i,s,o=Jt({h:(i=e[1],s=e[2],s===void 0&&(s="deg"),Number(i)*(To[s]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return te(o)},"hsl"]],object:[[function(t){var e=t.r,i=t.g,s=t.b,o=t.a,r=o===void 0?1:o;return z(e)&&z(i)&&z(s)?Xt({r:Number(e),g:Number(i),b:Number(s),a:Number(r)}):null},"rgb"],[function(t){var e=t.h,i=t.s,s=t.l,o=t.a,r=o===void 0?1:o;if(!z(e)||!z(i)||!z(s))return null;var h=Jt({h:Number(e),s:Number(i),l:Number(s),a:Number(r)});return te(h)},"hsl"],[function(t){var e=t.h,i=t.s,s=t.v,o=t.a,r=o===void 0?1:o;if(!z(e)||!z(i)||!z(s))return null;var h=function(c){return{h:Ae(c.h),s:R(c.s,0,100),v:R(c.v,0,100),a:R(c.a)}}({h:Number(e),s:Number(i),v:Number(s),a:Number(r)});return Me(h)},"hsv"]]},ee=function(t,e){for(var i=0;i<e.length;i++){var s=e[i][0](t);if(s)return[s,e[i][1]]}return[null,void 0]},Io=function(t){return typeof t=="string"?ee(t.trim(),It.string):typeof t=="object"&&t!==null?ee(t,It.object):[null,void 0]},xt=function(t,e){var i=rt(t);return{h:i.h,s:R(i.s+100*e,0,100),l:i.l,a:i.a}},At=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},se=function(t,e){var i=rt(t);return{h:i.h,s:i.s,l:R(i.l+100*e,0,100),a:i.a}},Bt=function(){function t(e){this.parsed=Io(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return A(At(this.rgba),2)},t.prototype.isDark=function(){return At(this.rgba)<.5},t.prototype.isLight=function(){return At(this.rgba)>=.5},t.prototype.toHex=function(){return e=Tt(this.rgba),i=e.r,s=e.g,o=e.b,h=(r=e.a)<1?pt(A(255*r)):"","#"+pt(i)+pt(s)+pt(o)+h;var e,i,s,o,r,h},t.prototype.toRgb=function(){return Tt(this.rgba)},t.prototype.toRgbString=function(){return e=Tt(this.rgba),i=e.r,s=e.g,o=e.b,(r=e.a)<1?"rgba("+i+", "+s+", "+o+", "+r+")":"rgb("+i+", "+s+", "+o+")";var e,i,s,o,r},t.prototype.toHsl=function(){return Qt(rt(this.rgba))},t.prototype.toHslString=function(){return e=Qt(rt(this.rgba)),i=e.h,s=e.s,o=e.l,(r=e.a)<1?"hsla("+i+", "+s+"%, "+o+"%, "+r+")":"hsl("+i+", "+s+"%, "+o+"%)";var e,i,s,o,r},t.prototype.toHsv=function(){return e=Le(this.rgba),{h:A(e.h),s:A(e.s),v:A(e.v),a:A(e.a,3)};var e},t.prototype.invert=function(){return N({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),N(xt(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),N(xt(this.rgba,-e))},t.prototype.grayscale=function(){return N(xt(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),N(se(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),N(se(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?N({r:(i=this.rgba).r,g:i.g,b:i.b,a:e}):A(this.rgba.a,3);var i},t.prototype.hue=function(e){var i=rt(this.rgba);return typeof e=="number"?N({h:e,s:i.s,l:i.l,a:i.a}):A(i.h)},t.prototype.isEqual=function(e){return this.toHex()===N(e).toHex()},t}(),N=function(t){return t instanceof Bt?t:new Bt(t)},oe=[],Bo=function(t){t.forEach(function(e){oe.indexOf(e)<0&&(e(Bt,It),oe.push(e))})};function Ro(t,e){var i={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var o in i)s[i[o]]=o;var r={};t.prototype.toName=function(h){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var c,p,S=s[this.toHex()];if(S)return S;if(h!=null&&h.closest){var C=this.toRgb(),E=1/0,v="black";if(!r.length)for(var b in i)r[b]=new t(i[b]).toRgb();for(var k in i){var M=(c=C,p=r[k],Math.pow(c.r-p.r,2)+Math.pow(c.g-p.g,2)+Math.pow(c.b-p.b,2));M<E&&(E=M,v=k)}return v}},e.string.push([function(h){var c=h.toLowerCase(),p=c==="transparent"?"#0000":i[c];return p?new t(p).toRgb():null},"name"])}var Lt=function(t){var e=t/255;return e<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},Mt=function(t){return .2126*Lt(t.r)+.7152*Lt(t.g)+.0722*Lt(t.b)};function Oo(t){t.prototype.luminance=function(){return e=Mt(this.rgba),(i=2)===void 0&&(i=0),s===void 0&&(s=Math.pow(10,i)),Math.round(s*e)/s+0;var e,i,s},t.prototype.contrast=function(e){e===void 0&&(e="#FFF");var i,s,o,r,h,c,p,S=e instanceof t?e:new t(e);return r=this.rgba,h=S.toRgb(),c=Mt(r),p=Mt(h),i=c>p?(c+.05)/(p+.05):(p+.05)/(c+.05),(s=2)===void 0&&(s=0),o===void 0&&(o=Math.pow(10,s)),Math.floor(o*i)/o+0},t.prototype.isReadable=function(e,i){return e===void 0&&(e="#FFF"),i===void 0&&(i={}),this.contrast(e)>=(c=(h=(s=i).size)===void 0?"normal":h,(r=(o=s.level)===void 0?"AA":o)==="AAA"&&c==="normal"?7:r==="AA"&&c==="large"?3:4.5);var s,o,r,h,c}}Bo([Ro,Oo]);function ie(t,e){const i=N(e),s=({color:r})=>i.contrast(r),o=Math.max(...t.map(s));return t.find(r=>s(r)===o).color}const Do={setup(){return{truSeoHighlighterStore:nt()}},emits:["next","previous"],components:{SvgEllipse:ye,SvgCaret:ft,SvgClose:Rt},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)}}},Vo=t=>(ge("data-v-966cf3f9"),t=t(),me(),t),Uo={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},No={class:"tru-seo-highlight-popover__count"},Ko=Vo(()=>u("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),Fo={class:"tru-seo-highlight-popover__nav"},Go=["disabled"],zo=["disabled"],qo={class:"tru-seo-highlight-popover__close"};function Wo(t,e,i,s,o,r){const h=a("svg-ellipse"),c=a("svg-caret"),p=a("svg-close");return n(),_("div",Uo,[u("div",{class:P(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":o.error}])},[l(h,{width:"8"})],2),u("div",No,[u("span",null,m(o.order)+"/"+m(o.total),1)]),Ko,u("div",Fo,[u("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:o.order===1,onClick:e[0]||(e[0]=H(S=>t.$emit("previous"),["stop","exact"]))},[l(c,{width:"20"})],8,Go),u("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:o.order===o.total,onClick:e[1]||(e[1]=H(S=>t.$emit("next"),["stop","exact"]))},[l(c,{width:"20"})],8,zo)]),u("div",qo,[u("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=H((...S)=>r.close&&r.close(...S),["stop","exact"]))},[l(p,{width:"10"})],32)])])}const jo=y(Do,[["render",Wo],["__scopeId","data-v-966cf3f9"]]),Yo={setup(){return{truSeoHighlighterStore:nt()}},computed:{...Ve(nt),markBgColor(){var s,o;const t="#cce0ff";if(typeof ie!="function")return t;const e=((s=this.getEditorNode("first-block"))==null?void 0:s.parentElement)||{},i=Object.values(e).length?(o=document.defaultView.getComputedStyle(e))==null?void 0:o.backgroundColor:"";return i&&!i.match(/(fffff|255,\s?255,\s?255|rgba)/gi)?ie([{color:"#e6f0ff"},{color:t},{color:"#b3d1ff"}],i):t}},data(){var t,e,i,s;return{editorObserver:null,editorWrapperRect:{},isBlockEditor:_t(),isClassicEditor:de(),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"),strings:{highlightSections:this.$t.__("Highlight sections in the Editor",this.$td)}}},methods:{annotateBlock(t){var i,s,o,r,h,c;let e="content";(s=(i=t.block)==null?void 0:i.attributes)!=null&&s.caption?e="caption":(r=(o=t.block)==null?void 0:o.attributes)!=null&&r.value?e="value":(c=(h=t.block)==null?void 0:h.attributes)!=null&&c.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=as(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=Je({name:"TruSeoHighlightPopover",render(){return Qe(jo,{onNext(){t.incrementActiveMark(1)},onPrevious(){t.incrementActiveMark(-1)}})}}),i=ls(),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,r,h;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)||((r=t==null?void 0:t.attributes)==null?void 0:r.value)||((h=t==null?void 0:t.attributes)==null?void 0:h.citation)||"",i=i.replace(/<br[^>]*>/gi,` `),i=Ue(i)),ds(i)},getEditorNode(t){var e;if(t==="closest-relative")return Et({element:this.getEditorNode("wrapper").parentElement,property:"position",value:"relative"});if(t==="navigable")return Et({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 r,h;const e=()=>{t.preventDefault(),t.clipboardData.setData("text/html",window.getSelection().toString())},i=window.getSelection()||{};if(!(i!=null&&i.rangeCount))return!1;const s=((r=t.clipboardData)==null?void 0:r.getData("text/html"))||"";if(s&&s.indexOf(this.truSeoHighlighterStore.source)!==-1)return e(),!1;const o=i.getRangeAt(0)||{};for(const c of Object.values(((h=o==null?void 0:o.cloneContents())==null?void 0:h.children)||[]))if(Object.values((c==null?void 0:c.classList)||[]).some(p=>p.endsWith(this.truSeoHighlighterStore.source)))return e(),!1},listenWindowKeyup(t){var r,h;const e=(c,p)=>{c.collapse(p.firstChild,p.firstChild.length),c.deleteFromDocument()};if(["Delete","Backspace"].indexOf(t.key)===-1)return!1;const i=window.getSelection()||null;if(!(i!=null&&i.toString()))return!1;const s=((r=i==null?void 0:i.anchorNode)==null?void 0:r.parentElement)||null,o=((h=i==null?void 0:i.anchorNode)==null?void 0:h.nextElementSibling)||null;Object.values((s==null?void 0:s.classList)||[]).some(c=>c.endsWith(this.truSeoHighlighterStore.source))?e(i,s):Object.values((o==null?void 0:o.classList)||[]).some(c=>c.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 r of(o==null?void 0:o.removedNodes)||[])(this.truSeoHighlighterStore.highlightMarks.some(h=>r.isEqualNode(h.parent))||Object.values((r==null?void 0:r.classList)||[]).some(h=>h.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,r)=>{var h;r.disconnect();for(const c of o){if(Object.values(((h=c==null?void 0:c.target)==null?void 0:h.classList)||[]).some(p=>p.endsWith(this.truSeoHighlighterStore.source))){this.setHighlightMarkNode(c.target);continue}for(const p of(c==null?void 0:c.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 r of e){if((r==null?void 0:r.type)!=="attributes")continue;if(!Et({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(),[r,h]=[140,32];let c=e.top,p=o.left-s.left;r<p?(this.truSeoHighlighterStore.highlightPopover.node.style.top=c-s.top+"px",this.truSeoHighlighterStore.highlightPopover.node.style.transform="translate(-105%, 0)",this.truSeoHighlighterStore.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(c=c-h-s.top,c=this.isClassicEditor?c+i.top:c,p=this.isClassicEditor?p+i.left:p,this.truSeoHighlighterStore.highlightPopover.node.style.top=c+"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,r;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-=((r=(o=document.querySelector("#wp-content-editor-container .mce-toolbar-grp"))==null?void 0:o.getBoundingClientRect())==null?void 0:r.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=this.markBgColor)},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 r=new RegExp(J(o),"g");let h;for(;(h=r.exec(i))!==null&&!this.truSeoHighlighterStore.highlightMarks.find(S=>S.sentenceIndex===s);){const c={start:h.index,end:h.index+h[0].length||1};this.truSeoHighlighterStore.highlightMarks.find(S=>e?(S.range.start===c.start||S.range.end===c.end)&&S.parent.isEqualNode(e):(S.range.start===c.start||S.range.end===c.end)&&S.block.clientId===t.clientId)||this.truSeoHighlighterStore.highlightMarks.push({id:io(1,999999999),range:c,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((gt()||!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)}},Zo={emits:["selectedKeyphrase","deleted","saved"],components:{CoreTooltip:G,SvgPencil:St,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){const e=t.target.value,i=this.index;this.$emit("saved",{index:i,value:e}),this.edit=!1},pressEnter(t){t.preventDefault(),t.target.blur(),this.edit=!1}}},Xo={class:"aioseo-keyphrase-tag"},Jo={key:0,class:"aioseo-edit-keyphrase-tag"},Qo=["value"];function ti(t,e,i,s,o,r){const h=a("svg-pencil"),c=a("svg-trash"),p=a("core-tooltip");return n(),_("div",Xo,[u("span",{class:P(["aioseo-add-keyphrase-tag",o.edit?"hidden":""])},[u("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=S=>r.toggleKeyphrasesPanel(i.index))},m(i.keyphrase),1),u("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=S=>r.editKeyphraseEv(i.index))},[l(h)]),u("span",{class:P(["keyphrase-score",r.scoreClass]),onClick:e[2]||(e[2]=S=>r.toggleKeyphrasesPanel(i.index))},m(i.score)+"/100",3)],2),o.edit?(n(),_("span",Jo,[u("input",{value:i.keyphrase,onBlur:e[3]||(e[3]=(...S)=>r.closeEdit&&r.closeEdit(...S)),onKeydown:e[4]||(e[4]=Dt((...S)=>r.pressEnter&&r.pressEnter(...S),["enter"]))},null,40,Qo),u("span",{class:"keyphrase-delete",onClick:e[5]||(e[5]=S=>r.deleteKeyphraseEv(i.index))},[l(p,{type:"action"},{tooltip:d(()=>[w(m(o.strings.delete),1)]),default:d(()=>[l(c)]),_:1})])])):g("",!0)])}const He=y(Zo,[["render",ti]]),ei={},si={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"},oi=u("path",{d:"M8.0018 8.57162C8.78938 8.57162 9.45817 8.29596 10.0082 7.74465C10.5582 7.19335 10.8332 6.5239 10.8332 5.73632C10.8332 4.94874 10.5575 4.27995 10.0062 3.72995C9.4549 3.17995 8.78546 2.90495 7.99787 2.90495C7.21029 2.90495 6.5415 3.1806 5.9915 3.73191C5.4415 4.28322 5.1665 4.95266 5.1665 5.74025C5.1665 6.52783 5.44216 7.19661 5.99347 7.74661C6.54477 8.29662 7.21422 8.57162 8.0018 8.57162ZM7.99592 7.60495C7.47631 7.60495 7.03595 7.42309 6.67484 7.05937C6.31373 6.69563 6.13317 6.25396 6.13317 5.73436C6.13317 5.21475 6.31503 4.77439 6.67875 4.41328C7.04249 4.05217 7.48415 3.87161 8.00375 3.87161C8.52337 3.87161 8.96373 4.05348 9.32484 4.4172C9.68595 4.78093 9.8665 5.2226 9.8665 5.7422C9.8665 6.26181 9.68464 6.70217 9.32092 7.06328C8.95719 7.42439 8.51552 7.60495 7.99592 7.60495ZM7.99984 10.7383C6.37762 10.7383 4.91095 10.2772 3.59984 9.35495C2.28873 8.43273 1.31095 7.22717 0.666504 5.73828C1.31095 4.24939 2.28873 3.04384 3.59984 2.12161C4.91095 1.19939 6.37762 0.738281 7.99984 0.738281C9.62206 0.738281 11.0887 1.19939 12.3998 2.12161C13.7109 3.04384 14.6887 4.24939 15.3332 5.73828C14.6887 7.22717 13.7109 8.43273 12.3998 9.35495C11.0887 10.2772 9.62206 10.7383 7.99984 10.7383Z",fill:"currentColor"},null,-1),ii=[oi];function ri(t,e){return n(),_("svg",si,ii)}const ni=y(ei,[["render",ri]]),ai={setup(){return{truSeoHighlighterStore:nt()}},components:{CoreTooltip:G,SvgEye:bt,SvgEyeFilled:ni},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)}}},li=["disabled"];function di(t,e,i,s,o,r){const h=a("svg-eye"),c=a("core-tooltip"),p=a("svg-eye-filled");return s.truSeoHighlighterStore.enabled?(n(),_("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!s.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=H(S=>r.onClickBtnToggleHighlighter(),["stop","exact"]))},[s.truSeoHighlighterStore.highlightAnalyzer!==i.analyzer?(n(),f(c,{key:0,offset:t.$root._data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:d(()=>[w(m(s.truSeoHighlighterStore.allowHighlighting?o.strings.highlightSections:o.strings.highlightingIsDisabled),1)]),default:d(()=>[l(h,{width:"16",height:"16"})]),_:1},8,["offset"])):(n(),f(p,{key:1,width:"16",height:"16"}))],8,li)):g("",!0)}const ci=y(ai,[["render",di]]),ui={components:{SvgCaret:ft,SvgCircleCheck:Ot,SvgCircleClose:We,TruSeoToggleHighlighter:ci},props:{analysisItems:{type:Object}},methods:{toggleDescriptionEv(t){t.target.parentElement.classList.toggle("toggled")}}},hi={class:"aioseo-analysis-detail"},pi={key:0},gi={class:"title__text"},mi={class:"description"};function _i(t,e,i,s,o,r){const h=a("svg-circle-check"),c=a("svg-circle-close"),p=a("tru-seo-toggle-highlighter"),S=a("svg-caret");return n(),_("ul",hi,[(n(!0),_(K,null,et(i.analysisItems,(C,E)=>{var v;return n(),_(K,{key:E},[C.title?(n(),_("li",pi,[u("p",{class:P(["title",C.error===0?"toggled":""])},[C.error===0?(n(),f(h,{key:0,width:"16"})):g("",!0),C.error===1?(n(),f(c,{key:1,width:"16"})):g("",!0),u("span",gi,m(C.title),1),(v=C==null?void 0:C.highlightSentences)!=null&&v.length?(n(),f(p,{key:2,analyzer:E},null,8,["analyzer"])):g("",!0),l(S,{width:"16",role:"button",onClick:H(r.toggleDescriptionEv,["stop"])},null,8,["onClick"])],2),u("p",mi,m(C.description),1)])):g("",!0)],64)}),128))])}const vt=y(ui,[["render",_i]]),fi={setup(){return{licenseStore:O(),postEditorStore:$()}},components:{CoreAlert:F,CoreKeyphrase:He,CoreLoader:pe,SvgCirclePlus:Kt,metaboxAnalysisDetail:vt},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),r=document.getElementsByClassName("keyphrase-name");this.postEditorStore.currentPost.loading.additional[0]=!0,e.value="",e.blur(),this.postEditorStore.isDirty=!0,(i=r[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})}}},Si={class:"additional-keyphrases-panel"},yi={key:0},bi={class:"analysis-wrapper"},vi={class:"aioseo-description additional-keyphrases-description"},ki=["innerHTML"];function wi(t,e,i,s,o,r){const h=a("core-keyphrase"),c=a("core-loader"),p=a("metaboxAnalysisDetail"),S=a("base-input"),C=a("svg-circle-plus"),E=a("base-button"),v=a("core-alert");return n(),_("div",Si,[s.postEditorStore.currentPost.keyphrases.additional&&s.postEditorStore.currentPost.keyphrases.additional.length&&t.$isPro&&s.licenseStore.license.isActive?(n(),_("div",yi,[(n(!0),_(K,null,et(s.postEditorStore.currentPost.keyphrases.additional,(b,k)=>(n(),f(h,{key:k,index:k,keyphrase:b.keyphrase,score:b.score,onSaved:r.onSaved,onDeleted:r.onDeleted,onSelectedKeyphrase:r.onSelectedKeyphrase,class:P(["aioseo-keyphrase-tag additional-keyphrase",o.selectedKeyphrase===k?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),u("div",bi,[s.postEditorStore.currentPost.loading.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&s.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase].keyphrase?(n(),f(c,{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?(n(),f(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?(n(),f(S,{key:1,size:"medium",class:P(`add-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:Dt(r.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),t.$isPro&&s.licenseStore.license.isActive?(n(),f(E,{key:2,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:r.addKeyphraseEv},{default:d(()=>[l(C,{width:"14",height:"14"}),w(" "+m(o.strings.addKeyphrase),1)]),_:1},8,["onClick"])):g("",!0),!t.$isPro||!s.licenseStore.license.isActive?(n(),_(K,{key:3},[u("div",vi,m(o.strings.keyphraseDocumentation),1),l(v,{class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.upsell},null,8,ki)]),_:1})],64)):g("",!0)])}const Ci=y(fi,[["render",wi],["__scopeId","data-v-73d0fe06"]]),Ei=""+window.__aioseoDynamicImportPreload__("images/open-ai.Du2ac8yQ.png"),$i={setup(){return{getAssetUrl:us,settingsStore:Y()}},components:{CoreModal:X},props:{type:{type:String,required:!0}},data(){return{OpenAiImage:Ei,strings:{upgradeToPro:this.$t.__("Upgrade to Pro Today",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))}}},Pi={class:"cta"},Ti=["src"],xi={class:"bottom"},Ai={class:"title"},Li=["innerHTML"];function Mi(t,e,i,s,o,r){const h=a("base-button"),c=a("core-modal");return n(),f(c,{classes:["aioseo-ai-generator-modal"],onClose:e[0]||(e[0]=p=>s.settingsStore.setModalState({modalName:"aiGenerator",value:!1}))},{headerTitle:d(()=>[w(m(r.headerTitle),1)]),body:d(()=>[u("div",Pi,[u("img",{src:s.getAssetUrl(o.OpenAiImage),alt:"open-ai-upsell"},null,8,Ti),u("div",xi,[u("div",null,[u("p",Ai,m(r.ctaHeaderTitle),1),u("p",null,m(r.ctaDescription),1)]),u("div",null,[l(h,{type:"green",size:"medium",tag:"a",href:t.$links.getPricingUrl("post-settings","general","open-ai")},{default:d(()=>[w(m(o.strings.upgradeToPro),1)]),_:1},8,["href"]),u("span",{innerHTML:o.strings.learnMoreLink},null,8,Li)])])])]),_:1})}const Hi=y($i,[["render",Mi]]),Ii={},Bi={class:"aioseo-ai-robot",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg"},Ri=u("path",{d:"M2.23351 8.73334C1.73351 8.73334 1.31129 8.55996 0.966845 8.2132C0.622412 7.86644 0.450195 7.44537 0.450195 6.95C0.450195 6.45464 0.623579 6.03357 0.970345 5.6868C1.31709 5.34005 1.73815 5.16667 2.23351 5.16667V2.89999C2.23351 2.63332 2.33351 2.39999 2.53351 2.19999C2.73351 1.99999 2.96685 1.89999 3.23351 1.89999H6.21686C6.21686 1.39999 6.39024 0.977765 6.737 0.63332C7.08376 0.288876 7.50483 0.116653 8.0002 0.116653C8.49556 0.116653 8.91663 0.290037 9.2634 0.636803C9.61015 0.983559 9.78353 1.40462 9.78353 1.89999H12.7669C13.0335 1.89999 13.2669 1.99999 13.4669 2.19999C13.6669 2.39999 13.7669 2.63332 13.7669 2.89999V5.16667C14.2669 5.16667 14.6891 5.34005 15.0335 5.6868C15.378 6.03357 15.5502 6.45464 15.5502 6.95C15.5502 7.44537 15.3768 7.86644 15.0301 8.2132C14.6833 8.55996 14.2622 8.73334 13.7669 8.73334V12.2167C13.7669 12.4834 13.6669 12.7167 13.4669 12.9167C13.2669 13.1167 13.0335 13.2167 12.7669 13.2167H3.23351C2.96685 13.2167 2.73351 13.1167 2.53351 12.9167C2.33351 12.7167 2.23351 12.4834 2.23351 12.2167V8.73334ZM5.77731 7.01015C5.97615 7.01015 6.14416 6.94024 6.28136 6.80042C6.41856 6.66061 6.48716 6.48971 6.48716 6.28774C6.48716 6.08577 6.41726 5.91619 6.27745 5.77899C6.13762 5.64179 5.9683 5.57319 5.76946 5.57319C5.57063 5.57319 5.40104 5.64283 5.2607 5.78212C5.12036 5.92141 5.0502 6.09414 5.0502 6.3003C5.0502 6.49914 5.12167 6.66715 5.26463 6.80435C5.40758 6.94155 5.57848 7.01015 5.77731 7.01015ZM10.2309 7.01015C10.4298 7.01015 10.5994 6.94024 10.7397 6.80042C10.88 6.66061 10.9502 6.48971 10.9502 6.28774C10.9502 6.08577 10.8787 5.91619 10.7358 5.77899C10.5928 5.64179 10.4219 5.57319 10.2231 5.57319C10.0242 5.57319 9.85623 5.64283 9.71903 5.78212C9.58183 5.92141 9.51323 6.09414 9.51323 6.3003C9.51323 6.49914 9.58313 6.66715 9.72295 6.80435C9.86277 6.94155 10.0321 7.01015 10.2309 7.01015ZM5.30383 10.25H10.6966V9.14637H5.30383V10.25ZM3.55383 11.8964H12.4466V3.2203H3.55383V11.8964Z",fill:"currentColor"},null,-1),Oi=[Ri];function Di(t,e){return n(),_("svg",Bi,Oi)}const Vi=y(Ii,[["render",Di]]),Ui={setup(){return{settingsStore:Y()}},components:{AiModal:Hi,CoreTooltip:G,SvgAiRobot:Vi},props:{type:{type:String,required:!0}},data(){return{strings:{useAiGenerator:this.$t.__("Use AI Generator",this.$td)}}}},Ni={class:"aioseo-ai-generator"};function Ki(t,e,i,s,o,r){const h=a("svg-ai-robot"),c=a("core-tooltip"),p=a("ai-modal");return n(),_("div",Ni,[l(c,{type:"action",offset:"-30px,0"},{tooltip:d(()=>[w(m(o.strings.useAiGenerator),1)]),default:d(()=>[u("button",{type:"button",onClick:e[1]||(e[1]=S=>s.settingsStore.setModalState({modalName:"aiGenerator",value:i.type}))},[l(h,{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 Fi=y(Ui,[["render",Ki]]),Gi={setup(){const{strings:t}=_e();return{settingsStore:Y(),strings:t}},components:{CoreTooltip:G,SvgCaret:ft,SvgCircleCheck:Ot,SvgCircleQuestionMark:Nt,SvgEllipse:ye,TransitionSlide:Os},mixins:[fe],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)}},zi={class:"aioseo-card aioseo-sidebar-card"},qi={class:"text"},Wi={key:0,class:"content"},ji={key:1,class:"content"};function Yi(t,e,i,s,o,r){const h=a("svg-ellipse"),c=a("svg-circle-check"),p=a("svg-circle-question-mark"),S=a("core-tooltip"),C=a("svg-caret"),E=a("transition-slide");return n(),_("div",zi,[i.hideHeader?g("",!0):(n(),_("div",{key:0,class:"header",onClick:e[0]||(e[0]=v=>s.settingsStore.toggleCard({slug:i.slug,shouldSave:i.saveToggleStatus}))},[u("div",qi,[q(t.$slots,"header",{},()=>[w(m(i.headerText),1)]),i.focusScore>=0?q(t.$slots,"alt",{key:0},()=>[i.focusScore!==null?(n(),_("span",{key:0,class:P(["card-score",t.getScoreClass(i.focusScore)])},m(i.focusScore)+"/100 ",3)):g("",!0)]):g("",!0),i.trueSeoScore>=0?q(t.$slots,"alt",{key:1},()=>[u("span",{class:P(["card-score",t.getErrorClass(i.trueSeoScore)])},[0<i.trueSeoScore?(n(),f(h,{key:0,width:"6"})):g("",!0),i.trueSeoScore===0?(n(),f(c,{key:1,width:"12"})):g("",!0),w(" "+m(t.getErrorDisplay(i.trueSeoScore)),1)],2)]):g("",!0),t.$slots.tooltip?(n(),f(S,{key:2},{tooltip:d(()=>[q(t.$slots,"tooltip")]),default:d(()=>[l(p)]),_:3})):g("",!0)]),i.toggles&&s.settingsStore.settings.toggledCards?(n(),f(C,{key:0,class:P({rotated:!s.settingsStore.settings.toggledCards[i.slug]})},null,8,["class"])):g("",!0)])),s.settingsStore.settings.toggledCards||i.noSlide?(n(),f(E,{key:1,active:s.settingsStore.settings.toggledCards[i.slug]&&i.toggles||i.noSlide},{default:d(()=>[t.$slots["before-tabs"]?(n(),_("div",Wi,[q(t.$slots,"before-tabs")])):g("",!0),q(t.$slots,"tabs"),t.$slots.default?(n(),_("div",ji,[q(t.$slots,"default")])):g("",!0)]),_:3},8,["active"])):g("",!0)])}const Zi=y(Gi,[["render",Yi]]),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 r=o.x===0?0:o.x/t,h=o.y===0?0:o.y/e,c=r*this.width,p=i-h*i+this.strokeWidth;return`${c},${p}`}).join(" ");return`0,${i+this.strokeWidth} `+s+` ${this.width},${i+this.strokeWidth}`}}},Ji=["width","height","viewBox"],Qi=["fill","points"],tr=["stroke","strokeWidth","points"];function er(t,e,i,s,o,r){return n(),_("svg",{width:i.width,height:i.height,viewBox:r.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[u("polygon",{fill:i.fillColor,points:r.polylinePoints},null,8,Qi),u("polyline",{fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:r.polylinePoints},null,8,tr)],8,Ji)}const sr=y(Xi,[["render",er]]),or={},ir={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"},rr=u("path",{d:"M108.808 8.212c0-2.579-1.586-4.456-4.628-4.456h-9.826v13.37h3.227v-4.563h3.822l3.742 4.562h3.637v-.29l-3.637-4.351c2.288-.463 3.663-2.13 3.663-4.272zm-4.985 1.653h-6.229V6.533h6.229c1.15 0 1.891.608 1.891 1.666 0 1.084-.714 1.666-1.891 1.666zM157.593 3.756h-3.029v5.078h-8.133V3.756h-3.266v13.383h3.266v-5.277h8.133v5.277h3.029V3.756zM85.72 3.756l-3.598 11.253h-.198l-3.61-11.253H72.56v13.383h3.081V6.149h.185l3.597 10.99h4.96l3.61-10.99h.185v10.99h3.174V3.756h-5.634zM50.57 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.687-1.31 3.464-1.31 2.46 0 4.721.53 6.692 1.482V4.787c-1.97-.939-4.153-1.402-6.864-1.402-3.808 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.642 3.861 1.124.12 3.028.291 4.364.397 1.454.12 1.878.569 1.878 1.23 0 .913-1.019 1.468-3.597 1.468-2.619 0-5.277-.86-7.168-2.063v3.081c1.521 1.019 4.14 1.878 7.062 1.878 4.152 0 6.824-1.6 6.824-4.47.026-2.168-1.402-3.478-4.682-3.821zM57.393 3.756v13.383h12.47V14.4h-9.389v-2.71h9.23V8.978h-9.23V6.493h9.39V3.756H57.392zM136.487 9.23c-1.138-.118-3.267-.317-4.404-.436-1.124-.119-1.772-.45-1.772-1.19 0-.714.688-1.31 3.465-1.31 2.459 0 4.721.53 6.691 1.482V4.787c-1.97-.939-4.152-1.402-6.863-1.402-3.809 0-6.44 1.587-6.44 4.285 0 2.275 1.547 3.518 4.641 3.861 1.124.12 3.029.291 4.364.397 1.455.12 1.878.569 1.878 1.23 0 .913-1.018 1.468-3.597 1.468-2.618 0-5.276-.86-7.167-2.063v3.081c1.52 1.019 4.139 1.878 7.061 1.878 4.153 0 6.824-1.6 6.824-4.47.027-2.168-1.402-3.478-4.681-3.821zM121.742 3.756v6.85c0 2.592-1.574 4.02-3.941 4.02-2.38 0-3.941-1.402-3.941-4.06v-6.81h-3.213v6.506c0 4.853 3.028 7.26 7.207 7.26 4.007 0 7.115-2.301 7.115-7.101V3.756h-3.227z",fill:"#020202"},null,-1),nr=u("path",{d:"M30.19 10.368c0 .648-.33.753-1.15.753-.872 0-1.031-.145-1.124-.806-.172-1.68-1.309-3.108-3.213-3.267-.608-.052-.754-.277-.754-1.031 0-.7.106-1.031.648-1.031 3.306.013 5.594 2.67 5.594 5.382zm4.814 0C35.004 5.329 31.593 0 23.711 0H8.054c-.318 0-.516.159-.516.45 0 .158.119.304.225.383.568.45 1.415.952 2.525 1.508 1.085.542 1.931.899 2.777 1.243.357.145.49.304.49.502 0 .278-.199.45-.582.45H.543c-.371 0-.543.238-.543.476 0 .198.066.37.238.542 1.005 1.058 2.618 2.328 4.96 3.796a71.557 71.557 0 006.611 3.636c.344.159.45.344.45.542-.013.225-.185.41-.582.41h-5.7c-.317 0-.502.172-.502.437 0 .145.119.33.278.476 1.295 1.177 3.372 2.46 6.136 3.636C15.579 20.061 19.32 21 23.526 21c7.974 0 11.478-5.964 11.478-10.632zm-10.407 7.445c-4.073 0-7.485-3.32-7.485-7.458 0-4.074 3.399-7.353 7.485-7.353 4.179 0 7.458 3.266 7.458 7.353-.013 4.139-3.28 7.458-7.458 7.458z",fill:"#FF642D"},null,-1),ar=[rr,nr];function lr(t,e){return n(),_("svg",ir,ar)}const dr=y(or,[["render",lr]]),cr={setup(){return{connectStore:Ne(),licenseStore:O(),optionsStore:ct(),postEditorStore:$(),rootStore:Z(),semrushStore:Ke()}},components:{CoreAlert:F,CoreKeyphrase:He,CoreLoader:pe,CoreModal:X,CoreTooltip:G,SvgAreaChart:sr,SvgCircleCheck:Ot,SvgCirclePlus:Kt,SvgLogoSemrush:dr,SvgTrash:yt,metaboxAnalysisDetail:vt},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){Zt(t,this.connectWithAioseo,600,630,!0,["token"],this.completedConnectCallback,this.closedConnectCallback)},openPopup(t){Zt(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:r}=t;if(!(r!=="https://oauth.semrush.com"||e!==o)){if(s.type==="semrush:oauth:success"){window.removeEventListener("message",i,!1);let h={};try{const c=new URL(s.url);h=at(c.search)}catch{}this.completedCallback(h).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=null,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");if(e.value){const i={keyphrase:e.value,score:0,analysis:{}};this.postEditorStore.currentPost.keyphrases.focus=i,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())}},ur={class:"aioseo-focus-keyphrase-panel"},hr={class:"disabled-button gray medium"},pr={class:"disabled-button gray"},gr=["innerHTML"],mr={class:"aioseo-modal-content has-padding"},_r={class:"aioseo-settings-row"},fr={class:"settings-name"},Sr={class:"name"},yr={class:"results"},br={"aria-label":"Additional Keyphrases",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},vr={class:"keyphrases-header"},kr={class:"keyphrase"},wr={class:"keyphrase-volume"},Cr={class:"keyphrase-trend"},Er={key:0,class:"keyphrase-actions"},$r={class:"keyphrases-rows"},Pr={class:"keyphrase"},Tr={class:"keyphrase-volume"},xr={class:"keyphrase-trend"},Ar={key:0,class:"keyphrase-actions"},Lr={key:0,class:"focus-keyphrase"},Mr={key:1},Hr={key:1,class:"remove-keyphrase"},Ir=["onClick"],Br={key:1,class:"keyphrase-row"},Rr=["colspan"],Or={key:1},Dr={class:"semrush-logo"},Vr={class:"semrush-upsell"},Ur=["innerHTML"],Nr=["innerHTML"];function Kr(t,e,i,s,o,r){const h=a("base-input"),c=a("svg-circle-plus"),p=a("base-button"),S=a("core-tooltip"),C=a("core-keyphrase"),E=a("core-loader"),v=a("metaboxAnalysisDetail"),b=a("core-alert"),k=a("base-select"),M=a("svg-area-chart"),L=a("svg-circle-check"),Q=a("svg-trash"),kt=a("svg-logo-semrush"),ut=a("core-modal");return n(),_("div",ur,[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),f(h,{key:0,size:"medium",class:P(`add-focus-keyphrase-${this.$root._data.screenContext}-input`),onKeydown:Dt(r.pressEnter,["enter"])},null,8,["class","onKeydown"])):g("",!0),u("div",{class:P(`add-focus-keyphrase-${this.$root._data.screenContext}-button`)},[!s.postEditorStore.currentPost.keyphrases.focus||!s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),f(p,{key:0,id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:r.addKeyphraseEv},{default:d(()=>[l(c,{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?(n(),f(S,{key:1},{tooltip:d(()=>[u("span",null,m(o.strings.semrushGetAdditionalKeyphrases)+" "+m(o.strings.pleaseAddFocusKeyphrase),1)]),default:d(()=>[u("div",hr,[l(c,{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?(n(),f(C,{key:1,index:0,keyphrase:s.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:s.postEditorStore.currentPost.keyphrases.focus.score,onSaved:r.onSaved,onDeleted:r.onDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"])):g("",!0),s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus?(n(),f(E,{key:2,class:"analysis-loading",dark:""})):g("",!0),!s.postEditorStore.currentPost.loading.focus&&s.postEditorStore.currentPost.keyphrases.focus&&s.postEditorStore.currentPost.keyphrases.focus.keyphrase?(n(),f(v,{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?(n(),f(S,{key:4},{tooltip:d(()=>[u("span",{innerHTML:o.strings.semrushTooltipLicenseKey},null,8,gr)]),default:d(()=>[u("div",pr,[l(c,{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)?(n(),f(S,{key:5,disabled:!o.showSemrushTooltip||t.$isPro,"force-show":o.showSemrushTooltip&&!t.$isPro},{tooltip:d(()=>[u("span",null,m(o.strings.semrushTooltip),1)]),default:d(()=>[l(p,{class:"add-keyphrase gray medium",onClick:r.getAdditionalKeyphrases},{default:d(()=>[l(c,{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]=T=>o.semrushShowModal=!1),classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:d(()=>[w(m(o.strings.modalTitle),1)]),body:d(()=>[u("div",mr,[s.licenseStore.isUnlicensed?(n(),f(b,{key:0,type:"blue",innerHTML:o.strings.upsell},null,8,["innerHTML"])):g("",!0),u("div",_r,[u("div",fr,[u("div",Sr,m(o.strings.showResultsFor),1)]),l(k,{class:"semrush-country-selector",size:"medium",options:r.semrushDatabase,placeholder:o.strings.selectPriceIndicator,modelValue:o.semrushCountry,"onUpdate:modelValue":e[0]||(e[0]=T=>o.semrushCountry=T)},null,8,["options","placeholder","modelValue"])]),u("div",yr,[u("table",br,[u("thead",null,[u("tr",vr,[u("th",kr,m(o.strings.keyphrase),1),u("th",wr,m(o.strings.volume),1),u("th",Cr,m(o.strings.trend),1),s.licenseStore.isUnlicensed?g("",!0):(n(),_("th",Er))])]),u("tbody",$r,[s.semrushStore.results.length&&!o.loadingResults?(n(!0),_(K,{key:0},et(s.semrushStore.results,(T,I)=>(n(),_("tr",{class:P(["keyphrase-row",{even:I%2===0}]),key:I},[u("td",Pr,m(T[0]),1),u("td",Tr,m(T[1]),1),u("td",xr,[l(M,{width:66,height:24,data:r.transformTrendDataToChartPoints(T[2]),strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.licenseStore.isUnlicensed?g("",!0):(n(),_("td",Ar,[T[0]===s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(n(),_("div",Lr,[l(L),w(" "+m(o.strings.focusKeyphrase),1)])):g("",!0),T[0]!==s.postEditorStore.currentPost.keyphrases.focus.keyphrase.toLowerCase()?(n(),_("div",Mr,[I!==o.removingAdditionalKeyphrase&&(I===o.addingAdditionalKeyphrase||!r.hasAdditionalKeyphrase(T[0]))?(n(),f(p,{key:0,type:"gray",size:"medium",onClick:ht=>r.addAdditionalKeyphrase(T[0],I),loading:I===o.addingAdditionalKeyphrase},{default:d(()=>[w(m(o.strings.addAdditionalKeyphrase),1)]),_:2},1032,["onClick","loading"])):g("",!0),r.getAdditionalKeyphrase(T[0])&&I!==o.addingAdditionalKeyphrase&&(I===o.removingAdditionalKeyphrase||r.hasAdditionalKeyphrase(T[0]))?(n(),_("div",Hr,[u("span",{class:P(["keyphrase-score",r.scoreClass(r.getAdditionalKeyphrase(T[0]).score)]),onClick:ht=>r.goToAdditionalKeyphrase(T[0])},m(r.getAdditionalKeyphrase(T[0]).score)+"/100",11,Ir),l(S,{type:"action"},{tooltip:d(()=>[w(m(o.strings.delete),1)]),default:d(()=>[l(Q,{onClick:ht=>r.removeAdditionalKeyphrase(T[0],I)},null,8,["onClick"])]),_:2},1024)])):g("",!0)])):g("",!0)]))],2))),128)):g("",!0),!s.semrushStore.results.length||o.loadingResults?(n(),_("tr",Br,[u("td",{colspan:s.licenseStore.isUnlicensed?3:4,class:"no-results"},[u("div",null,[o.loadingResults?(n(),f(E,{key:0,dark:""})):g("",!0),!o.loadingResults&&!s.semrushStore.error?(n(),_("span",Or,m(o.strings.noResults),1)):g("",!0),s.semrushStore.error&&!s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(n(),f(b,{key:2,type:"red"},{default:d(()=>[w(m(r.semrushError),1)]),_:1})):g("",!0),s.semrushStore.error&&s.semrushStore.error.includes("TOTAL LIMIT EXCEEDED")?(n(),_(K,{key:3},[u("div",Dr,[l(kt)]),u("div",Vr,[u("span",null,[u("strong",{innerHTML:o.strings.youHaveExceededSemrush},null,8,Ur)]),w(" "+m(" ")+" "),u("span",{innerHTML:o.strings.inOrderToUpgradeSemrush},null,8,Nr)])],64)):g("",!0)])],8,Rr)])):g("",!0)])])])])]),_:1},8,["show"])])}const Fr=y(cr,[["render",Kr]]),Gr={setup(){return{postEditorStore:$(),rootStore:Z()}},components:{CoreAlert:F,CoreMainTabs:st,metaboxAnalysisDetail:vt},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(!_t()||!["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}}},zr={class:"page-analysis-panel"},qr=["innerHTML"];function Wr(t,e,i,s,o,r){const h=a("core-alert"),c=a("core-main-tabs"),p=a("metaboxAnalysisDetail");return n(),_("div",zr,[r.pageBuilderAlert?(n(),f(h,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:r.pageBuilderAlert},null,8,qr)]),_:1})):g("",!0),l(c,{tabs:r.parseTabs,showSaveButton:!1,active:this.initTab,internal:"",onChanged:e[0]||(e[0]=S=>r.processChangeTab(S))},null,8,["tabs","active"]),l(lt,{mode:"out-in"},{default:d(()=>[s.postEditorStore.currentPost.page_analysis?(n(),f(p,{key:0,analysisItems:s.postEditorStore.currentPost.page_analysis.analysis[this.initTab]},null,8,["analysisItems"])):g("",!0)]),_:1})])}const jr=y(Gr,[["render",Wr]]),Yr={setup(){return{licenseStore:O(),postEditorStore:$(),hasRequiredFeature:mt.hasCoreFeature("general","cornerstone-content")}},components:{CoreAlert:F},emits:["changeTab"],data(){return{license:mt,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)}}}},Zr={class:"cornerstone-content-panel"},Xr={class:"cornerstone-content-text"},Jr=["innerHTML"],Qr=["innerHTML"];function tn(t,e,i,s,o,r){const h=a("base-toggle"),c=a("core-alert");return n(),_("div",Zr,[u("p",Xr,[u("span",null,m(o.strings.description),1),u("a",{href:"#",onClick:e[0]||(e[0]=H(p=>t.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},m(o.strings.linkingRecommendations),1),u("span",{innerHTML:this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,Jr)]),l(h,{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:d(()=>[w(m(o.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),s.licenseStore.isUnlicensed||!s.hasRequiredFeature?(n(),f(c,{key:0,class:"inline-upsell",type:"blue"},{default:d(()=>[u("div",{innerHTML:o.strings.upsell},null,8,Qr)]),_:1})):g("",!0)])}const en=y(Yr,[["render",tn]]),sn={setup(){const{strings:t}=_e();return{licenseStore:O(),optionsStore:ct(),postEditorStore:$(),rootStore:Z(),seoPreviewStore:Fe(),settingsStore:Y(),tagsStore:Ge(),truSeoHighlighterStore:nt(),composableStrings:t}},emits:["changeTab"],mixins:[Vt,ns,Ut,fe,Yo],components:{AdditionalKeyphrases:Ci,AiGenerator:Fi,BaseRadioToggle:be,CoreAlert:F,CoreGoogleSearchPreview:Rs,CoreHtmlTagsEditor:Ft,CoreSettingsRow:U,CoreSidebarCard:Zi,CoreTooltip:G,CoreProBadge:Ds,FocusKeyphrase:Fr,MetaboxAnalysisDetail:vt,PageAnalysis:jr,CornerstoneContent:en,SvgCircleQuestionMark:Nt,SvgDesktop:is,SvgMobile:rs,SvgPencil:St},props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},data(){return{license:mt,allowed:j,separator:void 0,isPageBuilderEditor:gt,titleCount:0,descriptionCount:0,keywords:null,keyphrases:null,selectedKeyphrase:0,editSnippet:!1,truSeo:null,titleKey:"title0",descriptionKey:"description0",strings:ce(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"(){Ct(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"postEditorStore.currentPost.description"(){Ct(()=>this.runAnalysis({postId:this.postEditorStore.currentPost.id}),750)},"truSeoHighlighterStore.highlightSentences"(t,e){Ct(()=>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"&&j("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarKeyphraseCard(){return $t()&&this.$root._data.screenContext==="sidebar"&&this.parentComponentContext!=="modal"&&j("aioseo_page_analysis")&&!this.isForum},displayTruSeoSidebarAnalysisCard(){return $t()&&this.$root._data.screenContext==="sidebar"&&this.postEditorStore.currentPost.page_analysis&&this.parentComponentContext!=="modal"&&j("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"]}}},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)})}},on={class:"aioseo-tab-content aioseo-post-general"},rn=["innerHTML"],nn=["innerHTML"],an=["innerHTML"],ln={key:0},dn=["innerHTML"],cn=["innerHTML"];function un(t,e,i,s,o,r){const h=a("svg-circle-question-mark"),c=a("core-tooltip"),p=a("svg-desktop"),S=a("svg-mobile"),C=a("base-radio-toggle"),E=a("core-google-search-preview"),v=a("svg-pencil"),b=a("base-button"),k=a("core-settings-row"),M=a("ai-generator"),L=a("core-html-tags-editor"),Q=a("core-alert"),kt=a("core-pro-badge"),ut=a("cornerstone-content"),T=a("focus-keyphrase"),I=a("additional-keyphrases"),ht=a("page-analysis"),tt=a("core-sidebar-card"),wt=a("metabox-analysis-detail");return n(),_("div",on,[o.allowed("aioseo_page_general_settings")?(n(),f(k,{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:d(()=>[u("div",null,[u("span",null,m(o.strings.serpPreview),1),l(c,{offset:t.$root._data.screenContext==="sidebar"&&i.parentComponentContext==="metabox"?"10px,0":"50px,0",placement:"bottom"},{tooltip:d(()=>[w(m(o.strings.serpPreviewDocumentation),1)]),default:d(()=>[l(h)]),_:1},8,["offset"])]),t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal"?(n(),f(C,{key:0,modelValue:s.postEditorStore.currentPost.generalMobilePrev,"onUpdate:modelValue":r.isMobilePreviewEv,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:d(()=>[l(p)]),mobile:d(()=>[l(S)]),_:1},8,["modelValue","onUpdate:modelValue"])):g("",!0)]),content:d(()=>{var x,Wt,jt;return[l(E,{"focus-keyphrase":((jt=(Wt=(x=s.postEditorStore.currentPost)==null?void 0:x.keyphrases)==null?void 0:Wt.focus)==null?void 0:jt.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"?(n(),f(b,{key:0,class:"edit-snippet gray small",onClick:r.editSnippetEv},{default:d(()=>[l(v),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")?(n(),f(k,{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:r.title,key:o.titleKey},{content:d(()=>[l(L,{modelValue:s.postEditorStore.currentPost.title,"onUpdate:modelValue":[e[0]||(e[0]=x=>s.postEditorStore.currentPost.title=x),e[2]||(e[2]=x=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=x=>t.updateCount(x,"titleCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Title`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":r.getDefaultTags("title")},{"tags-description":d(()=>[w(m(o.strings.clickToAddTitle),1)]),"append-button":d(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(n(),f(M,{key:0,type:"title"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,60)},null,8,rn)]),_:1},8,["name"])):g("",!0),(t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal")&&o.allowed("aioseo_page_general_settings")?(n(),f(k,{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:o.strings.metaDescription,key:o.descriptionKey},{content:d(()=>[r.showAutogenerateDescriptionsAlert?(n(),f(Q,{key:0,type:"yellow"},{default:d(()=>[u("span",{innerHTML:o.strings.autogenerateDescriptionsAlert},null,8,nn)]),_:1})):g("",!0),l(L,{modelValue:s.postEditorStore.currentPost.description,"onUpdate:modelValue":[e[3]||(e[3]=x=>s.postEditorStore.currentPost.description=x),e[5]||(e[5]=x=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=x=>t.updateCount(x,"descriptionCount")),"tags-context":`${s.postEditorStore.currentPost.postType||s.postEditorStore.currentPost.termType}Description`,defaultMenuOrientation:i.parentComponentContext==="modal"?"top":"bottom","default-tags":r.getDefaultTags("description")},{"tags-description":d(()=>[w(m(o.strings.clickToAddDescription),1)]),"append-button":d(()=>[s.postEditorStore.currentPost.postType&&!o.isPageBuilderEditor()?(n(),f(M,{key:0,type:"description"})):g("",!0)]),_:1},8,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,160)},null,8,an)]),_:1},8,["name"])):g("",!0),t.$root._data.screenContext==="metabox"&&s.postEditorStore.currentPost.context==="post"&&s.postEditorStore.currentPost.postType!=="attachment"&&!o.isPageBuilderEditor()?(n(),f(k,{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:d(()=>[w(m(o.strings.cornerstoneContent)+" ",1),s.licenseStore.isUnlicensed?(n(),f(kt,{key:0})):g("",!0)]),content:d(()=>[l(ut,{onChangeTab:e[6]||(e[6]=x=>t.$emit("changeTab",x))})]),_:1})):g("",!0),r.displayTruSeoMetaboxCard?(n(),_(K,{key:4},[s.optionsStore.options.searchAppearance.advanced.useKeywords&&s.optionsStore.options.searchAppearance.advanced.keywordsLooking?(n(),_("div",ln,[l(Q,{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:r.hideKeywordsLooking},{default:d(()=>[w(m(o.strings.lookingForMetaKeywords)+" ",1),u("a",{href:"#",onClick:e[7]||(e[7]=H(x=>t.$emit("changeTab","advanced"),["prevent"]))},m(o.strings.goToAdvancedTab),1),u("a",{class:"no-underline",href:"#",onClick:e[8]||(e[8]=H(x=>t.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1},8,["onCloseAlert"])])):g("",!0),l(k,{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:d(()=>[u("span",null,m(o.strings.focusKeyphrase),1),l(c,{offset:"25px,0"},{tooltip:d(()=>[u("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,dn)]),default:d(()=>[l(h)]),_:1})]),content:d(()=>[l(T)]),_:1}),l(k,{name:o.strings.additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:d(()=>[l(I)]),_:1},8,["name"])],64)):g("",!0),r.displayTruSeoMetaboxCard&&s.postEditorStore.currentPost.page_analysis?(n(),f(k,{key:5,name:o.strings.pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:d(()=>[l(ht)]),_:1},8,["name"])):g("",!0),t.$root._data.screenContext==="sidebar"&&!o.isPageBuilderEditor()&&this.parentComponentContext!=="modal"?(n(),f(tt,{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":o.strings.cornerstoneContent},{default:d(()=>[l(ut,{onChangeTab:e[9]||(e[9]=x=>t.$emit("changeTab",x))})]),_:1},8,["header-text"])):g("",!0),r.displayTruSeoSidebarKeyphraseCard?(n(),f(tt,{key:7,slug:"focus",focusScore:r.focusKeyphraseScore,class:"card-focus-keyphrase"},{header:d(()=>[u("span",null,m(o.strings.focusKeyphrase),1),l(c,{offset:o.isPageBuilderEditor()?"35px,0":"0,0"},{tooltip:d(()=>[u("div",{innerHTML:o.strings.keyphraseDocumentation},null,8,cn)]),default:d(()=>[l(h)]),_:1},8,["offset"])]),default:d(()=>[l(T)]),_:1},8,["focusScore"])):g("",!0),r.displayTruSeoSidebarKeyphraseCard?(n(),f(tt,{key:8,slug:"additional","header-text":o.strings.additionalKeyphrases,class:"card-additional-keyphrase"},{default:d(()=>[l(I)]),_:1},8,["header-text"])):g("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),f(tt,{key:9,slug:"basicseo","header-text":o.strings.basicSeo,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:d(()=>[l(wt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),f(tt,{key:10,slug:"title","header-text":o.strings.title,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:d(()=>[l(wt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0),r.displayTruSeoSidebarAnalysisCard?(n(),f(tt,{key:11,slug:"readability","header-text":o.strings.readability,trueSeoScore:s.postEditorStore.currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:d(()=>[l(wt,{analysisItems:s.postEditorStore.currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):g("",!0)])}const Ie=y(sn,[["render",un]]),hn={},pn={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"},gn=u("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1),mn=[gn];function _n(t,e){return n(),_("svg",pn,mn)}const zt=y(hn,[["render",_n]]),fn={setup(){return{postEditorStore:$()}},components:{CoreSettingsRow:U,SvgRightArrowShort:zt},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)}}}},Sn={class:"aioseo-link-assistant-sidebar"},yn={class:"aioseo-sidebar-content-title"};function bn(t,e,i,s,o,r){const h=a("svg-right-arrow-short"),c=a("base-button"),p=a("core-settings-row");return n(),_("div",Sn,[t.$root._data.screenContext==="sidebar"?(n(),f(p,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:d(()=>[u("div",yn,m(o.strings.title),1),u("p",null,m(o.strings.description),1),l(c,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:d(()=>[l(h),w(" "+m(o.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const vn=y(fn,[["render",bn]]),V="all-in-one-seo-pack",kn=()=>{const t={frontPage:D("Front Page",V),deleteLink:D("Delete Link",V)},e={areYouSureSingle:D("Are you sure you want to delete this link?",V),areYouSureMultiple:D("Are you sure you want to delete these links?",V),areYouSureAll:D("Are you sure you want to delete all links?",V),actionCannotBeUndone:D("This action cannot be undone.",V),yesSingle:D("Yes, I want to delete this link",V),yesMultiple:D("Yes, I want to delete these links",V),yesAll:D("Yes, I want to delete all links",V),noChangedMind:D("No, I changed my mind",V)};return{bulkOptions:[{label:D("Delete",V),value:"delete"}],modalStrings:e,strings:t}},wn={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 r=this.findTargetBlock(o.innerBlocks,e);r&&(s=r)}),s}}},Cn={emits:["updatingLinks","linksUpdated"],mixins:[wn],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=ot();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=$();window.aioseoBus.$emit("updatingLinks",!0);const i={...t,additionalFilters:{postId:this.post.ID||e.currentPost.id,postIndex:this.postIndex,type:this.linkType}},s=ot(),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=ot(),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=ot(),s=$();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){_t()&&(window.aioseoBus.$emit("updatingLinks",!1),this.blockEditorRemoveLink(t),window.aioseoBus.$emit("updatingLinks",!1)),de()&&this.classicEditorRemoveLink(t)},blockEditorRemoveLink(t){const i=$().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(),r=J(o),h=window.wp.data.select("core/block-editor").getBlocks(),c=this.findTargetBlock(h,o);if(!c){window.aioseoBus.$emit("updatingLinks",!1);return}const p=window.wp.data.select("core/block-editor").getBlock(c);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(`${r}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(c,{content:p.attributes.content.replace(S,C)}).then(()=>{this.post.links[this.linkType].rows.splice(t,1)}).catch(E=>{console.error(`Couldn delete link with type "${this.linkType}" and index ${t}:`,E)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),this.$emit("linksUpdated")})},classicEditorRemoveLink(t){var v;const i=$().currentPost.linkAssistant.links[this.linkType].rows[t];if(!i||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let s="",o=null,r=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(o=window.tinyMCE.get("content"),s=o.getContent({format:"raw"})):(r=document.querySelector("textarea#content"),s=r?r.value:""),!s){window.aioseoBus.$emit("updatingLinks",!1);return}let h=i.phrase_html.trim();o||(h=h.replace(/(\sdata-mce-href=".*")/gi,""));const c=J(i.anchor.trim());let p=new RegExp(`(<t?a[^<>]*>)(.*)?(${c})(.*)?(</t?a[^<>]*>)`,"i");const S=h.replace(p,"$2$3$4"),C=J(h);p=new RegExp(`${C}`,"i"),s=s.replace(p,S),o?o.setContent(s):r.value=s,this.post.links[this.linkType].rows.splice(t,1),(v=ot().postSettingsUpdate({postContent:s}))==null||v.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})}}},En={emits:["closeModal","doBulkAction"],components:{CoreModal:X,SvgClose:Rt},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}}},$n={class:"aioseo-modal-body"},Pn=["innerHTML"];function Tn(t,e,i,s,o,r){const h=a("svg-close"),c=a("base-button"),p=a("core-modal");return n(),f(p,{show:i.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=S=>t.$emit("closeModal",!0))},{body:d(()=>[u("div",$n,[u("button",{class:"close",onClick:e[1]||(e[1]=H(S=>t.$emit("closeModal",!0),["stop"]))},[l(h,{onClick:e[0]||(e[0]=S=>t.$emit("closeModal",!0))})]),u("h3",null,m(r.areYouSure),1),u("div",{class:"reset-description",innerHTML:i.strings.actionCannotBeUndone},null,8,Pn),l(c,{type:"blue",size:"medium",onClick:e[2]||(e[2]=S=>t.$emit("doBulkAction",S))},{default:d(()=>[w(m(r.confirmation),1)]),_:1}),l(c,{type:"gray",size:"medium",onClick:e[3]||(e[3]=S=>t.$emit("closeModal",!0))},{default:d(()=>[w(m(i.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const xn=y(En,[["render",Tn]]),An={components:{CoreTooltip:G},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=it.decode(this.anchor),e=J(t);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return it.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return it.decode(this.stripTags(this.getPart(2)))},lastPart(){return it.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(t){const i=it.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()}}},Ln={class:"phrase"},Mn={key:0,class:"first"},Hn=["href"],In={key:2},Bn={class:"anchor"},Rn={key:3,class:"last"};function On(t,e,i,s,o,r){const h=a("core-tooltip");return n(),_("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=c=>t.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=c=>t.$emit("mouseLeave"))},[u("span",Ln,[r.firstPart?(n(),_("span",Mn,m(r.firstPart),1)):g("",!0),i.tooltip?(n(),f(h,{key:1,type:"action"},{tooltip:d(()=>[u("a",{class:"tooltip-url",href:i.url,target:"_blank"},m(i.url),9,Hn)]),default:d(()=>[u("span",{class:"anchor",onClick:e[0]||(e[0]=(...c)=>r.maybeOpenLink&&r.maybeOpenLink(...c))},m(r.linkAnchor),1)]),_:1})):g("",!0),i.tooltip?g("",!0):(n(),_("div",In,[u("span",Bn,m(r.linkAnchor),1)])),r.lastPart?(n(),_("span",Rn,m(r.lastPart),1)):g("",!0)]),q(t.$slots,"icons")],32)}const Dn=y(An,[["render",On]]),Vn={},Un={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"},Nn=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.66699 7.43742H4.33366C2.95866 7.43742 1.83366 6.31242 1.83366 4.93742C1.83366 3.56242 2.95866 2.43742 4.33366 2.43742H7.66699V0.770752H4.33366C2.03366 0.770752 0.166992 2.63742 0.166992 4.93742C0.166992 7.23742 2.03366 9.10408 4.33366 9.10408H7.66699V7.43742ZM12.667 0.770752H9.33366V2.43742H12.667C14.042 2.43742 15.167 3.56242 15.167 4.93742C15.167 6.31242 14.042 7.43742 12.667 7.43742H9.33366V9.10408H12.667C14.967 9.10408 16.8337 7.23742 16.8337 4.93742C16.8337 2.63742 14.967 0.770752 12.667 0.770752ZM11.8337 4.10409H5.16699V5.77075H11.8337V4.10409Z",fill:"currentColor"},null,-1),Kn=[Nn];function Fn(t,e){return n(),_("svg",Un,Kn)}const qt=y(Vn,[["render",Fn]]),Gn={setup(){const{strings:t,modalStrings:e,bulkOptions:i}=kn();return{rootStore:Z(),settingsStore:Y(),composableStrings:t,bulkOptions:i,modalStrings:e}},emits:["openSuggestions"],components:{CoreTooltip:G,CoreWpTable:Us,LinkAssistantConfirmationModal:xn,LinkAssistantPhrase:Dn,SvgLinkExternal:we,SvgLinkSuggestion:qt,SvgTrash:yt},mixins:[Cn,Ns,Vs],data(){return{tableId:"aioseo-post-report-inbound-internal",linkType:"inboundInternal",strings:ce(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))}}},zn={key:0},qn={key:0,class:"row-actions"},Wn={class:"view"},jn=["href"],Yn={class:"edit"},Zn=["href"],Xn={key:0,class:"links-bottom"},Jn={class:"links-bottom-left"},Qn={key:1},ta={class:"links-bottom-right"};function ea(t,e,i,s,o,r){const h=a("link-assistant-phrase"),c=a("svg-trash"),p=a("core-tooltip"),S=a("core-wp-table"),C=a("svg-link-suggestion"),E=a("base-button"),v=a("svg-link-external"),b=a("link-assistant-confirmation-modal");return n(),_("div",null,[(n(),f(S,{id:o.tableId,key:t.wpTableKey,class:P({"link-assistant-inner-table":!t.postReport}),columns:r.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:r.processPagination,onProcessBulkAction:t.maybeDoBulkAction,onProcessChangeItemsPerPage:t.processChangeItemsPerPage},{post_title:d(({row:k})=>{var M,L;return[u("span",null,[w(m(k.context.postTitle)+" ",1),((L=(M=k.context)==null?void 0:M.permalink)==null?void 0:L.replace(/\/$/,""))===s.rootStore.aioseo.urls.home?(n(),_("span",zn,"("+m(o.strings.frontPage)+")",1)):g("",!0)]),k.context?(n(),_("div",qn,[u("span",Wn,[u("a",{href:k.context.permalink,target:"_blank"},m(t.viewPost(k.context.postType.singular)),9,jn),w(" | ")]),u("span",Yn,[u("a",{href:k.context.editLink,target:"_blank"},m(t.editPost(k.context.postType.singular)),9,Zn)])])):g("",!0)]}),phrase:d(({row:k})=>[l(h,{phrase:k.phrase,phraseHtml:k.phrase_html||"",anchor:k.anchor,url:k.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:d(({index:k})=>[l(p,{type:"action"},{tooltip:d(()=>[w(m(o.strings.deleteLink),1)]),default:d(()=>[l(c,{onClick:M=>t.maybeDoBulkAction({action:"delete",selectedRows:k})},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):(n(),_("div",Xn,[u("div",Jn,[t.post.links.inboundInternal.rows.length?(n(),f(E,{key:0,type:"blue",tag:"button",onClick:e[0]||(e[0]=k=>t.$emit("openSuggestions"))},{default:d(()=>[l(C),w(" "+m(o.strings.outboundSuggestions),1)]),_:1})):g("",!0),t.post.links.inboundInternal.totals.total>5&&t.linksReport?(n(),_("div",Qn,[l(v),u("a",{class:"link-view",href:"#",onClick:e[1]||(e[1]=H(k=>t.openPostReport("inbound-internal"),["prevent"]))},m(r.seeAllLinks),1)])):g("",!0)]),u("div",ta,[t.post.links.inboundInternal.rows.length?(n(),_("a",{key:0,class:"link-delete",onClick:e[2]||(e[2]=H(k=>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]=k=>t.showModal=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}const sa=y(Gn,[["render",ea]]),oa={setup(){return{licenseStore:O(),postEditorStore:$()}},components:{CoreAlert:F,CoreBlur:Gt,CoreMainTabs:st,CoreModal:X,Cta:ke,LinkAssistantInboundInternal:sa,LinksSideBar:vn,SvgLinkAffiliate:Ks,SvgLinkExternal:we,SvgLinkInternalInbound:Fs,SvgLinkInternalOutbound:Gs,SvgLinkSuggestion:qt,RequiredPlans:zs},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"))}}},ia={class:"aioseo-tab-content aioseo-link-assistant"},ra={key:0};function na(t,e,i,s,o,r){const h=a("core-main-tabs"),c=a("link-assistant-inbound-internal"),p=a("core-blur"),S=a("required-plans"),C=a("cta"),E=a("core-modal"),v=a("links-side-bar");return n(),_("div",ia,[t.$root._data.screenContext==="metabox"?(n(),_("div",ra,[l(p,null,{default:d(()=>[l(h,{class:"link-tabs",internal:"",tabs:r.tabs,active:r.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:b})=>[(n(),f(B(b.icon),{class:P([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(n(),f(c,{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":d(()=>[w(m(o.strings.ctaHeader),1)]),description:d(()=>[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(E,{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:d(()=>[w(m(r.modalHeader),1)]),body:d(()=>[l(p,null,{default:d(()=>[l(h,{class:"link-tabs",internal:"",tabs:r.tabs,active:r.initialTab,showSaveButton:!1},{"var-tab-icon":d(({tab:b})=>[(n(),f(B(b.icon),{class:P([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(n(),f(c,{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":d(()=>[w(m(o.strings.ctaHeader),1)]),description:d(()=>[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"?(n(),f(v,{key:1})):g("",!0)])}const re=y(oa,[["render",na]]),aa={};function la(t,e){return n(),_("div")}const da=y(aa,[["render",la]]),ca={setup(){return{addons:ve,licenseStore:O()}},components:{Links:re,LinksActivate:da,LinksLite:re},props:{parentComponentContext:String}},ua={class:"aioseo-tab-content aioseo-link-assistant"};function ha(t,e,i,s,o,r){const h=a("Links",!0),c=a("LinksLite"),p=a("LinksActivate");return n(),_("div",ua,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-link-assistant")&&!s.addons.requiresUpgrade("aioseo-link-assistant")?(n(),f(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-link-assistant")?(n(),f(c,{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")?(n(),f(p,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const pa=y(ca,[["render",ha]]),ga={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}}},ma={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)||""}}},_a={setup(){return{optionsStore:ct(),postEditorStore:$(),rootStore:Z()}},components:{CoreAlert:F,CoreFacebookPreview:qs,CoreHtmlTagsEditor:Ft,CoreImageUploader:Pe,CoreSettingsRow:U},mixins:[Ce,Ee,Vt,Ut,ga],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:$e,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)}},fa={class:"tab-facebook"},Sa={id:"aioseo-post-settings-facebook"},ya=["innerHTML"],ba=["innerHTML"];function va(t,e,i,s,o,r){const h=a("core-alert"),c=a("core-facebook-preview"),p=a("core-settings-row"),S=a("core-html-tags-editor"),C=a("base-select"),E=a("base-input"),v=a("core-image-uploader");return n(),_("div",fa,[l(p,{class:"snippet-preview-row"},{name:d(()=>[u("span",null,m(o.strings.tabName),1)]),content:d(()=>[s.optionsStore.options.social.facebook.general.enable?g("",!0):(n(),f(h,{key:0,class:"facebook-disabled-warning",innerHTML:o.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),l(c,{description:r.previewDescription,image:t.imageUrl,loading:t.loading,title:r.previewTitle},null,8,["description","image","loading","title"])]),_:1}),u("div",Sa,[l(p,{name:o.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:d(()=>[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":d(()=>[w(m(o.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,95)},null,8,ya)]),_:1},8,["name"]),l(p,{name:o.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:d(()=>[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":d(()=>[w(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,ba)]),_:1},8,["name"]),l(p,{class:"facebook-image-source",name:o.strings.imageSource,align:""},{content:d(()=>[l(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[6]||(e[6]=b=>r.saveImageType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.og_image_type==="custom"?(n(),f(p,{key:0,name:o.strings.customFieldsName,align:""},{content:d(()=>[l(E,{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"?(n(),f(p,{key:1,class:"facebook-image",name:o.strings.facebookImage},{content:d(()=>[l(v,{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:d(()=>[l(E,{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:d(()=>[l(C,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:r.getObjectTypeOptions(s.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[11]||(e[11]=b=>r.setObjectType(b.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),r.shouldShowArticleSection?(n(),f(p,{key:2,name:o.strings.articleSection,align:""},{content:d(()=>[l(E,{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),r.shouldShowArticleSection?(n(),f(p,{key:3,name:o.strings.articleTags,align:""},{content:d(()=>[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 ka=y(_a,[["render",va]]),wa={setup(){return{optionsStore:ct(),postEditorStore:$(),rootStore:Z()}},components:{CoreAlert:F,CoreHtmlTagsEditor:Ft,CoreImageUploader:Pe,CoreSettingsRow:U,CoreTwitterPreview:Ws},mixins:[Ce,Ee,Vt,Ut,ma],props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:$e,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)}},Ca={class:"tab-twitter"},Ea={id:"aioseo-post-settings-twitter"},$a=["innerHTML"],Pa=["innerHTML"];function Ta(t,e,i,s,o,r){const h=a("core-alert"),c=a("core-twitter-preview"),p=a("core-settings-row"),S=a("base-toggle"),C=a("core-html-tags-editor"),E=a("base-select"),v=a("base-input"),b=a("core-image-uploader");return n(),_("div",Ca,[l(p,{class:"snippet-preview-row"},{name:d(()=>[u("span",null,m(o.strings.twitterPreview),1)]),description:d(()=>[u("i",null,m(o.strings.twitterPreviewDescription),1)]),content:d(()=>[s.optionsStore.options.social.twitter.general.enable?g("",!0):(n(),f(h,{key:0,class:"twitter-disabled-warning",innerHTML:o.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),l(c,{card:s.postEditorStore.currentPost.twitter_card,description:r.previewDescription,image:r.previewImage,loading:t.loading,title:r.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),u("div",Ea,[l(p,{name:o.strings.useFB,class:"use-facebook"},{content:d(()=>[l(S,{modelValue:s.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":[e[0]||(e[0]=k=>s.postEditorStore.currentPost.twitter_use_og=k),e[1]||(e[1]=k=>s.postEditorStore.isDirty=!0)]},null,8,["modelValue"])]),_:1},8,["name"]),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(n(),f(p,{key:0,name:o.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:d(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":[e[2]||(e[2]=k=>s.postEditorStore.currentPost.twitter_title=k),e[4]||(e[4]=k=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,single:"",onCounter:e[3]||(e[3]=k=>t.updateCount(k,"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"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.titleCount,70)},null,8,$a)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(n(),f(p,{key:1,name:o.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:d(()=>[l(C,{class:"twitter-meta-input",modelValue:s.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":[e[5]||(e[5]=k=>s.postEditorStore.currentPost.twitter_description=k),e[7]||(e[7]=k=>s.postEditorStore.isDirty=!0)],"line-numbers":!1,description:"",onCounter:e[6]||(e[6]=k=>t.updateCount(k,"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":d(()=>[w(m(o.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),u("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(o.descriptionCount,200)},null,8,Pa)]),_:1},8,["name"])),s.postEditorStore.currentPost.twitter_use_og?g("",!0):(n(),f(p,{key:2,class:"twitter-image-source",name:o.strings.imageSource,align:""},{content:d(()=>[l(E,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(s.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[8]||(e[8]=k=>r.saveTwitterImageType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!s.postEditorStore.currentPost.twitter_use_og&&s.postEditorStore.currentPost.twitter_image_type==="custom"?(n(),f(p,{key:3,class:"twitter-custom-field",name:o.strings.customFieldsName,align:""},{content:d(()=>[l(v,{type:"text",size:"medium",placeholder:o.strings.placeholder,modelValue:s.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":[e[9]||(e[9]=k=>s.postEditorStore.currentPost.twitter_image_custom_fields=k),e[10]||(e[10]=k=>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"?(n(),f(p,{key:4,class:"twitter-image",name:o.strings.twitterImage},{content:d(()=>[l(b,{description:r.twitterImageUploaderDescription,modelValue:s.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[11]||(e[11]=k=>s.postEditorStore.currentPost.twitter_image_custom_url=k)},null,8,["description","modelValue"])]),_:1},8,["name"])):g("",!0),l(p,{class:"twitter-card-type",name:o.strings.twitterCardType,align:""},{content:d(()=>[l(E,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:r.getCardOptions(s.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[12]||(e[12]=k=>r.cardSelect(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const xa=y(wa,[["render",Ta]]),Aa={setup(){return{postEditorStore:$(),settingsStore:Y()}},components:{CoreSettingsRow:U,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}}},La={class:"aioseo-sidebar-content-title"};function Ma(t,e,i,s,o,r){const h=a("svg-pencil"),c=a("base-button"),p=a("core-settings-row");return t.$root._data.screenContext==="sidebar"?(n(),f(p,{key:0,name:o.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:d(()=>[u("div",La,m(o.strings.title),1),u("p",null,m(o.strings.sidebarCopy),1),l(c,{class:"open-social-modal gray small",onClick:r.openModalEv},{default:d(()=>[l(h),w(" "+m(o.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):g("",!0)}const Ha=y(Aa,[["render",Ma]]),Ia={setup(){return{postEditorStore:$(),settingsStore:Y()}},components:{BaseRadioToggle:be,CoreMainTabs:st,CoreSettingsRow:U,Facebook:ka,Twitter:xa,SocialSideBar:Ha},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(){at()["social-tab"]&&(this.processChangeTab(at()["social-tab"]),setTimeout(()=>{Ht("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 Ra(t,e,i,s,o,r){const h=a("core-main-tabs"),c=a("core-settings-row"),p=a("social-side-bar");return n(),_("div",Ba,[t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal"?(n(),f(c,{key:0,"no-border":""},{content:d(()=>[l(h,{tabs:o.tabs,showSaveButton:!1,active:r.initTab,internal:"",onChanged:e[0]||(e[0]=S=>r.processChangeTab(S)),disableMobile:""},null,8,["tabs","active"])]),_:1})):g("",!0),t.$root._data.screenContext==="metabox"||i.parentComponentContext==="modal"?(n(),f(lt,{key:1,name:"route-fade",mode:"out-in"},{default:d(()=>[(n(),f(B(r.initTab)))]),_:1})):g("",!0),this.parentComponentContext!=="modal"?(n(),f(p,{key:2})):g("",!0)])}const Be=y(Ia,[["render",Ra]]),Oa={setup(){return{settingsStore:Y()}},components:{CoreMainTabs:st,CoreSettingsRow:U,General:Ie,Social:Be,SvgSettings:Se,SvgShare:Te},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=>j(`aioseo_page_${t.slug}_settings`))}},methods:{processChangeTab(t){this.settingsStore.changeTabSettings({setting:"modal",value:t})}}},Da={class:"aioseo-modal-content"},Va={class:"mobile-radio-buttons"},Ua={class:"component-wrapper"};function Na(t,e,i,s,o,r){const h=a("core-main-tabs");return n(),_("div",Da,[u("div",Va,[l(h,{tabs:r.getTabs,showSaveButton:!1,active:s.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=c=>r.processChangeTab(c))},null,8,["tabs","active"])]),u("div",Ua,[l(lt,{name:"route-fade",mode:"out-in"},{default:d(()=>[(n(),f(B(s.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Ka=y(Oa,[["render",Na]]),Fa={setup(){return{postEditorStore:$()}},components:{CoreSettingsRow:U,SvgRightArrowShort:zt},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)}}}},Ga={class:"aioseo-redirects-sidebar"},za={class:"aioseo-sidebar-content-title"};function qa(t,e,i,s,o,r){const h=a("svg-right-arrow-short"),c=a("base-button"),p=a("core-settings-row");return n(),_("div",Ga,[t.$root._data.screenContext==="sidebar"?(n(),f(p,{key:0,class:"snippet-description-row open-redirects-copy"},{content:d(()=>[u("div",za,m(o.strings.title),1),u("p",null,m(o.strings.description),1),l(c,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=S=>s.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:d(()=>[l(h),w(" "+m(o.strings.button),1)]),_:1})]),_:1})):g("",!0)])}const Wa=y(Fa,[["render",qa],["__scopeId","data-v-9484ed37"]]),ja={setup(){return{postEditorStore:$()}},components:{CoreModal:X,RedirectsSideBar:Wa,RedirectsLite:Ys},props:{parentComponentContext:String},data(){return{strings:{modalHeader:this.$t.__("Redirects",this.$td)}}}},Ya={class:"bd"};function Za(t,e,i,s,o,r){const h=a("redirects-lite"),c=a("core-modal"),p=a("redirects-side-bar");return n(),_("div",null,[t.$root._data.screenContext==="metabox"?(n(),f(h,{key:0,noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),l(c,{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:d(()=>[w(m(o.strings.modalHeader),1)]),body:d(()=>[u("div",Ya,[l(h,{noCoreCard:!0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),this.parentComponentContext!=="modal"?(n(),f(p,{key:1})):g("",!0)])}const ne=y(ja,[["render",Za]]),Xa={};function Ja(t,e){return n(),_("div")}const Qa=y(Xa,[["render",Ja]]),tl={setup(){return{addons:ve,licenseStore:O()}},components:{Redirects:ne,RedirectsActivate:Qa,RedirectsLite:ne},props:{parentComponentContext:String}},el={class:"aioseo-tab-content"};function sl(t,e,i,s,o,r){const h=a("Redirects",!0),c=a("RedirectsLite"),p=a("RedirectsActivate");return n(),_("div",el,[!s.licenseStore.isUnlicensed&&s.addons.isActive("aioseo-redirects")&&!s.addons.requiresUpgrade("aioseo-redirects")?(n(),f(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0),s.licenseStore.isUnlicensed||s.addons.requiresUpgrade("aioseo-redirects")?(n(),f(c,{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")?(n(),f(p,{key:2,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const ol=y(tl,[["render",sl]]),il={};function rl(t,e){return n(),_("div")}const nl=y(il,[["render",rl]]),al={};function ll(t,e){return n(),_("div")}const dl=y(al,[["render",ll]]),cl={};function ul(t,e){return n(),_("div")}const hl=y(cl,[["render",ul]]),pl={};function gl(t,e){return n(),_("div")}const ml=y(pl,[["render",gl]]),_l={};function fl(t,e){return n(),_("div")}const Sl=y(_l,[["render",fl]]),yl={};function bl(t,e){return n(),_("div")}const vl=y(yl,[["render",bl]]),kl={};function wl(t,e){return n(),_("div")}const Cl=y(kl,[["render",wl]]),El={};function $l(t,e){return n(),_("div")}const Pl=y(El,[["render",$l]]),Tl={};function xl(t,e){return n(),_("div")}const Al=y(Tl,[["render",xl]]),Ll={};function Ml(t,e){return n(),_("div")}const Hl=y(Ll,[["render",Ml]]),Il={};function Bl(t,e){return n(),_("div")}const Rl=y(Il,[["render",Bl]]),Ol={};function Dl(t,e){return n(),_("div")}const Vl=y(Ol,[["render",Dl]]),Ul={};function Nl(t,e){return n(),_("div")}const Kl=y(Ul,[["render",Nl]]),Fl={};function Gl(t,e){return n(),_("div")}const zl=y(Fl,[["render",Gl]]),ql={};function Wl(t,e){return n(),_("div")}const jl=y(ql,[["render",Wl]]),Yl={};function Zl(t,e){return n(),_("div")}const Xl=y(Yl,[["render",Zl]]),Jl={};function Ql(t,e){return n(),_("div")}const td=y(Jl,[["render",Ql]]),ed={};function sd(t,e){return n(),_("div")}const od=y(ed,[["render",sd]]),id={},rd={viewBox:"0 0 11 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-trash"},nd=u("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),ad=[nd];function ld(t,e){return n(),_("svg",rd,ad)}const dd=y(id,[["render",ld]]),Re={components:{Article:nl,Book:dl,Course:hl,Dataset:ml,Event:Sl,FAQPage:vl,FactCheck:Cl,HowTo:Pl,JobPosting:Al,Movie:Hl,Music:Rl,Person:Vl,Product:Kl,Recipe:zl,Service:jl,SoftwareApplication:Xl,Video:td,WebPage:od,SvgArticle:hs,SvgBook:ps,SvgCircleQuestionMark:Nt,SvgCustomSchema:gs,SvgCopy:ms,SvgCourse:_s,SvgDataset:fs,SvgEvent:Ss,SvgEye:bt,SvgFaqPage:ys,SvgFactCheck:bs,SvgFile:vs,SvgFileEdit:ks,SvgGoogleSmall:ws,SvgHowTo:Cs,SvgJobPosting:Es,SvgMovie:$s,SvgMusic:Ps,SvgPencil:St,SvgPerson:Ts,SvgProduct:xs,SvgRecipe:As,SvgService:Ls,SvgSoftwareApplication:Ms,SvgTerminal:Hs,SvgTrash:dd,SvgVideo:Is,SvgWebPage:Bs}},cd={mixins:[Re],props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(){const{childGraphs:t,graphs:e}=ue();return{childGraphs:t,graphs:e}},computed:{graphLabel(){var i,s,o,r;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((r=this.graphs.find(h=>h.slug===t))==null?void 0:r.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(r=>{e||t===r.childGraphName&&(e=o,i=r.label,this.graphs.forEach(h=>{h.graphName===o&&(e=h.label)}))})}),e?e+" - "+i+" "+this.$t.__("(Default)",this.$td):t+" "+this.$t.__("(Default)",this.$td)}}},ud={class:"graph-container"},hd={class:"graph"},pd={class:"left"},gd=["title"],md={class:"right action-buttons"};function _d(t,e,i,s,o,r){return n(),_("div",ud,[u("div",hd,[u("div",pd,[(n(),f(B(r.graphIcon))),u("span",{title:r.graphLabel},m(r.graphLabel),9,gd)]),u("div",md,[q(t.$slots,"buttons")])])])}const Oe=y(cd,[["render",_d]]),fd={emits:["close"],mixins:[Re],components:{CoreBlur:Gt,CoreMainTabs:st,CoreModal:X,CoreTooltip:G,Cta:ke,GraphCard:Oe,SvgCirclePlus:Kt},setup(){const{graphs:t}=ue();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)}]}}},Sd={class:"title"},yd=["innerHTML"],bd={class:"schema-templates"},vd={class:"main"},kd={class:"schema-catalog"},wd={class:"graphs"};function Cd(t,e,i,s,o,r){const h=a("svg-circle-question-mark"),c=a("core-tooltip"),p=a("core-main-tabs"),S=a("base-input"),C=a("svg-circle-plus"),E=a("base-button"),v=a("graph-card"),b=a("core-blur"),k=a("cta"),M=a("core-modal");return n(),f(M,{classes:["aioseo-post-schema-modal-cta"],onClose:e[0]||(e[0]=L=>t.$emit("close"))},{headerTitle:d(()=>[u("div",Sd,m(o.strings.schemaGenerator),1),l(c,null,{tooltip:d(()=>[u("span",{innerHTML:o.strings.headerTooltip},null,8,yd)]),default:d(()=>[l(h)]),_:1})]),body:d(()=>[l(b,null,{default:d(()=>[l(p,{tabs:o.tabs,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":d(({tab:L})=>[(n(),f(B(L.icon)))]),_:1},8,["tabs"]),u("div",bd,[l(p,{tabs:o.templatesTabs,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":d(({tab:L})=>[(n(),f(B(L.icon)))]),_:1},8,["tabs"]),u("div",vd,[l(S,{class:"search",size:"medium",prependIcon:"search",placeholder:o.strings.searchSchema},null,8,["placeholder"]),u("div",kd,[u("div",wd,[(n(!0),_(K,null,et(s.graphs,(L,Q)=>(n(),f(v,{key:L.graphName+Q,graph:L},{buttons:d(()=>[l(E,{class:"small",type:"gray"},{default:d(()=>[l(C)]),_:1})]),_:2},1032,["graph"]))),128))])])])])]),_:1}),l(k,{"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":d(()=>[w(m(o.strings.ctaHeader),1)]),description:d(()=>[w(m(o.strings.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list"])]),_:1})}const Ed=y(fd,[["render",Cd]]),$d={setup(){return{postEditorStore:$()}},components:{CoreAlert:F,CoreSettingsRow:U,CoreTooltip:G,CtaModal:Ed,GraphCard:Oe,SvgEye:bt},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"}}},Pd={class:"graphs"},Td={key:0,class:"sidebar-description"},xd={class:"description"},Ad=["innerHTML"],Ld=["innerHTML"],Md={class:"buttons"};function Hd(t,e,i,s,o,r){const h=a("svg-eye"),c=a("base-button"),p=a("core-tooltip"),S=a("graph-card"),C=a("core-alert"),E=a("cta-modal"),v=a("core-settings-row");return n(),_("div",{class:P(["aioseo-tab-content aioseo-post-schema",[{sidebar:r.isSidebar}]])},[l(v,{name:o.strings.schemaInUse},{content:d(()=>[u("div",Pd,[r.isSidebar?(n(),_("div",Td,[u("p",xd,m(o.strings.sidebarDescription),1),u("p",{class:"description",innerHTML:t.$links.getDocLink(t.$constants.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,Ad)])):g("",!0),s.postEditorStore.currentPost.schema.default.graphName&&s.postEditorStore.currentPost.schema.default.isEnabled?(n(),f(S,{key:1,defaultGraph:s.postEditorStore.currentPost.schema.default.graphName},{buttons:d(()=>[l(p,{offset:r.isSidebar?"-70px,0":"0,0"},{tooltip:d(()=>[u("span",{innerHTML:o.strings.defaultGraphTooltip},null,8,Ld)]),default:d(()=>[l(c,{class:"small no-hover",type:"gray"},{default:d(()=>[l(h)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):g("",!0)]),u("div",Md,[!s.postEditorStore.currentPost.schema.default.graphName||!s.postEditorStore.currentPost.schema.default.isEnabled?(n(),f(C,{key:0,class:"no-graphs",type:"yellow"},{default:d(()=>[w(m(o.strings.noGraphs),1)]),_:1})):g("",!0),l(c,{class:"medium",type:"blue",onClick:e[0]||(e[0]=b=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:d(()=>[w(m(o.strings.generateSchema),1)]),_:1}),l(c,{class:"medium",type:"gray",onClick:e[1]||(e[1]=b=>{o.modalOpenMetabox=!0,o.modalOpenSidebar=!0})},{default:d(()=>[w(m(o.strings.validateSchema),1)]),_:1})]),l(E,{show:!r.isSidebar&&o.modalOpenMetabox,onClose:e[2]||(e[2]=b=>o.modalOpenMetabox=!1)},null,8,["show"]),l(E,{show:r.isSidebar&&o.modalOpenSidebar,onClose:e[3]||(e[3]=b=>o.modalOpenSidebar=!1)},null,8,["show"])]),_:1},8,["name"])],2)}const ae=y($d,[["render",Hd]]),Id={setup(){return{licenseStore:O()}},components:{Schema:ae,SchemaLite:ae},props:{parentComponentContext:String}},Bd={class:"aioseo-post-schema-view"};function Rd(t,e,i,s,o,r){const h=a("schema",!0),c=a("schema-lite");return n(),_("div",Bd,[s.licenseStore.isUnlicensed?g("",!0):(n(),f(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])),s.licenseStore.isUnlicensed?(n(),f(c,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):g("",!0)])}const Od=y(Id,[["render",Rd]]),De=t=>(ge("data-v-20175fdb"),t=t(),me(),t),Dd={class:"aioseo-seo-revision-list-item"},Vd={class:"aioseo-seo-revision-list-item__author"},Ud={class:"aioseo-seo-revision-list-item__author__avatar"},Nd={class:"aioseo-seo-revision-list-item__author__name"},Kd=De(()=>u("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),Fd={class:"aioseo-seo-revision-list-item__action"},Gd=De(()=>u("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),zd={class:"aioseo-seo-revision-list-item__action__view"},qd={class:"aioseo-seo-revision-list-item__action__delete"},Wd={__name:"ListItem",setup(t){const{currentUser:e}=he(dt());return(i,s)=>(n(),_("div",Dd,[u("div",Vd,[u("span",Ud,[l(W(Zs),{src:W(e).avatar.url,size:W(e).avatar.size},null,8,["src","size"])]),u("span",Nd,m(W(ze)(W(e).display_name,30)),1)]),Kd,u("div",Fd,[Gd,u("span",zd,[l(W(bt),{width:"18"})]),u("span",qd,[l(W(yt),{width:"18"})])])]))}},jd=y(Wd,[["__scopeId","data-v-20175fdb"]]),Yd={components:{SeoRevisionListItem:jd}},Zd={class:"aioseo-seo-revisions-list"};function Xd(t,e,i,s,o,r){const h=a("seo-revision-list-item");return n(),_("div",Zd,[(n(),_(K,null,et(13,c=>l(h,{key:"seo-revision-list-item-"+c})),64))])}const Jd=y(Yd,[["render",Xd],["__scopeId","data-v-7b502c37"]]),Qd={setup(){return{seoRevisionsStore:dt()}},components:{CoreBlur:Gt,CoreModal:X,CoreSettingsRow:U,SeoRevisionsList:Jd,SeoRevisionsUpsell:Xs,SvgRightArrowShort:zt},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)}}}},tc={key:0,class:"aioseo-seo-revisions-metabox"},ec={key:1,class:"aioseo-seo-revisions-sidebar"},sc={class:"aioseo-seo-revisions-sidebar__modal-body"},oc={class:"description"};function ic(t,e,i,s,o,r){const h=a("seo-revisions-list"),c=a("core-blur"),p=a("seo-revisions-upsell"),S=a("core-modal"),C=a("svg-right-arrow-short"),E=a("base-button"),v=a("core-settings-row");return t.$root._data.screenContext==="metabox"?(n(),_("div",tc,[l(c,null,{default:d(()=>[l(h)]),_:1}),l(p,{"parent-component-context":"metabox"})])):t.$root._data.screenContext==="sidebar"?(n(),_("div",ec,[l(S,{show:s.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=b=>s.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:d(()=>[w(m(o.strings.seoRevisions),1)]),body:d(()=>[u("div",sc,[l(c,null,{default:d(()=>[l(h)]),_:1}),l(p,{"parent-component-context":"modal"})])]),_:1},8,["show"]),l(v,{align:""},{name:d(()=>[w(m(o.strings.seoRevisions),1)]),description:d(()=>[u("p",oc,m(o.strings.description),1)]),content:d(()=>[l(E,{class:"gray small",onClick:e[1]||(e[1]=H(b=>s.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:d(()=>[l(C,{width:"10"}),w(" "+m(o.strings.button),1)]),_:1})]),_:1})])):g("",!0)}const le=y(Qd,[["render",ic],["__scopeId","data-v-5273d1c7"]]),rc={setup(){return{licenseStore:O()}},data(){return{license:mt}},components:{SeoRevisions:le,SeoRevisionsLite:le},props:{parentComponentContext:String}},nc={class:"aioseo-seo-revisions aioseo-tab-content"};function ac(t,e,i,s,o,r){const h=a("seo-revisions",!0),c=a("seo-revisions-lite");return n(),_("div",nc,[!s.licenseStore.isUnlicensed&&o.license.hasCoreFeature("seo-revisions")?(n(),f(h,{key:0,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"])):(n(),f(c,{key:1,parentComponentContext:i.parentComponentContext},null,8,["parentComponentContext"]))])}const lc=y(rc,[["render",ac],["__scopeId","data-v-5e3c402f"]]),dc={__name:"CountBadge",setup(t){const{itemsTotalCount:e}=he(dt()),i=ts(()=>99<e.value?"99+":e.value);return(s,o)=>W(e)?(n(),_("span",{key:0,class:P(["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<W(e)}])},m(i.value),3)):g("",!0)}},cc={},uc={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"},hc=u("path",{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"},null,-1),pc=[hc];function gc(t,e){return n(),_("svg",uc,pc)}const mc=y(cc,[["render",gc]]),_c={},fc={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"},Sc=u("path",{d:"M7.00016 0.833334C3.32016 0.833334 0.333496 3.82 0.333496 7.5C0.333496 11.18 3.32016 14.1667 7.00016 14.1667C10.6802 14.1667 13.6668 11.18 13.6668 7.5C13.6668 3.82 10.6802 0.833334 7.00016 0.833334ZM7.66683 10.8333H6.3335V9.5H7.66683V10.8333ZM7.66683 8.16667H6.3335V4.16667H7.66683V8.16667Z",fill:"currentColor"},null,-1),yc=[Sc];function bc(t,e){return n(),_("svg",fc,yc)}const vc=y(_c,[["render",bc]]),kc={},wc={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"},Cc=u("path",{d:"M11 1.83325L10 0.833252L9 1.83325L8 0.833252L7 1.83325L6 0.833252L5 1.83325L4 0.833252L3 1.83325L2 0.833252L1 1.83325L0 0.833252V14.1666L1 13.1666L2 14.1666L3 13.1666L4 14.1666L5 13.1666L6 14.1666L7 13.1666L8 14.1666L9 13.1666L10 14.1666L11 13.1666L12 14.1666V0.833252L11 1.83325ZM1.33333 12.2266V2.77328H10.6667V12.2266H1.33333ZM10 10.8333V9.49992H2V10.8333H10ZM10 6.83325V8.16659H2V6.83325H10ZM10 5.49992V4.16658H2V5.49992H10Z",fill:"currentColor"},null,-1),Ec=[Cc];function $c(t,e){return n(),_("svg",wc,Ec)}const Pc=y(kc,[["render",$c]]),Tc={},xc={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"},Ac=u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.26625 4.7737L1.73375 0.249954L0.5 1.4837L5.02375 6.00745L6.26625 4.7737ZM9.6875 0.249954L11.4725 2.03495L0.5 13.0162L1.73375 14.25L12.715 3.27745L14.5 5.06245V0.249954H9.6875ZM8.74251 9.71747L9.97626 8.48372L12.715 11.2225L14.5 9.43746V14.25H9.68751L11.4813 12.4562L8.74251 9.71747Z",fill:"currentColor"},null,-1),Lc=[Ac];function Mc(t,e){return n(),_("svg",xc,Lc)}const Hc=y(Tc,[["render",Mc]]),Ic={setup(){return{licenseStore:O(),postEditorStore:$(),redirectsStore:qe(),rootStore:Z(),settingsStore:Y(),seoRevisionsStore:dt()}},components:{Advanced:Eo,Alert:xe,CoreMainTabs:st,CoreModal:X,General:Ie,LinkAssistant:pa,ModalContent:Ka,Redirects:ol,Schema:Od,SeoRevisions:lc,SeoRevisionsCountBadge:dc,Social:Be,SvgBackup:mc,SvgBuild:js,SvgCaret:ft,SvgCircleInformationSolid:vc,SvgClose:Rt,SvgLinkSuggestion:qt,SvgReceipt:Pc,SvgRedirectCrossedArrows:Hc,SvgSettings:Se,SvgShare:Te},data(){return{activeTab:"general",modal:!1,strings:{pageName:"General",modalTitle:this.$t.__("Preview Snippet Editor",this.$td)},activeMainSidebarTab:"",isPageBuilderEditor:gt}},watch:{"postEditorStore.currentPost":{deep:!0,handler(){je(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&&!gt()&&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"&&j(this.getTabPermission(t.slug))):this.tabs.filter(t=>j(this.getTabPermission(t.slug))?!0:t.slug==="general"&&(j("aioseo_page_analysis")||j(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:[ro],created(){switch(this.modal=at()["aioseo-modaltab"]||this.modal,this.modal&&(this.settingsStore.changeTabSettings({setting:"modal",value:this.modal}),this.postEditorStore.currentPost.modalOpen=!0,setTimeout(()=>{Ht("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=at()["aioseo-tab"]||this.initTab,this.settingsStore.changeTabSettings({setting:"main",value:this.activeTab}),setTimeout(()=>{Ht("aioseo-tab")},500);break}},beforeMount(){const t=document.querySelector(".interface-complementary-area__pin-unpin-item");t&&t!==null&&(t.style.display="block")},mounted(){_t()&&!this.licenseStore.isUnlicensed&&this.watchObjectRevisionsOnSavePost()}},Bc={class:"aioseo-app aioseo-post-settings"},Rc={key:0,class:"aioseo-sidepanel"},Oc=["onClick"],Dc={class:"name"},Vc={key:0,class:"aioseo-tab-title"};function Uc(t,e,i,s,o,r){const h=a("core-main-tabs"),c=a("svg-circle-information-solid"),p=a("svg-caret"),S=a("svg-close"),C=a("alert"),E=a("modal-content"),v=a("core-modal");return n(),_("div",Bc,[t.$root._data.screenContext!=="sidebar"?(n(),f(h,{key:0,tabs:r.getTabs,showSaveButton:!1,active:o.activeTab,internal:"",disableMobile:"",onChanged:e[0]||(e[0]=b=>r.processChangeTab(b))},{"var-tab-icon":d(({tab:b})=>[(n(),f(B(b.icon),{class:P([{warning:b.warning}])},null,8,["class"])),(n(),f(B(b.badge)))]),_:1},8,["tabs","active"])):g("",!0),l(lt,{name:"route-fade",mode:"out-in"},{default:d(()=>[t.$root._data.screenContext==="sidebar"&&o.activeTab===null?(n(),_("div",Rc,[(n(!0),_(K,null,et(r.getTabs,(b,k)=>(n(),_("a",{key:k,class:"aioseo-sidepanel-button",href:"#",onClick:H(M=>r.processChangeTab(b.slug),["prevent"])},[(n(),f(B(b.icon),{class:"icon"})),u("div",Dc,m(b.name),1),(n(),f(B(b.badge))),b.warning?(n(),f(c,{key:0,width:"15",height:"15"})):g("",!0),l(p)],8,Oc))),128))])):g("",!0)]),_:1}),l(lt,{name:"route-fade",mode:"out-in"},{default:d(()=>[o.activeTab?(n(),_("div",{key:o.activeTab,class:P(["aioseo-tab",{"is-page-builder":!!s.rootStore.aioseo.integration}])},[t.$root._data.screenContext==="sidebar"?(n(),_("div",Vc,[u("span",null,m(r.getTabName(o.activeTab)),1),l(S,{onClick:e[1]||(e[1]=b=>r.processChangeTab(null))})])):g("",!0),this.$root._data.screenContext==="sidebar"?(n(),f(C,{key:1})):g("",!0),(n(),f(B(o.activeTab),{parentComponentContext:"metabox",onChangeTab:e[2]||(e[2]=b=>r.processChangeTab(b))},null,32))],2)):g("",!0)]),_:1}),l(v,{show:s.postEditorStore.currentPost.modalOpen&&t.$root._data.screenContext==="sidebar",onClose:r.closeModal,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:d(()=>[w(m(o.strings.modalTitle),1)]),body:d(()=>[l(E)]),_:1},8,["show","onClose"])])}const Nc=y(Ic,[["render",Uc]]),Kc={setup(){return{postEditorStore:$()}},components:{Alert:xe,MainView:Nc},mixins:[os],data(){return{scrollContainer:".interface-interface-skeleton__content",scrollTimeout:1e3,ScrollAndHighlightTimeout:2e3}}};function Fc(t,e,i,s,o,r){const h=a("alert"),c=a("main-view");return n(),_("div",{onClick:e[0]||(e[0]=H(()=>{},["stop"])),id:"main-settings-cont"},[this.$root._data.screenContext!=="sidebar"?(n(),f(h,{key:0})):g("",!0),s.postEditorStore.currentPost.id?(n(),f(c,{key:1})):g("",!0)])}const Uu=y(Kc,[["render",Fc]]);export{Uu as A};