文件操作 - App.0f5c0305.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/ltlcompare.com/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/App.0f5c0305.js
编辑文件内容
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__aioseoDynamicImportPreload__("js/vendor-lottie.9356ecad.js"),window.__aioseoDynamicImportPreload__("js/vendor-other.2cdd5822.js"),window.__aioseoDynamicImportPreload__("js/extend-block-editor.c5187e68.js"),window.__aioseoDynamicImportPreload__("js/app-core.82d0a9b8.js"),window.__aioseoDynamicImportPreload__("js/vendor-vue-ui.02763c14.js"),window.__aioseoDynamicImportPreload__("css/vendor-vue-ui.dbee72c8.css"),window.__aioseoDynamicImportPreload__("js/vendor-datetime.430013a3.js"),window.__aioseoDynamicImportPreload__("js/vendor-lodash.f9514987.js"),window.__aioseoDynamicImportPreload__("js/utils.825d3528.js"),window.__aioseoDynamicImportPreload__("js/icon.6c0bd3d8.js")])))=>i.map(i=>d[i]); import{as as h,f as r,i as v,Q as y,M as f,v as c,R as u,j as l,O as re,a0 as p,ae as P,U as _,r as N,b as We,I as As,u as q,w as Ie,ac as Go,aA as io,Y as ao,ad as xe,S as ae,T as te,V as Ls,af as Lt,P as Q,n as He,o as Bt,ap as Bs,h as Ms,B as Oe,a4 as rt,e as zo,aF as wo,g as No,ay as Rs,aj as So,av as jo}from"./vendor-vue-ui.02763c14.js";/* empty css */import{b as Pe,k as ge,d as se,G as fe,u as J,aE as Os,aD as Hs,x as Ke,aX as lo,j as Ce,Y as Je,aB as Ae,Q as Re,B as we,t as $e,s as Fe,_ as Ve,ac as at,bk as Vs,h as Le,aG as Pt,I as $s,bl as et,F as Wo,bm as Mt,bn as Kt,K as Ne,bo as Ds,bp as Us,bq as Ks,br as Fs,bi as Rt,bs as qs,bt as Gs,bu as zs,bv as Ns,T as Zo,bw as js,bx as Yo,by as Ws,bz as Zs,bA as Ys,bB as Xs,bC as Qs,bD as Js,bE as en,bF as tn,bG as on,bH as sn,bI as nn,N as rn,z as it,ba as an,aq as ln,i as Ft,O as co,ap as qt,n as cn,e as Xo,az as dn,w as un,X as yt,D as uo,c as pn,bJ as Qo,m as Ot,S as gn,aC as Jo,g as Tt,r as to,bK as mn,ao as hn}from"./app-core.82d0a9b8.js";import{u as _n}from"./ScrollAndHighlight.e8828a09.js";import{C as fn,a as yn}from"./LicenseKeyBar.18bb2e13.js";import{_ as A}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as es,C as Se}from"./Button.b03184b6.js";import{a as vn}from"./icon.6c0bd3d8.js";import{_ as a,X as bn,Y as kn,$ as wn,J as oo,a0 as Sn,a as G,c as po,a1 as Cn,h as ot}from"./vendor-other.2cdd5822.js";import{C as me}from"./Index.a7b56d13.js";import{C as le}from"./Index.ab3a7ebe.js";import{b as lt,a as Ht,S as xn}from"./Pencil.b091de6b.js";import{C as pe}from"./SettingsRow.b0f20d96.js";import{B as ct}from"./Checkbox.e9c7109b.js";import{G as Pn,a as Tn}from"./Row.42f1b009.js";import{u as En}from"./Url.98506653.js";import{C as Ze}from"./CreditCounter.1114c9bf.js";import{C as de}from"./Tooltip.16bec62e.js";import{S as qe}from"./Close.ed64f0a2.js";import{S as dt}from"./CheckSolid.12f45fae.js";import{B as Co}from"./Textarea.a6cf2891.js";import{S as je,_ as ut}from"./Trash.9c01fca5.js";import{S as Vt}from"./AiContent.f9a3ca96.js";import{S as In}from"./Simple.b8e87454.js";import{x as An,y as Ln,l as xt,z as Bn,m as ts}from"./vendor-lodash.f9514987.js";import{S as pt}from"./Plus.1acb1230.js";import{B as Mn}from"./HighlightToggle.2b6a259c.js";import{C as Ue}from"./Tabs.8e508d9e.js";import{_ as Rn}from"./Cta.e1675955.js";import{C as gt}from"./Blur.a74558b3.js";import{u as go}from"./MaxCounts.b6c015d6.js";import{S as $t}from"./Caret.1dd03f59.js";import{S as mo}from"./Ellipse.f21cbcd1.js";import{S as mt}from"./Eye.b9334231.js";import{u as ho}from"./TruSeoScore.8cda3e8e.js";import{S as On}from"./Statistics.7e4f8c20.js";import{B as os}from"./RadioToggle.51982cf9.js";import{C as Hn}from"./GoogleSearchPreview.d41069ca.js";import{C as Et}from"./HtmlTagsEditor.9105e4cd.js";import{T as Vn}from"./Slide.59825bf3.js";import{C as $n}from"./ProBadge.e8abb23c.js";import{S as Dn,a as Un}from"./Mobile.5775b6c3.js";import{u as Kn}from"./Cta.bb7712a9.js";import{u as Fn}from"./GoogleSearchConsole.66da0b81.js";import{_ as qn}from"./ConnectCta.a049044b.js";import{C as _o}from"./Index.d16c1162.js";import{G as so}from"./Graph.5f8fef63.js";import{u as ss}from"./WpTable.f1cd732f.js";import{C as fo}from"./Table.3adae4ef.js";import{R as ns}from"./RequiredPlans.db82a3fa.js";import{u as Gn}from"./PostTypes.b1cb8150.js";import{S as rs}from"./External.7661144f.js";import{b as zn,S as Nn,a as jn}from"./InternalOutbound.eed09880.js";import{S as is}from"./Settings.a6fe5e74.js";import{S as as,a as Wn}from"./Build.32c5d71f.js";import{C as ls}from"./Index.0c668a12.js";import{_ as Zn}from"./Redirects.58f5d805.js";import{u as Yn}from"./Index.e719a21f.js";import{B as Xn,n as Gt,o as Qn,i as Jn,h as er,p as tr,g as or,f as sr,j as nr,q as rr,r as ir,s as ar,e as lr,t as cr,d as dr,c as ur,b as pr,u as gr,a as mr,v as hr,w as _r,x as fr,l as yr,k as vr,y as br}from"./Input.07427c66.js";import{B as kr}from"./Toggle.a8bd36f4.js";import{U as wr,S as Sr}from"./Upsell.181129af.js";import{u as cs}from"./Image.05a54bc2.js";import{C as Cr}from"./FacebookPreview.228c8d04.js";import{C as ds}from"./ImageUploader.56866b52.js";import{C as xr}from"./TwitterPreview.9bc35db8.js";const Pr={setup(){return{licenseStore:ge(),rootStore:Pe()}},components:{CoreApiBar:yn,CoreLicenseKeyBar:fn}};function Tr(o,e,s,t,i,n){const m=h("core-api-bar"),d=h("core-license-key-bar");return r(),v("div",null,[t.rootStore.pong?f("",!0):(r(),y(m,{key:0})),t.rootStore.isPro&&t.licenseStore.isUnlicensed&&t.rootStore.pong?(r(),y(d,{key:1})):f("",!0)])}const us=A(Pr,[["render",Tr]]),ps="all-in-one-seo-pack",Er={placeholder:a("Type / to choose a block or // to use AI Assistant",ps)};let vt=null;const It=(o,e)=>o&&o.name==="core/paragraph"&&!e.getBlockRootClientId(o.clientId),Ir=({aiAssistantStore:o})=>{if(!o.extend.paragraphPlaceholder)return;const{addFilter:e}=window.wp?.hooks||{},{select:s}=window.wp?.data||{};!e||!s||e("editor.BlockEdit","aioseo/paragraph-placeholder",bn(t=>i=>{const n=s("core/block-editor");return!o.isBlockAvailable||!It(i,n)?oo.createElement(t,i):oo.createElement(t,{...i,attributes:{...i.attributes,placeholder:i.attributes.placeholder||Er.placeholder}})},"aioseoExtendParagraphPlaceholder"))},Ar=({aiAssistantStore:o})=>{if(!o.extend.paragraphPlaceholder)return;const{select:e,dispatch:s}=window.wp?.data||{},{createBlock:t}=window.wp?.blocks||{};if(!e||!s||!t)return;const i=e("core/block-editor"),n=i.getSelectedBlock();if(!It(n,i))return;if((n.attributes?.content||"").trim()==="//"&&i.getSelectionEnd()?.offset===2){const g=t("aioseo/ai-assistant");s("core/block-editor").replaceBlock(n.clientId,g)}},Lr=({aiAssistantStore:o})=>{if(!o.extend.blockEditorInserterButton)return;if(!vt){const m=document.createElement("div"),d=kn.createRoot(m);wn.flushSync(()=>{d.render(oo.createElement(Sn,{className:"aioseo-ai-assistant-inserter-btn",icon:vn,iconSize:"18",variant:"secondary",size:"small",__next40pxDefaultSize:!0,title:a("Insert AI Assistant Block",ps),style:{marginLeft:"8px",verticalAlign:"top",padding:"0",minWidth:"auto",width:"24px",backgroundColor:"#fff",display:"inline-flex"}}))}),vt=m.firstChild?.cloneNode(!0),vt.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation();const b=window.wp?.data?.select,C=window.wp?.data?.dispatch,{createBlock:S}=window.wp?.blocks||{};if(!b||!C||!S)return;const x=S("aioseo/ai-assistant"),k=b("core/block-editor"),E=k.getSelectedBlock();if(It(E,k)&&!E?.attributes?.content?.trim())C("core/block-editor").replaceBlock(E.clientId,x);else{const R=k.getBlockInsertionPoint()||{};C("core/block-editor").insertBlock(x,R.index,R.rootClientId)}}),m.remove()}const{select:e}=window.wp?.data||{};if(!e)return;const s=document.getElementById("editor");if(!s)return;const t=e("core/block-editor"),i=t.getSelectedBlock(),n=s.querySelector(".aioseo-ai-assistant-inserter-btn");if(!It(i,t)){n?.remove();return}setTimeout(()=>{if(s.querySelector(".aioseo-ai-assistant-inserter-btn"))return;const m=s.querySelector(".block-editor-inserter__toggle");!m||m.closest(".is-vertical")||m.after(vt)})},Br=["innerHTML"],Mr={__name:"Breadcrumbs",setup(o){const e="all-in-one-seo-pack",s=ge(),t={breadcrumbsUpsell:G(a("Breadcrumbs is a %1$s feature. %2$s",e),"PRO",se.getUpsellLink("post-settings","breadcrumbs",fe.learnMore,"breadcrumbs",!0))};return(i,n)=>c(s).isUnlicensed?(r(),y(c(le),{key:0,class:"inline-upsell",type:"blue"},{default:u(()=>[l("div",{innerHTML:t.breadcrumbsUpsell},null,8,Br)]),_:1})):f("",!0)}},zt=A(Mr,[["__scopeId","data-v-b393e975"]]),Rr={class:"aioseo-post-breadcrumbs-view"},Or={class:"bd"},Hr={__name:"Breadcrumbs",props:{parentComponentContext:String},setup(o){const e="all-in-one-seo-pack",s=ge(),t=N(!1),i={editBreadcrumbsLabel:a("Edit Breadcrumbs",e),modalTitle:a("Breadcrumbs",e)};return(n,m)=>(r(),v("div",Rr,[c(s).isUnlicensed?f("",!0):(r(),v(re,{key:0},[n.$root.$data.screenContext==="sidebar"?(r(),y(c(es),{key:0,class:"edit-snippet gray small",onClick:m[0]||(m[0]=d=>t.value=!0)},{default:u(()=>[p(c(lt)),P(" "+_(i.editBreadcrumbsLabel),1)]),_:1})):f("",!0),n.$root.$data.screenContext!=="sidebar"?(r(),y(c(zt),{key:1,parentComponentContext:o.parentComponentContext},null,8,["parentComponentContext"])):f("",!0),p(c(me),{show:t.value,onClose:m[1]||(m[1]=d=>t.value=!1)},{headerTitle:u(()=>[P(_(i.modalTitle),1)]),body:u(()=>[l("div",Or,[p(c(zt),{parentComponentContext:o.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"])],64)),c(s).isUnlicensed?(r(),y(c(zt),{key:1,parentComponentContext:o.parentComponentContext},null,8,["parentComponentContext"])):f("",!0)]))}},Vr=A(Hr,[["__scopeId","data-v-34e6f863"]]),_e="all-in-one-seo-pack",$r={setup(){return{postEditorStore:J()}},components:{BaseCheckbox:ct,GridColumn:Tn,GridRow:Pn},data(){return{strings:{useDefaultSettings:a("Use Default Settings",_e),robotsMeta:a("Robots meta:",_e),maxSnippet:a("Max Snippet",_e),maxVideoPreview:a("Max Video Preview",_e),maxImagePreview:a("Max Image Preview",_e),standard:a("Standard",_e),none:a("None",_e),large:a("Large",_e),noindex:a("No Index",_e),nofollow:a("No Follow",_e),noarchive:a("No Archive",_e),notranslate:a("No Translate",_e),noimageindex:a("No Image Index",_e),nosnippet:a("No Snippet",_e),noodp:a("No ODP",_e)}}},computed:{imagePreviewOptions(){return[{label:this.strings.none,value:"none"},{label:this.strings.standard,value:"standard"},{label:this.strings.large,value:"large"}]}},methods:{getImagePreview(o){return this.imagePreviewOptions.find(e=>e.value===o)}}},Dr={class:"aioseo-robots-meta"},Ur={key:0,class:"global-robots-settings aioseo-description"},Kr={class:"robots-meta-title"},Fr={class:"global-robots-settings-options"},qr={key:0,class:"aioseo-description max-snippet"},Gr={class:"aioseo-description max-video-preview"},zr={key:1,class:"aioseo-description max-image-preview"};function Nr(o,e,s,t,i,n){const m=h("base-toggle"),d=h("base-checkbox"),g=h("grid-column"),b=h("grid-row"),C=h("base-input"),S=h("base-select");return r(),v("div",Dr,[p(m,{modelValue:t.postEditorStore.currentPost.default,"onUpdate:modelValue":e[0]||(e[0]=x=>t.postEditorStore.currentPost.default=x)},{default:u(()=>[P(_(i.strings.useDefaultSettings),1)]),_:1},8,["modelValue"]),t.postEditorStore.currentPost.default?f("",!0):(r(),v("div",Ur,[l("span",Kr,_(i.strings.robotsMeta),1),p(b,{class:"settings"},{default:u(()=>[t.postEditorStore.currentPost.isHomePage?f("",!0):(r(),y(g,{key:0,xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.noindex,"onUpdate:modelValue":e[1]||(e[1]=x=>t.postEditorStore.currentPost.noindex=x)},{default:u(()=>[P(_(i.strings.noindex),1)]),_:1},8,["modelValue"])]),_:1})),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.nofollow,"onUpdate:modelValue":e[2]||(e[2]=x=>t.postEditorStore.currentPost.nofollow=x)},{default:u(()=>[P(_(i.strings.nofollow),1)]),_:1},8,["modelValue"])]),_:1}),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.noarchive,"onUpdate:modelValue":e[3]||(e[3]=x=>t.postEditorStore.currentPost.noarchive=x)},{default:u(()=>[P(_(i.strings.noarchive),1)]),_:1},8,["modelValue"])]),_:1}),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.notranslate,"onUpdate:modelValue":e[4]||(e[4]=x=>t.postEditorStore.currentPost.notranslate=x)},{default:u(()=>[P(_(i.strings.notranslate),1)]),_:1},8,["modelValue"])]),_:1}),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.noimageindex,"onUpdate:modelValue":e[5]||(e[5]=x=>t.postEditorStore.currentPost.noimageindex=x)},{default:u(()=>[P(_(i.strings.noimageindex),1)]),_:1},8,["modelValue"])]),_:1}),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.nosnippet,"onUpdate:modelValue":e[6]||(e[6]=x=>t.postEditorStore.currentPost.nosnippet=x)},{default:u(()=>[P(_(i.strings.nosnippet),1)]),_:1},8,["modelValue"])]),_:1}),p(g,{xl:"3",md:"4",sm:"6"},{default:u(()=>[p(d,{size:"medium",modelValue:t.postEditorStore.currentPost.noodp,"onUpdate:modelValue":e[7]||(e[7]=x=>t.postEditorStore.currentPost.noodp=x)},{default:u(()=>[P(_(i.strings.noodp),1)]),_:1},8,["modelValue"])]),_:1})]),_:1}),l("div",Fr,[t.postEditorStore.currentPost.nosnippet?f("",!0):(r(),v("div",qr,[l("span",null,_(i.strings.maxSnippet),1),p(C,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxSnippet,"onUpdate:modelValue":e[8]||(e[8]=x=>t.postEditorStore.currentPost.maxSnippet=x)},null,8,["modelValue"])])),l("div",Gr,[l("span",null,_(i.strings.maxVideoPreview),1),p(C,{type:"number",size:"medium",modelValue:t.postEditorStore.currentPost.maxVideoPreview,"onUpdate:modelValue":e[9]||(e[9]=x=>t.postEditorStore.currentPost.maxVideoPreview=x)},null,8,["modelValue"])]),t.postEditorStore.currentPost.noimageindex?f("",!0):(r(),v("div",zr,[l("span",null,_(i.strings.maxImagePreview),1),p(S,{size:"medium",options:n.imagePreviewOptions,modelValue:n.getImagePreview(t.postEditorStore.currentPost.maxImagePreview),"onUpdate:modelValue":e[10]||(e[10]=x=>{t.postEditorStore.currentPost.maxImagePreview=x.value})},null,8,["options","modelValue"])]))])]))])}const jr=A($r,[["render",Nr]]),ye="all-in-one-seo-pack",Wr={setup(){const{decodeUrl:o}=En();return{licenseStore:ge(),optionsStore:Ke(),postEditorStore:J(),decodeUrl:o}},components:{Breadcrumbs:Vr,CoreAlert:le,CoreSettingsRow:pe,CoreSingleRobotsMeta:jr},props:{disabled:{type:Boolean,default(){return!1}},type:{type:String,required:!1},object:{type:Object,required:!1}},data(){return{strings:{pageName:a("Advanced",ye),robotsMeta:a("Robots Meta",ye),breadcrumbs:a("Breadcrumbs",ye),canonicalUrl:a("Canonical URL",ye),validUrl:a("Please enter a valid URL.",ye),placeholder:a("Enter custom canonical URL",ye),priorityScore:a("Priority Score",ye),priority:a("Priority",ye),frequency:a("Frequency",ye),priorityFrequencyUpsell:G(a("Priority Score is a %1$s feature. %2$s",ye),"PRO",se.getUpsellLink("post-settings","priority-frequency",fe.learnMore,"liteUpgrade",!0)),keywords:a("Keywords",ye),tagPlaceholder:a("Press enter to create a keyword",ye)},error:!1}},computed:{getPriorityOptions(){return[{label:a("default",ye),value:"default"}].concat(Hs)},getFrequencyOptions(){return[{label:a("default",ye),value:"default"}].concat(Os)}},methods:{getPriority(o){return o=o!=="default"?parseFloat(o):o,this.getPriorityOptions.find(e=>e.value===o)},savePriority(o){this.postEditorStore.currentPost.priority=o},getFrequency(o){return this.getFrequencyOptions.find(e=>e.value===o)},saveFrequency(o){this.postEditorStore.currentPost.frequency=o},inputEventDecodeUrl(o){const e=o.target.value;this.postEditorStore.currentPost.canonicalUrl="",this.postEditorStore.currentPost.canonicalUrl=this.decodeUrl(e)}}},Zr={class:"aioseo-tab-content aioseo-post-advanced"},Yr={class:"selectbox-row"},Xr={class:"select"},Qr={class:"select"},Jr=["innerHTML"];function ei(o,e,s,t,i,n){const m=h("core-single-robots-meta"),d=h("core-settings-row"),g=h("breadcrumbs"),b=h("base-input"),C=h("core-alert"),S=h("base-select");return r(),v("div",Zr,[p(d,{id:"aioseo-post-robots-setting",name:i.strings.robotsMeta,align:""},{content:u(()=>[p(m)]),_:1},8,["name"]),p(d,{id:"aioseo-post-breadcrumbs-setting",name:i.strings.breadcrumbs,align:""},{content:u(()=>[p(g)]),_:1},8,["name"]),p(d,{id:"aioseo-post-canonical-url",name:i.strings.canonicalUrl,align:""},{content:u(()=>[p(b,{ref:"canonicalUrlInput",type:"text",size:"medium",placeholder:i.strings.placeholder,modelValue:t.postEditorStore.currentPost.canonicalUrl,"onUpdate:modelValue":e[0]||(e[0]=x=>t.postEditorStore.currentPost.canonicalUrl=x),onInput:n.inputEventDecodeUrl},null,8,["placeholder","modelValue","onInput"]),i.error?(r(),y(C,{key:0,class:"cannonical-url-error",type:"red",size:"small"},{default:u(()=>[P(_(i.strings.validUrl),1)]),_:1})):f("",!0)]),_:1},8,["name"]),p(d,{name:i.strings.priorityScore,align:""},{content:u(()=>[l("div",Yr,[l("div",Xr,[l("span",null,_(i.strings.priority),1),p(S,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:n.getPriorityOptions,modelValue:t.licenseStore.isUnlicensed?n.getPriority("default"):n.getPriority(t.postEditorStore.currentPost.priority),"onUpdate:modelValue":e[1]||(e[1]=x=>t.licenseStore.isUnlicensed?null:n.savePriority(x.value))},null,8,["disabled","options","modelValue"])]),e[4]||(e[4]=l("div",{class:"separator"},[l("span"),P(" - ")],-1)),l("div",Qr,[l("span",null,_(i.strings.frequency),1),p(S,{disabled:t.licenseStore.isUnlicensed,size:"medium",options:n.getFrequencyOptions,modelValue:t.licenseStore.isUnlicensed?n.getFrequency("default"):n.getFrequency(t.postEditorStore.currentPost.frequency),"onUpdate:modelValue":e[2]||(e[2]=x=>t.licenseStore.isUnlicensed?null:n.saveFrequency(x.value))},null,8,["disabled","options","modelValue"])])]),t.licenseStore.isUnlicensed?(r(),y(C,{key:0,class:"inline-upsell",type:"blue"},{default:u(()=>[l("div",{innerHTML:i.strings.priorityFrequencyUpsell},null,8,Jr)]),_:1})):f("",!0)]),_:1},8,["name"]),t.optionsStore.options.searchAppearance.advanced.useKeywords?(r(),y(d,{key:0,name:i.strings.keywords,align:""},{content:u(()=>[p(S,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.keywords||[],modelValue:t.postEditorStore.currentPost.keywords||[],"onUpdate:modelValue":e[3]||(e[3]=x=>t.postEditorStore.currentPost.keywords=x),"tag-placeholder":i.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):f("",!0)])}const ti=A(Wr,[["render",ei]]),ce="all-in-one-seo-pack",no={aiAssistant:{slug:"ai-assistant",svg:"ai-content",strings:{name:a("AI Assistant",ce),description:a("Leverage AI to generate high-quality, relevant content for your post quickly and efficiently.",ce),buttonSubmit:a("Generate Content",ce)},excludedPostTypes:[],isPopular:!0,clickCallback:()=>{const{wp:o}=window,e=o.data.select("core/block-editor"),s=o.data.dispatch("core/block-editor"),t=e.getBlockInsertionPoint()||{};if(e.canInsertBlockType("aioseo/ai-assistant",t.rootClientId)){s.insertBlock(o.blocks.createBlock("aioseo/ai-assistant"),t.index,t.rootClientId);return}const n=e.getSelectedBlockClientId();if(n){const m=e.getBlockHierarchyRootClientId(n),d=e.getBlockIndex(m);s.insertBlock(o.blocks.createBlock("aioseo/ai-assistant"),d+1)}else s.insertBlock(o.blocks.createBlock("aioseo/ai-assistant"))}},imageGenerator:{slug:"image-generator",svg:"image-generator",strings:{name:a("Image Generator",ce),description:a("Generate AI-powered images from text prompts to visually enhance your content and capture attention.",ce),buttonSubmit:a("Generate Image",ce)},excludedPostTypes:[],isPopular:!0},socialPosts:{slug:"social-posts",svg:"repurpose-content",strings:{name:a("Social Posts",ce),description:a("Generate posts you can easily share on social media so you can reach a broader audience.",ce),buttonSubmit:a("Generate Social Posts",ce)},excludedPostTypes:[]},faqs:{slug:"faqs",svg:"faq",strings:{name:a("FAQs",ce),description:a("Generate helpful FAQs based on your content to enhance user engagement and boost SEO.",ce),buttonSubmit:a("Generate FAQs",ce)},excludedPostTypes:[]},keyPoints:{slug:"key-points",svg:"key-points",strings:{name:a("Key Points",ce),description:a("Extract and summarize the key points from your content to provide quick insights and improve readability.",ce),buttonSubmit:a("Generate Key Points",ce)},excludedPostTypes:[]},metaTitle:{slug:"meta-title",svg:"meta-title",strings:{name:a("SEO Titles",ce),description:a("Generate a compelling SEO title for your post to improve click-through rates and search engine visibility.",ce),buttonSubmit:a("Generate SEO Titles",ce)},excludedPostTypes:[]},metaDescription:{slug:"meta-description",svg:"meta-description",strings:{name:a("Meta Descriptions",ce),description:a("Stand out in search results with a meta description that sparks curiosity and drives clicks to your content.",ce),buttonSubmit:a("Generate Meta Descriptions",ce)},excludedPostTypes:[]}},oi=()=>{const o=lo(),e=J();return Object.values(no).filter(s=>s.slug==="ai-assistant"?o.isBlockEnabled&&Ce():!(e?.currentPost?.postType&&s.excludedPostTypes.includes(e.currentPost.postType)))},gs=o=>{if(Ce())return o;if(Je()){let e=function(s){s.clipboardData.setData("text/html",o),s.clipboardData.setData("text/plain",o),s.preventDefault()};document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}return o},si=""+window.__aioseoDynamicImportPreload__("images/email.68284f07.png"),ni=""+window.__aioseoDynamicImportPreload__("images/facebook.7369f328.png"),ri=""+window.__aioseoDynamicImportPreload__("images/faq.2449fe7f.png"),ii=""+window.__aioseoDynamicImportPreload__("images/instagram.fd98caa8.png"),ai=""+window.__aioseoDynamicImportPreload__("images/keypoints.093999e0.png"),li=""+window.__aioseoDynamicImportPreload__("images/linkedin.3655379a.png"),ci=""+window.__aioseoDynamicImportPreload__("images/meta-title.ed692631.png"),di=""+window.__aioseoDynamicImportPreload__("images/meta-description.b3bbc445.png"),ui=""+window.__aioseoDynamicImportPreload__("images/twitter.deb7793c.png"),pi={class:"aioseo-ai-content-loader"},gi={class:"aioseo-ai-content-loader-image"},mi=["src","alt"],hi={class:"aioseo-ai-content-loader-text"},_i={class:"loading-container"},fi={class:"loading-text"},ht={__name:"Loader",props:{loaders:{type:Array,required:!0,validator:o=>o.every(e=>typeof e.name=="string"&&typeof e.icon=="string")}},setup(o){const e=o,s=Ae(),t=N(0),i=()=>{t.value=(t.value+1)%e.loaders.length};let n=null;We(()=>{n=setInterval(i,2e3)}),As(()=>{clearInterval(n)});const m=q(()=>e.loaders[t.value]),d=g=>{switch(g){case"email":return Re(si);case"faq":return Re(ri);case"facebook":return Re(ni);case"instagram":return Re(ii);case"linkedin":return Re(li);case"key-points":return Re(ai);case"twitter":return Re(ui);case"meta-title":return Re(ci);case"meta-description":return Re(di);default:return null}};return(g,b)=>(r(),v("div",pi,[l("div",gi,[l("img",{src:d(m.value.slug),alt:m.value.label},null,8,mi)]),l("div",hi,[l("div",_i,[p(c(Se),{dark:!0}),l("div",fi,_(c(s).loadingText(m.value.name)),1)])])]))}},yi={props:{header:{type:String,required:!0},step:{type:[Number,String],required:!1}}},vi={class:"aioseo-ai-content-step-header"},bi={class:"step-header"},ki={key:0,class:"step-header-number"},wi={class:"step-header-title"};function Si(o,e,s,t,i,n){return r(),v("div",vi,[l("div",bi,[s.step?(r(),v("span",ki,_(s.step),1)):f("",!0),l("span",wi,_(s.header),1)])])}const _t=A(yi,[["render",Si]]),Ci={setup(){return{aiContent:Ae(),aiStore:$e(),optionsStore:Ke(),allowed:we}},components:{CoreAlert:le},props:{optionsKey:{type:String,required:!0}},computed:{options(){return this.aiStore[this.optionsKey]}},beforeMount(){this.options.tone=this.optionsStore.options.aiContent.tone,this.options.audience=this.optionsStore.options.aiContent.audience}},xi={class:"aioseo-ai-content-style-form"},Pi={class:"form-group"},Ti={class:"field-group"},Ei={class:"field-group"};function Ii(o,e,s,t,i,n){const m=h("base-select"),d=h("core-alert");return r(),v("div",xi,[l("div",Pi,[l("div",Ti,[l("label",null,_(t.aiContent.strings.tone),1),p(m,{size:"small",options:t.aiContent.toneOptions,modelValue:t.aiContent.toneOptions.find(g=>g.value===n.options.tone),"onUpdate:modelValue":e[0]||(e[0]=g=>n.options.tone=g.value)},null,8,["options","modelValue"])]),l("div",Ei,[l("label",null,_(t.aiContent.strings.audience),1),p(m,{size:"small",options:t.aiContent.audienceOptions,modelValue:t.aiContent.audienceOptions.find(g=>g.value===n.options.audience),"onUpdate:modelValue":e[1]||(e[1]=g=>n.options.audience=g.value)},null,8,["options","modelValue"])]),t.allowed("aioseo_general_settings")?(r(),y(d,{key:0,type:"blue",innerHTML:t.aiContent.strings.alertDescription},null,8,["innerHTML"])):f("",!0)])])}const ft=A(Ci,[["render",Ii]]),Ai={},Li={class:"aioseo-arrow-back",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function Bi(o,e){return r(),v("svg",Li,[...e[0]||(e[0]=[l("path",{d:"M3.825 9L9.425 14.6L8 16L0 8L8 0L9.425 1.4L3.825 7H16V9H3.825Z",fill:"currentColor"},null,-1)])])}const tt=A(Ai,[["render",Bi]]),Mi={},Ri={class:"aioseo-ai-copy",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};function Oi(o,e){return r(),v("svg",Ri,[...e[0]||(e[0]=[l("path",{d:"M7.5 15.0001C7.04167 15.0001 6.64931 14.8369 6.32292 14.5105C5.99653 14.1841 5.83333 13.7917 5.83333 13.3334V3.33341C5.83333 2.87508 5.99653 2.48272 6.32292 2.15633C6.64931 1.82994 7.04167 1.66675 7.5 1.66675H15C15.4583 1.66675 15.8507 1.82994 16.1771 2.15633C16.5035 2.48272 16.6667 2.87508 16.6667 3.33341V13.3334C16.6667 13.7917 16.5035 14.1841 16.1771 14.5105C15.8507 14.8369 15.4583 15.0001 15 15.0001H7.5ZM7.5 13.3334H15V3.33341H7.5V13.3334ZM4.16667 18.3334C3.70833 18.3334 3.31597 18.1702 2.98958 17.8438C2.66319 17.5174 2.5 17.1251 2.5 16.6667V5.00008H4.16667V16.6667H13.3333V18.3334H4.16667Z",fill:"currentColor"},null,-1)])])}const yo=A(Mi,[["render",Oi]]),Hi={},Vi={class:"aioseo-ai-faq",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function $i(o,e){return r(),v("svg",Vi,[...e[0]||(e[0]=[l("path",{d:"M11.6667 12.5C11.9029 12.5 12.1077 12.4132 12.2813 12.2396C12.4549 12.066 12.5417 11.8611 12.5417 11.625C12.5417 11.3889 12.4549 11.184 12.2813 11.0104C12.1077 10.8368 11.9029 10.75 11.6667 10.75C11.4306 10.75 11.2258 10.8368 11.0522 11.0104C10.8786 11.184 10.7917 11.3889 10.7917 11.625C10.7917 11.8611 10.8786 12.066 11.0522 12.2396C11.2258 12.4132 11.4306 12.5 11.6667 12.5ZM11.0417 9.83335H12.2917C12.2917 9.43058 12.3334 9.13544 12.4167 8.94794C12.5001 8.76044 12.6945 8.51391 13.0001 8.20835C13.4167 7.79169 13.6945 7.45488 13.8334 7.19794C13.9723 6.94099 14.0417 6.63891 14.0417 6.29169C14.0417 5.66669 13.823 5.15627 13.3855 4.76044C12.948 4.3646 12.3751 4.16669 11.6667 4.16669C11.0973 4.16669 10.6008 4.32641 10.1772 4.64585C9.75355 4.9653 9.45841 5.38891 9.29175 5.91669L10.4167 6.37502C10.5417 6.0278 10.7119 5.76738 10.9272 5.59377C11.1424 5.42016 11.389 5.33335 11.6667 5.33335C12.0001 5.33335 12.2709 5.4271 12.4792 5.6146C12.6876 5.8021 12.7917 6.05558 12.7917 6.37502C12.7917 6.56946 12.7362 6.75349 12.6251 6.9271C12.514 7.10071 12.3195 7.31946 12.0417 7.58335C11.5834 7.98613 11.3022 8.3021 11.198 8.53127C11.0938 8.76044 11.0417 9.19446 11.0417 9.83335ZM6.66675 15C6.20841 15 5.81605 14.8368 5.48966 14.5104C5.16328 14.184 5.00008 13.7917 5.00008 13.3334V3.33335C5.00008 2.87502 5.16328 2.48266 5.48966 2.15627C5.81605 1.82988 6.20841 1.66669 6.66675 1.66669H16.6667C17.1251 1.66669 17.5174 1.82988 17.8438 2.15627C18.1702 2.48266 18.3334 2.87502 18.3334 3.33335V13.3334C18.3334 13.7917 18.1702 14.184 17.8438 14.5104C17.5174 14.8368 17.1251 15 16.6667 15H6.66675ZM6.66675 13.3334H16.6667V3.33335H6.66675V13.3334ZM3.33341 18.3334C2.87508 18.3334 2.48272 18.1702 2.15633 17.8438C1.82994 17.5174 1.66675 17.125 1.66675 16.6667V5.00002H3.33341V16.6667H15.0001V18.3334H3.33341Z",fill:"currentColor"},null,-1)])])}const Dt=A(Hi,[["render",$i]]),Di={},Ui={class:"aioseo-ai-rephrase",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function Ki(o,e){return r(),v("svg",Ui,[...e[0]||(e[0]=[l("path",{d:"M7.99999 13.3334C6.5111 13.3334 5.24999 12.8167 4.21666 11.7834C3.18332 10.75 2.66666 9.48891 2.66666 8.00002C2.66666 6.51113 3.18332 5.25002 4.21666 4.21669C5.24999 3.18335 6.5111 2.66669 7.99999 2.66669C8.76666 2.66669 9.49999 2.82502 10.2 3.14169C10.9 3.45835 11.5 3.91113 12 4.50002V2.66669H13.3333V7.33335H8.66666V6.00002H11.4667C11.1111 5.3778 10.625 4.88891 10.0083 4.53335C9.39166 4.1778 8.72221 4.00002 7.99999 4.00002C6.88888 4.00002 5.94443 4.38891 5.16666 5.16669C4.38888 5.94446 3.99999 6.88891 3.99999 8.00002C3.99999 9.11113 4.38888 10.0556 5.16666 10.8334C5.94443 11.6111 6.88888 12 7.99999 12C8.85555 12 9.62777 11.7556 10.3167 11.2667C11.0055 10.7778 11.4889 10.1334 11.7667 9.33335H13.1667C12.8555 10.5111 12.2222 11.4722 11.2667 12.2167C10.3111 12.9611 9.22221 13.3334 7.99999 13.3334Z",fill:"currentColor"},null,-1)])])}const Ut=A(Di,[["render",Ki]]),Be="all-in-one-seo-pack",Fi={emits:["closeModal"],setup(o,{emit:e}){const s=Ae(),t=$e(),i=J(),n=N(i?.currentPost?.ai?.faqs?.length?"results":"settings"),m=N(!1),d=N(!1),g=N([]),b=(O=!1)=>{m.value=!1,n.value="loading",g.value=[],t.generateFaqs(O).then(()=>{n.value="results"}).catch(()=>{n.value="settings",m.value=!0})},C=q(()=>d.value?K.copied:K.copy),S=q(()=>{const O=g.value.length?g.value:i.currentPost.ai.faqs;let H="";return Ce()?H=O.map(M=>`**${M.question}** ${M.answer}`).join(` `):H=O.map(M=>`<h3><strong>${M.question}</strong></h3> <p>${M.answer}</p>`).join(` `),H}),x=O=>{d.value=!0,gs(O?.text),setTimeout(()=>{d.value=!1},2e3)},k=(O,H)=>{O?g.value.includes(H)||g.value.push(H):g.value=g.value.filter(M=>M.question!==H.question)},E=q(()=>g.value.length?po("Insert FAQ Block","Insert FAQ Blocks",g.value.length,Be):a("Insert FAQ Block",Be)),R=()=>{if(!g.value.length)return;const O=window.wp.data.select("core/block-editor").getBlockInsertionPoint();Object.assign([],g.value.reverse()).forEach(M=>{const{question:F,answer:V}=M,j=window.wp.blocks.createBlock("core/paragraph",{content:V}),ie=window.wp.blocks.createBlock("aioseo/faq",{question:F},[j]);setTimeout(()=>{const ne=O?.rootClientId?window.wp.data.select("core/block-editor").getBlock(O.rootClientId):null;if(ne&&ne.name==="aioseo/faq"){const Y=window.wp.data.select("core/block-editor").getBlockIndex(ne.clientId);window.wp.data.dispatch("core/block-editor").insertBlock(ie,Y+1)}else if(ne){const Y=window.wp.data.select("core/block-editor").getBlocks();window.wp.data.dispatch("core/block-editor").insertBlock(ie,Y.length)}else window.wp.data.dispatch("core/block-editor").insertBlock(ie,O.index,O.rootClientId)},100)}),setTimeout(()=>{e("closeModal")},100)},K={copy:a("Copy",Be),copied:a("Copied!",Be),settingsHeader:a("Select tone and audience",Be),generateButtonText:G(a("Generate FAQs (%1$d credits)",Be),s.getFeatureCost("faqs")),rephrase:a("Regenerate (5 credits)",Be),viewPreviousResults:a("View Previous Results",Be)},U=[{slug:"faq",label:a("FAQ",Be),icon:"faq",name:a("FAQ",Be)}];return Ie(n,(O,H)=>{O==="results"&&H!=="results"&&(g.value=[])}),Go(()=>{g.value=[]}),{aiContent:s,aiStore:t,postEditorStore:i,currentScreen:n,error:m,generate:b,copyText:C,doCopyContent:S,justCopied:d,onCopy:x,updateSelectedFaqs:k,selected:g,insertBlockButtonText:E,insertBlock:R,strings:K,loaders:U,isBlockEditor:Ce}},components:{BaseCheckbox:ct,CoreModal:me,CreditCounter:Ze,Loader:ht,StepHeader:_t,StyleForm:ft,SvgArrowBack:tt,SvgClose:qe,SvgCopy:yo,SvgCircleCheckSolid:dt,SvgFaq:Dt,SvgRephrase:Ut},props:{feature:{type:Object,required:!0},show:{type:Boolean,default(){return!1}}}},qi={class:"header-left"},Gi={class:"header-right"},zi={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},Ni={class:"aioseo-ai-content-feature-modal-body-main"},ji={key:0,class:"settings"},Wi={class:"settings-left"},Zi={key:2,class:"results"},Yi={class:"faq-data"},Xi={class:"question"},Qi={class:"answer"},Ji={class:"footer-left"},ea={class:"footer-right"};function ta(o,e,s,t,i,n){const m=h("svg-arrow-back"),d=h("svg-close"),g=h("step-header"),b=h("style-form"),C=h("loader"),S=h("base-checkbox"),x=h("svg-rephrase"),k=h("base-button"),E=h("credit-counter"),R=h("svg-copy"),K=h("svg-circle-check-solid"),U=h("core-modal"),O=io("clipboard");return r(),y(U,{show:s.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-faq-modal"],"allow-overflow":t.currentScreen==="settings",onClose:e[6]||(e[6]=H=>o.$emit("closeModal",!0))},{header:u(()=>[l("div",qi,[t.currentScreen==="results"?(r(),y(m,{key:0,onClick:e[0]||(e[0]=H=>t.currentScreen="settings")})):f("",!0),(r(),y(ae(`svg-${s.feature.svg}`),{class:"aioseo-ai-content-feature-modal-icon"})),l("span",null,_(s.feature.strings.name),1)]),l("div",Gi,[l("button",{class:"close",type:"button",onClick:e[2]||(e[2]=te(H=>o.$emit("closeModal",!0),["stop"]))},[p(d,{onClick:e[1]||(e[1]=H=>o.$emit("closeModal",!0))})])])]),body:u(()=>[l("div",zi,[l("div",Ni,[t.currentScreen==="settings"?(r(),v("div",ji,[l("div",Wi,[p(g,{style:{"margin-left":"-40px"},header:t.strings.settingsHeader},null,8,["header"]),p(b,{optionsKey:"faqs"})])])):f("",!0),t.currentScreen==="loading"?(r(),y(C,{key:1,loaders:t.loaders},null,8,["loaders"])):f("",!0),t.currentScreen==="results"?(r(),v("div",Zi,[(r(!0),v(re,null,xe(t.postEditorStore.currentPost.ai.faqs,H=>(r(),v("div",{key:H.id,class:"faq"},[p(S,{size:"medium","onUpdate:modelValue":M=>t.updateSelectedFaqs(M,H)},{default:u(()=>[l("div",Yi,[l("div",Xi,_(H.question),1),l("div",Qi,_(H.answer),1)])]),_:2},1032,["onUpdate:modelValue"])]))),128))])):f("",!0)])])]),footer:u(()=>[l("div",Ji,[t.currentScreen==="results"?(r(),y(k,{key:0,class:"rephrase-button",size:"small",type:"gray",onClick:e[3]||(e[3]=H=>t.generate(!0)),disabled:!t.aiContent.hasEnoughCredits(5)},{default:u(()=>[p(x),P(" "+_(t.strings.rephrase),1)]),_:1},8,["disabled"])):f("",!0),p(E,{"parent-component-context":"modal"})]),l("div",ea,[t.currentScreen==="settings"&&0<t.postEditorStore.currentPost.ai.faqs.length?(r(),y(k,{key:0,class:"view-button",size:"small",type:"gray",onClick:e[4]||(e[4]=H=>t.currentScreen="results")},{default:u(()=>[l("span",null,_(t.strings.viewPreviousResults),1)]),_:1})):f("",!0),t.currentScreen==="settings"?(r(),y(k,{key:1,class:"generate-button",size:"small",type:"blue",onClick:e[5]||(e[5]=H=>t.generate(!1)),disabled:!t.aiContent.hasEnoughCredits(t.aiContent.getFeatureCost("faqs"))},{default:u(()=>[P(_(t.strings.generateButtonText),1)]),_:1},8,["disabled"])):f("",!0),t.currentScreen==="results"?ao((r(),y(k,{key:2,class:"copy-button",size:"small",type:"gray"},{default:u(()=>[t.justCopied?f("",!0):(r(),y(R,{key:0})),t.justCopied?(r(),y(K,{key:1})):f("",!0),l("span",null,_(t.copyText),1)]),_:1})),[[O,t.doCopyContent,"copy"],[O,t.onCopy,"success"]]):f("",!0),t.currentScreen==="results"&&t.isBlockEditor()?(r(),y(k,{key:3,size:"small",type:"blue",class:"block-button",onClick:t.insertBlock,disabled:!t.selected.length},{default:u(()=>[P(_(t.insertBlockButtonText),1)]),_:1},8,["onClick","disabled"])):f("",!0)])]),_:1},8,["show","allow-overflow"])}const oa=A(Fi,[["render",ta],["__scopeId","data-v-a240f853"]]),sa={class:"aioseo-ai-image-generator-delete-images-modal__body"},na=["src"],ra={class:"aioseo-ai-image-generator-delete-images-modal__footer"},ia={__name:"DeleteImages",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const s="all-in-one-seo-pack",t=Fe(),i=e,n=N(!1),m={headerTitle:a("Delete Image",s),areYouSure:a("Are you sure you want to permanently delete the following image?",s)},d=async()=>{n.value=!0;try{await t.deleteImages(t.images.selected.map(g=>g.id)),await t.fetchImages(),t.images.selected=[],i("update:modalOpen",!1)}catch(g){console.error(g)}finally{n.value=!1}};return(g,b)=>{const C=h("base-button");return r(),y(c(me),{show:o.modalOpen,onClose:b[2]||(b[2]=S=>g.$emit("update:modalOpen",!1)),classes:["aioseo-ai-image-generator-delete-images-modal"]},{headerTitle:u(()=>[P(_(m.headerTitle),1)]),body:u(()=>[l("div",sa,[l("span",null,_(m.areYouSure),1),(r(!0),v(re,null,xe(c(t).images.selected,S=>(r(),v("img",{key:`delete-image-${S.id}`,src:S.url,alt:""},null,8,na))),128))])]),footer:u(()=>[l("div",ra,[p(C,{type:"gray",size:"medium",onClick:b[0]||(b[0]=te(S=>g.$emit("update:modalOpen",!1),["exact"]))},{default:u(()=>[P(_(c(fe).cancel),1)]),_:1}),p(C,{type:"red",size:"medium",loading:n.value,onClick:b[1]||(b[1]=te(S=>d(),["exact"]))},{default:u(()=>[P(_(c(fe).delete),1)]),_:1},8,["loading"])])]),_:1},8,["show"])}}},aa={emits:["animCreated"],props:{options:{type:Object,required:!0},height:Number,width:Number},data(){return{style:{width:this.width?`${this.width}px`:"100%",height:this.height?`${this.height}px`:"100%",overflow:"hidden"}}},mounted(){Ve(async()=>{const{default:o}=await import("./vendor-lottie.9356ecad.js").then(e=>e.l);return{default:o}},__vite__mapDeps([0,1]),import.meta.url).then(({default:o})=>{this.anim=o.loadAnimation({container:this.$refs.lavContainer,renderer:"svg",loop:this.options.loop!==!1,autoplay:this.options.autoplay!==!1,animationData:{...this.options.animationData},rendererSettings:this.options.rendererSettings}),this.$emit("animCreated",this.anim)})}};function la(o,e,s,t,i,n){return r(),v("div",{style:Ls(i.style),ref:"lavContainer"},null,4)}const ca=A(aa,[["render",la]]),da={class:"ai-image-generator__form-waiting"},ua={key:0,class:"ai-image-generator__form-waiting__encouraging-message"},pa={key:1,class:"ai-image-generator__form-waiting__loader"},ga={__name:"FormWhileGenerating",setup(o){const e="all-in-one-seo-pack",s=Fe(),t={generatingImage:a("Generating Image",e)},i=[()=>Ve(()=>import("./cute-bear-dancing-animation.2c3a3b47.js"),[],import.meta.url),()=>Ve(()=>import("./enjoying-sloth-animation.62b50865.js"),[],import.meta.url),()=>Ve(()=>import("./koala-eats-leaves.26b77b34.js"),[],import.meta.url),()=>Ve(()=>import("./panda-sleeping-animation.1698c65a.js"),[],import.meta.url),()=>Ve(()=>import("./cat-playing-animation.07de0374.js"),[],import.meta.url)],n=[a("Bear-ing down on your image... just a moment!",e),a("Your image is being generated... hang in there!",e),a("Koala-ty pixels in progress… give us a moment.",e),a("Dreaming up something special… stay tuned!",e),a("Pawsing for perfection… your image is coming!",e)],m=N(null),d=N(0);We(async()=>{d.value=Math.floor(Math.random()*i.length);const b=await i[d.value]();m.value=b.default||b});const g=q(()=>({lottie:m.value,text:n[d.value]}));return(b,C)=>(r(),v("div",da,[c(s).isGenerationTakingTooLong?(r(),v("div",ua,[g.value.lottie?(r(),y(c(ca),{key:0,options:{animationData:g.value.lottie},height:200,width:200},null,8,["options"])):f("",!0),l("div",null,_(g.value.text),1)])):(r(),v("div",pa,[p(c(Se),{dark:""}),l("span",null,_(t.generatingImage),1)]))]))}},xo=A(ga,[["__scopeId","data-v-d206c9a4"]]),ma={class:"ai-image-generator__form"},ha={class:"ai-image-generator__group"},_a={class:"ai-image-generator__title"},fa={class:"ai-image-generator__group"},ya=["for"],va={class:"ai-image-generator__group"},ba=["for"],ka={class:"ai-image-generator__group"},wa=["for"],Sa={class:"ai-image-generator__group"},Ca=["for"],xa={class:"ai-image-generator__group"},Pa={class:"ai-image-generator__title"},Ta={class:"ai-image-generator__group"},Ea=["for"],Ia={class:"ai-image-generator__regenerate-description"},Aa={class:"ai-image-generator__group"},La=["for"],Ba={class:"ai-image-generator__group"},Ma={__name:"Form",setup(o){const e=Fe(),s=Pe(),t="all-in-one-seo-pack",{imageQualityOptions:i,imageStyleOptions:n,imageAspectRatioOptions:m,strings:d}=Ae(),g={imageOptions:a("Image Options",t),prompt:a("Prompt",t),placeholder:a("A cozy cottage in a snowy forest at sunset. A cute cat wearing a wizard hat, reading a spellbook… Unleash your imagination!",t),manageDefaultSettings:G(a('You can manage your default settings under <a href="%1$s" target="_blank" rel="noopener noreferrer">AI Suite > AI Content</a>.',t),s.aioseo.urls.aio.aiSuite+"#/ai-content"),editImage:a("Edit Image",t),regenerateDescription:a("Edit the selected image by describing the changes you want to make.",t),describeChanges:a("Give the dog a hat, change the background to a sunset... You can make any changes you want!",t),qualityTooltip:a("Please note that selecting a higher image quality will increase the credit cost and processing time.",t)},b=q(()=>{const S=0<e.images.selected.length,x=e.selectedImage.prompt===e.formPrompt;return{submit:{disabled:!e.formPrompt||S&&x||e.formPrompt.length<e.form.prompt.minlength,loading:e.form.isGenerating,text:G(a("Regenerate (%1$s credits)",t),e.generationPrice.toLocaleString())}}}),C=async()=>{if(!(b.value.submit.disabled||b.value.submit.loading))try{e.errors.api=null,await e.generateImage().then(S=>{e.selectImage(S.data)}),await e.fetchImages()}catch(S){console.error(S),e.errors.api=d.somethingWrong}};return We(()=>{setTimeout(()=>{const S=document.getElementById(e.form.prompt.id)||null;S&&S.focus()})}),(S,x)=>{const k=h("base-select"),E=h("base-button");return r(),v("div",ma,[c(e).images.selected.length===0?(r(),v(re,{key:0},[c(e).form.isGenerating?(r(),y(c(xo),{key:0,class:"ai-image-generator__group"})):(r(),v(re,{key:1},[l("div",ha,[l("h3",_a,_(g.imageOptions),1)]),l("div",fa,[l("label",{for:c(e).form.prompt.id,class:"ai-image-generator__label"},_(g.prompt),9,ya),p(c(Co),{modelValue:c(e).form.prompt.value,"onUpdate:modelValue":x[0]||(x[0]=R=>c(e).form.prompt.value=R),id:c(e).form.prompt.id,rows:5,"max-height":200,placeholder:g.placeholder,maxlength:c(e).form.prompt.maxlength},null,8,["modelValue","id","placeholder","maxlength"])]),l("div",va,[l("label",{for:c(e).form.quality.id,class:"ai-image-generator__label"},[P(_(c(d).imageQuality)+" ",1),p(c(de),{placement:"right"},{tooltip:u(()=>[P(_(g.qualityTooltip),1)]),default:u(()=>[p(c(je),{width:"17",height:"17"})]),_:1})],8,ba),p(k,{modelValue:c(e).form.quality.value,"onUpdate:modelValue":x[1]||(x[1]=R=>c(e).form.quality.value=R),id:c(e).form.quality.id,options:c(i),size:"medium"},null,8,["modelValue","id","options"])]),l("div",ka,[l("label",{for:c(e).form.style.id,class:"ai-image-generator__label"},_(c(d).imageStyle),9,wa),p(k,{modelValue:c(e).form.style.value,"onUpdate:modelValue":x[2]||(x[2]=R=>c(e).form.style.value=R),id:c(e).form.style.id,options:c(n),size:"medium"},null,8,["modelValue","id","options"])]),l("div",Sa,[l("label",{for:c(e).form.aspectRatio.id,class:"ai-image-generator__label"},_(c(d).imageAspectRatio),9,Ca),p(k,{modelValue:c(e).form.aspectRatio.value,"onUpdate:modelValue":x[3]||(x[3]=R=>c(e).form.aspectRatio.value=R),id:c(e).form.aspectRatio.id,options:c(m),size:"medium"},null,8,["modelValue","id","options"])]),p(c(le),{class:"ai-image-generator__group",type:"blue",innerHTML:g.manageDefaultSettings},null,8,["innerHTML"])],64))],64)):(r(),v(re,{key:1},[c(e).form.isGenerating?(r(),y(c(xo),{key:0,class:"ai-image-generator__group"})):(r(),v(re,{key:1},[l("div",xa,[l("h3",Pa,_(g.editImage),1)]),l("div",Ta,[l("label",{for:c(e).form.prompt.id,class:"ai-image-generator__label"},_(g.prompt),9,Ea),p(c(Co),{modelValue:c(e).form.prompt.value,"onUpdate:modelValue":x[4]||(x[4]=R=>c(e).form.prompt.value=R),id:c(e).form.prompt.id,rows:5,"max-height":200,placeholder:g.describeChanges,maxlength:c(e).form.prompt.maxlength},null,8,["modelValue","id","placeholder","maxlength"]),l("div",Ia,_(g.regenerateDescription),1)]),l("div",Aa,[l("label",{for:c(e).form.quality.id,class:"ai-image-generator__label"},[P(_(c(d).imageQuality)+" ",1),p(c(de),{placement:"right"},{tooltip:u(()=>[P(_(g.qualityTooltip),1)]),default:u(()=>[p(c(je),{width:"17",height:"17"})]),_:1})],8,La),p(k,{modelValue:c(e).form.quality.value,"onUpdate:modelValue":x[5]||(x[5]=R=>c(e).form.quality.value=R),id:c(e).form.quality.id,options:c(i),size:"medium"},null,8,["modelValue","id","options"])]),l("div",Ba,[p(E,{size:"small",type:"green",onClick:C,disabled:b.value.submit.disabled,loading:b.value.submit.loading},{default:u(()=>[P(_(b.value.submit.text),1)]),_:1},8,["disabled","loading"])])],64))],64))])}}},Ra=A(Ma,[["__scopeId","data-v-a7698311"]]),Oa=["for","tabindex"],Ha=["id","checked","disabled"],Va=["src"],$a={class:"ai-image-generator__image__actions"},Da={__name:"Image",props:{image:Object},setup(o){const e=Fe(),{getAspectRatioFromDimensions:s}=Ae(),t=N(null),i=o,n=q(()=>s(i.image.width,i.image.height)),m=q(()=>({editImage:{show:e.currentScreen==="results"},removeImage:{show:e.currentScreen==="results"}})),d=q(()=>e.images.selected.find(C=>C.id===i.image.id)),g=C=>{C.target.checked&&e.selectImage(i.image)},b=()=>{e.switchScreen("generate"),e.selectImage(i.image)};return(C,S)=>{const x=h("base-button");return r(),v("label",{for:`ai-image-generator__image-${o.image.id}`,tabindex:c(e).form.isGenerating?-1:0,class:Q({"ai-image-generator__image":!0,"ai-image-generator__shimmer":c(e).form.isGenerating&&d.value,"ai-image-generator__image--landscape":n.value==="landscape","ai-image-generator__image--portrait":n.value==="portrait","ai-image-generator__image--square":n.value==="square"}),onKeydown:S[1]||(S[1]=Lt(k=>C.$refs.inputTag.click(),["enter"]))},[l("input",{ref_key:"inputTag",ref:t,type:"checkbox",id:`ai-image-generator__image-${o.image.id}`,checked:d.value,disabled:c(e).form.isGenerating||d.value,onInput:g},null,40,Ha),l("img",{src:o.image.url,alt:"",decoding:"async"},null,8,Va),l("div",$a,[m.value.removeImage.show?(r(),y(x,{key:0,size:"small",type:"gray",onClick:S[0]||(S[0]=te(k=>c(e).toggleModal({modal:"modalOpenDeleteImages",open:!0,images:[o.image]}),["stop"])),title:c(fe).delete},{default:u(()=>[p(c(ut),{trim:""})]),_:1},8,["title"])):f("",!0),m.value.editImage.show?(r(),y(x,{key:1,size:"small",type:"gray",onClick:te(b,["stop"]),title:c(fe).edit},{default:u(()=>[p(c(lt))]),_:1},8,["title"])):f("",!0)])],42,Oa)}}},ro=A(Da,[["__scopeId","data-v-9f584cbf"]]),Ua={class:"ai-image-generator__generate"},Ka={class:"ai-image-generator__left"},Fa={class:"ai-image-generator__right"},qa={class:"ai-image-generator__group"},Ga={class:"ai-image-generator__title"},za={class:"ai-image-generator__group"},Na={class:"ai-image-generator__generate__preview-outer"},ja={class:"ai-image-generator__generate__preview-inner"},Wa={key:0,class:"ai-image-generator__group"},Za={__name:"Generate",setup(o){const e="all-in-one-seo-pack",s=Fe(),t={imagePreview:a("Preview",e)},i=q(()=>s.selectedImage&&s.selectedImage.parentImageId?s.images.all.rows.find(d=>d.id===s.selectedImage.parentImageId):null),n=q(()=>!s.selectedImage||i.value?null:s.images.all.rows.find(d=>d.parentImageId===s.selectedImage.id)),m=q(()=>s.selectedImage?i.value?[i.value,s.selectedImage]:n.value?[s.selectedImage,n.value]:[s.selectedImage]:[]);return(d,g)=>(r(),v("div",Ua,[l("div",Ka,[p(c(Ra))]),l("div",Fa,[l("div",qa,[l("h3",Ga,_(t.imagePreview),1)]),l("div",za,[l("div",Na,[l("div",ja,[m.value.length>0?(r(),v("div",{key:0,class:Q(["ai-image-generator__generate__preview-images",{"ai-image-generator__generate__preview-images--one":m.value.length===1}])},[p(c(ro),{image:m.value[0]},null,8,["image"]),1<m.value.length?(r(),y(c(In),{key:0,width:"20",height:"20",color:"#8C8F9A"})):f("",!0),m.value[1]?(r(),y(c(ro),{key:1,image:m.value[1]},null,8,["image"])):f("",!0)],2)):(r(),v("div",{key:1,class:Q(["ai-image-generator__generate__preview-placeholder",{"ai-image-generator__generate__preview-placeholder--landscape":c(s).form.aspectRatio.value.value==="landscape","ai-image-generator__generate__preview-placeholder--portrait":c(s).form.aspectRatio.value.value==="portrait","ai-image-generator__generate__preview-placeholder--square":c(s).form.aspectRatio.value.value==="square","ai-image-generator__shimmer":c(s).form.isGenerating}])},[p(c(Vt))],2))])])]),c(s).error?.message?(r(),v("div",Wa,[p(c(le),{innerHTML:c(s).error.message,type:c(s).error.type},null,8,["innerHTML","type"])])):f("",!0)])]))}},Ya={class:"ai-image-generator__results"},Xa={class:"ai-image-generator__group"},Qa={class:"ai-image-generator__title"},Ja={key:0,class:"ai-image-generator__group"},el={key:1,class:"ai-image-generator__group"},tl={key:2,class:"ai-image-generator__group"},ol={class:"ai-image-generator__results__masonry"},sl={__name:"Results",setup(o){const e="all-in-one-seo-pack",s=Fe(),t={title:a("Previous Results",e),noResults:a("No results found.",e),generateFirstImage:a("Generate your first image",e)};return(i,n)=>{const m=h("base-button");return r(),v("div",Ya,[c(s).images.isFetching?(r(),y(c(Se),{key:0,dark:""})):(r(),v(re,{key:1},[l("div",Xa,[l("h3",Qa,_(t.title),1)]),c(s).images.count===0?(r(),v("div",Ja,_(t.noResults),1)):f("",!0),c(s).images.count===0?(r(),v("div",el,[p(m,{size:"small",type:"blue",onClick:n[0]||(n[0]=d=>c(s).switchScreen("generate"))},{default:u(()=>[P(_(t.generateFirstImage),1)]),_:1})])):(r(),v("div",tl,[l("div",ol,[(r(!0),v(re,null,xe(c(s).images.all.rows,(d,g)=>(r(),y(c(ro),{key:`image-${g}`,image:d},null,8,["image"]))),128))])]))],64))])}}},nl=A(sl,[["__scopeId","data-v-e2e713c6"]]),rl={class:"aioseo-ai-image-generator"},il={__name:"App",setup(o){const e=Fe();return e.setFormDefaults(),We(()=>{if(e.images.count===null)try{e.fetchImages()}catch(s){console.error(s)}if(e.initiator.slug==="image-block-toolbar"){const s=window.wp.data.select("core/block-editor").getSelectedBlock();if(!s)return;const t=s?.attributes,i=t?.id;if(!i)return;if(!e.initiator.wpMedia){e.resetInitiator();return}const n=e.images.all.rows.find(m=>m.id===i)||{id:i,url:t.url,alt:t.alt,width:e.initiator.wpMedia?.media_details?.width,height:e.initiator.wpMedia?.media_details?.height};e.selectImage(n)}}),(s,t)=>(r(),v("div",rl,[c(e).currentScreen==="generate"?(r(),y(c(Za),{key:0})):f("",!0),c(e).currentScreen==="results"?(r(),y(c(nl),{key:1})):f("",!0),p(c(ia),{"modal-open":c(e).modalOpenDeleteImages,"onUpdate:modalOpen":t[0]||(t[0]=i=>c(e).toggleModal({modal:"modalOpenDeleteImages",open:i}))},null,8,["modal-open"])]))}},al={},ll={width:"24",height:"24",viewBox:"4.83 4 24 24",xmlns:"http://www.w3.org/2000/svg"};function cl(o,e){return r(),v("svg",ll,[...e[0]||(e[0]=[l("path",{fill:"currentColor",d:"M7.49992 28C6.76659 28 6.13881 27.7389 5.61659 27.2167C5.09436 26.6944 4.83325 26.0667 4.83325 25.3333V6.66667C4.83325 5.93333 5.09436 5.30556 5.61659 4.78333C6.13881 4.26111 6.76659 4 7.49992 4H26.1666C26.8999 4 27.5277 4.26111 28.0499 4.78333C28.5721 5.30556 28.8333 5.93333 28.8333 6.66667V25.3333C28.8333 26.0667 28.5721 26.6944 28.0499 27.2167C27.5277 27.7389 26.8999 28 26.1666 28H7.49992ZM7.49992 25.3333H26.1666V6.66667H7.49992V25.3333ZM8.83325 22.6667H24.8333L19.8333 16L15.8333 21.3333L12.8333 17.3333L8.83325 22.6667ZM12.1666 13.3333C12.7221 13.3333 13.1944 13.1389 13.5833 12.75C13.9721 12.3611 14.1666 11.8889 14.1666 11.3333C14.1666 10.7778 13.9721 10.3056 13.5833 9.91667C13.1944 9.52778 12.7221 9.33333 12.1666 9.33333C11.611 9.33333 11.1388 9.52778 10.7499 9.91667C10.361 10.3056 10.1666 10.7778 10.1666 11.3333C10.1666 11.8889 10.361 12.3611 10.7499 12.75C11.1388 13.1389 11.611 13.3333 12.1666 13.3333Z"},null,-1)])])}const ms=A(al,[["render",cl]]),dl={class:"header-left"},ul={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},pl={class:"aioseo-ai-content-feature-modal-body-main"},gl={class:"footer-left"},ml={class:"footer-right"},hl={__name:"ImageGeneratorModal",props:{feature:Object,show:{type:Boolean,default(){return!1}}},emits:["closeModal"],setup(o,{emit:e}){const s=Fe(),t="all-in-one-seo-pack",{hasEnoughCredits:i,strings:n}=Ae(),m={showPreviousResults:a("Show Previous Results",t),insertImage:a("Insert Image",t)},d=e,g=()=>{d("closeModal"),s.resetInitiator(),s.switchScreen("generate")},b=q(()=>{const x=!i(s.generationPrice)||!s.formPrompt||s.formPrompt.length<s.form.prompt.minlength;return{submit:{show:s.currentScreen==="generate"&&!s.images.selected.length,disabled:x,loading:s.form.isGenerating,text:G(a("Generate Image (%1$s credits)",t),s.generationPrice.toLocaleString())},previousResults:{show:s.currentScreen!=="results"&&!!s.images.count,disabled:s.form.isGenerating},insertIntoContent:{show:(Je()||Ce())&&(s.currentScreen==="results"||s.images.selected.length),disabled:!s.images.selected.length||s.form.isGenerating}}}),C=async()=>{if(!(b.value.submit.disabled||b.value.submit.loading))try{s.errors.api=null,await s.generateImage().then(x=>{s.selectImage(x.data)}),await s.fetchImages()}catch(x){console.error(x),s.errors.api=n.somethingWrong}},S=async()=>{const{wp:x}=window;if(Ce()){const k={alt:s.selectedImage.alt,url:s.selectedImage.url,id:s.selectedImage.id,sizeSlug:"full"};if(s.initiator.slug==="image-block-placeholder"||s.initiator.slug==="image-block-toolbar"){const E=x.data.select("core/block-editor").getSelectedBlock();x.data.dispatch("core/block-editor").updateBlockAttributes(E.clientId,k)}if(s.initiator.slug==="featured-image-btn"&&x.data.dispatch("core/editor").editPost({featured_media:s.selectedImage.id}),!s.initiator.slug){const E=x.data.select("core/block-editor").getBlockInsertionPoint()||{},R=x.blocks.createBlock("core/image",k);x.data.dispatch("core/block-editor").insertBlock(R,E.index,E.rootClientId)}}if(Je()){const k=x.media.string.image({},{alt:s.selectedImage.alt,height:s.selectedImage.height,id:s.selectedImage.id,type:"image",url:s.selectedImage.url,width:s.selectedImage.width});x.media.editor.insert(k)}await He(),g()};return(x,k)=>{const E=h("base-button");return r(),y(c(me),{show:o.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-image-generator-modal"],onClose:g},{headerTitle:u(()=>[l("div",dl,[c(s).currentScreen==="results"||c(s).images.selected.length?(r(),y(c(tt),{key:0,onClick:k[0]||(k[0]=R=>c(s).switchScreen("generate"))})):f("",!0),p(c(ms),{class:"aioseo-ai-content-feature-modal-icon"}),P(" "+_(o.feature.strings.name),1)])]),body:u(()=>[l("div",ul,[l("div",pl,[p(c(il))])])]),footer:u(()=>[l("div",gl,[p(c(Ze),{"parent-component-context":"modal"})]),l("div",ml,[b.value.previousResults.show?(r(),y(E,{key:0,size:"small",type:"gray",onClick:k[1]||(k[1]=R=>c(s).switchScreen("results")),disabled:b.value.previousResults.disabled},{default:u(()=>[P(_(m.showPreviousResults),1)]),_:1},8,["disabled"])):f("",!0),b.value.submit.show?(r(),y(E,{key:1,size:"small",type:"blue",onClick:C,disabled:b.value.submit.disabled,loading:b.value.submit.loading},{default:u(()=>[P(_(b.value.submit.text),1)]),_:1},8,["disabled","loading"])):f("",!0),b.value.insertIntoContent.show?(r(),y(E,{key:2,size:"small",type:"blue",onClick:S,disabled:b.value.insertIntoContent.disabled},{default:u(()=>[P(_(m.insertImage),1)]),_:1},8,["disabled"])):f("",!0)])]),_:1},8,["show"])}}},_l={},fl={class:"aioseo-ai-key-points",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};function yl(o,e){return r(),v("svg",fl,[...e[0]||(e[0]=[l("path",{d:"M7.5 15.8333V14.1666H17.5V15.8333H7.5ZM7.5 10.8333V9.16665H17.5V10.8333H7.5ZM7.5 5.83331V4.16665H17.5V5.83331H7.5ZM4.16667 16.6666C3.70833 16.6666 3.31597 16.5035 2.98958 16.1771C2.66319 15.8507 2.5 15.4583 2.5 15C2.5 14.5416 2.66319 14.1493 2.98958 13.8229C3.31597 13.4965 3.70833 13.3333 4.16667 13.3333C4.625 13.3333 5.01736 13.4965 5.34375 13.8229C5.67014 14.1493 5.83333 14.5416 5.83333 15C5.83333 15.4583 5.67014 15.8507 5.34375 16.1771C5.01736 16.5035 4.625 16.6666 4.16667 16.6666ZM4.16667 11.6666C3.70833 11.6666 3.31597 11.5035 2.98958 11.1771C2.66319 10.8507 2.5 10.4583 2.5 9.99998C2.5 9.54165 2.66319 9.14928 2.98958 8.8229C3.31597 8.49651 3.70833 8.33331 4.16667 8.33331C4.625 8.33331 5.01736 8.49651 5.34375 8.8229C5.67014 9.14928 5.83333 9.54165 5.83333 9.99998C5.83333 10.4583 5.67014 10.8507 5.34375 11.1771C5.01736 11.5035 4.625 11.6666 4.16667 11.6666ZM4.16667 6.66665C3.70833 6.66665 3.31597 6.50345 2.98958 6.17706C2.66319 5.85067 2.5 5.45831 2.5 4.99998C2.5 4.54165 2.66319 4.14929 2.98958 3.8229C3.31597 3.49651 3.70833 3.33331 4.16667 3.33331C4.625 3.33331 5.01736 3.49651 5.34375 3.8229C5.67014 4.14929 5.83333 4.54165 5.83333 4.99998C5.83333 5.45831 5.67014 5.85067 5.34375 6.17706C5.01736 6.50345 4.625 6.66665 4.16667 6.66665Z",fill:"currentColor"},null,-1)])])}const hs=A(_l,[["render",yl]]),Me="all-in-one-seo-pack",vl={emits:["closeModal"],setup(o,{emit:e}){const s=Ae(),t=$e(),i=J(),n=N(i.currentPost.ai.keyPoints.length?"results":"settings"),m=N(!1),d=N(!1),g=N([]),b=(M=!1)=>{m.value=!1,n.value="loading",g.value=[],t.generateKeyPoints(M).then(()=>{n.value="results"}).catch(()=>{n.value="settings",m.value=!0})},C=q(()=>d.value?O.copied:O.copy),S=q(()=>{const M=g.value.length?g.value:i.currentPost.ai.keyPoints;let F="";if(Ce())F=M.map(V=>`• **${V.title}:** ${V.explanation}`).join(` `);else{const V=["<ul>"];M.forEach(j=>{V.push(`<li><strong>${j.title}:</strong> ${j.explanation}</li>`)}),V.push("</ul>"),F=V.join(` `)}return F}),x=M=>{d.value=!0,gs(M?.text),setTimeout(()=>{d.value=!1},2e3)},k=(M,F)=>{M?g.value.includes(F)||g.value.push(F):g.value=g.value.filter(V=>V.title!==F.title)},E=q(()=>g.value.length?po("Insert Key Points Block","Insert Key Points Blocks",g.value.length,Me):a("Insert Key Points Block",Me)),R=M=>{const F=[];g.value.forEach(V=>{const{explanation:j,title:ie}=V,ne=window.wp.blocks.createBlock("core/list-item",{content:`<strong>${ie}:</strong> ${j}`});F.push(ne)}),setTimeout(()=>{window.wp.data.dispatch("core/block-editor").insertBlocks(F,M.index,M.rootClientId)},100)},K=M=>{const F=[];g.value.forEach(ie=>{const{explanation:ne,title:Y}=ie;F.push(`<li><strong>${Y}:</strong> ${ne}</li>`)});const V=window.wp.blocks.createBlock("core/list",{type:"ul",values:F.join("")}),j=window.wp.blocks.createBlock("aioseo/key-points",{},[V]);setTimeout(()=>{if(M?.rootClientId){const ie=window.wp.data.select("core/block-editor").getBlocks();window.wp.data.dispatch("core/block-editor").insertBlock(j,ie.length)}else window.wp.data.dispatch("core/block-editor").insertBlock(j,M.index,M.rootClientId)},100)},U=()=>{if(!g.value.length)return;const M=window.wp.data.select("core/block-editor").getBlockInsertionPoint(),F=M?.rootClientId?window.wp.data.select("core/block-editor").getBlock(M.rootClientId):null;F&&F.name==="core/list"?R(M):K(M),setTimeout(()=>{e("closeModal")},100)},O={copy:a("Copy",Me),copied:a("Copied!",Me),settingsHeader:a("Select tone and audience",Me),generateButtonText:G(a("Generate Key Points (%1$d credits)",Me),s.getFeatureCost("keyPoints")),rephrase:a("Regenerate (5 credits)",Me),viewPreviousResults:a("View Previous Results",Me)},H=[{slug:"key-points",label:a("Key Points",Me),icon:"key-points",name:a("Key Points",Me)}];return Ie(n,(M,F)=>{M==="results"&&F!=="results"&&(g.value=[])}),Go(()=>{g.value=[]}),{aiContent:s,aiStore:t,postEditorStore:i,currentScreen:n,error:m,generate:b,copyText:C,doCopyContent:S,justCopied:d,onCopy:x,updateSelectedKeyPoints:k,selected:g,insertBlockButtonText:E,insertBlock:U,strings:O,loaders:H,isBlockEditor:Ce}},components:{BaseCheckbox:ct,CoreModal:me,CreditCounter:Ze,Loader:ht,StepHeader:_t,StyleForm:ft,SvgClose:qe,SvgCopy:yo,SvgCircleCheckSolid:dt,SvgKeyPoints:hs,SvgRephrase:Ut,SvgArrowBack:tt},props:{feature:{type:Object,required:!0},show:{type:Boolean,default(){return!1}}}},bl={class:"header-left"},kl={class:"header-right"},wl={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},Sl={class:"aioseo-ai-content-feature-modal-body-main"},Cl={key:0,class:"settings"},xl={class:"settings-left"},Pl={key:2,class:"results"},Tl={class:"key-point-data"},El={class:"title"},Il={class:"explanation"},Al={class:"footer-left"},Ll={class:"footer-right"};function Bl(o,e,s,t,i,n){const m=h("svg-arrow-back"),d=h("svg-close"),g=h("step-header"),b=h("style-form"),C=h("loader"),S=h("base-checkbox"),x=h("svg-rephrase"),k=h("base-button"),E=h("credit-counter"),R=h("svg-copy"),K=h("svg-circle-check-solid"),U=h("core-modal"),O=io("clipboard");return r(),y(U,{show:s.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-key-points-modal"],"allow-overflow":t.currentScreen==="settings",onClose:e[6]||(e[6]=H=>o.$emit("closeModal",!0))},{header:u(()=>[l("div",bl,[t.currentScreen==="results"?(r(),y(m,{key:0,onClick:e[0]||(e[0]=H=>t.currentScreen="settings")})):f("",!0),(r(),y(ae(`svg-${s.feature.svg}`),{class:"aioseo-ai-content-feature-modal-icon"})),l("span",null,_(s.feature.strings.name),1)]),l("div",kl,[l("button",{class:"close",type:"button",onClick:e[2]||(e[2]=te(H=>o.$emit("closeModal",!0),["stop"]))},[p(d,{onClick:e[1]||(e[1]=H=>o.$emit("closeModal",!0))})])])]),body:u(()=>[l("div",wl,[l("div",Sl,[t.currentScreen==="settings"?(r(),v("div",Cl,[l("div",xl,[p(g,{style:{"margin-left":"-40px"},header:t.strings.settingsHeader},null,8,["header"]),p(b,{optionsKey:"keyPoints"})])])):f("",!0),t.currentScreen==="loading"?(r(),y(C,{key:1,loaders:t.loaders},null,8,["loaders"])):f("",!0),t.currentScreen==="results"?(r(),v("div",Pl,[(r(!0),v(re,null,xe(t.postEditorStore.currentPost.ai.keyPoints,H=>(r(),v("div",{key:H.id,class:"key-point"},[p(S,{size:"medium","onUpdate:modelValue":M=>t.updateSelectedKeyPoints(M,H)},{default:u(()=>[l("div",Tl,[l("span",El,_(H.title)+":",1),l("span",Il,_(H.explanation),1)])]),_:2},1032,["onUpdate:modelValue"])]))),128))])):f("",!0)])])]),footer:u(()=>[l("div",Al,[t.currentScreen==="results"?(r(),y(k,{key:0,class:"rephrase-button",size:"small",type:"gray",onClick:e[3]||(e[3]=H=>t.generate(!0)),disabled:!t.aiContent.hasEnoughCredits(5)},{default:u(()=>[p(x),P(" "+_(t.strings.rephrase),1)]),_:1},8,["disabled"])):f("",!0),p(E,{"parent-component-context":"modal"})]),l("div",Ll,[t.currentScreen==="settings"&&0<t.postEditorStore.currentPost.ai.keyPoints.length?(r(),y(k,{key:0,class:"view-button",size:"small",type:"gray",onClick:e[4]||(e[4]=H=>t.currentScreen="results")},{default:u(()=>[l("span",null,_(t.strings.viewPreviousResults),1)]),_:1})):f("",!0),t.currentScreen==="settings"?(r(),y(k,{key:1,class:"generate-button",size:"small",type:"blue",onClick:e[5]||(e[5]=H=>t.generate(!1)),disabled:!t.aiContent.hasEnoughCredits(t.aiContent.getFeatureCost("keyPoints"))},{default:u(()=>[P(_(t.strings.generateButtonText),1)]),_:1},8,["disabled"])):f("",!0),t.currentScreen==="results"?ao((r(),y(k,{key:2,class:"copy-button",size:"small",type:"gray"},{default:u(()=>[t.justCopied?f("",!0):(r(),y(R,{key:0})),t.justCopied?(r(),y(K,{key:1})):f("",!0),l("span",null,_(t.copyText),1)]),_:1})),[[O,t.doCopyContent,"copy"],[O,t.onCopy,"success"]]):f("",!0),t.currentScreen==="results"&&t.isBlockEditor()?(r(),y(k,{key:3,size:"small",type:"blue",class:"block-button",onClick:t.insertBlock,disabled:!t.selected.length},{default:u(()=>[P(_(t.insertBlockButtonText),1)]),_:1},8,["onClick","disabled"])):f("",!0)])]),_:1},8,["show","allow-overflow"])}const Ml=A(vl,[["render",Bl]]);function Rl(o){return o=o.replace(/\s{2,}/g," "),o=o.replace(/\s\./g,"."),o.trim()}const vo=["address","article","aside","blockquote","canvas","details","dialog","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"],_s=["b","big","i","small","tt","abbr","acronym","cite","code","dfn","em","kbd","strong","samp","time","var","a","bdo","br","img","map","object","q","script","span","sub","sup","button","input","label","select","textarea"],Ol=new RegExp("^<("+vo.join("|")+")[^>]*?>$","i"),Hl=new RegExp("^</("+vo.join("|")+")[^>]*?>$","i"),Vl=new RegExp("^<("+_s.join("|")+")[^>]*>$","i"),$l=new RegExp("^</("+_s.join("|")+")[^>]*>$","i"),Dl=/^<([^>\s/]+)[^>]*>$/,Ul=/^<\/([^>\s]+)[^>]*>$/,Kl=/^[^<]+$/,Fl=/^<[^><]*$/,ql=/<!--(.|[\r\n])*?-->/g;let At=[],Ee;function Gl(){At=[],Ee=Cn(function(o){At.push(o)}),Ee.addRule(Kl,"content"),Ee.addRule(Fl,"greater-than-sign-content"),Ee.addRule(Ol,"block-start"),Ee.addRule(Hl,"block-end"),Ee.addRule(Vl,"inline-start"),Ee.addRule($l,"inline-end"),Ee.addRule(Dl,"other-element-start"),Ee.addRule(Ul,"other-element-end")}function zl(o){const e=[];let s=0,t="",i="",n="";return o=o.replace(ql,""),Gl(),Ee.onText(o),Ee.end(),Ln(At,function(m,d){const g=At[d+1];switch(m.type){case"content":case"greater-than-sign-content":case"inline-start":case"inline-end":case"other-tag":case"other-element-start":case"other-element-end":case"greater than sign":!g||s===0&&(g.type==="block-start"||g.type==="block-end")?(i+=m.src,e.push(i),t="",i="",n=""):i+=m.src;break;case"block-start":s!==0&&(i.trim()!==""&&e.push(i),i="",n=""),s++,t=m.src;break;case"block-end":s--,n=m.src,t!==""&&n!==""?e.push(t+i+n):i.trim()!==""&&e.push(i),t="",i="",n="";break}0>s&&(s=0)}),e}An(zl);const Nl=new RegExp("</?("+vo.join("|")+")[^>]*?>","ig"),Po=function(o){return o=o.replace(/<header[^>]*? class\s*=\s*["']?aioseo-toc-header[^>]+>([\S\s]*?)<\/header>/gms,""),o=o.replace(/<span[^>]*? class\s*=\s*["']?aioseo-tooltip[^>]+>([\S\s]*?)<\/span>/gms,""),o=o.replace(Nl," "),o=o.replace(/(<([^>]+)>)/ig,""),o=Rl(o),o},jl={emits:["closeModal"],setup(){return{getAssetUrl:Re,postEditorStore:J(),rootStore:Pe(),settingsStore:Le()}},components:{SvgCirclePlus:pt},props:{type:{type:String,required:!0},suggestions:{type:Array,required:!0},generateFn:{type:Function,required:!0}},data(){return{loading:!1,triedFetchingResults:!1,postContent:null,suggestionsKey:0}},methods:{setSuggestion(o){if(this.type==="title"){this.postEditorStore.updateTitle(o),this.$emit("closeModal");return}this.postEditorStore.updateDescription(o),this.$emit("closeModal")}},beforeMount(){this.postContent=Po(at()).trim()||Po(Vs()).trim()}},Wl={class:"titles-descriptions"},Zl={key:0,class:"list"},Yl=["onClick"];function Xl(o,e,s,t,i,n){const m=h("svg-circle-plus");return r(),v("div",Wl,[s.suggestions.length?(r(),v("div",Zl,[(r(),v("div",{class:"suggestions",key:i.suggestionsKey},[(r(!0),v(re,null,xe(s.suggestions,(d,g)=>(r(),v("div",{class:Q(["suggestion",[{single:s.type==="title"}]]),key:g},[l("p",null,_(d),1),l("button",{onClick:b=>n.setSuggestion(d),type:"button"},[p(m,{onClick:b=>n.setSuggestion(d)},null,8,["onClick"])],8,Yl)],2))),128))]))])):f("",!0)])}const fs=A(jl,[["render",Xl],["__scopeId","data-v-8c468fbd"]]),Ql={},Jl={class:"aioseo-ai-meta-description",viewBox:"0 0 25 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function ec(o,e){return r(),v("svg",Jl,[...e[0]||(e[0]=[l("path",{d:"M3.16667 24C2.43333 24 1.80556 23.7389 1.28333 23.2167C0.761111 22.6944 0.5 22.0667 0.5 21.3333V2.66667C0.5 1.93333 0.761111 1.30556 1.28333 0.783333C1.80556 0.261111 2.43333 0 3.16667 0H21.8333C22.5667 0 23.1944 0.261111 23.7167 0.783333C24.2389 1.30556 24.5 1.93333 24.5 2.66667V21.3333C24.5 22.0667 24.2389 22.6944 23.7167 23.2167C23.1944 23.7389 22.5667 24 21.8333 24H3.16667ZM3.16667 21.3333H21.8333V5.33333H3.16667V21.3333ZM5.83333 12V9.33333H19.1667V12H5.83333ZM5.83333 17.3333V14.6667H13.8333V17.3333H5.83333Z",fill:"currentColor"},null,-1)])])}const ys=A(Ql,[["render",ec]]),Ge="all-in-one-seo-pack",tc={emits:["closeModal"],setup(){const o=Ae(),e=$e(),s=J(),t=N(s?.currentPost?.ai?.descriptions?.length?"results":"settings"),i=N(!1),n=q(()=>at().length),m=async(b=!1)=>{i.value=!1,t.value="loading",e.generateMetaDescriptions(b).then(()=>{t.value="results"}).catch(()=>{t.value="settings",i.value=!0})},d={settingsHeader:a("Select tone and audience",Ge),generateButtonText:G(a("Generate Meta Descriptions (%1$d credits)",Ge),o.getFeatureCost("descriptions")),rephrase:a("Regenerate (5 credits)",Ge),viewPreviousResults:a("View Previous Results",Ge),noContentWarning:a("Your post is too short to generate AI content. Please add more content. For the best results, we recommend adding at least 200 words.",Ge)},g=[{slug:"meta-description",label:a("Meta Description",Ge),icon:"meta-description",name:a("Meta Description",Ge)}];return{aiContent:o,aiStore:e,postEditorStore:s,currentScreen:t,error:i,generate:m,strings:d,loaders:g,postContentLength:n}},components:{BaseCheckbox:ct,CoreAlert:le,CoreModal:me,CreditCounter:Ze,Loader:ht,StepHeader:_t,StyleForm:ft,SvgArrowBack:tt,SvgClose:qe,SvgCircleCheckSolid:dt,SvgFaq:Dt,SvgMetaDescription:ys,SvgRephrase:Ut,TitlesDescriptions:fs},props:{feature:{type:Object,required:!0},show:{type:Boolean,default(){return!1}}}},oc={class:"header-left"},sc={class:"header-right"},nc={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},rc={class:"aioseo-ai-content-feature-modal-body-main"},ic={key:0,class:"settings"},ac={class:"settings-left"},lc={key:2,class:"results"},cc={class:"footer-left"},dc={class:"footer-right"};function uc(o,e,s,t,i,n){const m=h("svg-arrow-back"),d=h("svg-close"),g=h("step-header"),b=h("core-alert"),C=h("style-form"),S=h("loader"),x=h("titles-descriptions"),k=h("svg-rephrase"),E=h("base-button"),R=h("credit-counter"),K=h("core-modal");return r(),y(K,{show:s.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-meta-description-modal"],"allow-overflow":t.currentScreen==="settings",onClose:e[7]||(e[7]=U=>o.$emit("closeModal",!0))},{header:u(()=>[l("div",oc,[t.currentScreen==="results"?(r(),y(m,{key:0,onClick:e[0]||(e[0]=U=>t.currentScreen="settings")})):f("",!0),(r(),y(ae(`svg-${s.feature.svg}`),{class:"aioseo-ai-content-feature-modal-icon"})),l("span",null,_(s.feature.strings.name),1)]),l("div",sc,[l("button",{class:"close",type:"button",onClick:e[2]||(e[2]=te(U=>o.$emit("closeModal",!0),["stop"]))},[p(d,{onClick:e[1]||(e[1]=U=>o.$emit("closeModal",!0))})])])]),body:u(()=>[l("div",nc,[l("div",rc,[t.currentScreen==="settings"?(r(),v("div",ic,[l("div",ac,[p(g,{style:{"margin-left":"-40px"},header:t.strings.settingsHeader},null,8,["header"]),t.postContentLength<500?(r(),y(b,{key:0,class:"aioseo-ai-content-no-content-warning",type:"red"},{default:u(()=>[P(_(t.strings.noContentWarning),1)]),_:1})):f("",!0),p(C,{optionsKey:"metaDescription"})])])):f("",!0),t.currentScreen==="loading"?(r(),y(S,{key:1,loaders:t.loaders},null,8,["loaders"])):f("",!0),t.currentScreen==="results"?(r(),v("div",lc,[p(x,{suggestions:t.postEditorStore.currentPost.ai.descriptions,type:"description","generate-fn":t.generate,onCloseModal:e[3]||(e[3]=U=>o.$emit("closeModal",!0))},null,8,["suggestions","generate-fn"])])):f("",!0)])])]),footer:u(()=>[l("div",cc,[t.currentScreen==="results"?(r(),y(E,{key:0,class:"rephrase-button",size:"small",type:"gray",onClick:e[4]||(e[4]=U=>t.generate(!0)),disabled:!t.aiContent.hasEnoughCredits(5)||t.postContentLength<500},{default:u(()=>[p(k),P(" "+_(t.strings.rephrase),1)]),_:1},8,["disabled"])):f("",!0),p(R,{"parent-component-context":"modal"})]),l("div",dc,[t.currentScreen==="settings"&&0<t.postEditorStore.currentPost.ai.descriptions.length?(r(),y(E,{key:0,class:"view-button",size:"small",type:"gray",onClick:e[5]||(e[5]=U=>t.currentScreen="results")},{default:u(()=>[l("span",null,_(t.strings.viewPreviousResults),1)]),_:1})):f("",!0),t.currentScreen==="settings"?(r(),y(E,{key:1,class:"generate-button",size:"small",type:"blue",onClick:e[6]||(e[6]=U=>t.generate(!1)),disabled:!t.aiContent.hasEnoughCredits(t.aiContent.getFeatureCost("descriptions"))||t.postContentLength<500},{default:u(()=>[P(_(t.strings.generateButtonText),1)]),_:1},8,["disabled"])):f("",!0)])]),_:1},8,["show","allow-overflow"])}const vs=A(tc,[["render",uc]]),pc={},gc={class:"aioseo-ai-meta-title",viewBox:"0 0 25 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function mc(o,e){return r(),v("svg",gc,[...e[0]||(e[0]=[l("path",{d:"M4.16699 9.33333H16.167V5.33333H4.16699V9.33333ZM2.83366 24C2.10033 24 1.47255 23.7389 0.950326 23.2167C0.428103 22.6944 0.166992 22.0667 0.166992 21.3333V2.66667C0.166992 1.93333 0.428103 1.30556 0.950326 0.783333C1.47255 0.261111 2.10033 0 2.83366 0H21.5003C22.2337 0 22.8614 0.261111 23.3837 0.783333C23.9059 1.30556 24.167 1.93333 24.167 2.66667V21.3333C24.167 22.0667 23.9059 22.6944 23.3837 23.2167C22.8614 23.7389 22.2337 24 21.5003 24H2.83366ZM2.83366 21.3333H21.5003V2.66667H2.83366V21.3333Z",fill:"currentColor"},null,-1)])])}const bs=A(pc,[["render",mc]]),ze="all-in-one-seo-pack",hc={emits:["closeModal"],setup(){const o=Ae(),e=$e(),s=J(),t=N(s.currentPost.ai.titles.length?"results":"settings"),i=N(!1),n=q(()=>at().length),m=async(b=!1)=>{i.value=!1,t.value="loading",e.generateMetaTitles(b).then(()=>{t.value="results"}).catch(()=>{t.value="settings",i.value=!0})},d={settingsHeader:a("Select tone and audience",ze),generateButtonText:G(a("Generate SEO Titles (%1$d credits)",ze),o.getFeatureCost("titles")),rephrase:a("Regenerate (5 credits)",ze),viewPreviousResults:a("View Previous Results",ze),noContentWarning:a("Your post is too short to generate AI content. Please add more content. For the best results, we recommend adding at least 200 words.",ze)},g=[{slug:"meta-title",label:a("SEO Title",ze),icon:"meta-title",name:a("SEO Title",ze)}];return{aiContent:o,aiStore:e,postEditorStore:s,currentScreen:t,error:i,generate:m,strings:d,loaders:g,postContentLength:n}},components:{BaseCheckbox:ct,CoreAlert:le,CoreModal:me,CreditCounter:Ze,Loader:ht,StepHeader:_t,StyleForm:ft,SvgArrowBack:tt,SvgClose:qe,SvgCircleCheckSolid:dt,SvgFaq:Dt,SvgMetaTitle:bs,SvgRephrase:Ut,TitlesDescriptions:fs},props:{feature:{type:Object,required:!0},show:{type:Boolean,default(){return!1}}}},_c={class:"header-left"},fc={class:"header-right"},yc={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},vc={class:"aioseo-ai-content-feature-modal-body-main"},bc={key:0,class:"settings"},kc={class:"settings-left"},wc={key:2,class:"results"},Sc={class:"footer-left"},Cc={class:"footer-right"};function xc(o,e,s,t,i,n){const m=h("svg-arrow-back"),d=h("svg-close"),g=h("step-header"),b=h("core-alert"),C=h("style-form"),S=h("loader"),x=h("titles-descriptions"),k=h("svg-rephrase"),E=h("base-button"),R=h("credit-counter"),K=h("core-modal");return r(),y(K,{show:s.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-meta-title-modal"],"allow-overflow":t.currentScreen==="settings",onClose:e[7]||(e[7]=U=>o.$emit("closeModal",!0))},{header:u(()=>[l("div",_c,[t.currentScreen==="results"?(r(),y(m,{key:0,onClick:e[0]||(e[0]=U=>t.currentScreen="settings")})):f("",!0),(r(),y(ae(`svg-${s.feature.svg}`),{class:"aioseo-ai-content-feature-modal-icon"})),l("span",null,_(s.feature.strings.name),1)]),l("div",fc,[l("button",{class:"close",type:"button",onClick:e[2]||(e[2]=te(U=>o.$emit("closeModal",!0),["stop"]))},[p(d,{onClick:e[1]||(e[1]=U=>o.$emit("closeModal",!0))})])])]),body:u(()=>[l("div",yc,[l("div",vc,[t.currentScreen==="settings"?(r(),v("div",bc,[l("div",kc,[p(g,{style:{"margin-left":"-40px"},header:t.strings.settingsHeader},null,8,["header"]),t.postContentLength<500?(r(),y(b,{key:0,class:"aioseo-ai-content-no-content-warning",type:"red"},{default:u(()=>[P(_(t.strings.noContentWarning),1)]),_:1})):f("",!0),p(C,{optionsKey:"metaTitle"})])])):f("",!0),t.currentScreen==="loading"?(r(),y(S,{key:1,loaders:t.loaders},null,8,["loaders"])):f("",!0),t.currentScreen==="results"?(r(),v("div",wc,[p(x,{suggestions:t.postEditorStore.currentPost.ai.titles,type:"title","generate-fn":t.generate,onCloseModal:e[3]||(e[3]=U=>o.$emit("closeModal",!0))},null,8,["suggestions","generate-fn"])])):f("",!0)])])]),footer:u(()=>[l("div",Sc,[t.currentScreen==="results"?(r(),y(E,{key:0,class:"rephrase-button",size:"small",type:"gray",onClick:e[4]||(e[4]=U=>t.generate(!0)),disabled:!t.aiContent.hasEnoughCredits(5)||t.postContentLength<500},{default:u(()=>[p(k),P(" "+_(t.strings.rephrase),1)]),_:1},8,["disabled"])):f("",!0),p(R,{"parent-component-context":"modal"})]),l("div",Cc,[t.currentScreen==="settings"&&0<t.postEditorStore.currentPost.ai.titles.length?(r(),y(E,{key:0,class:"view-button",size:"small",type:"gray",onClick:e[5]||(e[5]=U=>t.currentScreen="results")},{default:u(()=>[l("span",null,_(t.strings.viewPreviousResults),1)]),_:1})):f("",!0),t.currentScreen==="settings"?(r(),y(E,{key:1,class:"generate-button",size:"small",type:"blue",onClick:e[6]||(e[6]=U=>t.generate(!1)),disabled:!t.aiContent.hasEnoughCredits(t.aiContent.getFeatureCost("titles"))||t.postContentLength<500},{default:u(()=>[P(_(t.strings.generateButtonText),1)]),_:1},8,["disabled"])):f("",!0)])]),_:1},8,["show","allow-overflow"])}const ks=A(hc,[["render",xc]]),Pc={},Tc={class:"aioseo-svg aioseo-svg-repurpose-content",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ec(o,e){return r(),v("svg",Tc,[...e[0]||(e[0]=[l("g",{"clip-path":"url(#clip0_214_18404)"},[l("path",{d:"M6.54175 17.6042C5.0973 16.9375 3.92369 15.9306 3.02091 14.5834C2.11814 13.2361 1.66675 11.7153 1.66675 10.0209C1.66675 9.65974 1.68411 9.30558 1.71883 8.95835C1.75355 8.61113 1.81258 8.27085 1.89591 7.93752L0.937581 8.50002L0.104248 7.06252L4.08341 4.77085L6.37508 8.72919L4.91675 9.56252L3.79175 7.60419C3.63897 7.97919 3.52439 8.36808 3.448 8.77085C3.37161 9.17363 3.33341 9.5903 3.33341 10.0209C3.33341 11.3681 3.70147 12.5938 4.43758 13.6979C5.17369 14.8021 6.15286 15.6181 7.37508 16.1459L6.54175 17.6042ZM12.9167 7.50002V5.83335H15.1876C14.5487 5.04169 13.7779 4.4271 12.8751 3.9896C11.9723 3.5521 11.014 3.33335 10.0001 3.33335C9.23619 3.33335 8.51397 3.45141 7.83341 3.68752C7.15286 3.92363 6.52786 4.25696 5.95841 4.68752L5.12508 3.22919C5.81953 2.74308 6.57647 2.36113 7.39591 2.08335C8.21536 1.80558 9.08341 1.66669 10.0001 1.66669C11.0973 1.66669 12.1459 1.87155 13.1459 2.28127C14.1459 2.69099 15.0417 3.28474 15.8334 4.06252V2.91669H17.5001V7.50002H12.9167ZM12.3751 20L8.39591 17.7084L10.6876 13.75L12.1251 14.5834L10.9376 16.625C12.5765 16.3889 13.9411 15.6459 15.0313 14.3959C16.1216 13.1459 16.6667 11.6806 16.6667 10C16.6667 9.84724 16.6633 9.70488 16.6563 9.57294C16.6494 9.44099 16.632 9.30558 16.6042 9.16669H18.2917C18.3056 9.30558 18.3161 9.44099 18.323 9.57294C18.3299 9.70488 18.3334 9.84724 18.3334 10C18.3334 11.875 17.7744 13.5521 16.6563 15.0313C15.5383 16.5104 14.0834 17.507 12.2917 18.0209L13.2084 18.5625L12.3751 20Z",fill:"currentColor"})],-1)])])}const ws=A(Pc,[["render",Ec]]),Ic={},Ac={class:"aioseo-ai-social-email",width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};function Lc(o,e){return r(),v("svg",Ac,[...e[0]||(e[0]=[l("path",{d:"M3.33317 16.6666C2.87484 16.6666 2.48248 16.5035 2.15609 16.1771C1.8297 15.8507 1.6665 15.4583 1.6665 15V4.99998C1.6665 4.54165 1.8297 4.14929 2.15609 3.8229C2.48248 3.49651 2.87484 3.33331 3.33317 3.33331H16.6665C17.1248 3.33331 17.5172 3.49651 17.8436 3.8229C18.17 4.14929 18.3332 4.54165 18.3332 4.99998V15C18.3332 15.4583 18.17 15.8507 17.8436 16.1771C17.5172 16.5035 17.1248 16.6666 16.6665 16.6666H3.33317ZM9.99984 10.8333L3.33317 6.66665V15H16.6665V6.66665L9.99984 10.8333ZM9.99984 9.16665L16.6665 4.99998H3.33317L9.99984 9.16665ZM3.33317 6.66665V4.99998V15V6.66665Z",fill:"currentColor"},null,-1)])])}const Bc=A(Ic,[["render",Lc]]),Mc={},Rc={class:"aioseo-ai-social-facebook",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function Oc(o,e){return r(),v("svg",Rc,[...e[0]||(e[0]=[l("g",{"clip-path":"url(#clip0_214_20458)"},[l("path",{d:"M8 0C3.58176 0 0 3.58176 0 8C0 11.7517 2.58304 14.8998 6.06752 15.7645V10.4448H4.41792V8H6.06752V6.94656C6.06752 4.22368 7.29984 2.9616 9.97312 2.9616C10.48 2.9616 11.3546 3.06112 11.7123 3.16032V5.37632C11.5235 5.35648 11.1955 5.34656 10.7882 5.34656C9.47648 5.34656 8.9696 5.84352 8.9696 7.13536V8H11.5827L11.1338 10.4448H8.9696V15.9414C12.9309 15.463 16.0003 12.0902 16.0003 8C16 3.58176 12.4182 0 8 0Z",fill:"currentColor"})],-1)])])}const Hc=A(Mc,[["render",Oc]]),Vc={},$c={class:"aioseo-ai-social-instagram",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function Dc(o,e){return r(),v("svg",$c,[...e[0]||(e[0]=[l("g",{"clip-path":"url(#clip0_214_20465)"},[l("path",{d:"M8 1.44062C10.1375 1.44062 10.3906 1.45 11.2313 1.4875C12.0125 1.52187 12.4344 1.65313 12.7156 1.7625C13.0875 1.90625 13.3563 2.08125 13.6344 2.35938C13.9156 2.64062 14.0875 2.90625 14.2313 3.27813C14.3406 3.55938 14.4719 3.98438 14.5063 4.7625C14.5438 5.60625 14.5531 5.85938 14.5531 7.99375C14.5531 10.1313 14.5438 10.3844 14.5063 11.225C14.4719 12.0063 14.3406 12.4281 14.2313 12.7094C14.0875 13.0813 13.9125 13.35 13.6344 13.6281C13.3531 13.9094 13.0875 14.0813 12.7156 14.225C12.4344 14.3344 12.0094 14.4656 11.2313 14.5C10.3875 14.5375 10.1344 14.5469 8 14.5469C5.8625 14.5469 5.60938 14.5375 4.76875 14.5C3.9875 14.4656 3.56563 14.3344 3.28438 14.225C2.9125 14.0813 2.64375 13.9063 2.36563 13.6281C2.08438 13.3469 1.9125 13.0813 1.76875 12.7094C1.65938 12.4281 1.52813 12.0031 1.49375 11.225C1.45625 10.3813 1.44688 10.1281 1.44688 7.99375C1.44688 5.85625 1.45625 5.60313 1.49375 4.7625C1.52813 3.98125 1.65938 3.55938 1.76875 3.27813C1.9125 2.90625 2.0875 2.6375 2.36563 2.35938C2.64688 2.07812 2.9125 1.90625 3.28438 1.7625C3.56563 1.65313 3.99063 1.52187 4.76875 1.4875C5.60938 1.45 5.8625 1.44062 8 1.44062ZM8 0C5.82813 0 5.55625 0.009375 4.70313 0.046875C3.85313 0.084375 3.26875 0.221875 2.7625 0.41875C2.23438 0.625 1.7875 0.896875 1.34375 1.34375C0.896875 1.7875 0.625 2.23438 0.41875 2.75938C0.221875 3.26875 0.084375 3.85 0.046875 4.7C0.009375 5.55625 0 5.82812 0 8C0 10.1719 0.009375 10.4438 0.046875 11.2969C0.084375 12.1469 0.221875 12.7313 0.41875 13.2375C0.625 13.7656 0.896875 14.2125 1.34375 14.6562C1.7875 15.1 2.23438 15.375 2.75938 15.5781C3.26875 15.775 3.85 15.9125 4.7 15.95C5.55313 15.9875 5.825 15.9969 7.99688 15.9969C10.1688 15.9969 10.4406 15.9875 11.2938 15.95C12.1438 15.9125 12.7281 15.775 13.2344 15.5781C13.7594 15.375 14.2063 15.1 14.65 14.6562C15.0938 14.2125 15.3688 13.7656 15.5719 13.2406C15.7688 12.7313 15.9063 12.15 15.9438 11.3C15.9813 10.4469 15.9906 10.175 15.9906 8.00313C15.9906 5.83125 15.9813 5.55938 15.9438 4.70625C15.9063 3.85625 15.7688 3.27188 15.5719 2.76562C15.375 2.23438 15.1031 1.7875 14.6563 1.34375C14.2125 0.9 13.7656 0.625 13.2406 0.421875C12.7313 0.225 12.15 0.0875 11.3 0.05C10.4438 0.009375 10.1719 0 8 0Z",fill:"currentColor"}),l("path",{d:"M8 3.89062C5.73125 3.89062 3.89062 5.73125 3.89062 8C3.89062 10.2688 5.73125 12.1094 8 12.1094C10.2688 12.1094 12.1094 10.2688 12.1094 8C12.1094 5.73125 10.2688 3.89062 8 3.89062ZM8 10.6656C6.52813 10.6656 5.33437 9.47188 5.33437 8C5.33437 6.52813 6.52813 5.33437 8 5.33437C9.47188 5.33437 10.6656 6.52813 10.6656 8C10.6656 9.47188 9.47188 10.6656 8 10.6656Z",fill:"currentColor"}),l("path",{d:"M13.2312 3.72811C13.2312 4.25936 12.8 4.68749 12.2719 4.68749C11.7406 4.68749 11.3125 4.25624 11.3125 3.72811C11.3125 3.19686 11.7438 2.76874 12.2719 2.76874C12.8 2.76874 13.2312 3.19999 13.2312 3.72811Z",fill:"currentColor"})],-1)])])}const Uc=A(Vc,[["render",Dc]]),Kc={},Fc={class:"aioseo-ai-social-linkedin",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};function qc(o,e){return r(),v("svg",Fc,[...e[0]||(e[0]=[l("g",{"clip-path":"url(#clip0_214_20442)"},[l("path",{d:"M14.8156 0H1.18125C0.528125 0 0 0.515625 0 1.15313V14.8438C0 15.4813 0.528125 16 1.18125 16H14.8156C15.4688 16 16 15.4813 16 14.8469V1.15313C16 0.515625 15.4688 0 14.8156 0ZM4.74687 13.6344H2.37188V5.99687H4.74687V13.6344ZM3.55938 4.95625C2.79688 4.95625 2.18125 4.34062 2.18125 3.58125C2.18125 2.82188 2.79688 2.20625 3.55938 2.20625C4.31875 2.20625 4.93437 2.82188 4.93437 3.58125C4.93437 4.3375 4.31875 4.95625 3.55938 4.95625ZM13.6344 13.6344H11.2625V9.92188C11.2625 9.0375 11.2469 7.89687 10.0281 7.89687C8.79375 7.89687 8.60625 8.8625 8.60625 9.85938V13.6344H6.2375V5.99687H8.5125V7.04063H8.54375C8.85938 6.44063 9.63438 5.80625 10.7875 5.80625C13.1906 5.80625 13.6344 7.3875 13.6344 9.44375V13.6344Z",fill:"currentColor"})],-1)])])}const Gc=A(Kc,[["render",qc]]),zc={},Nc={class:"aioseo-ai-social-twitter",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"};function jc(o,e){return r(),v("svg",Nc,[...e[0]||(e[0]=[l("path",{d:"M12.2174 1.26929H14.4663L9.55298 6.88495L15.3332 14.5266H10.8073L7.26253 9.89198L3.20647 14.5266H0.956125L6.21146 8.52002L0.666504 1.26929H5.30724L8.51143 5.50551L12.2174 1.26929ZM11.428 13.1805H12.6742L4.6301 2.54471H3.29281L11.428 13.1805Z",fill:"currentColor"},null,-1)])])}const Wc=A(zc,[["render",jc]]),Zc={setup(){return{postEditorStore:J(),softSanitizeHtml:Pt}},props:{slug:{type:String,required:!0}},computed:{content(){return Pt(this.postEditorStore.currentPost.ai.socialPosts[this.slug]?.replace(/\n/g,"<br />"))},className(){return`aioseo-ai-content-${this.slug}`}}},Yc=["innerHTML"];function Xc(o,e,s,t,i,n){return r(),v("div",{class:Q(["aioseo-ai-content-social-post",n.className])},[l("p",{innerHTML:n.content},null,8,Yc)],2)}const Qc=A(Zc,[["render",Xc]]),Nt="all-in-one-seo-pack",Jc={setup(){const o={subject:a("Subject",Nt),preview:a("Preview",Nt),body:a("Body",Nt)};return{postEditorStore:J(),strings:o,softSanitizeHtml:Pt}},computed:{emailContent(){return Pt(this.postEditorStore.currentPost.ai.socialPosts?.email.content.replace(/\n/g,"<br />"))}}},ed={class:"aioseo-ai-content-social-post aioseo-ai-content-email"},td={class:"label"},od={class:"label"},sd={class:"label"},nd=["innerHTML"];function rd(o,e,s,t,i,n){return r(),v("div",ed,[l("p",null,[l("span",td,_(t.strings.subject),1),P(": "+_(t.softSanitizeHtml(t.postEditorStore.currentPost.ai.socialPosts?.email.subject)),1)]),l("p",null,[l("span",od,_(t.strings.preview),1),P(": "+_(t.softSanitizeHtml(t.postEditorStore.currentPost.ai.socialPosts?.email.preview)),1)]),l("p",null,[l("span",sd,_(t.strings.body),1),e[0]||(e[0]=P(": ",-1)),l("span",{innerHTML:n.emailContent},null,8,nd)])])}const id=A(Jc,[["render",rd]]),ve="all-in-one-seo-pack",ad={emits:["closeModal"],setup(){const o=q(()=>0<Object.keys(t.currentPost.ai.socialPosts).length&&Object.values(t.currentPost.ai.socialPosts).some(O=>0<O.length||0<O?.content?.length)),e=$e(),s=Ae(),t=J(),i=N("linkedin"),n=N(o.value?"results":"settings"),m=N(!1),d=N(!1),g=()=>{const O=C.value.find(H=>H.slug===i.value)||C.value[0];return O&&(i.value=O.slug),O},b=O=>{i.value=O},C=q(()=>{const O=[];for(const H of U)Object.keys(t.currentPost.ai.socialPosts).includes(H.slug)&&(0<t.currentPost.ai.socialPosts[H.slug].length||0<t.currentPost.ai.socialPosts[H.slug]?.content?.length)&&O.push(U.find(M=>H.slug===M.slug));return O}),S=q(()=>{if(!e.socialPosts.selected.length)return a("Generate Social Posts",ve);const O=e.socialPosts.selected.length*s.getFeatureCost("socialPosts");return G("%1$s (%2$s)",a("Generate Social Posts",ve),G(po("%1$d credit","%1$d credits",O,ve),O))}),x=q(()=>n.value==="settings"&&o.value),k=q(()=>m.value?K.copied:K.copy),E=q(()=>{const O=g(),H=O.slug==="email"?t.currentPost.ai.socialPosts?.email.content:t.currentPost.ai.socialPosts[O.slug];return $s(H,!0)}),R=()=>{m.value=!0,setTimeout(()=>{m.value=!1},2e3)},K={copy:a("Copy",ve),copied:a("Copied!",ve),step1:a("Select tone and audience",ve),step2:a("Select media to generate content for",ve),creditDisclaimer:a("*10 credits will be charged for each selected option.",ve),viewPreviousResults:a("View Previous Results",ve)},U=[{slug:"linkedin",name:a("LinkedIn Post",ve),icon:"svg-linkedIn"},{slug:"twitter",name:a("X (Twitter Post)",ve),icon:"svg-twitter"},{slug:"email",name:a("Marketing Email",ve),icon:"svg-email"},{slug:"facebook",name:a("Facebook Post",ve),icon:"svg-facebook"},{slug:"instagram",name:a("Instagram Post",ve),icon:"svg-instagram"}];return{aiStore:e,aiContent:s,postEditorStore:J(),activeTab:i,tabs:C,generateButtonText:S,getActiveTabObject:g,processChangeTab:b,justCopied:m,onCopy:R,copyText:k,copyContent:E,currentScreen:n,shouldShowViewPreviousResults:x,error:d,socialOptions:U,strings:K}},components:{BaseHighlightToggle:Mn,CoreMainTabs:Ue,CoreModal:me,CreditCounter:Ze,Generic:Qc,Email:id,Loader:ht,StepHeader:_t,StyleForm:ft,SvgArrowBack:tt,SvgClose:qe,SvgCopy:yo,SvgCircleCheckSolid:dt,SvgRepurposeContent:ws,SvgEmail:Bc,SvgInstagram:Uc,SvgFacebook:Hc,SvgLinkedIn:Gc,SvgTwitter:Wc},props:{feature:{type:Object,required:!0},show:{type:Boolean,default(){return!1}}},methods:{updateSelectedSocials(o,e){const s=$e();if(o){this.isSocialSelected(e)||s.socialPosts.selected.push(e);return}s.socialPosts.selected=s.socialPosts.selected.filter(t=>t.slug!==e.slug)},isSocialSelected(o){return this.aiStore.socialPosts.selected.some(e=>e.slug===o.slug)},generate(){this.error=!1,this.currentScreen="loading",this.aiStore.generateSocialPosts().then(()=>{this.currentScreen="results",this.activeTab=this.tabs[0].slug}).catch(()=>{this.currentScreen="settings",this.error=!0,this.aiStore.socialPosts.selected=[]})}}},ld={class:"header-left"},cd={class:"header-right"},dd={class:"aioseo-modal-body aioseo-ai-content-feature-modal-body"},ud={class:"aioseo-ai-content-feature-modal-body-main"},pd={key:0,class:"settings"},gd={class:"settings-left"},md={class:"settings-right"},hd={class:"form-group"},_d={class:"credit-disclaimer"},fd={key:2,class:"results"},yd={class:"scrollable-component"},vd={class:"footer-left"},bd={class:"footer-right"};function kd(o,e,s,t,i,n){const m=h("svg-arrow-back"),d=h("svg-close"),g=h("step-header"),b=h("style-form"),C=h("base-highlight-toggle"),S=h("loader"),x=h("core-main-tabs"),k=h("generic"),E=h("email"),R=h("credit-counter"),K=h("base-button"),U=h("svg-copy"),O=h("svg-circle-check-solid"),H=h("core-modal"),M=io("clipboard");return r(),y(H,{show:s.show,classes:["aioseo-ai-content-feature-modal","aioseo-ai-content-social-posts-modal"],"allow-overflow":t.currentScreen==="settings",onClose:e[6]||(e[6]=F=>o.$emit("closeModal",!0))},{header:u(()=>[l("div",ld,[t.currentScreen==="results"?(r(),y(m,{key:0,onClick:e[0]||(e[0]=F=>{t.currentScreen="settings",t.aiStore.socialPosts.selected=[]})})):f("",!0),(r(),y(ae(`svg-${s.feature.svg}`),{class:"aioseo-ai-content-feature-modal-icon"})),l("span",null,_(s.feature.strings.name),1)]),l("div",cd,[l("button",{class:"close",type:"button",onClick:e[2]||(e[2]=te(F=>o.$emit("closeModal",!0),["stop"]))},[p(d,{onClick:e[1]||(e[1]=F=>o.$emit("closeModal",!0))})])])]),body:u(()=>[l("div",dd,[l("div",ud,[t.currentScreen==="settings"?(r(),v("div",pd,[l("div",gd,[p(g,{step:"1",header:t.strings.step1},null,8,["header"]),p(b,{optionsKey:"socialPosts"})]),l("div",md,[p(g,{step:"2",header:t.strings.step2},null,8,["header"]),l("div",hd,[(r(!0),v(re,null,xe(t.socialOptions,(F,V)=>(r(),v("div",{key:V,class:"field-item"},[p(C,{active:n.isSocialSelected(F),size:"medium",name:F.name,type:"checkbox",modelValue:n.isSocialSelected(F),"onUpdate:modelValue":j=>n.updateSelectedSocials(j,F)},{default:u(()=>[(r(),y(ae(F.icon))),P(" "+_(F.name),1)]),_:2},1032,["active","name","modelValue","onUpdate:modelValue"])]))),128)),l("div",_d,_(t.strings.creditDisclaimer),1)])])])):f("",!0),t.currentScreen==="loading"?(r(),y(S,{key:1,loaders:t.aiStore.socialPosts.selected},null,8,["loaders"])):f("",!0),t.currentScreen==="results"?(r(),v("div",fd,[p(x,{tabs:t.tabs,active:t.activeTab,showSaveButton:!1,onChanged:e[3]||(e[3]=F=>t.processChangeTab(F))},{"var-tab-icon":u(({tab:F})=>[(r(),y(ae(F.icon)))]),_:1},8,["tabs","active"]),l("div",yd,[t.getActiveTabObject().slug!=="email"?(r(),y(k,{key:0,slug:t.getActiveTabObject().slug},null,8,["slug"])):f("",!0),t.getActiveTabObject().slug==="email"?(r(),y(E,{key:1})):f("",!0)])])):f("",!0)])])]),footer:u(()=>[l("div",vd,[p(R,{"parent-component-context":"modal"})]),l("div",bd,[t.shouldShowViewPreviousResults?(r(),y(K,{key:0,class:"view-button",size:"small",type:"gray",onClick:e[4]||(e[4]=F=>t.currentScreen="results")},{default:u(()=>[l("span",null,_(t.strings.viewPreviousResults),1)]),_:1})):f("",!0),t.currentScreen==="settings"?(r(),y(K,{key:1,class:"generate-button",size:"small",type:"blue",onClick:e[5]||(e[5]=F=>n.generate(!1)),disabled:t.aiStore.socialPosts.selected.length<1||!t.aiContent.hasEnoughCredits(t.aiContent.getFeatureCost("socialPosts")*t.aiStore.socialPosts.selected.length)},{default:u(()=>[P(_(t.generateButtonText),1)]),_:1},8,["disabled"])):f("",!0),t.currentScreen==="results"?ao((r(),y(K,{key:2,class:"copy-button",size:"small",type:"gray"},{default:u(()=>[t.justCopied?f("",!0):(r(),y(U,{key:0})),t.justCopied?(r(),y(O,{key:1})):f("",!0),l("span",null,_(t.copyText),1)]),_:1})),[[M,t.copyContent,"copy"],[M,t.onCopy,"success"]]):f("",!0)])]),_:1},8,["show","allow-overflow"])}const wd=A(ad,[["render",kd]]),Sd={},Cd={viewBox:"0 0 14 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-star-outline"};function xd(o,e){return r(),v("svg",Cd,[...e[0]||(e[0]=[l("path",{d:"M4.90004 10.2166L7.00004 8.94992L9.10004 10.2333L8.55004 7.83325L10.4 6.23325L7.96671 6.01659L7.00004 3.74992L6.03337 5.99992L3.60004 6.21659L5.45004 7.83325L4.90004 10.2166ZM2.88337 12.9999L3.96671 8.31659L0.333374 5.16659L5.13337 4.74992L7.00004 0.333252L8.86671 4.74992L13.6667 5.16659L10.0334 8.31659L11.1167 12.9999L7.00004 10.5166L2.88337 12.9999Z",fill:"currentColor"},null,-1)])])}const Pd=A(Sd,[["render",xd]]),To="all-in-one-seo-pack",Td={setup(){return{aiAssistantStore:lo(),aiContent:Ae(),aiStore:$e(),optionsStore:Ke()}},components:{CoreTooltip:de,FaqsModal:oa,ImageGeneratorModal:hl,KeyPointsModal:Ml,MetaDescriptionModal:vs,MetaTitleModal:ks,SocialPostsModal:wd,SvgAiContent:Vt,SvgFaq:Dt,SvgImageGenerator:ms,SvgKeyPoints:hs,SvgMetaDescription:ys,SvgMetaTitle:bs,SvgRepurposeContent:ws,SvgStarOutline:Pd},props:{parentComponentContext:String,feature:{type:Object,required:!0},buttonDisabled:{type:Boolean,required:!1}},data(){return{strings:{blockHiddenWarning:G(a("Block hidden in %1$s.",To),a("Preferences",To))}}},computed:{isAiAssistantHiddenByUser(){return this.feature.slug==="ai-assistant"&&this.aiAssistantStore.isBlockHiddenByUser}}},Ed={class:"aioseo-ai-content-feature-card-header"},Id={class:"aioseo-ai-content-feature-card-header-title"},Ad={class:"aioseo-ai-content-feature-card-header-title-text"},Ld={key:0,class:"popular-badge"},Bd={key:0},Md={key:0,class:"aioseo-ai-content-feature-card-description"},Rd={key:0},Od={key:1},Hd={key:0},Vd={key:1};function $d(o,e,s,t,i,n){const m=h("svg-star-outline"),d=h("base-button"),g=h("core-tooltip");return r(),v("div",{class:Q(["aioseo-ai-content-feature-card",{"aioseo-ai-content-feature-card--metabox":s.parentComponentContext==="metabox"}])},[l("div",Ed,[l("div",Id,[(r(),y(ae(`svg-${s.feature.svg}`))),l("span",Ad,_(s.feature.strings.name),1)]),s.feature.isPopular?(r(),v("div",Ld,[s.parentComponentContext!=="sidebar"?(r(),v("span",Bd,"Popular")):(r(),y(m,{key:1,width:"15",height:"15"}))])):f("",!0)]),s.parentComponentContext!=="sidebar"?(r(),v("div",Md,_(s.feature.strings.description),1)):f("",!0),l("div",null,[n.isAiAssistantHiddenByUser?(r(),y(g,{key:0,type:"action",placement:"top",offset:s.parentComponentContext==="sidebar"?"-80px, 0":"25px, 0"},{tooltip:u(()=>[P(_(i.strings.blockHiddenWarning),1)]),default:u(()=>[p(d,{size:"small",type:"blue",disabled:"",class:"aioseo-ai-content-feature-card-btn"},{default:u(()=>[s.parentComponentContext!=="sidebar"?(r(),v("span",Rd,_(s.feature.strings.buttonSubmit),1)):(r(),v("span",Od,"→"))]),_:1})]),_:1},8,["offset"])):(r(),y(d,{key:1,size:"small",type:"blue",disabled:!t.optionsStore.internalOptions.internal.ai.credits.remaining||s.buttonDisabled,onClick:e[0]||(e[0]=b=>s.feature?.clickCallback?s.feature.clickCallback():t.aiStore.isModalOpened=s.feature.slug),class:"aioseo-ai-content-feature-card-btn"},{default:u(()=>[s.parentComponentContext!=="sidebar"?(r(),v("span",Hd,_(s.feature.strings.buttonSubmit),1)):(r(),v("span",Vd,"→"))]),_:1},8,["disabled"]))]),s.feature.clickCallback?f("",!0):(r(),y(ae(`${s.feature.slug}-modal`),{key:1,feature:s.feature,show:t.aiStore.isModalOpened===s.feature.slug,onCloseModal:e[1]||(e[1]=b=>t.aiStore.isModalOpened=null),"modal-name":`ai-content-${s.feature.slug}-modal`},null,40,["feature","show","modal-name"]))],2)}const Dd=A(Td,[["render",$d]]),st="all-in-one-seo-pack",Ud=()=>at().replace(/<\/?[a-z][^>]*?>/gi,"").replace(/<!--[\s\S]*?-->/g,"").trim(),Kd={setup(){return{optionsStore:Ke()}},components:{CoreAlert:le,CreditCounter:Ze,FeatureCard:Dd},props:{parentComponentContext:String},data(){return{getPostEditedContent:at,getCleanedContent:Ud,features:oi(),postContentLength:0,strings:{aiContentGeneration:a("AI Content Generation",st),noContentWarning:a("Your post is too short to generate AI content. Please add more content. For the best results, we recommend adding at least 200 characters.",st),trialWarning:G(a("You can try out our AI features for free, enjoy! To unlock additional AI credits, %1$s or %2$s.",st),G('<a href="%1$s" target="_blank">%2$s</a>',se.getUpsellUrl("ai-content","trial-warning","pricing"),a("upgrade to Pro",st)),G('<a href="%1$s" target="_blank">%2$s</a>',se.getUpsellUrl("ai-content","trial-warning","aiCredits"),a("purchase PAYG credits",st)))}}},methods:{isButtonDisabled(o){return o.slug==="image-generator"||o.slug==="ai-assistant"?!1:500>this.postContentLength},updateContentLength(o){this.postContentLength=o},watchBlockEditor(){window.wp.data.subscribe(()=>{xt(()=>{this.updateContentLength(this.getCleanedContent().length)},500)()})},watchClassicEditor(){if(window.tinyMCE)if(document.querySelector("#wp-content-wrap.tmce-active"))window.tinyMCE.get("content").on("keyup",()=>{const o=window.tinyMCE.get("content").getContent({format:"raw"}).length;this.updateContentLength(o)}),window.tinyMCE.get("content").on("paste",()=>{const o=window.tinyMCE.get("content").getContent({format:"raw"}).length;this.updateContentLength(o)});else{const o=document.querySelector("textarea#content");o&&(o.addEventListener("keyup",()=>{const e=o.value.length;this.updateContentLength(e)}),o.addEventListener("paste",()=>{const e=o.value.length;this.updateContentLength(e)}))}},watchPageBuilderEditor(){window.aioseoBus.$on("aioseo-content-changed",()=>{this.updateContentLength(this.getCleanedContent().length)})},initWatchers(){et()?this.watchPageBuilderEditor():Ce()?this.watchBlockEditor():Je()&&this.watchClassicEditor()}},beforeMount(){this.updateContentLength(this.getCleanedContent().length),this.initWatchers()},beforeUnmount(){window.aioseoBus.$off("aioseo-content-changed")}},Fd={class:"aioseo-ai-content-main-header"},qd={key:0,class:"aioseo-ai-content-main-header-title"},Gd={class:"aioseo-ai-content-main-body"},zd={class:"aioseo-ai-content-features"};function Nd(o,e,s,t,i,n){const m=h("credit-counter"),d=h("core-alert"),g=h("feature-card");return r(),v("div",{class:Q(["aioseo-ai-content-main",{"aioseo-ai-content-main--sidebar":s.parentComponentContext==="sidebar"}])},[l("div",Fd,[s.parentComponentContext!=="sidebar"?(r(),v("div",qd,_(i.strings.aiContentGeneration),1)):f("",!0),p(m,{"parent-component-context":s.parentComponentContext,"tooltip-placement":"bottom","tooltip-offset":"-60px, 0"},null,8,["parent-component-context"])]),l("div",Gd,[i.postContentLength<200?(r(),y(d,{key:0,class:"aioseo-ai-content-no-content-warning",type:"red"},{default:u(()=>[P(_(i.strings.noContentWarning),1)]),_:1})):f("",!0),t.optionsStore.internalOptions.internal.ai.accessToken&&t.optionsStore.internalOptions.internal.ai.isTrialAccessToken?(r(),y(d,{key:1,class:"aioseo-ai-content-trial-warning",type:"blue",innerHTML:i.strings.trialWarning},null,8,["innerHTML"])):f("",!0),l("div",zd,[(r(!0),v(re,null,xe(i.features,(b,C)=>(r(),y(g,{key:C,feature:b,buttonDisabled:n.isButtonDisabled(b),"parent-component-context":s.parentComponentContext},null,8,["feature","buttonDisabled","parent-component-context"]))),128))])])],2)}const Eo=A(Kd,[["render",Nd]]),jd={class:"aioseo-ai-content-standalone aioseo-tab-content"},Wd={__name:"AiContent",props:{parentComponentContext:String},setup(o){const e=o,s=$e();return(t,i)=>(r(),v("div",jd,[c(s).isFreeAndOutOfCredits?(r(),y(c(gt),{key:0},{default:u(()=>[p(c(Eo),{"parent-component-context":e.parentComponentContext},null,8,["parent-component-context"])]),_:1})):(r(),y(c(Eo),{key:1,"parent-component-context":e.parentComponentContext},null,8,["parent-component-context"])),c(s).isFreeAndOutOfCredits?(r(),y(c(Rn),{key:2})):f("",!0)]))}},Zd={emits:["next","previous"],setup(){return{truSeoHighlighterStore:Mt()}},components:{CoreTooltip:de,SvgCaret:$t,SvgClose:qe,SvgEllipse:mo,SvgEye:mt},computed:{total(){return this.truSeoHighlighterStore.highlightMarks.length},error(){return this.truSeoHighlighterStore.highlightAnalyzerHasError},order(){return this.truSeoHighlighterStore.highlightMarks.findIndex(o=>o.active)+1},showSentence(){return this.truSeoHighlighterStore.activeMark?.sentence.length&&this.truSeoHighlighterStore.activeMark.annotatorSelector==="block"},sentences(){const o=[];let e=1;return this.truSeoHighlighterStore.highlightMarks.forEach(s=>{s.node.isSameNode(this.truSeoHighlighterStore.activeMark.node)&&(o.push(`<strong>(${e})</strong> ${s.sentence}`),e++)}),Wo(o.join(" "),1e3," [...]")}},methods:{close(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(null)}}},Yd={class:"tru-seo-highlight-popover","data-arrow-placement":"right"},Xd={key:0,class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--sentence"},Qd={class:"tru-seo-highlight-popover__sentence"},Jd=["innerHTML"],eu={class:"tru-seo-highlight-popover__row tru-seo-highlight-popover__row--main"},tu={class:"tru-seo-highlight-popover__count"},ou={class:"tru-seo-highlight-popover__nav"},su=["disabled"],nu=["disabled"],ru={class:"tru-seo-highlight-popover__close"};function iu(o,e,s,t,i,n){const m=h("svg-eye"),d=h("core-tooltip"),g=h("svg-ellipse"),b=h("svg-caret"),C=h("svg-close");return r(),v("div",Yd,[n.showSentence?(r(),v("div",Xd,[l("div",Qd,[p(d,{offset:"120px,0"},{tooltip:u(()=>[l("span",{innerHTML:n.sentences},null,8,Jd)]),default:u(()=>[p(m,{width:"16",height:"16"})]),_:1})])])):f("",!0),l("div",eu,[l("div",{class:Q(["tru-seo-highlight-popover__bullet",{"tru-seo-highlight-popover__bullet--error":n.error}])},[p(g,{width:"8"})],2),l("div",tu,[l("span",null,_(n.order)+"/"+_(n.total),1)]),e[3]||(e[3]=l("div",{class:"tru-seo-highlight-popover__pipe"},null,-1)),l("div",ou,[l("button",{type:"button",class:"caret-wrapper caret-wrapper--previous",tabindex:"0",disabled:n.order===1,onClick:e[0]||(e[0]=te(S=>o.$emit("previous"),["stop","exact"]))},[p(b,{width:"20"})],8,su),l("button",{type:"button",class:"caret-wrapper",tabindex:"0",disabled:n.order===n.total,onClick:e[1]||(e[1]=te(S=>o.$emit("next"),["stop","exact"]))},[p(b,{width:"20"})],8,nu)]),l("div",ru,[l("button",{type:"button",class:"close-wrapper",tabindex:"0",onClickOnce:e[2]||(e[2]=te((...S)=>n.close&&n.close(...S),["stop","exact"]))},[p(C,{width:"10"})],32)])])])}const au=A(Zd,[["render",iu],["__scopeId","data-v-aa3e0f58"]]),lu=()=>{const o=N(null),e=N({}),s=Ce(),t=Je(),i=window?.wp?.data?.select("core/block-editor"),n=window?.wp?.data?.select("core/edit-post"),m=N(null),d=Mt(),g=async(w,T="range")=>{let I="content";w.block?.attributes?.caption?I="caption":w.block?.attributes?.value?I="value":w.block?.attributes?.citation&&(I="citation"),w.annotatorSelector=T;const B=T==="block"?{selector:T,source:d.source,blockClientId:w.block.clientId}:{selector:T,id:w.id,range:w.range,source:d.source,blockClientId:w.block.clientId,richTextIdentifier:I};return d.dispatchAnnotations.__experimentalAddAnnotation(B)},b=(w,T)=>{if(!T)return!1;!T.hasFocus()&&s&&T.focus();let I=T.selection.win.getSelection();I.selectAllChildren(w.parent);const B=I.toString().length;if(w.range.end<B)for(let W=w.range.end;W<B;W++)I.modify("extend","backward","character");if(0<w.range.start){I=Ds(I);for(let W=w.range.start;0<W;W--)I.modify("extend","forward","character")}T.undoManager.ignore(()=>{T.annotator.annotate(d.source,{uid:w.id})}),I.empty()},C=()=>{if(d.clearHighlightPopover(),d.sanitizeHighlightMarks(),!d.activeMark)return!1;const w=Bs({name:"TruSeoHighlightPopover",render(){return Ms(au,{onNext(){K(1)},onPrevious(){K(-1)}})}}),T=Fs(),I=new ResizeObserver(xt(j,750)),B=k("wrapper");if(!B)return!1;B.parentElement.appendChild(T),w.mount(T),I.observe(k("wrapper"),{box:"border-box"}),d.highlightPopover.app=w,d.highlightPopover.node=T,d.highlightPopover.observer=I,j()},S=()=>{d.toggleHighlightAnalyzer(null),d.allowHighlighting=!1},x=({block:w,node:T})=>{try{let I="";return T?I=T.outerText.replace(/\n\n/g,` `):w&&(I=w?.attributes?.content||w?.attributes?.caption||w?.attributes?.value||w?.attributes?.citation||"",w.name==="core/table"&&(I=w?.originalContent||""),I=I.replace(/<br[^>]*>/gi,` `),I=Us(I)),Ks(I)}catch{return""}},k=w=>{if(w==="closest-relative")return Kt({element:k("wrapper").parentElement,property:"position",value:"relative"});if(w==="navigable")return Kt({element:k("wrapper").parentElement,property:"overflow-y",value:"auto"});if(t){if(w==="wrapper")return document.getElementById("content_ifr");if(w==="first-block")return m.value.getBody()?.firstElementChild||{}}if(s){if(w==="wrapper")return document.querySelector(".editor-styles-wrapper");if(w==="first-block"){const T=i.getBlocks()[0];return document.getElementById(`block-${T?.clientId}`)||{}}}},E=()=>{for(const w of i.getBlocks()||[]){if(w.name==="core/freeform"){const T=window.tinymce.get(`editor-${w.clientId}`),I=T.getBody()?.children||[];if(!I.length)continue;V(T);for(const B of I)L({block:w,node:B});continue}L({block:w,node:null})}d.highlightMarks.forEach(async(w,T)=>{const I=T===d.highlightMarks.length-1;M(w.parent,I),w.block.name==="core/freeform"?b(w,window.tinymce.get(`editor-${w.block.clientId}`)):(await g(w),I&&setTimeout(()=>{d.highlightMarks.at(-1)?.parent.classList.add("is-hovered")},100))})},R=()=>{const w=m.value.getBody()?.children||[];if(!w.length)return!1;V(m.value);for(const T of w)L({block:null,node:T});d.highlightMarks.forEach((T,I)=>{M(T.parent,I===d.highlightMarks.length-1),b(T,m.value)})},K=w=>{const T=d.highlightMarks.findIndex(I=>I.active);if(!d.highlightMarks[T+w])return!1;d.allowScrolling=!0,d.highlightMarks[T].active=!1,d.highlightMarks[T+w].active=!0,C()},U=w=>{const T=()=>{w.preventDefault(),w.clipboardData.setData("text/html",window.getSelection().toString())},I=window.getSelection()||{};if(!I?.rangeCount)return!1;const B=w.clipboardData?.getData("text/html")||"";if(B&&B.indexOf(d.source)!==-1)return T(),!1;const W=I.getRangeAt(0)||{};for(const Z of Object.values(W?.cloneContents()?.children||[]))if(Object.values(Z?.classList||[]).some(z=>z.endsWith(d.source)))return T(),!1},O=w=>{const T=(Z,z)=>{Z.collapse(z.firstChild,z.firstChild.length),Z.deleteFromDocument()};if(["Delete","Backspace"].indexOf(w.key)===-1)return!1;const I=window.getSelection()||null;if(!I?.toString())return!1;const B=I?.anchorNode?.parentElement||null,W=I?.anchorNode?.nextElementSibling||null;Object.values(B?.classList||[]).some(Z=>Z.endsWith(d.source))?T(I,B):Object.values(W?.classList||[]).some(Z=>Z.endsWith(d.source))&&T(I,W)},H=()=>{o.value=new MutationObserver(T=>{let I=!1;for(const B of T)for(const W of B?.removedNodes||[])(d.highlightMarks.some(Z=>W.isEqualNode(Z.parent))||Object.values(W?.classList||[]).some(Z=>Z.endsWith(d.source)))&&(I=!0);I&&ie()});const w=k("first-block")?.parentElement;if(typeof w!="object")return!1;o.value.observe(w,{attributes:!1,childList:!0,subtree:!0})},M=(w,T=!1)=>{const I=(W,Z)=>{Z.disconnect();for(const z of W){if(z?.target?.classList.contains("is-hovered"))break;if(Object.values(z?.target?.classList||[]).some(X=>X.endsWith(d.source))){Y(z.target);continue}for(const X of z?.addedNodes||[])if(Object.values(X?.classList||[]).some(oe=>oe.endsWith(d.source))){Y(X);break}}T&&d.highlightMarks.forEach(async(z,X)=>{z.node||(M(z.parent),await g(z,"block")),X===d.highlightMarks.length-1&&(await He(),xt(C,250)())})};if(typeof w?.parentElement!="object")return!1;new MutationObserver(I).observe(w,{attributes:!0,childList:!0,subtree:!0})},F=()=>{const w=T=>{for(const I of T){if(I?.type!=="attributes")continue;if(!Kt({element:k("wrapper")?.parentElement,property:"display",value:"none"}).isEqualNode(document.documentElement)||s&&(n.getEditorMode()!=="visual"||i.getBlockMode(i.getSelectedBlock()?.clientId)==="html")||t&&(D(),document.getElementById("content")?.nodeName==="TEXTAREA"&&document.getElementById("content").style.display!=="none"))return S(),!1;d.allowHighlighting=!0}};d.wpBodyContentObserver=new MutationObserver(xt(w,250)),d.wpBodyContentObserver.observe(document.getElementById("wpbody-content"),{attributes:!0,childList:!1,subtree:!0})},V=w=>{w.annotator.register(d.source,{persistent:!1,decorate:()=>({classes:["annotation-text",`annotation-text-${d.source}`]})})},j=(w=[])=>{if(!d.activeMark||!d.highlightPopover.node)return!1;for(const he of w)if(JSON.stringify(he.contentRect)===JSON.stringify(e))return!1;w.length&&(e.value=w[0]?.contentRect||e,d.allowScrolling=!1);const T=d.activeMark.node.getBoundingClientRect(),I=k("wrapper").getBoundingClientRect(),B=k("closest-relative").getBoundingClientRect(),W=k("first-block").getBoundingClientRect(),[Z,z]=[140,32];let X=T.top,oe=W.left-B.left;Z<oe?(d.highlightPopover.node.style.top=X-B.top+"px",d.highlightPopover.node.style.transform="translate(-105%, 0)",d.highlightPopover.node.childNodes[0].dataset.arrowPlacement="right"):(X=X-z-B.top,X=t?X+I.top:X,oe=t?oe+I.left:oe,d.highlightPopover.node.style.top=X+"px",d.highlightPopover.node.style.transform="translate(0, 0)",d.highlightPopover.node.childNodes[0].dataset.arrowPlacement="bottomleft"),d.highlightPopover.node.style.left=oe+"px",ne()},ie=()=>{window.removeEventListener("copy",U),window.removeEventListener("keyup",O),o.value?.disconnect(),d.clearAll(),He().then(()=>{if(!d.highlightSentences)return d.toggleHighlightAnalyzer(null),!1;s&&E(),t&&R(),H(),window.addEventListener("copy",U),window.addEventListener("keyup",O)})},ne=()=>{He().then(()=>{if(!d.allowScrolling)return!1;d.activeMark.node.scrollIntoView();let w=k("navigable"),T=w.scrollTop-60;t&&(T-=document.querySelector("#wp-content-editor-tools")?.getBoundingClientRect()?.height||0,T-=document.querySelector("#wp-content-editor-container .mce-toolbar-grp")?.getBoundingClientRect()?.height||0),w.isEqualNode(document.documentElement)&&(w=window),w.scrollTo({top:T}),d.allowScrolling=!1})},Y=w=>{const T=[];d.highlightMarks.forEach((I,B)=>{if(w.hasAttribute("data-mce-annotation-uid")&&w.dataset.mceAnnotationUid.indexOf(I.id)!==-1){T.push(B);return}if(w.classList.contains(`is-annotated-by-${d.source}`)&&I.block.clientId===w.dataset.block){T.push(B);return}w.id.indexOf(I.id)!==-1&&T.push(B)}),T.length&&T.forEach(I=>{d.highlightMarks[I].node=w})},L=({block:w,node:T})=>{const I=x({block:w,node:T});if(I)for(const[B,W]of Object.entries(d.highlightSentences||{})){const Z=new RegExp(Ne(W),"g");let z;for(;(z=Z.exec(I))!==null&&!d.highlightMarks.find(he=>he.sentenceIndex===B);){const X={start:z.index,end:z.index+z[0].length||1};d.highlightMarks.find(he=>T?(he.range.start===X.start||he.range.end===X.end)&&he.parent.isSameNode(T):(he.range.start===X.start||he.range.end===X.end)&&he.block.clientId===w.clientId)||d.highlightMarks.push({id:Bn(1,999999999),range:X,block:w,parent:T||document.getElementById(`block-${w.clientId}`),active:d.highlightMarks.length===0,sentenceIndex:B,sentence:W,node:null,annotatorSelector:null})}}if(w)for(const B of w?.innerBlocks||[])L({block:B,node:null})},D=()=>{if(m.value)return!1;const w=window.setInterval(()=>{if(m.value=window?.tinymce?.get("content")||null,!m.value||!m.value.dom)return!1;window.clearInterval(w),m.value.dom.addStyle(` span.annotation-text.annotation-text-${d.source} { background-color: #CCE0FF; color: inherit; display: inline; font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; position: static; } `.trim())},500)},$=(w,T)=>{const I=JSON.stringify(w),B=JSON.stringify(T);I!==B&&ie()};return We(()=>{d.wpBodyContentObserver&&d.wpBodyContentObserver?.disconnect();const w=window.setInterval(()=>{typeof k("wrapper")=="object"&&(window.clearInterval(w),F())},1e3)}),Bt(()=>{(et()||!s&&!t)&&(d.enabled=!1),s&&(!d.dispatchAnnotations||!i||!n)&&(d.enabled=!1)}),{watchHighlightSentences:$}},cu="all-in-one-seo-pack",du={emits:["selectedKeyphrase","deleted","saved"],setup(){return{keywordRankTrackerStore:Rt()}},components:{CoreTooltip:de,SvgPencil:lt,SvgStatistics:On,SvgTrash:ut},props:{index:{type:Number},keyphrase:{type:String},score:{type:Number}},data(){return{edit:!1,strings:{delete:a("Delete",cu)}}},computed:{scoreClass(){return 79<this.score?"score-green":49<this.score?"score-orange":0<this.score?"score-red":"score-none"}},methods:{editKeyphraseEv(o){this.edit=!0,this.$emit("selectedKeyphrase",o)},deleteKeyphraseEv(o){this.edit=!1,this.$emit("deleted",o)},toggleKeyphrasesPanel(o){this.$emit("selectedKeyphrase",o)},closeEdit(o){const e=o.target?.value.trim(),s=this.index;e?(this.edit=!1,this.$emit("saved",{index:s,value:e})):this.deleteKeyphraseEv(s)},pressEnter(o){o.preventDefault(),o.target.blur(),this.edit=!1}}},uu={class:"aioseo-keyphrase-tag"},pu={key:0,class:"aioseo-edit-keyphrase-tag"},gu=["value"];function mu(o,e,s,t,i,n){const m=h("svg-pencil"),d=h("svg-statistics"),g=h("svg-trash"),b=h("core-tooltip");return r(),v("div",uu,[l("span",{class:Q(["aioseo-add-keyphrase-tag",i.edit?"hidden":""])},[l("span",{class:"keyphrase-name",onClick:e[0]||(e[0]=C=>n.toggleKeyphrasesPanel(s.index))},_(s.keyphrase),1),l("span",{class:"keyphrase-edit",onClick:e[1]||(e[1]=C=>n.editKeyphraseEv(s.index))},[p(m)]),l("a",{href:"#",onClick:e[2]||(e[2]=te(C=>t.keywordRankTrackerStore.toggleModal({modal:"modalOpenPostEdit",open:!0}),["prevent","exact"])),class:"btn-keyword-rank-tracker"},[p(d,{width:"20",height:"19"})]),l("span",{class:Q(["keyphrase-score",n.scoreClass]),onClick:e[3]||(e[3]=C=>n.toggleKeyphrasesPanel(s.index))},_(s.score)+"/100",3)],2),i.edit?(r(),v("span",pu,[l("input",{value:s.keyphrase,onBlur:e[4]||(e[4]=(...C)=>n.closeEdit&&n.closeEdit(...C)),onKeydown:e[5]||(e[5]=Lt((...C)=>n.pressEnter&&n.pressEnter(...C),["enter"]))},null,40,gu),l("span",{class:"keyphrase-delete",onClick:e[6]||(e[6]=C=>n.deleteKeyphraseEv(s.index))},[p(b,{type:"action"},{tooltip:u(()=>[P(_(i.strings.delete),1)]),default:u(()=>[p(g)]),_:1})])])):f("",!0)])}const Ss=A(du,[["render",mu]]),hu={},_u={width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-eye-filled"};function fu(o,e){return r(),v("svg",_u,[...e[0]||(e[0]=[l("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)])])}const yu=A(hu,[["render",fu]]),Io="all-in-one-seo-pack",vu={setup(){return{truSeoHighlighterStore:Mt()}},components:{CoreTooltip:de,SvgEye:mt,SvgEyeFilled:yu},props:{analyzer:String},data(){return{strings:{highlightSections:a("Highlight sections in the Editor",Io),highlightingIsDisabled:a("Highlighting is disabled for current view",Io)}}},methods:{onClickBtnToggleHighlighter(){this.truSeoHighlighterStore.toggleHighlightAnalyzer(this.analyzer)}}},bu=["disabled"];function ku(o,e,s,t,i,n){const m=h("svg-eye"),d=h("core-tooltip"),g=h("svg-eye-filled");return t.truSeoHighlighterStore.enabled?(r(),v("button",{key:0,type:"button",class:"tru-seo-toggle-highlighter",disabled:!t.truSeoHighlighterStore.allowHighlighting,onClick:e[0]||(e[0]=te(b=>n.onClickBtnToggleHighlighter(),["stop","exact"]))},[t.truSeoHighlighterStore.highlightAnalyzer!==s.analyzer?(r(),y(d,{key:0,offset:o.$root.$data.screenContext==="sidebar"?"-200px,0":"",type:"action"},{tooltip:u(()=>[P(_(t.truSeoHighlighterStore.allowHighlighting?i.strings.highlightSections:i.strings.highlightingIsDisabled),1)]),default:u(()=>[p(m,{width:"16",height:"16"})]),_:1},8,["offset"])):(r(),y(g,{key:1,width:"16",height:"16"}))],8,bu)):f("",!0)}const wu=A(vu,[["render",ku]]),Su={class:"aioseo-analysis-detail"},Cu={key:0,class:"detail detail--pl-0"},xu={key:0,class:"detail"},Pu={class:"title__text"},Tu={class:"description"},Qe={__name:"MetaboxAnalysisDetail",props:{analysisItems:{type:Object}},setup(o){const s={switchToVisualEditor:a("TruSEO cannot analyze the post while you are using the Code Editor. Please switch back to the Visual Editor to view your results.","all-in-one-seo-pack")},t=i=>{i.target.parentElement.classList.toggle("toggled")};return(i,n)=>(r(),v("ul",Su,[c(qs)()?(r(),v("li",Cu,[p(c(le),{type:"yellow"},{default:u(()=>[P(_(s.switchToVisualEditor),1)]),_:1})])):(r(!0),v(re,{key:1},xe(o.analysisItems,(m,d)=>(r(),v(re,{key:d},[m.title?(r(),v("li",xu,[l("p",{class:Q(["title",m.error===0?"toggled":""])},[m.error===0?(r(),y(c(Ht),{key:0,width:"16"})):f("",!0),m.error===1?(r(),y(c(xn),{key:1,width:"16"})):f("",!0),l("span",Pu,_(m.title),1),m?.highlightSentences?.length?(r(),y(c(wu),{key:2,analyzer:d},null,8,["analyzer"])):f("",!0),p(c($t),{width:"16",role:"button",onClick:te(t,["stop"])})],2),l("p",Tu,_(m.description),1)])):f("",!0)],64))),128))]))}},Eu={emits:["saved","deleted","selected"],components:{CoreKeyphrase:Ss,CoreLoader:Se,MetaboxAnalysisDetail:Qe},props:{keyphrases:{type:Array,required:!0},selectedKeyphrase:{type:Number,default:0},loading:{type:Array,default:()=>[]}},computed:{hasKeyphrases(){return this.keyphrases&&0<this.keyphrases.length},isLoading(){return this.loading[this.selectedKeyphrase]&&this.keyphrases[this.selectedKeyphrase]&&this.keyphrases[this.selectedKeyphrase].keyphrase},hasAnalysis(){return this.keyphrases[this.selectedKeyphrase]&&this.keyphrases[this.selectedKeyphrase].keyphrase},analysisItems(){return this.keyphrases[this.selectedKeyphrase]?.analysis||{}}},methods:{handleSaved(o){this.$emit("saved",o)},handleDeleted(o){this.$emit("deleted",o)},handleSelectedKeyphrase(o){this.$emit("selected",o)}}},Iu={key:0,class:"additional-keyphrases-display"},Au={class:"analysis-wrapper"};function Lu(o,e,s,t,i,n){const m=h("core-keyphrase"),d=h("core-loader"),g=h("metabox-analysis-detail");return n.hasKeyphrases?(r(),v("div",Iu,[(r(!0),v(re,null,xe(s.keyphrases,(b,C)=>(r(),y(m,{key:C,index:C,keyphrase:b.keyphrase,score:b.score,onSaved:n.handleSaved,onDeleted:n.handleDeleted,onSelectedKeyphrase:n.handleSelectedKeyphrase,class:Q(["aioseo-keyphrase-tag additional-keyphrase",s.selectedKeyphrase===C?"selected":null])},null,8,["index","keyphrase","score","onSaved","onDeleted","onSelectedKeyphrase","class"]))),128)),l("div",Au,[n.isLoading?(r(),y(d,{key:0,class:"analysis-loading",dark:""})):f("",!0),!n.isLoading&&n.hasAnalysis?(r(),y(g,{key:1,analysisItems:n.analysisItems},null,8,["analysisItems"])):f("",!0)])])):f("",!0)}const Bu=A(Eu,[["render",Lu],["__scopeId","data-v-bd384ffc"]]),Ao="all-in-one-seo-pack",Mu={emits:["add"],components:{CoreTooltip:de,SvgCirclePlus:pt},props:{screenContext:{type:String,required:!0},maxReached:{type:Boolean,default:!1},maxAdditionalKeyphrases:{type:Number,required:!0}},computed:{strings(){return{addKeyphrase:a("Add Additional Keywords",Ao),maxAmountReached:G(a("You have reached the maximum of %1$s additional keywords.",Ao),this.maxAdditionalKeyphrases)}}},methods:{handleAddClick(){this.$emit("add")},handleEnter(o){o.preventDefault();const e=document.getElementById("add-additional-keyphrase");e&&e.click()}}},Ru={class:"additional-keyphrase-input-wrapper"};function Ou(o,e,s,t,i,n){const m=h("base-input"),d=h("svg-circle-plus"),g=h("base-button"),b=h("core-tooltip");return r(),v("div",Ru,[p(m,{size:"medium",class:Q(`add-keyphrase-${s.screenContext}-input`),onKeydown:Lt(n.handleEnter,["enter"])},null,8,["class","onKeydown"]),s.maxReached?f("",!0):(r(),y(g,{key:0,id:"add-additional-keyphrase",class:"add-keyphrase gray medium",onClick:n.handleAddClick},{default:u(()=>[p(d,{width:"14",height:"14"}),P(" "+_(n.strings.addKeyphrase),1)]),_:1},8,["onClick"])),s.maxReached?(r(),y(b,{key:1},{tooltip:u(()=>[l("span",null,_(n.strings.maxAmountReached),1)]),default:u(()=>[p(g,{id:"add-additional-keyphrase",class:"add-keyphrase gray medium",disabled:!0},{default:u(()=>[p(d,{width:"14",height:"14"}),P(" "+_(n.strings.addKeyphrase),1)]),_:1})]),_:1})):f("",!0)])}const Hu=A(Mu,[["render",Ou],["__scopeId","data-v-a031c128"]]),Lo="all-in-one-seo-pack",Vu={components:{CoreAlert:le},data(){return{strings:{keyphraseDocumentation:a("Improve your SEO rankings with additional keywords.",Lo),upsell:G(a("Additional Keywords are a %1$s feature. %2$s",Lo),"PRO",se.getUpsellLink("post-settings","additional-keywords",fe.learnMore,"liteUpgrade",!0))}}}},$u={class:"additional-keyphrases-upsell"},Du={class:"aioseo-description additional-keyphrases-description"},Uu=["innerHTML"];function Ku(o,e,s,t,i,n){const m=h("core-alert");return r(),v("div",$u,[l("div",Du,_(i.strings.keyphraseDocumentation),1),p(m,{class:"inline-upsell",type:"blue"},{default:u(()=>[l("div",{innerHTML:i.strings.upsell},null,8,Uu)]),_:1})])}const Fu=A(Vu,[["render",Ku],["__scopeId","data-v-22516404"]]),qu={setup(){return{licenseStore:ge(),postEditorStore:J(),rootStore:Pe(),truSeo:new Zo}},components:{AdditionalKeyphrasesDisplay:Bu,AdditionalKeyphraseInput:Hu,AdditionalKeyphrasesUpsell:Fu},data(){return{selectedKeyphrase:0}},watch:{"postEditorStore.currentPost.keyphrases.additional"(){this.postEditorStore.currentPost.keyphrases.additional&&!this.postEditorStore.currentPost.keyphrases.additional[this.selectedKeyphrase]&&(this.selectedKeyphrase=0)}},computed:{hasLicense(){return this.rootStore.isPro&&this.licenseStore.license.isActive},maxReached(){return this.postEditorStore.currentPost.maxAdditionalKeyphrases<=(this.postEditorStore.currentPost.keyphrases?.additional?.length||0)}},methods:{handleSelectedKeyphrase(o){this.selectedKeyphrase=o},handleSaved(o){const{index:e,value:s}=o;Ns({postEditorStore:this.postEditorStore,truSeo:this.truSeo,index:e,value:s,onSuccess:t=>{this.selectedKeyphrase=t}})},handleDeleted(o){zs({postEditorStore:this.postEditorStore,truSeo:this.truSeo,index:o})},handleAdd(){const o=Gs({postEditorStore:this.postEditorStore,truSeo:this.truSeo,screenContext:this.$root.$data.screenContext,onSuccess:e=>{this.selectedKeyphrase=e}});o!==null&&(this.selectedKeyphrase=o)}},mounted(){this.selectedKeyphrase=this.postEditorStore.currentPost.keyphrases.additional?.length-1}},Gu={class:"additional-keyphrases-panel"};function zu(o,e,s,t,i,n){const m=h("additional-keyphrases-display"),d=h("additional-keyphrase-input"),g=h("additional-keyphrases-upsell");return r(),v("div",Gu,[n.hasLicense?(r(),y(m,{key:0,keyphrases:t.postEditorStore.currentPost.keyphrases.additional,"selected-keyphrase":i.selectedKeyphrase,loading:t.postEditorStore.currentPost.loading.additional,onSaved:n.handleSaved,onDeleted:n.handleDeleted,onSelected:n.handleSelectedKeyphrase},null,8,["keyphrases","selected-keyphrase","loading","onSaved","onDeleted","onSelected"])):f("",!0),n.hasLicense?(r(),y(d,{key:1,"screen-context":o.$root.$data.screenContext,"max-reached":n.maxReached,"max-additional-keyphrases":t.postEditorStore.currentPost.maxAdditionalKeyphrases,onAdd:n.handleAdd},null,8,["screen-context","max-reached","max-additional-keyphrases","onAdd"])):f("",!0),n.hasLicense?f("",!0):(r(),y(g,{key:2}))])}const Bo=A(qu,[["render",zu],["__scopeId","data-v-5e4a7647"]]),Nu="all-in-one-seo-pack",ju={setup(){return{settingsStore:Le()}},components:{CoreTooltip:de,SvgAiContent:Vt,MetaTitleModal:ks,MetaDescriptionModal:vs},props:{feature:{type:Object,required:!0}},data(){return{strings:{useAiGenerator:a("Use AI Generator",Nu)},showModal:!1}}},Wu={class:"aioseo-ai-generator"};function Zu(o,e,s,t,i,n){const m=h("svg-ai-content"),d=h("core-tooltip");return r(),v("div",Wu,[p(d,{type:"action",offset:"-30px,0"},{tooltip:u(()=>[P(_(i.strings.useAiGenerator),1)]),default:u(()=>[l("button",{type:"button",onClick:e[0]||(e[0]=g=>i.showModal=!0)},[p(m,{width:"18",height:"18"})])]),_:1}),(r(),y(ae(`${s.feature.slug}-modal`),{feature:s.feature,show:i.showModal,onCloseModal:e[1]||(e[1]=g=>i.showModal=!1)},null,40,["feature","show"]))])}const Mo=A(ju,[["render",Zu]]),Yu={setup(){const{getErrorClass:o,getErrorDisplay:e,getScoreClass:s,strings:t}=ho();return{getErrorClass:o,getErrorDisplay:e,getScoreClass:s,settingsStore:Le(),strings:t}},components:{CoreTooltip:de,SvgCaret:$t,SvgCircleCheck:Ht,SvgCircleQuestionMark:je,SvgEllipse:mo,TransitionSlide:Vn},props:{slug:{type:String,required:!0},headerText:String,focusScore:Number,trueSeoScore:Number,toggles:{type:Boolean,default(){return!0}},hideHeader:Boolean,noSlide:Boolean,saveToggleStatus:{type:Boolean,default(){return!0}}},watch:{"settingsStore.metaBoxTabs.mainSidebar":{deep:!0,handler(o){this.$root.$data.screenContext==="sidebar"&&this.openCard(o.card)}}},methods:{openCard(o){for(const e in this.settingsStore.settings.toggledCards)this.settingsStore.settings.toggledCards[e]&&this.settingsStore.toggleCard({slug:e});this.settingsStore.toggleCard({slug:o})}},created(){this.openCard(this.settingsStore.metaBoxTabs.mainSidebar.card)}},Xu={class:"aioseo-card aioseo-sidebar-card"},Qu={class:"text"},Ju={key:0,class:"content"},ep={key:1,class:"content"};function tp(o,e,s,t,i,n){const m=h("svg-ellipse"),d=h("svg-circle-check"),g=h("svg-circle-question-mark"),b=h("core-tooltip"),C=h("svg-caret"),S=h("transition-slide");return r(),v("div",Xu,[s.hideHeader?f("",!0):(r(),v("div",{key:0,class:"header",onClick:e[0]||(e[0]=x=>t.settingsStore.toggleCard({slug:s.slug,shouldSave:s.saveToggleStatus}))},[l("div",Qu,[Oe(o.$slots,"header",{},()=>[P(_(s.headerText),1)]),s.focusScore>=0?Oe(o.$slots,"alt",{key:0},()=>[s.focusScore!==null?(r(),v("span",{key:0,class:Q(["card-score",t.getScoreClass(s.focusScore)])},_(s.focusScore)+"/100 ",3)):f("",!0)]):f("",!0),s.trueSeoScore>=0?Oe(o.$slots,"alt",{key:1},()=>[l("span",{class:Q(["card-score",t.getErrorClass(s.trueSeoScore)])},[0<s.trueSeoScore?(r(),y(m,{key:0,width:"6"})):f("",!0),s.trueSeoScore===0?(r(),y(d,{key:1,width:"12"})):f("",!0),P(" "+_(t.getErrorDisplay(s.trueSeoScore)),1)],2)]):f("",!0),o.$slots.tooltip?(r(),y(b,{key:2},{tooltip:u(()=>[Oe(o.$slots,"tooltip")]),default:u(()=>[p(g)]),_:3})):f("",!0)]),s.toggles&&t.settingsStore.settings.toggledCards?(r(),y(C,{key:0,class:Q({rotated:!t.settingsStore.settings.toggledCards[s.slug]})},null,8,["class"])):f("",!0)])),t.settingsStore.settings.toggledCards||s.noSlide?(r(),y(S,{key:1,active:t.settingsStore.settings.toggledCards[s.slug]&&s.toggles||s.noSlide},{default:u(()=>[o.$slots["before-tabs"]?(r(),v("div",Ju,[Oe(o.$slots,"before-tabs")])):f("",!0),Oe(o.$slots,"tabs"),o.$slots.default?(r(),v("div",ep,[Oe(o.$slots,"default")])):f("",!0)]),_:3},8,["active"])):f("",!0)])}const Ye=A(Yu,[["render",tp]]),bt="all-in-one-seo-pack",op={emits:["add"],components:{CoreTooltip:de,SvgCirclePlus:pt},props:{screenContext:{type:String,required:!0}},data(){return{strings:{addKeyphrase:a("Add Focus Keyword",bt),getAdditionalKeyphrases:a("Get Additional Keywords",bt),semrushGetAdditionalKeyphrases:G(a("%1$s integrates directly with %2$s to provide you with actionable keywords to help you write better content.",bt),"AIOSEO","Semrush"),pleaseAddFocusKeyphrase:a("To use this feature, first add a focus keyword.",bt)}}},methods:{handleAddClick(){this.$emit("add")},handleEnter(o){o.preventDefault();const e=document.getElementById("add-focus-keyphrase");e&&e.click()}}},sp={class:"focus-keyphrase-input-wrapper"},np={class:"disabled-button gray medium"};function rp(o,e,s,t,i,n){const m=h("base-input"),d=h("svg-circle-plus"),g=h("base-button"),b=h("core-tooltip");return r(),v("div",sp,[p(m,{size:"medium",class:Q(`add-focus-keyphrase-${s.screenContext}-input`),onKeydown:Lt(n.handleEnter,["enter"])},null,8,["class","onKeydown"]),l("div",{class:Q(`add-focus-keyphrase-${s.screenContext}-button`)},[p(g,{id:"add-focus-keyphrase",class:"add-keyphrase gray medium",onClick:n.handleAddClick},{default:u(()=>[p(d,{width:"14",height:"14"}),P(" "+_(i.strings.addKeyphrase),1)]),_:1},8,["onClick"]),p(b,null,{tooltip:u(()=>[l("span",null,_(i.strings.semrushGetAdditionalKeyphrases)+" "+_(i.strings.pleaseAddFocusKeyphrase),1)]),default:u(()=>[l("div",np,[p(d,{width:"14",height:"14"}),P(" "+_(i.strings.getAdditionalKeyphrases),1)])]),_:1})],2)])}const ip=A(op,[["render",rp],["__scopeId","data-v-d13c67de"]]),ap={emits:["saved","deleted"],components:{CoreKeyphrase:Ss,CoreLoader:Se,MetaboxAnalysisDetail:Qe},props:{keyphrase:{type:String,required:!0},score:{type:Number,default:0},loading:{type:Boolean,default:!1},analysisItems:{type:Object,default:()=>({})}},methods:{handleSaved(o){this.$emit("saved",o)},handleDeleted(){this.$emit("deleted")}}},lp={class:"focus-keyphrase-display"};function cp(o,e,s,t,i,n){const m=h("core-keyphrase"),d=h("core-loader"),g=h("metabox-analysis-detail");return r(),v("div",lp,[p(m,{index:0,keyphrase:s.keyphrase,score:s.score,onSaved:n.handleSaved,onDeleted:n.handleDeleted,class:"aioseo-keyphrase-tag"},null,8,["keyphrase","score","onSaved","onDeleted"]),s.loading?(r(),y(d,{key:0,class:"analysis-loading",dark:""})):f("",!0),!s.loading&&s.analysisItems?(r(),y(g,{key:1,analysisItems:s.analysisItems},null,8,["analysisItems"])):f("",!0)])}const dp=A(ap,[["render",cp],["__scopeId","data-v-0d9ef5cb"]]),jt="all-in-one-seo-pack",up={emits:["click"],components:{CoreTooltip:de,SvgCirclePlus:pt},props:{hasFocusKeyphrase:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},isPro:{type:Boolean,default:!1},isUnlicensed:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},settingsUrl:{type:String,required:!0}},computed:{strings(){return{getAdditionalKeyphrases:a("Get Additional Keywords",jt),semrushTooltip:G(a("Get Additional Keywords with %1$s!",jt),"Semrush"),semrushTooltipLicenseKey:G(a("%1$sA valid license key is required%2$s in order to connect with %3$s.",jt),'<a href="'+this.settingsUrl+'">',"</a>","Semrush")}}},methods:{handleClick(){this.$emit("click")}}},pp={class:"semrush-keywords-button-wrapper"},gp={class:"disabled-button gray"},mp=["innerHTML"];function hp(o,e,s,t,i,n){const m=h("svg-circle-plus"),d=h("core-tooltip"),g=h("base-button");return r(),v("div",pp,[!s.loading&&s.hasFocusKeyphrase&&s.isPro&&s.isUnlicensed?(r(),y(d,{key:0},{tooltip:u(()=>[l("span",{innerHTML:n.strings.semrushTooltipLicenseKey},null,8,mp)]),default:u(()=>[l("div",gp,[p(m,{width:"14",height:"14"}),P(" "+_(n.strings.getAdditionalKeyphrases),1)])]),_:1})):f("",!0),!s.loading&&s.hasFocusKeyphrase&&(!s.isPro||!s.isUnlicensed)?(r(),y(d,{key:1,disabled:!s.showTooltip||s.isPro,"force-show":s.showTooltip&&!s.isPro},{tooltip:u(()=>[l("span",null,_(n.strings.semrushTooltip),1)]),default:u(()=>[p(g,{class:"add-keyphrase gray medium",onClick:n.handleClick},{default:u(()=>[p(m,{width:"14",height:"14"}),P(" "+_(n.strings.getAdditionalKeyphrases),1)]),_:1},8,["onClick"])]),_:1},8,["disabled","force-show"])):f("",!0)])}const _p=A(up,[["render",hp],["__scopeId","data-v-4eb801a3"]]),fp={},yp={viewBox:"0 0 158 21",class:"aioseo-logo-semrush"};function vp(o,e){return r(),v("svg",yp,[...e[0]||(e[0]=[l("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),l("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)])])}const bp=A(fp,[["render",vp]]),kp={props:{width:Number,height:Number,fillColor:String,strokeColor:String,strokeWidth:Number,data:Array},computed:{getViewBox(){return"0 0 "+this.width+" "+this.height},polylinePoints(){const o=Math.max(...this.data.map(i=>i.x)),e=Math.max(...this.data.map(i=>i.y)),s=this.height-this.strokeWidth,t=this.data.map(i=>{const n=i.x===0?0:i.x/o,m=i.y===0?0:i.y/e,d=n*this.width,g=s-m*s+this.strokeWidth;return`${d},${g}`}).join(" ");return`0,${s+this.strokeWidth} `+t+` ${this.width},${s+this.strokeWidth}`}}},wp=["width","height","viewBox"],Sp=["fill","points"],Cp=["stroke","strokeWidth","points"];function xp(o,e,s,t,i,n){return r(),v("svg",{width:s.width,height:s.height,viewBox:n.getViewBox,role:"img","aria-hidden":"true",focusable:"false"},[l("polygon",{fill:s.fillColor,points:n.polylinePoints},null,8,Sp),l("polyline",{fill:"none",stroke:s.strokeColor,strokeWidth:s.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round",points:n.polylinePoints},null,8,Cp)],8,wp)}const Pp=A(kp,[["render",xp]]),kt="all-in-one-seo-pack",Tp={emits:["add","remove","navigate"],components:{CoreTooltip:de,SvgAreaChart:Pp,SvgCircleCheck:Ht,SvgTrash:ut},props:{keyword:{type:Array,required:!0},index:{type:Number,required:!0},focusKeyphrase:{type:String,required:!0},hasAdditional:{type:Boolean,default:!1},additionalScore:{type:Number,default:0},isAdding:{type:Boolean,default:!1},isRemoving:{type:Boolean,default:!1},maxReached:{type:Boolean,default:!1},isUnlicensed:{type:Boolean,default:!1},maxAdditionalKeyphrases:{type:Number,required:!0}},computed:{isFocusKeyphrase(){return this.keyword[0]===this.focusKeyphrase.toLowerCase()},trendData(){return js(this.keyword[2])},scoreClass(){const o=this.additionalScore;return 79<o?"score-green":49<o?"score-orange":0<o?"score-red":"score-none"},strings(){return{focusKeyphrase:a("Focus Keyword",kt),addAdditionalKeyphrase:a("Add Keyword",kt),delete:a("Delete",kt),maxAmountReached:G(a("You have reached the maximum of %1$s additional keywords.",kt),this.maxAdditionalKeyphrases)}}},methods:{handleAdd(){this.$emit("add",this.keyword[0],this.index)},handleRemove(){this.$emit("remove",this.keyword[0],this.index)},handleNavigate(){this.$emit("navigate",this.keyword[0])}}},Ep={class:"keyphrase"},Ip={class:"keyphrase-volume"},Ap={class:"keyphrase-trend"},Lp={key:0,class:"keyphrase-actions"},Bp={key:0,class:"focus-keyphrase"},Mp={key:1},Rp={key:2,class:"remove-keyphrase"};function Op(o,e,s,t,i,n){const m=h("svg-area-chart"),d=h("svg-circle-check"),g=h("base-button"),b=h("core-tooltip"),C=h("svg-trash");return r(),v("tr",{class:Q(["keyphrase-row",{even:s.index%2===0}])},[l("td",Ep,_(s.keyword[0]),1),l("td",Ip,_(s.keyword[1]),1),l("td",Ap,[p(m,{width:66,height:24,data:n.trendData,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc"},null,8,["data"])]),s.isUnlicensed?f("",!0):(r(),v("td",Lp,[n.isFocusKeyphrase?(r(),v("div",Bp,[p(d),P(" "+_(n.strings.focusKeyphrase),1)])):f("",!0),n.isFocusKeyphrase?f("",!0):(r(),v("div",Mp,[!s.isRemoving&&(s.isAdding||!s.hasAdditional)&&!s.maxReached?(r(),y(g,{key:0,type:"gray",size:"medium",onClick:n.handleAdd,loading:s.isAdding},{default:u(()=>[P(_(n.strings.addAdditionalKeyphrase),1)]),_:1},8,["onClick","loading"])):f("",!0),!s.isRemoving&&(s.isAdding||!s.hasAdditional)&&s.maxReached?(r(),y(b,{key:1},{tooltip:u(()=>[l("span",null,_(n.strings.maxAmountReached),1)]),default:u(()=>[p(g,{type:"gray",size:"medium",disabled:!0,loading:s.isAdding},{default:u(()=>[P(_(n.strings.addAdditionalKeyphrase),1)]),_:1},8,["loading"])]),_:1})):f("",!0),s.hasAdditional&&!s.isAdding&&(s.isRemoving||s.hasAdditional)?(r(),v("div",Rp,[l("span",{class:Q(["keyphrase-score",n.scoreClass]),onClick:e[0]||(e[0]=(...S)=>n.handleNavigate&&n.handleNavigate(...S))},_(s.additionalScore)+"/100",3),p(b,{type:"action"},{tooltip:u(()=>[P(_(n.strings.delete),1)]),default:u(()=>[p(C,{onClick:n.handleRemove},null,8,["onClick"])]),_:1})])):f("",!0)]))]))],2)}const Hp=A(Tp,[["render",Op],["__scopeId","data-v-40f391ea"]]),De="all-in-one-seo-pack",Vp={emits:["add","remove","navigate"],components:{CoreAlert:le,CoreLoader:Se,SvgLogoSemrush:bp,SemrushKeywordTableRow:Hp},props:{keywords:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},error:{type:String,default:""},focusKeyphrase:{type:String,required:!0},additionalKeyphrases:{type:Array,default:()=>[]},addingIndex:{type:[Number,Boolean],default:!1},removingIndex:{type:[Number,Boolean],default:!1},maxAdditionalKeyphrases:{type:Number,required:!0},isUnlicensed:{type:Boolean,default:!1}},computed:{maxReached(){return this.maxAdditionalKeyphrases<=(this.additionalKeyphrases?.length||0)},formattedError(){return this.error&&this.error.includes("TOTAL LIMIT EXCEEDED")?a("You have exceeded the limit for requests. Please try again later.",De):this.error||a("An error occurred while fetching keywords. Please try again later.",De)},strings(){return{keyphrase:a("Keyword",De),volume:a("Volume",De),trend:a("Trend",De),noResults:a("No results",De),youHaveExceededSemrush:G(a("You have exceeded the number of requests allowed by your %1$s plan.",De),"Semrush"),inOrderToUpgradeSemrush:G(a("In order to continue searching for additional keywords, you'll need to upgrade. %1$s",De),se.getUpsellLink("post-settings","semrush-pricing",fe.learnMore,"semrushPricing",!0))}}},methods:{hasAdditionalKeyphrase(o){return!this.additionalKeyphrases||!Array.isArray(this.additionalKeyphrases)?!1:0<this.additionalKeyphrases.filter(e=>e.keyphrase.toLowerCase()===o.toLowerCase()).length},getAdditionalKeyphraseScore(o){if(!this.additionalKeyphrases||!Array.isArray(this.additionalKeyphrases))return 0;const e=this.additionalKeyphrases.find(s=>s.keyphrase.toLowerCase()===o.toLowerCase());return e?e.score:0},handleAdd(o,e){this.$emit("add",o,e)},handleRemove(o,e){this.$emit("remove",o,e)},handleNavigate(o){this.$emit("navigate",o)}}},$p={class:"results"},Dp={"aria-label":"Additional Keywords",class:"additional-keyphrases-table",cellpadding:"0",cellspacing:"0"},Up={class:"keyphrases-header"},Kp={class:"keyphrase"},Fp={class:"keyphrase-volume"},qp={class:"keyphrase-trend"},Gp={key:0,class:"keyphrase-actions"},zp={class:"keyphrases-rows"},Np={key:1,class:"keyphrase-row"},jp=["colspan"],Wp={key:1},Zp={class:"semrush-logo"},Yp={class:"semrush-upsell"},Xp=["innerHTML"],Qp=["innerHTML"];function Jp(o,e,s,t,i,n){const m=h("semrush-keyword-table-row"),d=h("core-loader"),g=h("core-alert"),b=h("svg-logo-semrush");return r(),v("div",$p,[l("table",Dp,[l("thead",null,[l("tr",Up,[l("th",Kp,_(n.strings.keyphrase),1),l("th",Fp,_(n.strings.volume),1),l("th",qp,_(n.strings.trend),1),s.isUnlicensed?f("",!0):(r(),v("th",Gp))])]),l("tbody",zp,[s.keywords.length&&!s.loading?(r(!0),v(re,{key:0},xe(s.keywords,(C,S)=>(r(),y(m,{key:S,keyword:C,index:S,"focus-keyphrase":s.focusKeyphrase,"has-additional":n.hasAdditionalKeyphrase(C[0]),"additional-score":n.getAdditionalKeyphraseScore(C[0]),"is-adding":s.addingIndex===S,"is-removing":s.removingIndex===S,"max-reached":n.maxReached,"is-unlicensed":s.isUnlicensed,"max-additional-keyphrases":s.maxAdditionalKeyphrases,onAdd:n.handleAdd,onRemove:n.handleRemove,onNavigate:n.handleNavigate},null,8,["keyword","index","focus-keyphrase","has-additional","additional-score","is-adding","is-removing","max-reached","is-unlicensed","max-additional-keyphrases","onAdd","onRemove","onNavigate"]))),128)):f("",!0),!s.keywords.length||s.loading?(r(),v("tr",Np,[l("td",{colspan:s.isUnlicensed?3:4,class:"no-results"},[l("div",null,[s.loading?(r(),y(d,{key:0,dark:""})):f("",!0),!s.loading&&!s.error?(r(),v("span",Wp,_(n.strings.noResults),1)):f("",!0),s.error&&!s.error.includes("TOTAL LIMIT EXCEEDED")?(r(),y(g,{key:2,type:"red"},{default:u(()=>[P(_(n.formattedError),1)]),_:1})):f("",!0),s.error&&s.error.includes("TOTAL LIMIT EXCEEDED")?(r(),v(re,{key:3},[l("div",Zp,[p(b)]),l("div",Yp,[l("span",null,[l("strong",{innerHTML:n.strings.youHaveExceededSemrush},null,8,Xp)]),e[0]||(e[0]=P(" "+_(" ")+" ",-1)),l("span",{innerHTML:n.strings.inOrderToUpgradeSemrush},null,8,Qp)])],64)):f("",!0)])],8,jp)])):f("",!0)])])])}const eg=A(Vp,[["render",Jp],["__scopeId","data-v-be732be9"]]),wt="all-in-one-seo-pack",tg={emits:["close","add","remove","navigate","country-changed"],components:{CoreAlert:le,CoreModal:me,SemrushKeywordsTable:eg},props:{show:{type:Boolean,default:!1},keywords:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},error:{type:String,default:""},focusKeyphrase:{type:String,required:!0},additionalKeyphrases:{type:Array,default:()=>[]},addingIndex:{type:[Number,Boolean],default:!1},removingIndex:{type:[Number,Boolean],default:!1},maxAdditionalKeyphrases:{type:Number,required:!0},isUnlicensed:{type:Boolean,default:!1},countryValue:{type:Object,required:!0}},data(){return{selectedCountry:this.countryValue,strings:{modalTitle:G(a("Additional Keywords by %1$s",wt),"Semrush"),showResultsFor:a("Show Results For:",wt),selectPriceIndicator:a("Select a country",wt),upsell:G(a("Analyzing your content with %1$s keywords is only available to licensed %2$s users. %3$s",wt),"Semrush","<strong>AIOSEO Pro</strong>",se.getUpsellLink("post-settings","semrush-keywords",fe.learnMore,"liteUpgrade",!0))}}},watch:{countryValue:{deep:!0,handler(o){this.selectedCountry=o}},selectedCountry:{deep:!0,handler(o){this.$emit("country-changed",o)}}},computed:{countryOptions(){return Yo()}},methods:{handleClose(){this.$emit("close")},handleAdd(o,e){this.$emit("add",o,e)},handleRemove(o,e){this.$emit("remove",o,e)},handleNavigate(o){this.$emit("navigate",o)}}},og={class:"aioseo-modal-content has-padding"},sg={class:"aioseo-settings-row"},ng={class:"settings-name"},rg={class:"name"};function ig(o,e,s,t,i,n){const m=h("core-alert"),d=h("base-select"),g=h("semrush-keywords-table"),b=h("core-modal");return r(),y(b,{show:s.show,onClose:n.handleClose,classes:["aioseo-focus-keyphrase-panel-modal"]},{headerTitle:u(()=>[P(_(i.strings.modalTitle),1)]),body:u(()=>[l("div",og,[s.isUnlicensed?(r(),y(m,{key:0,type:"blue",innerHTML:i.strings.upsell},null,8,["innerHTML"])):f("",!0),l("div",sg,[l("div",ng,[l("div",rg,_(i.strings.showResultsFor),1)]),p(d,{class:"semrush-country-selector",size:"medium",options:n.countryOptions,placeholder:i.strings.selectPriceIndicator,modelValue:i.selectedCountry,"onUpdate:modelValue":e[0]||(e[0]=C=>i.selectedCountry=C)},null,8,["options","placeholder","modelValue"])]),p(g,{keywords:s.keywords,loading:s.loading,error:s.error,"focus-keyphrase":s.focusKeyphrase,"additional-keyphrases":s.additionalKeyphrases,"adding-index":s.addingIndex,"removing-index":s.removingIndex,"max-additional-keyphrases":s.maxAdditionalKeyphrases,"is-unlicensed":s.isUnlicensed,onAdd:n.handleAdd,onRemove:n.handleRemove,onNavigate:n.handleNavigate},null,8,["keywords","loading","error","focus-keyphrase","additional-keyphrases","adding-index","removing-index","max-additional-keyphrases","is-unlicensed","onAdd","onRemove","onNavigate"])])]),_:1},8,["show","onClose"])}const ag=A(tg,[["render",ig]]),lg={setup(){return{connectStore:rn(),licenseStore:ge(),optionsStore:Ke(),postEditorStore:J(),rootStore:Pe(),semrushStore:nn(),settingsStore:Le(),truSeo:new Zo}},components:{FocusKeyphraseInput:ip,FocusKeyphraseDisplay:dp,SemrushKeywordsButton:_p,SemrushKeywordsModal:ag},data(){return{showSemrushTooltip:!1,loadingResults:!1,semrushShowModal:!1,addingAdditionalKeyphrase:!1,removingAdditionalKeyphrase:!1,semrushCountry:null}},computed:{hasFocusKeyphrase(){return!!(this.postEditorStore.currentPost.keyphrases.focus&&this.postEditorStore.currentPost.keyphrases.focus.keyphrase)}},methods:{handleAddKeyphrase(){sn({postEditorStore:this.postEditorStore,truSeo:this.truSeo,screenContext:this.$root.$data.screenContext})},handleKeyphraseSaved(o){const{value:e}=o;on({postEditorStore:this.postEditorStore,truSeo:this.truSeo,value:e})},handleKeyphraseDeleted(){tn({postEditorStore:this.postEditorStore,truSeo:this.truSeo})},async handleSemrushButtonClick(){this.showSemrushTooltip=!1,this.optionsStore.internalOptions.integrations.semrush.accessToken&&this.semrushStore.expired&&await this.semrushStore.refresh();const o=en({isConnected:this.connectStore.isConnected,hasValidTokens:this.semrushStore.hasValidTokens,connectUrl:this.rootStore.aioseo.urls.connect});if(!o){this.openModal();return}if(o.type==="connect"){this.openConnectPopup(o.url);return}o.type==="semrush_oauth"&&this.openSemrushOAuthPopup()},openConnectPopup(o){Js({url:o,onAuthenticated:e=>this.connectStore.saveConnectToken(e),onClosed:e=>{this.handleConnectOAuthClosed(e)}})},openSemrushOAuthPopup(){Qs({onAuthenticated:o=>this.semrushStore.authenticate(o),onClosed:o=>{this.handleSemrushOAuthClosed(o)}})},handleConnectOAuthClosed(o){if(o){if(this.semrushStore.hasValidTokens){this.$nextTick(this.handleSemrushButtonClick);return}this.showSemrushTooltip=!0}},handleSemrushOAuthClosed(o){o&&this.openModal()},openModal(){this.semrushShowModal=!0,!this.semrushStore.error&&this.getKeyphrases()},getKeyphrases(){Xs({semrushStore:this.semrushStore,database:this.semrushCountry.value,focusKeyphrase:this.postEditorStore.currentPost?.keyphrases?.focus?.keyphrase,onStart:()=>{this.loadingResults=!0},onSuccess:()=>{this.loadingResults=!1},onError:()=>{this.semrushShowModal=!1,this.loadingResults=!1}})},handleCountryChanged(o){this.semrushCountry.value===o.value&&this.semrushCountry.label===o.label||(this.settingsStore.changeSemrushCountry(o),this.semrushCountry=o,this.getKeyphrases())},async handleAddAdditionalKeyphrase(o,e){await Ys({postEditorStore:this.postEditorStore,truSeo:this.truSeo,keyphrase:o,onStart:()=>{this.addingAdditionalKeyphrase=e},onSuccess:()=>{this.addingAdditionalKeyphrase=!1}})},handleRemoveAdditionalKeyphrase(o,e){Zs({postEditorStore:this.postEditorStore,keyphrase:o,onStart:()=>{this.removingAdditionalKeyphrase=e},onSuccess:()=>{this.removingAdditionalKeyphrase=!1},nextTick:async()=>{await this.$nextTick()}})},handleNavigateToAdditionalKeyphrase(o){Ws({postEditorStore:this.postEditorStore,keyphrase:o,onSuccess:()=>{this.semrushShowModal=!1}})}},created(){const o=Yo();this.semrushCountry={value:this.settingsStore.settings.semrushCountry,label:o.find(e=>e.value===this.settingsStore.settings.semrushCountry)?.label||this.settingsStore.settings.semrushCountry}}},cg={class:"aioseo-focus-keyphrase-panel"};function dg(o,e,s,t,i,n){const m=h("focus-keyphrase-input"),d=h("focus-keyphrase-display"),g=h("semrush-keywords-button"),b=h("semrush-keywords-modal");return r(),v("div",cg,[n.hasFocusKeyphrase?f("",!0):(r(),y(m,{key:0,"screen-context":o.$root.$data.screenContext,onAdd:n.handleAddKeyphrase},null,8,["screen-context","onAdd"])),n.hasFocusKeyphrase?(r(),y(d,{key:1,keyphrase:t.postEditorStore.currentPost.keyphrases.focus.keyphrase,score:t.postEditorStore.currentPost.keyphrases.focus.score,loading:t.postEditorStore.currentPost.loading.focus,"analysis-items":t.postEditorStore.currentPost.keyphrases.focus.analysis,onSaved:n.handleKeyphraseSaved,onDeleted:n.handleKeyphraseDeleted},null,8,["keyphrase","score","loading","analysis-items","onSaved","onDeleted"])):f("",!0),p(g,{"has-focus-keyphrase":n.hasFocusKeyphrase,loading:t.postEditorStore.currentPost.loading.focus,"is-pro":t.rootStore.isPro,"is-unlicensed":t.licenseStore.isUnlicensed,"show-tooltip":i.showSemrushTooltip,"settings-url":t.rootStore.aioseo.urls.aio.settings,onClick:n.handleSemrushButtonClick},null,8,["has-focus-keyphrase","loading","is-pro","is-unlicensed","show-tooltip","settings-url","onClick"]),p(b,{show:i.semrushShowModal,keywords:t.semrushStore.results,loading:i.loadingResults,error:t.semrushStore.error,"focus-keyphrase":t.postEditorStore.currentPost.keyphrases.focus?.keyphrase||"","additional-keyphrases":t.postEditorStore.currentPost.keyphrases.additional,"adding-index":i.addingAdditionalKeyphrase,"removing-index":i.removingAdditionalKeyphrase,"max-additional-keyphrases":t.postEditorStore.currentPost.maxAdditionalKeyphrases,"is-unlicensed":t.licenseStore.isUnlicensed,"country-value":i.semrushCountry,onClose:e[0]||(e[0]=C=>i.semrushShowModal=!1),onAdd:n.handleAddAdditionalKeyphrase,onRemove:n.handleRemoveAdditionalKeyphrase,onNavigate:n.handleNavigateToAdditionalKeyphrase,onCountryChanged:n.handleCountryChanged},null,8,["show","keywords","loading","error","focus-keyphrase","additional-keyphrases","adding-index","removing-index","max-additional-keyphrases","is-unlicensed","country-value","onAdd","onRemove","onNavigate","onCountryChanged"])])}const Ro=A(lg,[["render",dg]]),St="all-in-one-seo-pack",ug={setup(){const{getErrorClass:o,getErrorDisplay:e,strings:s}=ho();return{postEditorStore:J(),rootStore:Pe(),getErrorClass:o,getErrorDisplay:e,strings:s}},components:{CoreAlert:le,CoreMainTabs:Ue,metaboxAnalysisDetail:Qe,SvgEllipse:mo,SvgCircleCheck:Ht},data(){return{initTab:"basic",tabs:[{slug:"basic",name:a("Basic SEO",St)},{slug:"title",name:a("Title",St)},{slug:"readability",name:a("Readability",St)}]}},computed:{parseTabs(){return this.tabs.map(o=>(o.errorCount=this.postEditorStore.currentPost.page_analysis.analysis[o.slug].errors,o))},pageBuilderAlert(){const o=this.rootStore.aioseo.integration,e=this.postEditorStore.currentPost?.editlink;if(!Ce()||!o||!e)return!1;const s=o.charAt(0).toUpperCase()+o.slice(1);return G(a("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.",St),s,'<a href="'+e+'">',"</a>")}},methods:{processChangeTab(o){this.initTab=o}}},pg={class:"page-analysis-panel"},gg=["innerHTML"];function mg(o,e,s,t,i,n){const m=h("core-alert"),d=h("svg-ellipse"),g=h("svg-circle-check"),b=h("core-main-tabs"),C=h("metaboxAnalysisDetail");return r(),v("div",pg,[n.pageBuilderAlert?(r(),y(m,{key:0,type:"yellow"},{default:u(()=>[l("span",{innerHTML:n.pageBuilderAlert},null,8,gg)]),_:1})):f("",!0),p(b,{tabs:n.parseTabs,showSaveButton:!1,active:i.initTab,internal:"",onChanged:e[0]||(e[0]=S=>n.processChangeTab(S))},{"after-label":u(({tab:S})=>[S.errorCount>=0?(r(),v("span",{key:0,class:Q(["tab-score",t.getErrorClass(t.postEditorStore.currentPost.page_analysis.analysis[S.slug].errors)])},[0<t.postEditorStore.currentPost.page_analysis.analysis[S.slug].errors?(r(),y(d,{key:0,width:"6"})):f("",!0),t.postEditorStore.currentPost.page_analysis.analysis[S.slug].errors===0?(r(),y(g,{key:1,width:"12"})):f("",!0),P(" "+_(t.getErrorDisplay(t.postEditorStore.currentPost.page_analysis.analysis[S.slug].errors)),1)],2)):f("",!0)]),_:1},8,["tabs","active"]),p(rt,{mode:"out-in"},{default:u(()=>[t.postEditorStore.currentPost.page_analysis?(r(),y(C,{key:0,analysisItems:t.postEditorStore.currentPost.page_analysis.analysis[i.initTab]},null,8,["analysisItems"])):f("",!0)]),_:1})])}const hg=A(ug,[["render",mg]]),Ct="all-in-one-seo-pack",_g={emits:["changeTab"],setup(){return{licenseStore:ge(),postEditorStore:J(),hasRequiredFeature:it.hasCoreFeature("general","cornerstone-content"),GLOBAL_STRINGS:fe,links:se}},components:{CoreAlert:le},data(){return{license:it,strings:{description:a("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",Ct),linkingRecommendations:a("internal linking recommendations in Link Assistant.",Ct),upsell:G(a("Cornerstone Content is a %1$s feature. %2$s",Ct),"PRO",se.getUpsellLink("post-settings-general","cornerstone-content",fe.learnMore,"liteUpgrade",!0)),markAsCornerstone:a("Mark as Cornerstone",Ct)}}}},fg={class:"cornerstone-content-panel"},yg={class:"cornerstone-content-text"},vg=["innerHTML"],bg=["innerHTML"];function kg(o,e,s,t,i,n){const m=h("base-toggle"),d=h("core-alert");return r(),v("div",fg,[l("div",yg,[l("span",null,_(i.strings.description),1),l("a",{href:"#",onClick:e[0]||(e[0]=te(g=>o.$emit("changeTab",{main:"linkAssistant",sub:"link-suggestions"}),["stop","prevent"]))},_(i.strings.linkingRecommendations),1),l("span",{innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"cornerstoneContent",!0)},null,8,vg)]),p(m,{modelValue:t.postEditorStore.currentPost.pillar_content,"onUpdate:modelValue":e[1]||(e[1]=g=>t.postEditorStore.currentPost.pillar_content=g),disabled:!t.hasRequiredFeature},{default:u(()=>[P(_(i.strings.markAsCornerstone),1)]),_:1},8,["modelValue","disabled"]),t.licenseStore.isUnlicensed||!t.hasRequiredFeature?(r(),y(d,{key:0,class:"inline-upsell",type:"blue"},{default:u(()=>[l("div",{innerHTML:i.strings.upsell},null,8,bg)]),_:1})):f("",!0)])}const Oo=A(_g,[["render",kg]]),wg={class:"aioseo-tab-content aioseo-post-general"},Sg={class:"snippet-preview-row-label"},Cg=["innerHTML"],xg=["innerHTML"],Pg=["innerHTML"],Tg={key:0},Eg=["innerHTML"],Ig=["innerHTML"],Cs={__name:"General",props:{disabled:{type:Boolean,default(){return!1}},parentComponentContext:String},emits:["changeTab"],setup(o){const e="all-in-one-seo-pack",s=o,t=ge(),i=Ke(),n=J(),m=Pe(),d=an(),g=Le(),b=ln(),C=Mt(),S=N(0),x=N(0),k=N(0),E=N(!1),R=N("title0"),K=N("description0"),{parseTags:U}=co({separator:void 0}),{maxRecommendedCount:O}=go(),{watchHighlightSentences:H}=lu(),{runAnalysis:M,strings:F}=ho(),V=ts(F,{pageName:a("General",e),serpPreview:a("SERP Preview",e),serpPreviewDocumentation:a("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.",e),editSnippet:a("Edit Snippet",e),clickToAddTitle:a("Click on the tags below to insert variables into your title.",e),metaDescription:a("Meta Description",e),clickToAddDescription:a("Click on the tags below to insert variables into your meta description.",e),cornerstoneContent:a("Cornerstone Content",e),focusKeyphrase:a("Focus Keyword",e),additionalKeyphrases:a("Additional Keywords",e),pageAnalysis:a("Page Analysis",e),basicSeo:a("Basic SEO",e),title:a("Title",e),readability:a("Readability",e),lookingForMetaKeywords:a("Looking for meta keywords?",e),goToAdvancedTab:a("Go to the Advanced tab to add/edit meta keywords",e),autogenerateDescriptionsAlert:G(a("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.",e),"AIOSEO",se.getPlainLink(a("Search Appearance > Advanced",e),m.aioseo.urls.aio.searchAppearance+"#/advanced")),keyphraseDocumentation:G(a("Not sure what keywords are used for? Check out our documentation for more information. %1$s",e),se.getDocLink(fe.learnMore,"useKeyphrasesTooltip",!0))}),j=q(()=>No().root.data.screenContext),ie=q(()=>G(a("%1$s Title",e),n.currentPost.type)),ne=q(()=>qt()&&j.value==="metabox"&&n.currentPost.context==="post"&&s.parentComponentContext!=="modal"&&we("aioseo_page_analysis")&&!D.value),Y=q(()=>qt()&&j.value==="sidebar"&&s.parentComponentContext!=="modal"&&we("aioseo_page_analysis")&&!D.value),L=q(()=>qt()&&j.value==="sidebar"&&n.currentPost.page_analysis&&s.parentComponentContext!=="modal"&&we("aioseo_page_analysis")&&!D.value),D=q(()=>m.aioseo.data.isBBPressActive&&(n.currentPost.postType==="forum"||n.currentPost.postType==="topic"||n.currentPost.postType==="reply")),$=q(()=>n.currentPost.keyphrases.focus.keyphrase?n.currentPost.keyphrases.focus.score:null),w=q(()=>i.internalOptions.internal.deprecatedOptions.includes("autogenerateDescriptions")?(n.currentPost.context==="post"?i.dynamicOptions.searchAppearance.postTypes[n.currentPost.postType].metaDescription:i.dynamicOptions.searchAppearance.taxonomies[n.currentPost.termType].metaDescription)===n.currentPost.description&&!i.options.deprecated.searchAppearance.advanced.autogenerateDescriptions:!1),T=()=>{i.options.searchAppearance.advanced.keywordsLooking=!1,i.saveChanges()},I=Z=>{n.changeGeneralPreview(Z)},B=()=>{E.value=!E.value,g.changeTabSettings({setting:"modal",value:"general"}),n.currentPost.modalOpen=!0},W=Z=>{switch(Z){case"title":return n.currentPost.context==="post"?["post_title","separator_sa","site_title"]:["taxonomy_title","separator_sa","site_title"];case"description":return n.currentPost.context==="post"?n.currentPost.postType==="attachment"?["attachment_caption","separator_sa","site_title"]:n.currentPost.postType==="product"?["post_excerpt","post_content"]:["post_excerpt","post_content","separator_sa"]:["taxonomy_title","separator_sa","taxonomy_description"]}};return Ie(()=>n.currentPost.title,()=>{Ft(()=>{M({postId:n.currentPost.id})},750)}),Ie(()=>n.currentPost.description,()=>{Ft(()=>M({postId:n.currentPost.id}),750)}),Ie(()=>C.highlightSentences,(Z,z)=>{Ft(()=>H(Z,z))}),We(()=>{n.currentPost.context==="post"&&!n.currentPost.keyphrases.length&&(k.value=-1),window.aioseoBus.$on("updateTitleKey",()=>{R.value="title"+Math.random(0,999)}),window.aioseoBus.$on("updateDescriptionKey",()=>{K.value="description"+Math.random(0,999)})}),zo(()=>{window.aioseoBus.$off("updateTitleKey"),window.aioseoBus.$off("updateDescriptionKey")}),(Z,z)=>{const X=h("base-button");return r(),v("div",wg,[c(we)("aioseo_page_general_settings")?(r(),y(c(pe),{key:0,class:"snippet-preview-row","no-right-max-width":""},{name:u(()=>[l("div",null,[l("span",Sg,_(c(V).serpPreview),1),p(c(de),{offset:"0,0",placement:"bottom"},{tooltip:u(()=>[P(_(c(V).serpPreviewDocumentation),1)]),default:u(()=>[p(c(je))]),_:1})]),j.value==="metabox"||s.parentComponentContext==="modal"?(r(),y(c(os),{key:0,modelValue:c(n).currentPost.generalMobilePrev,"onUpdate:modelValue":I,name:"previewGeneralIsMobile",class:"circle",options:[{label:"desktop",value:!1,activeClass:"dark",slot:"desktop"},{label:"mobile",value:!0,slot:"mobile"}]},{desktop:u(()=>[p(c(Un))]),mobile:u(()=>[p(c(Dn))]),_:1},8,["modelValue"])):f("",!0)]),content:u(()=>[p(c(Hn),{"focus-keyphrase":c(n).currentPost?.keyphrases?.focus?.keyphrase??"",device:j.value==="sidebar"&&s.parentComponentContext==="metabox"||c(n).currentPost.generalMobilePrev?"mobile":"desktop",url:c(b).liveTags.permalink,title:c(U)(c(n).currentPost.title||c(n).currentPost.tags.title||"#post_title #separator_sa #site_title"),description:c(U)(c(n).currentPost.description||c(n).currentPost.tags.description||"#post_content"),"rich-results":c(d).richResults},null,8,["focus-keyphrase","device","url","title","description","rich-results"]),j.value==="sidebar"&&s.parentComponentContext!=="modal"?(r(),y(X,{key:0,class:"edit-snippet gray small",onClick:B},{default:u(()=>[p(c(lt)),P(" "+_(c(V).editSnippet),1)]),_:1})):f("",!0)]),_:1})):f("",!0),(j.value==="metabox"||s.parentComponentContext==="modal")&&c(we)("aioseo_page_general_settings")?(r(),y(c(pe),{id:"aioseo-post-settings-post-title-row",class:"snippet-title-row",name:ie.value,key:R.value},{content:u(()=>[p(c(Et),{"line-numbers":!1,single:"",onCounter:z[0]||(z[0]=oe=>S.value=oe.length),modelValue:c(n).currentPost.title,"onUpdate:modelValue":z[1]||(z[1]=oe=>c(n).currentPost.title=oe),"tags-context":`${c(n).currentPost.postType||c(n).currentPost.termType}Title`,defaultMenuOrientation:s.parentComponentContext==="modal"?"top":"bottom","default-tags":W("title")},wo({"tags-description":u(()=>[P(_(c(V).clickToAddTitle),1)]),_:2},[c(we)("aioseo_page_ai_content_settings")&&!c(n).currentPost.isWooCommercePageWithoutSchema&&c(n).currentPost.postType&&!["attachment","web-story"].includes(c(n).currentPost.postType)?{name:"append-button",fn:u(()=>[p(c(Mo),{feature:c(no).metaTitle},null,8,["feature"])]),key:"0"}:void 0]),1032,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:c(O)(S.value,60)},null,8,Cg)]),_:1},8,["name"])):f("",!0),(j.value==="metabox"||s.parentComponentContext==="modal")&&c(we)("aioseo_page_general_settings")?(r(),y(c(pe),{id:"aioseo-post-settings-meta-description-row",class:"snippet-description-row",name:c(V).metaDescription,key:K.value},{content:u(()=>[w.value?(r(),y(c(le),{key:0,type:"yellow"},{default:u(()=>[l("span",{innerHTML:c(V).autogenerateDescriptionsAlert},null,8,xg)]),_:1})):f("",!0),p(c(Et),{"line-numbers":!1,description:"",onCounter:z[2]||(z[2]=oe=>x.value=oe.length),modelValue:c(n).currentPost.description,"onUpdate:modelValue":z[3]||(z[3]=oe=>c(n).currentPost.description=oe),"tags-context":`${c(n).currentPost.postType||c(n).currentPost.termType}Description`,defaultMenuOrientation:s.parentComponentContext==="modal"?"top":"bottom","default-tags":W("description")},wo({"tags-description":u(()=>[P(_(c(V).clickToAddDescription),1)]),_:2},[c(we)("aioseo_page_ai_content_settings")&&!c(n).currentPost.isWooCommercePageWithoutSchema&&c(n).currentPost.postType&&!["attachment","web-story"].includes(c(n).currentPost.postType)?{name:"append-button",fn:u(()=>[p(c(Mo),{feature:c(no).metaDescription},null,8,["feature"])]),key:"0"}:void 0]),1032,["modelValue","tags-context","defaultMenuOrientation","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:c(O)(x.value,160)},null,8,Pg)]),_:1},8,["name"])):f("",!0),s.parentComponentContext!=="modal"&&j.value==="metabox"&&c(n).currentPost.context==="post"&&!["attachment","web-story"].includes(c(n).currentPost.postType)&&!c(et)()?(r(),y(c(pe),{key:3,id:"aioseo-post-settings-cornerstone-content-row",class:"cornerstone-content-row"},{name:u(()=>[P(_(c(V).cornerstoneContent)+" ",1),c(t).isUnlicensed?(r(),y(c($n),{key:0})):f("",!0)]),content:u(()=>[p(c(Oo),{onChangeTab:z[4]||(z[4]=oe=>Z.$emit("changeTab",oe))})]),_:1})):f("",!0),ne.value?(r(),v(re,{key:4},[c(i).options.searchAppearance.advanced.useKeywords&&c(i).options.searchAppearance.advanced.keywordsLooking?(r(),v("div",Tg,[p(c(le),{class:"meta-keywords-alert",type:"blue","show-close":"",onCloseAlert:T},{default:u(()=>[P(_(c(V).lookingForMetaKeywords)+" ",1),l("a",{href:"#",onClick:z[5]||(z[5]=te(oe=>Z.$emit("changeTab","advanced"),["prevent"]))},_(c(V).goToAdvancedTab),1),l("a",{class:"no-underline",href:"#",onClick:z[6]||(z[6]=te(oe=>Z.$emit("changeTab","advanced"),["prevent"]))}," → ")]),_:1})])):f("",!0),p(c(pe),{id:"aioseo-post-settings-snippet-focus-keyphrase-row",class:"snippet-focus-keyphrase-row",align:""},{name:u(()=>[l("span",null,_(c(V).focusKeyphrase),1),p(c(de),{offset:"25px,0"},{tooltip:u(()=>[l("div",{innerHTML:c(V).keyphraseDocumentation},null,8,Eg)]),default:u(()=>[p(c(je))]),_:1})]),content:u(()=>[p(c(Ro))]),_:1}),p(c(pe),{name:c(V).additionalKeyphrases,class:"snippet-additional-keyphrases-row"},{content:u(()=>[p(c(Bo))]),_:1},8,["name"])],64)):f("",!0),ne.value&&c(n).currentPost.page_analysis?(r(),y(c(pe),{key:5,name:c(V).pageAnalysis,class:"snippet-page-analysis-row",align:""},{content:u(()=>[p(c(hg))]),_:1},8,["name"])):f("",!0),j.value==="sidebar"&&!c(et)()&&s.parentComponentContext!=="modal"?(r(),y(c(Ye),{key:6,class:"card-cornerstone-content",slug:"cornerstoneContent","header-text":c(V).cornerstoneContent},{default:u(()=>[p(c(Oo),{onChangeTab:z[7]||(z[7]=oe=>Z.$emit("changeTab",oe))})]),_:1},8,["header-text"])):f("",!0),Y.value?(r(),y(c(Ye),{key:7,slug:"focus",focusScore:$.value,class:"card-focus-keyphrase"},{header:u(()=>[l("span",null,_(c(V).focusKeyphrase),1),p(c(de),{offset:"0,0"},{tooltip:u(()=>[l("div",{innerHTML:c(V).keyphraseDocumentation},null,8,Ig)]),default:u(()=>[p(c(je))]),_:1})]),default:u(()=>[p(c(Ro))]),_:1},8,["focusScore"])):f("",!0),Y.value?(r(),y(c(Ye),{key:8,slug:"additional","header-text":c(V).additionalKeyphrases,class:"card-additional-keyphrase"},{default:u(()=>[p(c(Bo))]),_:1},8,["header-text"])):f("",!0),L.value?(r(),y(c(Ye),{key:9,slug:"basicseo","header-text":c(V).basicSeo,trueSeoScore:c(n).currentPost.page_analysis.analysis.basic.errors,class:"card-basic-seo"},{default:u(()=>[p(c(Qe),{analysisItems:c(n).currentPost.page_analysis.analysis.basic},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):f("",!0),L.value?(r(),y(c(Ye),{key:10,slug:"title","header-text":c(V).title,trueSeoScore:c(n).currentPost.page_analysis.analysis.title.errors,class:"card-title-seo"},{default:u(()=>[p(c(Qe),{analysisItems:c(n).currentPost.page_analysis.analysis.title},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):f("",!0),L.value?(r(),y(c(Ye),{key:11,slug:"readability","header-text":c(V).readability,trueSeoScore:c(n).currentPost.page_analysis.analysis.readability.errors,class:"card-readability-seo"},{default:u(()=>[p(c(Qe),{analysisItems:c(n).currentPost.page_analysis.analysis.readability},null,8,["analysisItems"])]),_:1},8,["header-text","trueSeoScore"])):f("",!0)])}}},Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Cs},Symbol.toStringTag,{value:"Module"})),Lg={class:"post-title"},Bg={key:1},Mg={key:1},Rg={key:1},Og={key:1},Hg={key:1},Vg={key:0,class:"btn-view"},$g=["href"],Ho="keyword-rank-tracker-keywords-table",Vo={__name:"KeywordsTable",props:{paginatedKeywords:Object,itemsPerPage:Number},setup(o){const e="all-in-one-seo-pack",s=Rt(),t=Pe(),i={position:a("Position",e),openInKrt:a("Open in Keyword Rank Tracker",e)},n=[{label:fe.delete,value:"delete"},{label:i.addToGroup,value:"assignGroup"}],m=o,d=N(null),g=N([]),{orderBy:b,orderDir:C,pageNumber:S,processAdditionalFilters:x,processChangeItemsPerPage:k,processFilterTable:E,processPagination:R,processSearch:K,processSort:U,searchTerm:O,wpTableKey:H,wpTableLoading:M}=ss({fetchData:s.fetchKeywords,tableId:Ho,tableRef:d.value,resultsPerPage:m.itemsPerPage}),F=q(()=>[{slug:"name",label:a("Keyword",e),sortable:1<m.paginatedKeywords.rows.length,sortDir:b.value==="name"?C.value:"asc",sorted:b.value==="name"},{slug:"clicks",label:a("Clicks",e),sortable:1<m.paginatedKeywords.rows.length,sortDir:b.value==="clicks"?C.value:"asc",sorted:b.value==="clicks",width:"80px"},{slug:"ctr",label:a("CTR",e),sortable:1<m.paginatedKeywords.rows.length,sortDir:b.value==="ctr"?C.value:"asc",sorted:b.value==="ctr",width:"68px"},{slug:"impressions",label:a("Impressions",e),sortable:1<m.paginatedKeywords.rows.length,sortDir:b.value==="impressions"?C.value:"asc",sorted:b.value==="impressions",width:"110px"},{slug:"position",label:a("Position",e),sortable:1<m.paginatedKeywords.rows.length,sortDir:b.value==="position"?C.value:"asc",sorted:b.value==="position",width:"90px"},{slug:"history",label:a("Position History",e),width:"140px"},{slug:"tracking",label:a("Tracking",e),width:"85px"},{slug:"view",label:"",width:"40px"}]),V=(Y,L)=>{let D=Y.statistics?.[L]??"";switch(L){case"ctr":D=D!==""?parseFloat(D)+"%":D;break;case"clicks":case"impressions":D=D!==""?cn.compactNumber(D):D;break;case"position":D=D!==""?Math.round(D).toFixed(0):D;break}return D},j=Y=>Y.statistics?.history?[{name:i.position,data:Y.statistics.history.map(L=>({x:L.date,y:L.position,label:L.position}))}]:[],ie=Y=>t.aioseo.urls.aio.searchStatistics+`&search=${encodeURIComponent(Y.name)}&aioseo-scroll=keyword-rank-tracker-keywords-table#/keyword-rank-tracker`,ne=async(Y,L)=>{g.value[L]=!0;try{Y.id?await s.deleteKeywords([Y.id]):await s.insertKeywords({keywords:[Y.name]}).then(()=>{Y.tracking=!0}).catch(()=>{Y.tracking=!1}),await s.fetchKeywords({rows:m.paginatedKeywords.rows}).then(()=>{s.maybeFetchStatistics({context:"keywords"})})}catch(D){console.error(D)}finally{g.value=[]}};return(Y,L)=>{const D=h("base-toggle");return r(),y(c(fo),{ref_key:"table",ref:d,id:Ho,"additional-filters":[],"bulk-options":n,columns:F.value,filters:[],"initial-items-per-page":100,"initial-page-number":c(S),"initial-search-term":c(O),key:c(H),loading:c(M),rows:o.paginatedKeywords.rows,"selected-filters":{},"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1,totals:{},"show-items-per-page":!1,"show-pagination":!1,onFilterTable:c(E),onPaginate:c(R),onProcessAdditionalFilters:c(x),onProcessBulkAction:$=>({}),onProcessChangeItemsPerPage:c(k),onSearch:c(K),onSortColumn:c(U)},{name:u(({row:$})=>[l("div",Lg,[l("b",null,_($.name),1)])]),clicks:u(({row:$})=>[$.statistics===null?(r(),y(c(Se),{key:0,dark:""})):(r(),v("div",Bg,_(V($,"clicks")),1))]),ctr:u(({row:$})=>[$.statistics===null?(r(),y(c(Se),{key:0,dark:""})):(r(),v("div",Mg,_(V($,"ctr")),1))]),impressions:u(({row:$})=>[$.statistics===null?(r(),y(c(Se),{key:0,dark:""})):(r(),v("div",Rg,_(V($,"impressions")),1))]),position:u(({row:$})=>[$.statistics===null?(r(),y(c(Se),{key:0,dark:""})):(r(),v("div",Og,_(V($,"position")),1))]),history:u(({row:$})=>[$.statistics===null?(r(),y(c(Se),{key:0,dark:""})):(r(),v("div",Hg,[j($).length?(r(),y(c(so),{key:0,series:j($),height:25,preset:"overview","chart-overrides":{tooltip:{y:{formatter:w=>parseFloat(w).toFixed(2)}}}},null,8,["series","chart-overrides"])):f("",!0)]))]),tracking:u(({row:$,index:w})=>[g.value[w]?(r(),y(c(Se),{key:0,dark:""})):f("",!0),p(D,{modelValue:$.tracking,"onUpdate:modelValue":[T=>$.tracking=T,T=>ne($,w,T)],disabled:!!g.value[w]},null,8,["modelValue","onUpdate:modelValue","disabled"])]),view:u(({row:$})=>[$.id?(r(),v("div",Vg,[l("a",{href:ie($),target:"_blank"},[p(c(de),{type:"action",offset:"-80px,0"},{tooltip:u(()=>[P(_(i.openInKrt),1)]),default:u(()=>[p(c(mt))]),_:1})],8,$g)])):f("",!0)]),_:1},8,["columns","initial-page-number","initial-search-term","loading","rows","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessChangeItemsPerPage","onSearch","onSortColumn"])}}},Dg={key:0,class:"keyword-rank-tracker-container"},Ug=["innerHTML"],Kg={class:"keyword-rank-tracker-container__card"},Fg={class:"keyword-rank-tracker-container__card__header"},qg={class:"keyword-rank-tracker-container__card__body"},Gg=["innerHTML"],zg={class:"keyword-rank-tracker-container__card"},Ng={class:"keyword-rank-tracker-container__card__header"},jg={class:"keyword-rank-tracker-container__card__body"},Wt="320px",Wg={__name:"KeywordRankTracker",setup(o){Rs(x=>({adb54240:Wt}));const e="all-in-one-seo-pack",s=Rt(),t=ge(),i=Xo(),n=se.getDocLink(a("Learn More",e),"keywordRankTracker",!0),{connect:m,loading:d}=Fn(),g={...Kn().strings,withAioseo:a("Below you can track how your page is performing in search results based on your keyword(s).",e),keywordPositions:a("Keyword Positions",e),sampleDataAlert:a("Sample data is available for you to explore. Connect your site to Google Search Console to receive insights on how content is being discovered. Identify areas for improvement and drive traffic to your website.",e),connectToGsc:a("Connect to Google Search Console",e),unlockSs:a("Unlock Search Statistics",e)},b=q(()=>!t.isUnlicensed&&it.hasCoreFeature("search-statistics")&&(!i.isConnected||i.unverifiedSite)),C=q(()=>({rows:s.keywords.all.rows.slice(0,3).map(x=>({...x,tracking:!0}))})),S=q(()=>{const x={};for(const E of C.value.rows)E?.statistics?.history&&(x[E.name]=E);const k=[];for(const E in x)k.push({name:E,data:x[E].statistics.history.map(R=>({x:R.date,y:R.position}))});return k});return(x,k)=>{const E=h("base-button");return r(),v("div",null,[c(i).shouldShowSampleReports?(r(),v("div",Dg,[p(c(le),{type:"yellow"},{default:u(()=>[l("span",null,_(g.sampleDataAlert),1),l("div",null,[b.value?(r(),y(E,{key:0,type:"green",size:"small",onClick:c(m),loading:c(d)},{default:u(()=>[P(_(g.connectToGsc),1)]),_:1},8,["onClick","loading"])):(r(),y(E,{key:1,tag:"a",href:c(se).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker","liteUpgrade"),target:"_blank",type:"green",size:"small",loading:c(d)},{default:u(()=>[P(_(g.unlockSs),1)]),_:1},8,["href","loading"]))])]),_:1}),l("div",null,[l("span",null,_(g.withAioseo),1),k[0]||(k[0]=P()),l("span",{innerHTML:c(n)},null,8,Ug)]),l("div",Kg,[l("div",Fg,_(g.keywordPositions),1),l("div",qg,[p(c(so),{height:parseInt(Wt),series:S.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:R=>parseFloat(R).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),p(c(Vo),{"paginated-keywords":C.value},null,8,["paginated-keywords"])])):(r(),v(re,{key:1},[p(c(gt),{class:"keyword-rank-tracker-container"},{default:u(()=>[l("div",null,[l("span",null,_(g.withAioseo),1),k[1]||(k[1]=P()),l("span",{innerHTML:c(n)},null,8,Gg)]),l("div",zg,[l("div",Ng,_(g.keywordPositions),1),l("div",jg,[p(c(so),{height:parseInt(Wt),series:S.value,loading:!1,"legend-style":"simple","chart-overrides":{tooltip:{y:{formatter:R=>parseFloat(R).toFixed(2)}}}},null,8,["height","series","chart-overrides"])])]),p(c(Vo),{"paginated-keywords":C.value},null,8,["paginated-keywords"])]),_:1}),b.value?(r(),y(c(qn),{key:0})):(r(),y(c(_o),{key:1,"cta-second-button-action":"",onCtaSecondButtonClick:c(i).showSampleReports,"cta-link":c(se).getPricingUrl("search-statistics","search-statistics-upsell","keyword-rank-tracker","liteUpgrade"),"button-text":g.ctaButtonText,"second-button-text":g.ctaSecondButtonText,"cta-second-button-new-badge":"","cta-second-button-visible":"","learn-more-link":c(se).getUpsellUrl("search-statistics","keyword-rank-tracker","liteUpgrade"),"feature-list":[g.feature1,g.feature2,g.feature3,g.feature4],"align-top":"","hide-bonus":!c(t).isUnlicensed},{"header-text":u(()=>[P(_(g.ctaHeader),1)]),description:u(()=>[p(c(ns),{"core-feature":["search-statistics"]}),P(" "+_(g.ctaDescription),1)]),_:1},8,["onCtaSecondButtonClick","cta-link","button-text","second-button-text","learn-more-link","feature-list","hide-bonus"]))],64))])}}},$o=A(Wg,[["__scopeId","data-v-bf6a422d"]]),Zg={__name:"KeywordRankTracker",props:{modalOpen:Boolean},emits:["update:modalOpen"],setup(o,{emit:e}){const s="all-in-one-seo-pack",t=ge(),i=Xo(),n=e,m={headerTitle:a("Keyword Performance Tracking",s)},d=q(()=>i.isConnected&&!i.unverifiedSite);return(g,b)=>(r(),y(c(me),{show:o.modalOpen,onClose:b[0]||(b[0]=C=>n("update:modalOpen",!1)),classes:["keyword-rank-tracker-main"]},{headerTitle:u(()=>[P(_(m.headerTitle),1)]),body:u(()=>[l("div",{class:Q(["keyword-rank-tracker-main__body",{"keyword-rank-tracker-main__body--disable-click":c(i).shouldShowSampleReports}])},[!c(t).isUnlicensed&&c(it).hasCoreFeature("search-statistics","keyword-rank-tracker")&&d.value?(r(),y(c($o),{key:0})):(r(),y(c($o),{key:1}))],2)]),_:1},8,["show"]))}},Yg={},Xg={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow-short"};function Qg(o,e){return r(),v("svg",Xg,[...e[0]||(e[0]=[l("path",{d:"M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z",fill:"currentColor"},null,-1)])])}const bo=A(Yg,[["render",Qg]]),Zt="all-in-one-seo-pack",Jg={setup(){return{postEditorStore:J()}},components:{CoreSettingsRow:pe,SvgRightArrowShort:bo},data(){return{strings:{title:a("Link Assistant",Zt),description:a("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.",Zt),button:a("Open Link Assistant",Zt)}}}},em={class:"aioseo-link-assistant-sidebar"},tm={class:"aioseo-sidebar-content-title"};function om(o,e,s,t,i,n){const m=h("svg-right-arrow-short"),d=h("base-button"),g=h("core-settings-row");return r(),v("div",em,[o.$root.$data.screenContext==="sidebar"?(r(),y(g,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:u(()=>[l("div",tm,_(i.strings.title),1),l("p",null,_(i.strings.description),1),p(d,{class:"open-link-assistant-modal gray small",onClick:e[0]||(e[0]=b=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:u(()=>[p(m),P(" "+_(i.strings.button),1)]),_:1})]),_:1})):f("",!0)])}const sm=A(Jg,[["render",om]]),nm=()=>{const o=(e,s)=>{const t=Ne(s);let i=null;return e.forEach(n=>{if(i||!n.attributes)return;if(n.attributes.content&&n.attributes.content.search(t)!==-1){i=n.clientId;return}if(!n.innerBlocks)return;const m=o(n.innerBlocks,s);m&&(i=m)}),i};return{findTargetBlock:o}},Te="all-in-one-seo-pack",rm=(o={})=>{const{emit:e,linkType:s,linksReport:t,metabox:i,pageNumber:n,post:m,postIndex:d,postReport:g,refreshTable:b=()=>{},wpTableLoading:C}=o,S=N(""),x="linkAssistantPostsReport",k=N([]),E=N(!1),R=q(()=>{if(!i)return m.links[s].rows;const w=n.value===1?0:(n.value-1)*10;return m.links[s].rows.slice(w,w+10)}),K={frontPage:a("Front Page",Te),deleteLink:a("Delete Link",Te)},U={areYouSureSingle:a("Are you sure you want to delete this link?",Te),areYouSureMultiple:a("Are you sure you want to delete these links?",Te),areYouSureAll:a("Are you sure you want to delete all links?",Te),actionCannotBeUndone:a("This action cannot be undone.",Te),yesSingle:a("Yes, I want to delete this link",Te),yesMultiple:a("Yes, I want to delete these links",Te),yesAll:a("Yes, I want to delete all links",Te),noChangedMind:a("No, I changed my mind",Te)},O=[{label:a("Delete",Te),value:"delete"}],H=dn(),M=J(),F=w=>{window.aioseoBus.$emit("updatingLinks",!0);const T={...w,additionalFilters:{postId:m.ID||M.currentPost.id,postIndex:d,type:s}};return H[g?"fetchPostReport":"fetchLinksReportInner"](T).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},V=w=>{window.location.href=`#/post-report?postId=${m.ID}&postIndex=${d}&initialTab=${w}`},j=({action:w,selectedRows:T})=>{!T.length||!w||(S.value=w,k.value=T,E.value=!0)},ie=()=>{if(E.value=!1,!!k.value.length){if(typeof k.value=="number"){ne(k.value);return}if(i&&s!=="inboundInternal"){$(k.value).forEach(T=>{Y(T)});return}window.aioseoBus.$emit("updatingLinks",!0),H.linksBulk({postIndex:d,postId:m.ID||M.currentPost.id,action:S.value,linkType:s,linkIds:k.value,linksReport:t,postReport:g}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),b()})}},ne=w=>{const T=m.links[s].rows[w].id;if(T){if(i&&s!=="inboundInternal"){Y(w);return}window.aioseoBus.$emit("updatingLinks",!0),H.linkDelete({postIndex:d,postId:m.ID||M.currentPost.id,linkId:T,linksReport:t,postReport:g}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated"),b()})}},Y=w=>{Ce()&&(window.aioseoBus.$emit("updatingLinks",!1),L(w),window.aioseoBus.$emit("updatingLinks",!1)),Je()&&D(w)},L=w=>{const T=M.currentPost.linkAssistant.links[s].rows[w];if(!T)return;window.aioseoBus.$emit("updatingLinks",!0);const I=Ne(T.anchor.trim()),B=T.phrase_html.trim(),W=Ne(B),Z=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:z}=nm(),X=z(Z,B);if(!X){window.aioseoBus.$emit("updatingLinks",!1);return}const oe=window.wp.data.select("core/block-editor").getBlock(X);if(!oe){window.aioseoBus.$emit("updatingLinks",!1);return}let he=new RegExp(`(<t?a[^<>]*>)(.*)?(${I})(.*)?(</t?a[^<>]*>)`,"i");const Es=B.replace(he,"$2$3$4");he=new RegExp(`${W}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(X,{content:oe.attributes.content.replace(he,Es)}).then(()=>{m.links[s].rows.splice(w,1)}).catch(Is=>{console.error(`Couldn delete link with type "${s}" and index ${w}:`,Is)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},D=w=>{const T=M.currentPost.linkAssistant.links[s].rows[w];if(!T||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let I="",B=null,W=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(B=window.tinyMCE.get("content"),I=B.getContent({format:"raw"})):(W=document.querySelector("textarea#content"),I=W?W.value:""),!I){window.aioseoBus.$emit("updatingLinks",!1);return}let Z=T.phrase_html.trim();B||(Z=Z.replace(/(\sdata-mce-href=".*")/gi,""));const z=Ne(T.anchor.trim());let X=new RegExp(`(<t?a[^<>]*>)(.*)?(${z})(.*)?(</t?a[^<>]*>)`,"i");const oe=Z.replace(X,"$2$3$4"),he=Ne(Z);X=new RegExp(`${he}`,"i"),I=I.replace(X,oe),B?B.setContent(I):W.value=I,m.links[s].rows.splice(w,1),H.postSettingsUpdate({postContent:I})?.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),e("linksUpdated")})},$=w=>{let T,I=[];return Array.isArray(w)&&(T=w.map(Number)),T&&m.links[s].rows.forEach((B,W)=>{T.includes(B.id)&&I.push(W)}),w==="all"&&(I=m.links[s].rows.map((B,W)=>W)),I.sort(function(B,W){return W-B})};return Bt(()=>{window.aioseoBus.$on("updatingLinks",w=>{C.value=w}),n.value=H.postReport[s].totals.page}),{bulkOptions:O,changeItemsPerPageSlug:x,doBulkAction:ie,fetchData:F,maybeDoBulkAction:j,modalStrings:U,openPostReport:V,rows:R,selectedRows:k,showModal:E,strings:K}},im={emits:["closeModal","doBulkAction"],components:{CoreModal:me,SvgClose:qe},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}}},am={class:"aioseo-modal-body"},lm=["innerHTML"];function cm(o,e,s,t,i,n){const m=h("svg-close"),d=h("base-button"),g=h("core-modal");return r(),y(g,{show:s.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:e[4]||(e[4]=b=>o.$emit("closeModal",!0))},{body:u(()=>[l("div",am,[l("button",{class:"close",onClick:e[1]||(e[1]=te(b=>o.$emit("closeModal",!0),["stop"]))},[p(m,{onClick:e[0]||(e[0]=b=>o.$emit("closeModal",!0))})]),l("h3",null,_(n.areYouSure),1),l("div",{class:"reset-description",innerHTML:s.strings.actionCannotBeUndone},null,8,lm),p(d,{type:"blue",size:"medium",onClick:e[2]||(e[2]=b=>o.$emit("doBulkAction",b))},{default:u(()=>[P(_(n.confirmation),1)]),_:1}),p(d,{type:"gray",size:"medium",onClick:e[3]||(e[3]=b=>o.$emit("closeModal",!0))},{default:u(()=>[P(_(s.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const dm=A(im,[["render",cm]]),um={components:{CoreTooltip:de},props:{phrase:{type:String,required:!0},phraseHtml:{type:String,required:!0},anchor:{type:String,required:!0},url:{type:String,required:!0},tooltip:{type:Boolean,required:!1,default:!0},clickableAnchor:{type:Boolean,default(){return!1}}},computed:{partPattern(){const o=ot.decode(this.anchor),e=Ne(o);return new RegExp(`(.*)(<t?a[^>]*>.*${e}.*</t?a>)(.*)`,"i")},firstPart(){return ot.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return ot.decode(this.stripTags(this.getPart(2)))},lastPart(){return ot.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(o){const s=ot.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return s?s[o]:""},stripTags(o,e=!1){return o=o.replace(/<br\s?\/?>/gi," "),e?o.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):o.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},pm={class:"phrase"},gm={key:0,class:"first"},mm=["href"],hm={key:2},_m={class:"anchor"},fm={key:3,class:"last"};function ym(o,e,s,t,i,n){const m=h("core-tooltip");return r(),v("div",{class:"aioseo-link-assistant-phrase",onMouseover:e[1]||(e[1]=d=>o.$emit("mouseOver")),onMouseleave:e[2]||(e[2]=d=>o.$emit("mouseLeave"))},[l("span",pm,[n.firstPart?(r(),v("span",gm,_(n.firstPart),1)):f("",!0),s.tooltip?(r(),y(m,{key:1,type:"action"},{tooltip:u(()=>[l("a",{class:"tooltip-url",href:s.url,target:"_blank"},_(s.url),9,mm)]),default:u(()=>[l("span",{class:"anchor",onClick:e[0]||(e[0]=(...d)=>n.maybeOpenLink&&n.maybeOpenLink(...d))},_(n.linkAnchor),1)]),_:1})):f("",!0),s.tooltip?f("",!0):(r(),v("div",hm,[l("span",_m,_(n.linkAnchor),1)])),n.lastPart?(r(),v("span",fm,_(n.lastPart),1)):f("",!0)]),Oe(o.$slots,"icons")],32)}const vm=A(um,[["render",ym]]),bm={},km={viewBox:"0 0 17 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-link-suggestion"};function wm(o,e){return r(),v("svg",km,[...e[0]||(e[0]=[l("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)])])}const ko=A(bm,[["render",wm]]),Sm={key:0},Cm={key:0,class:"row-actions"},xm={class:"view"},Pm=["href"],Tm={class:"edit"},Em=["href"],Im={key:0,class:"links-bottom"},Am={class:"links-bottom-left"},Lm={key:1},Bm={class:"links-bottom-right"},Mm="inboundInternal",Do="aioseo-post-report-inbound-internal",Rm={__name:"InboundInternal",props:{post:{type:Object,required:!0},postIndex:{type:Number,required:!1},postId:{type:Number,required:!1},linksReport:{type:Boolean,default(){return!1}},postReport:{type:Boolean,default(){return!1}},metabox:{type:Boolean,default(){return!1}}},emits:["linksUpdated","openSuggestions"],setup(o,{emit:e}){const s="all-in-one-seo-pack",t=Pe(),i=Le(),n=o,m=e,d=N(1),g=N(!1),{bulkOptions:b,changeItemsPerPageSlug:C,doBulkAction:S,fetchData:x,maybeDoBulkAction:k,modalStrings:E,openPostReport:R,rows:K,selectedRows:U,showModal:O,strings:H}=rm({emit:m,linkType:Mm,linksReport:n.linksReport,metabox:n.metabox,pageNumber:d,post:n.post,postIndex:n.postIndex,postReport:n.postReport,refreshTable:()=>ie(),wpTableLoading:g}),{editPost:M,viewPost:F}=Gn(),{processChangeItemsPerPage:V,processFetchTableData:j,refreshTable:ie,wpTableKey:ne}=ss({changeItemsPerPageSlug:C,fetchData:x,pageNumber:d,tableId:Do,wpTableLoading:g}),Y=ts(H,{deleteAllLinks:G(a("Delete All %1$s Links",s),a("Inbound Internal",s)),outboundSuggestions:G(a("%1$s Link Suggestions",s),a("Inbound",s))}),L=q(()=>[{slug:"post_title",label:a("Post Title",s)},{slug:"phrase",label:a("Phrase",s)},{slug:"delete",width:"50px"}]),D=q(()=>G(a("See All %1$s %2$s Links",s),n.post.links.inboundInternal.totals.total,a("Inbound Internal",s))),$=w=>{d.value=w,!n.metabox&&(g.value=!0,j().then(()=>g.value=!1))};return(w,T)=>{const I=h("base-button");return r(),v("div",null,[(r(),y(c(fo),{id:Do,key:c(ne),class:Q({"link-assistant-inner-table":!o.postReport}),columns:L.value,loading:g.value,rows:c(K),totals:o.post.links.inboundInternal.totals,"bulk-options":c(b),"initial-items-per-page":c(i).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":d.value,"show-pagination":!o.linksReport,"show-search":!1,"show-table-footer":o.postReport,"show-items-per-page":"",onPaginate:$,onProcessBulkAction:c(k),onProcessChangeItemsPerPage:c(V)},{post_title:u(({row:B})=>[l("span",null,[P(_(B.context.postTitle)+" ",1),B.context?.permalink?.replace(/\/$/,"")===c(t).aioseo.urls.home?(r(),v("span",Sm,"("+_(c(Y).frontPage)+")",1)):f("",!0)]),B.context?(r(),v("div",Cm,[l("span",xm,[l("a",{href:B.context.permalink,target:"_blank"},_(c(F)(B.context.postType.singular)),9,Pm),T[4]||(T[4]=P(" | ",-1))]),l("span",Tm,[l("a",{href:B.context.editLink,target:"_blank"},_(c(M)(B.context.postType.singular)),9,Em)])])):f("",!0)]),phrase:u(({row:B})=>[p(c(vm),{phrase:B.phrase,phraseHtml:B.phrase_html||"",anchor:B.anchor,url:B.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:u(({row:B})=>[p(c(de),{type:"action"},{tooltip:u(()=>[P(_(c(Y).deleteLink),1)]),default:u(()=>[p(c(ut),{onClick:W=>c(k)({action:"delete",selectedRows:[B.id]})},null,8,["onClick"])]),_:2},1024)]),_:1},8,["class","columns","loading","rows","totals","bulk-options","initial-items-per-page","initial-page-number","show-pagination","show-table-footer","onProcessBulkAction","onProcessChangeItemsPerPage"])),o.postReport?f("",!0):(r(),v("div",Im,[l("div",Am,[o.post.links.inboundInternal.rows.length?(r(),y(I,{key:0,type:"blue",tag:"button",onClick:T[0]||(T[0]=B=>m("openSuggestions"))},{default:u(()=>[p(c(ko)),P(" "+_(c(Y).outboundSuggestions),1)]),_:1})):f("",!0),o.post.links.inboundInternal.totals.total>5&&o.linksReport?(r(),v("div",Lm,[p(c(rs)),l("a",{class:"link-view",href:"#",onClick:T[1]||(T[1]=te(B=>c(R)("inbound-internal"),["prevent"]))},_(D.value),1)])):f("",!0)]),l("div",Bm,[o.post.links.inboundInternal.rows.length?(r(),v("a",{key:0,class:"link-delete",onClick:T[2]||(T[2]=te(B=>c(k)({action:"delete",selectedRows:"all"}),["prevent"]))},_(c(Y).deleteAllLinks),1)):f("",!0)])])),p(c(dm),{show:c(O),selectedRows:c(U),strings:c(E),onDoBulkAction:c(S),onCloseModal:T[3]||(T[3]=B=>O.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},be="all-in-one-seo-pack",Om={setup(){return{licenseStore:ge(),postEditorStore:J(),links:se}},components:{CoreAlert:le,CoreBlur:gt,CoreMainTabs:Ue,CoreModal:me,Cta:_o,LinkAssistantInboundInternal:Rm,LinksSideBar:sm,SvgLinkAffiliate:jn,SvgLinkExternal:rs,SvgLinkInternalInbound:Nn,SvgLinkInternalOutbound:zn,SvgLinkSuggestion:ko,RequiredPlans:ns},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:a("Unlock Link Assistant",be),ctaHeader:G(a("Link Assistant is a %1$s Feature",be),"PRO"),linkAssistantDescription:a("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",be),thisFeatureRequires:a("This feature requires one of the following plans:",be),linkOpportunities:a("Actionable Link Suggestions",be),orphanedPosts:a("See Orphaned Posts",be),affiliateLinks:a("See Affiliate Links",be),domainReports:a("Top Domain Reports",be)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:G("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,a("Inbound Internal",be))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:G("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,a("Outbound Internal",be))},{slug:"affiliate",icon:"svg-link-affiliate",name:G("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,a("Affiliate",be))},{slug:"external",icon:"svg-link-external",name:G("%1$s %2$s",this.mockedPostData.links.external.totals.total,a("External",be))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:G("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,a("Link Suggestions",be))}]},modalHeader(){return G(a('Links & Suggestions for "%1$s"',be),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},Hm={class:"aioseo-tab-content aioseo-link-assistant"},Vm={key:0};function $m(o,e,s,t,i,n){const m=h("core-main-tabs"),d=h("link-assistant-inbound-internal"),g=h("core-blur"),b=h("required-plans"),C=h("cta"),S=h("core-modal"),x=h("links-side-bar");return r(),v("div",Hm,[o.$root.$data.screenContext==="metabox"?(r(),v("div",Vm,[p(g,null,{default:u(()=>[p(m,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":u(({tab:k})=>[(r(),y(ae(k.icon),{class:Q([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),i.activeTab==="inbound-internal"?(r(),y(d,{key:0,post:i.mockedPostData,metabox:""},null,8,["post"])):f("",!0)]),_:1}),p(C,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox","liteUpgrade"),"button-text":i.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox","liteUpgrade"),"feature-list":[i.strings.linkOpportunities,i.strings.domainReports,i.strings.orphanedPosts,i.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":u(()=>[P(_(i.strings.ctaHeader),1)]),description:u(()=>[p(b,{addon:"aioseo-link-assistant"}),P(" "+_(i.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):f("",!0),p(S,{show:t.postEditorStore.currentPost.linkAssistant.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:e[0]||(e[0]=k=>t.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:u(()=>[P(_(n.modalHeader),1)]),body:u(()=>[p(g,null,{default:u(()=>[p(m,{class:"link-tabs",internal:"",tabs:n.tabs,active:n.initialTab,showSaveButton:!1},{"var-tab-icon":u(({tab:k})=>[(r(),y(ae(k.icon),{class:Q([{warning:k.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),i.activeTab==="inbound-internal"?(r(),y(d,{key:0,post:i.mockedPostData,metabox:""},null,8,["post"])):f("",!0)]),_:1}),p(C,{"cta-link":t.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox","liteUpgrade"),"button-text":i.strings.ctaButtonText,"learn-more-link":t.links.getUpsellUrl("link-assistant","metabox","liteUpgrade"),"feature-list":[i.strings.linkOpportunities,i.strings.domainReports,i.strings.orphanedPosts,i.strings.affiliateLinks],"hide-bonus":!t.licenseStore.isUnlicensed},{"header-text":u(()=>[P(_(i.strings.ctaHeader),1)]),description:u(()=>[p(b,{addon:"aioseo-link-assistant"}),P(" "+_(i.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),s.parentComponentContext!=="modal"?(r(),y(x,{key:1})):f("",!0)])}const Uo=A(Om,[["render",$m]]),Dm={};function Um(o,e){return r(),v("div")}const Km=A(Dm,[["render",Um]]),Fm={setup(){return{addons:un,licenseStore:ge()}},components:{Links:Uo,LinksActivate:Km,LinksLite:Uo},props:{parentComponentContext:String}},qm={class:"aioseo-tab-content aioseo-link-assistant"};function Gm(o,e,s,t,i,n){const m=h("Links",!0),d=h("LinksLite"),g=h("LinksActivate");return r(),v("div",qm,[!t.licenseStore.isUnlicensed&&t.addons.isActive("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(r(),y(m,{key:0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0),t.licenseStore.isUnlicensed||t.addons.requiresUpgrade("aioseo-link-assistant")?(r(),y(d,{key:1,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0),!t.licenseStore.isUnlicensed&&!t.addons.isActive("aioseo-link-assistant")&&t.addons.canActivate("aioseo-link-assistant")&&!t.addons.requiresUpgrade("aioseo-link-assistant")?(r(),y(g,{key:2,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0)])}const zm=A(Fm,[["render",Gm]]),Yt="all-in-one-seo-pack",Nm={setup(){return{settingsStore:Le()}},components:{CoreMainTabs:Ue,CoreSettingsRow:pe,General:So(()=>Ve(()=>Promise.resolve().then(()=>Ag),void 0,import.meta.url)),Social:So(()=>Ve(()=>Promise.resolve().then(()=>Wh),void 0,import.meta.url)),SvgSettings:is,SvgShare:as},data(){return{strings:{pageName:a("Modal Content",Yt)},tabs:[{slug:"general",icon:"svg-settings",name:a("General",Yt)},{slug:"social",icon:"svg-share",name:a("Social",Yt)}]}},computed:{getTabs(){return this.tabs.filter(o=>we(`aioseo_page_${o.slug}_settings`))}},methods:{processChangeTab(o){this.settingsStore.changeTabSettings({setting:"modal",value:o})}}},jm={class:"aioseo-modal-content"},Wm={class:"mobile-radio-buttons"},Zm={class:"component-wrapper"};function Ym(o,e,s,t,i,n){const m=h("core-main-tabs");return r(),v("div",jm,[l("div",Wm,[p(m,{tabs:n.getTabs,showSaveButton:!1,active:t.settingsStore.metaBoxTabs.modal||"general",internal:"",onChanged:e[0]||(e[0]=d=>n.processChangeTab(d))},null,8,["tabs","active"])]),l("div",Zm,[p(rt,{name:"route-fade",mode:"out-in"},{default:u(()=>[(r(),y(ae(t.settingsStore.metaBoxTabs.modal||"general"),{parentComponentContext:"modal"}))]),_:1})])])}const Xm=A(Nm,[["render",Ym]]),Xt="all-in-one-seo-pack",Qm={setup(){return{postEditorStore:J()}},components:{CoreSettingsRow:pe,SvgRightArrowShort:bo},data(){return{strings:{title:a("Redirects",Xt),description:a("Here you can add a redirect or view your existing redirects from this page. Click on the button below to view the Redirects panel.",Xt),button:a("Open Redirects",Xt)}}}},Jm={class:"aioseo-redirects-sidebar"},e1={class:"aioseo-sidebar-content-title"};function t1(o,e,s,t,i,n){const m=h("svg-right-arrow-short"),d=h("base-button"),g=h("core-settings-row");return r(),v("div",Jm,[o.$root.$data.screenContext==="sidebar"?(r(),y(g,{key:0,class:"snippet-description-row open-redirects-copy"},{content:u(()=>[l("div",e1,_(i.strings.title),1),l("p",null,_(i.strings.description),1),p(d,{class:"open-redirects-modal gray small",onClick:e[0]||(e[0]=b=>t.postEditorStore.currentPost.redirects.modalOpen=!0)},{default:u(()=>[p(m),P(" "+_(i.strings.button),1)]),_:1})]),_:1})):f("",!0)])}const o1=A(Qm,[["render",t1],["__scopeId","data-v-1754537e"]]),ee="all-in-one-seo-pack",s1={setup(){const{redirectHasUnPublishedPost:o}=Yn();return{notificationsStore:pn(),redirectsStore:uo(),settingsStore:Le(),redirectHasUnPublishedPost:o}},components:{BaseButton:es,BaseInput:Xn,BaseToggle:kr,CoreAddRedirection:ls,CoreAlert:le,CoreModal:me,CoreWpTable:fo},props:{excludeColumns:Array,disableSource:Boolean,showBulkActions:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showTableFooter:{type:Boolean,default:!0}},data(){return{wpTableKey:0,wpTableLoading:!1,modalOpened:!1,testLoading:!1,testResults:null,testUrl:"",strings:{searchUrls:a("Search URLs",ee),edit:a("Edit",ee),checkRedirect:a("Check Redirect",ee),delete:a("Delete",ee),redirectTest:a("Redirect Test",ee),redirectTestDescription:a("Enter a URL below to see if it redirects correctly. This will test the actual redirect and show you what happens.",ee),enterUrlPlaceholder:a("Enter a URL to test...",ee),test:a("Test",ee),sourceUrl:a("Source URL",ee),targetUrl:a("Target URL",ee),type:a("Type",ee),enabled:a("Enabled",ee),areYouSureDelete:a("Are you sure you want to delete this redirect?",ee),areYouSureDeleteSelected:a("Are you sure you want to delete the selected redirect(s)?",ee),bulkActionCannotBeUndone:a("This action cannot be undone.",ee),redirectTypes:{301:a("301 Moved Permanently",ee),302:a("302 Found",ee),307:a("307 Temporary Redirect",ee),308:a("308 Permanent Redirect",ee),400:a("400 Bad Request",ee),401:a("401 Unauthorized",ee),403:a("403 Forbidden",ee),404:a("404 Not Found",ee),410:a("410 Gone",ee),500:a("500 Internal Server Error",ee)}}}},computed:{tableId(){return this.disableSource?"aioseo-post-redirects-table":"aioseo-redirects-table"},pageNumber(){return this.$route.query.page?parseInt(this.$route.query.page):1},searchTerm(){return this.$route.query.search||null},getRows(){return this.redirectsStore.rows.map(o=>({...o,source_url:this.disableSource?"":o.source_url}))},columns(){const o=[{slug:"source_url",label:this.strings.sourceUrl,width:"300px",sortable:!0},{slug:"target_url",label:this.strings.targetUrl,width:"300px",sortable:!0},{slug:"type",label:this.strings.type,width:"120px",sortable:!0},{slug:"enabled",label:this.strings.enabled,width:"80px",sortable:!0}];return this.excludeColumns&&this.excludeColumns.length?o.filter(e=>!this.excludeColumns.includes(e.slug)):o},bulkOptions(){return[{label:a("Delete",ee),value:"delete"}]},additionalFilters(){return[]}},methods:{processFilterTable({slug:o,values:e}){this.redirectsStore.selectedFilters[o]=e,this.wpTableLoading=!0,this.redirectsStore.getRedirects().then(()=>{this.wpTableLoading=!1})},processPagination(o){this.redirectsStore.totals.main.page=o,this.wpTableLoading=!0,this.redirectsStore.getRedirects().then(()=>{this.wpTableLoading=!1})},processAdditionalFilters(o){Object.keys(o).forEach(e=>{this.redirectsStore.selectedFilters[e]=o[e]}),this.wpTableLoading=!0,this.redirectsStore.getRedirects().then(()=>{this.wpTableLoading=!1})},processBulkAction({action:o,selectedRows:e}){o==="delete"&&this.notificationsStore.show({type:"warning",title:this.strings.areYouSureDeleteSelected,message:this.strings.bulkActionCannotBeUndone,actions:[{label:a("Yes, delete the redirects",ee),action:"processDeleteSelected",data:e}]})},processDeleteSelected(o){yt.post(se.restUrl("redirects/delete")).send({redirectIds:o}).then(()=>{this.redirectsStore.getRedirects()})},processChangeItemsPerPage(o){this.settingsStore.changeItemsPerPage({slug:"redirects",itemsPerPage:o})},processSearch(o){this.wpTableLoading=!0,this.redirectsStore.getRedirects({searchTerm:o}).then(()=>{this.wpTableLoading=!1})},processSort({column:o,direction:e}){this.redirectsStore.sort.main=o,this.redirectsStore.sortDir.main=e,this.wpTableLoading=!0,this.redirectsStore.getRedirects().then(()=>{this.wpTableLoading=!1})},maybeDeleteRow(o){this.notificationsStore.show({type:"warning",title:this.strings.areYouSureDelete,message:this.strings.bulkActionCannotBeUndone,actions:[{label:a("Yes, delete the redirect",ee),action:"processDeleteRow",data:o}]})},processDeleteRow(o){const e=this.redirectsStore.rows[o];yt.post(se.restUrl("redirects/delete")).send({redirectIds:[e.id]}).then(()=>{this.redirectsStore.getRedirects()})},toggleInput(o,e){yt.post(se.restUrl("redirects/update")).send({id:o.id,enabled:e}).then(()=>{this.redirectsStore.getRedirects()})},showRedirectTest(o){this.testUrl=`${this.redirectsStore.options.server.home}${o.source_url}`,this.testResults=null,this.modalOpened=!0},processRedirectTest(){this.testUrl&&(this.testLoading=!0,this.testResults=null,yt.post(se.restUrl("redirects/test")).send({url:this.testUrl}).then(o=>{this.testResults=o.body,this.testLoading=!1}).catch(()=>{this.testLoading=!1}))},getColumnLabel(o){return this.strings.redirectTypes[o]||o}},mounted(){this.redirectsStore.rows.length||(this.wpTableLoading=!0,this.redirectsStore.getRedirects().then(()=>{this.wpTableLoading=!1}))}},n1={class:"aioseo-redirects-table"},r1=["onClick"],i1={class:"row-actions"},a1={class:"edit"},l1=["onClick"],c1={key:0,class:"test"},d1=["onClick"],u1={class:"trash"},p1=["onClick"],g1={class:"test-redirect-modal"},m1={class:"aioseo-description"},h1={class:"test-redirect-input"},_1={key:0,class:"test-redirect-results"};function f1(o,e,s,t,i,n){const m=h("base-toggle"),d=h("core-add-redirection"),g=h("core-wp-table"),b=h("base-input"),C=h("base-button"),S=h("core-alert"),x=h("core-modal");return r(),v("div",n1,[(r(),y(g,{ref:"table",id:n.tableId,"additional-filters":n.additionalFilters,"bulk-options":n.bulkOptions,columns:n.columns,filters:t.redirectsStore.filters,"initial-items-per-page":t.settingsStore.settings.tablePagination.redirects,"initial-page-number":n.pageNumber,"initial-search-term":n.searchTerm,key:i.wpTableKey,loading:i.wpTableLoading,rows:n.getRows,"search-label":i.strings.searchUrls,"selected-filters":t.redirectsStore.selectedFilters,"show-bulk-actions":s.showBulkActions,"show-header":s.showHeader,"show-table-footer":s.showTableFooter,totals:t.redirectsStore.totals.main,"show-items-per-page":"",onFilterTable:n.processFilterTable,onPaginate:n.processPagination,onProcessAdditionalFilters:n.processAdditionalFilters,onProcessBulkAction:n.processBulkAction,onProcessChangeItemsPerPage:n.processChangeItemsPerPage,onSearch:n.processSearch,onSortColumn:n.processSort},{source_url:u(({row:k,index:E,column:R,editRow:K})=>[l("strong",null,[l("a",{class:"edit-link",href:"#",onClick:te(U=>K(E),["prevent"])},_(R),9,r1)]),l("div",i1,[l("span",a1,[l("a",{href:"#",onClick:te(U=>K(E),["prevent"])},_(i.strings.edit),9,l1),e[2]||(e[2]=P(" | ",-1))]),k.enabled&&!t.redirectHasUnPublishedPost(k)?(r(),v("span",c1,[l("a",{href:"#",onClick:te(U=>n.showRedirectTest(k),["prevent"])},_(i.strings.checkRedirect),9,d1),e[3]||(e[3]=P(" | ",-1))])):f("",!0),l("span",u1,[l("a",{class:"submitdelete",href:"#",onClick:te(U=>n.maybeDeleteRow(E),["prevent"])},_(i.strings.delete),9,p1)])])]),target_url:u(({row:k})=>[P(_(400<=k.type?"-":k.target_url),1)]),type:u(({column:k})=>[P(_(n.getColumnLabel(k)),1)]),enabled:u(({column:k,row:E})=>[p(m,{modelValue:k,"onUpdate:modelValue":R=>n.toggleInput(E,k)},null,8,["modelValue","onUpdate:modelValue"])]),"edit-row":u(({row:k,editRow:E})=>[p(d,{edit:"",onCancel:R=>E(null),onAddedRedirect:R=>E(null),url:{id:k.id,url:k.source_url,regex:k.regex,ignoreSlash:k.ignore_slash,ignoreCase:k.ignore_case,showOptions:!0,errors:[],warnings:[]},target:k.target_url,type:k.type,"query-params":k.query_parameters,"custom-rules":k.rules,"is-table":!0},null,8,["onCancel","onAddedRedirect","url","target","type","query-params","custom-rules"])]),_:1},8,["id","additional-filters","bulk-options","columns","filters","initial-items-per-page","initial-page-number","initial-search-term","loading","rows","search-label","selected-filters","show-bulk-actions","show-header","show-table-footer","totals","onFilterTable","onPaginate","onProcessAdditionalFilters","onProcessBulkAction","onProcessChangeItemsPerPage","onSearch","onSortColumn"])),p(x,{show:i.modalOpened,onClose:e[1]||(e[1]=k=>i.modalOpened=!1)},{headerTitle:u(()=>[P(_(i.strings.redirectTest),1)]),body:u(()=>[l("div",g1,[l("div",m1,_(i.strings.redirectTestDescription),1),l("div",h1,[p(b,{class:"test-redirect-url",size:"medium",prependIcon:"link",placeholder:i.strings.enterUrlPlaceholder,modelValue:i.testUrl,"onUpdate:modelValue":e[0]||(e[0]=k=>i.testUrl=k)},null,8,["placeholder","modelValue"]),p(C,{size:"medium",type:"blue",loading:i.testLoading,onClick:n.processRedirectTest},{default:u(()=>[P(_(i.strings.test),1)]),_:1},8,["loading","onClick"])]),i.testResults?(r(),v("div",_1,[p(S,{type:i.testResults.type==="success"?"green":"red"},{default:u(()=>[P(_(i.testResults.message),1)]),_:1},8,["type"])])):f("",!0)])]),_:1},8,["show"])])}const y1=A(s1,[["render",f1]]),v1="all-in-one-seo-pack",b1={setup(){return{licenseStore:ge(),postEditorStore:J(),redirectsStore:uo()}},components:{CoreAddRedirection:ls,CoreModal:me,RedirectsSideBar:o1,RedirectsLite:Zn,RedirectsTable:y1},props:{parentComponentContext:String},data(){return{strings:{modalHeader:a("Redirects",v1)}}},computed:{getUrl(){return{url:this.postEditorStore.currentPost.permalinkPath,showOptions:!0}},hasRedirects(){return this.redirectsStore.rows.length},postId(){return this.postEditorStore.currentPost.context==="post"?parseInt(this.postEditorStore.currentPost.id):0}},methods:{reload(){this.redirectsStore.getPostRedirects()}}},k1={key:0},w1={class:"bd"},S1={key:1},C1={key:0,class:"aioseo-tab-content aioseo-redirects metabox"},x1={key:1},P1={class:"bd"},T1={key:1};function E1(o,e,s,t,i,n){const m=h("redirects-lite"),d=h("core-modal"),g=h("redirects-side-bar"),b=h("core-add-redirection"),C=h("redirects-table");return r(),v("div",null,[t.licenseStore.isUnlicensed?(r(),v("div",k1,[o.$root.$data.screenContext==="metabox"?(r(),y(m,{key:0,noCoreCard:!0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0),p(d,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[0]||(e[0]=S=>t.postEditorStore.currentPost.redirects.modalOpen=!1)},{headerTitle:u(()=>[P(_(i.strings.modalHeader),1)]),body:u(()=>[l("div",w1,[p(m,{noCoreCard:!0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])])]),_:1},8,["show"]),s.parentComponentContext!=="modal"?(r(),y(g,{key:1})):f("",!0)])):f("",!0),t.licenseStore.isUnlicensed?f("",!0):(r(),v("div",S1,[o.$root.$data.screenContext==="metabox"?(r(),v("div",C1,[n.hasRedirects?f("",!0):(r(),y(b,{key:t.postEditorStore.currentPost.permalinkPath,"disable-source":!0,"post-id":n.postId,"post-status":t.postEditorStore.currentPost.postStatus,url:n.getUrl,onAddedRedirect:n.reload},null,8,["post-id","post-status","url","onAddedRedirect"])),n.hasRedirects?(r(),v("div",x1,[p(C,{"disable-source":!0,"exclude-columns":["group"],"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1})])):f("",!0)])):f("",!0),p(d,{show:t.postEditorStore.currentPost.redirects.modalOpen&&o.$root.$data.screenContext==="sidebar",classes:["aioseo-redirects"],onClose:e[1]||(e[1]=S=>t.postEditorStore.currentPost.redirects.modalOpen=!1),"allow-overflow":""},{headerTitle:u(()=>[P(_(i.strings.modalHeader),1)]),body:u(()=>[l("div",P1,[n.hasRedirects?f("",!0):(r(),y(b,{key:t.postEditorStore.currentPost.permalinkPath,"disable-source":!0,"post-id":n.postId,"post-status":t.postEditorStore.currentPost.postStatus,url:n.getUrl,onAddedRedirect:n.reload},null,8,["post-id","post-status","url","onAddedRedirect"])),n.hasRedirects?(r(),v("div",T1,[p(C,{"disable-source":!0,"exclude-columns":["group"],"show-bulk-actions":!1,"show-header":!1,"show-table-footer":!1})])):f("",!0)])]),_:1},8,["show"]),s.parentComponentContext!=="modal"?(r(),y(g,{key:1})):f("",!0)]))])}const Ko=A(b1,[["render",E1]]),I1={setup(){return{rootStore:Pe(),licenseStore:ge()}},components:{Redirects:Ko,RedirectsLite:Ko},props:{parentComponentContext:String}},A1={class:"aioseo-tab-content"};function L1(o,e,s,t,i,n){const m=h("Redirects",!0),d=h("RedirectsLite");return r(),v("div",A1,[!t.licenseStore.isUnlicensed&&t.rootStore.isPro?(r(),y(m,{key:0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0),t.licenseStore.isUnlicensed||!t.rootStore.isPro?(r(),y(d,{key:1,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0)])}const B1=A(I1,[["render",L1]]),M1={class:"graph-container"},R1={class:"graph"},O1={class:"left"},H1=["title"],V1={class:"right action-buttons"},xs={__name:"GraphCard",props:{graph:Object,customGraph:Boolean,defaultGraph:String},setup(o){const e="all-in-one-seo-pack",s=o,{childGraphs:t,graphs:i}=Qo(),n=q(()=>{if(s.customGraph)return a("Custom Schema",e)+" - "+s.graph.graphName;if(s.defaultGraph)return g(s.defaultGraph);if(s.graph?.label)return s.graph.label;const C=s.graph?.slug?.toLowerCase();return i.find(x=>x.slug===C)?.label||a("Parsing Block Data...",e)}),m=q(()=>{if(s.customGraph)return Gt;if(s.defaultGraph){const C=d(s.defaultGraph);return C?b(C):Gt}return b(s.graph.slug)}),d=C=>{Object.entries(t).forEach(x=>{const k=x[0];x[1].forEach(E=>{C===E.childGraphName&&(C=k)})});let S="";return i.forEach(x=>{x.graphName===C&&(S=x.slug)}),S},g=C=>{let S="",x=C;return Object.entries(t).forEach(k=>{const E=k[0];k[1].forEach(R=>{S||C===R.childGraphName&&(S=E,x=R.label,i.forEach(K=>{K.graphName===E&&(S=K.label)}))})}),S?S+" - "+x+" "+a("(Default)",e):C+" "+a("(Default)",e)},b=C=>{switch(C){case"article":return fr;case"book":return _r;case"car":return hr;case"course":return mr;case"dataset":return gr;case"event":return pr;case"faq-page":return ur;case"fact-check":return dr;case"how-to":return cr;case"job-posting":return lr;case"movie":return ar;case"music":return ir;case"person":return rr;case"product":return nr;case"product-review":return sr;case"recipe":return or;case"service":return tr;case"software-application":return er;case"video":return Jn;case"web-page":return Qn;default:return Gt}};return(C,S)=>(r(),v("div",M1,[l("div",R1,[l("div",O1,[(r(),y(ae(m.value))),l("span",{title:n.value},_(n.value),9,H1)]),l("div",V1,[Oe(C.$slots,"buttons")])])]))}},$1={class:"title"},D1=["innerHTML"],U1={class:"schema-templates"},K1={class:"main"},F1={class:"schema-catalog"},q1={class:"graphs"},G1={__name:"CtaModal",setup(o){const e="all-in-one-seo-pack",{graphs:s}=Qo(),t={schemaGenerator:a("Schema Generator",e),headerTooltip:G(a("Use our powerful Schema Generator to configure Schema Markup for your content. Search Engines use structured data to better understand what your site is about as well as to display rich snippets in search results. %1$s",e),se.getDocLink(fe.learnMore,"schema",!0)),searchSchema:a("Search Schema",e),ctaDescription:a("Easily generate unlimited schema markup for your content to help you rank higher in search results. Our schema validator ensures your schema works out of the box.",e),ctaButtonText:a("Unlock Schema Generator",e),ctaHeader:G(a("Schema Generator is a %1$s Feature",e),"PRO")},i=[a("Unlimited Schema",e),a("Validate with Google",e),a("Increase Rankings",e),a("Additional Schema Types",e)],n=[{slug:"schema-templates",icon:yr,name:a("Schema Templates",e),component:"templates"},{slug:"custom-schema",icon:vr,name:a("Custom Schema",e),component:"custom"},{slug:"schema-validation",icon:br,name:a("Schema Validation",e),component:"validation"}],m=[{slug:"schema-catalog",name:a("Schema Catalog",e)},{slug:"your-templates",name:a("Your Templates",e)}];return(d,g)=>{const b=h("base-input"),C=h("base-button");return r(),y(c(me),{classes:["aioseo-post-schema-modal-cta"],onClose:g[0]||(g[0]=S=>d.$emit("close"))},{headerTitle:u(()=>[l("div",$1,_(t.schemaGenerator),1),p(c(de),null,{tooltip:u(()=>[l("span",{innerHTML:t.headerTooltip},null,8,D1)]),default:u(()=>[p(c(je))]),_:1})]),body:u(()=>[p(c(gt),null,{default:u(()=>[p(c(Ue),{tabs:n,active:"schema-templates",showSaveButton:!1},{"var-tab-icon":u(({tab:S})=>[(r(),y(ae(S.icon)))]),_:1}),l("div",U1,[p(c(Ue),{tabs:m,active:"schema-catalog",showSaveButton:!1},{"var-tab-icon":u(({tab:S})=>[(r(),y(ae(S.icon)))]),_:1}),l("div",K1,[p(b,{class:"search",size:"medium",prependIcon:"search",placeholder:t.searchSchema},null,8,["placeholder"]),l("div",F1,[l("div",q1,[(r(!0),v(re,null,xe(c(s),(S,x)=>(r(),y(c(xs),{key:S.graphName+x,graph:S},{buttons:u(()=>[p(C,{class:"small",type:"gray"},{default:u(()=>[p(c(pt))]),_:1})]),_:1},8,["graph"]))),128))])])])])]),_:1}),p(c(_o),{"cta-link":c(se).getPricingUrl("schema-generator","schema-generator-upsell",null,"liteUpgrade"),"button-text":t.ctaButtonText,"learn-more-link":c(se).getUpsellUrl("schema-generator",null,"liteUpgrade"),"feature-list":i},{"header-text":u(()=>[P(_(t.ctaHeader),1)]),description:u(()=>[P(_(t.ctaDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link"])]),_:1})}}},Xe="all-in-one-seo-pack",z1={setup(){return{postEditorStore:J(),GLOBAL_STRINGS:fe,links:se}},components:{CoreAlert:le,CoreSettingsRow:pe,CoreTooltip:de,CtaModal:G1,GraphCard:xs,SvgEye:mt},props:{parentComponentContext:String},data(){return{modalOpen:!1,strings:{sidebarDescription:a("Configure Schema Markup for your content. Search engines use structured data to display rich results in SERPs.",Xe),noGraphs:a("You have not added any schema yet. You can add any schema graphs you like via the Schema Generator below.",Xe),schemaInUse:a("Schema In Use",Xe),generateSchema:a("Generate Schema",Xe),validateSchema:a("Validate Schema",Xe),defaultGraphTooltip:a("This is the default graph for this post type. All data for this graph will be automatically generated.",Xe)}}},computed:{isSidebar(){return this.$root.$data.screenContext==="sidebar"}},methods:{getDefaultSchemaTooltipOffset(){return et()?"-120px,0":this.isSidebar?"-70px,0":"0,0"}}},N1={class:"graphs"},j1={key:0,class:"sidebar-description"},W1={class:"description"},Z1=["innerHTML"],Y1=["innerHTML"],X1={class:"buttons"};function Q1(o,e,s,t,i,n){const m=h("svg-eye"),d=h("base-button"),g=h("core-tooltip"),b=h("graph-card"),C=h("core-alert"),S=h("cta-modal"),x=h("core-settings-row");return r(),v("div",{class:Q(["aioseo-tab-content aioseo-post-schema",[{sidebar:n.isSidebar}]])},[p(x,{name:i.strings.schemaInUse},{content:u(()=>[l("div",N1,[n.isSidebar?(r(),v("div",j1,[l("p",W1,_(i.strings.sidebarDescription),1),l("p",{class:"description",innerHTML:t.links.getDocLink(t.GLOBAL_STRINGS.learnMore,"schema",!0)},null,8,Z1)])):f("",!0),t.postEditorStore.currentPost.schema.default.graphName&&t.postEditorStore.currentPost.schema.default.isEnabled?(r(),y(b,{key:1,defaultGraph:t.postEditorStore.currentPost.schema.default.graphName},{buttons:u(()=>[p(g,{offset:n.getDefaultSchemaTooltipOffset()},{tooltip:u(()=>[l("span",{innerHTML:i.strings.defaultGraphTooltip},null,8,Y1)]),default:u(()=>[p(d,{class:"small no-hover",type:"gray"},{default:u(()=>[p(m)]),_:1})]),_:1},8,["offset"])]),_:1},8,["defaultGraph"])):f("",!0)]),l("div",X1,[!t.postEditorStore.currentPost.schema.default.graphName||!t.postEditorStore.currentPost.schema.default.isEnabled?(r(),y(C,{key:0,class:"no-graphs",type:"yellow"},{default:u(()=>[P(_(i.strings.noGraphs),1)]),_:1})):f("",!0),p(d,{class:"medium",type:"blue",onClick:e[0]||(e[0]=k=>i.modalOpen=!0)},{default:u(()=>[P(_(i.strings.generateSchema),1)]),_:1}),p(d,{class:"medium",type:"gray",onClick:e[1]||(e[1]=k=>i.modalOpen=!0)},{default:u(()=>[P(_(i.strings.validateSchema),1)]),_:1})]),p(S,{show:i.modalOpen,onClose:e[2]||(e[2]=k=>i.modalOpen=!1),"modal-name":"schema-cta-modal"},null,8,["show"])]),_:1},8,["name"])],2)}const Fo=A(z1,[["render",Q1]]),J1={setup(){return{licenseStore:ge()}},components:{Schema:Fo,SchemaLite:Fo},props:{parentComponentContext:String}},eh={class:"aioseo-post-schema-view"};function th(o,e,s,t,i,n){const m=h("schema",!0),d=h("schema-lite");return r(),v("div",eh,[t.licenseStore.isUnlicensed?f("",!0):(r(),y(m,{key:0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])),t.licenseStore.isUnlicensed?(r(),y(d,{key:1,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):f("",!0)])}const oh=A(J1,[["render",th]]),sh={class:"aioseo-seo-revision-list-item"},nh={class:"aioseo-seo-revision-list-item__author"},rh={class:"aioseo-seo-revision-list-item__author__avatar"},ih={class:"aioseo-seo-revision-list-item__author__name"},ah={class:"aioseo-seo-revision-list-item__action"},lh={class:"aioseo-seo-revision-list-item__action__view"},ch={class:"aioseo-seo-revision-list-item__action__delete"},dh={__name:"ListItem",setup(o){const{currentUser:e}=jo(Ot());return(s,t)=>(r(),v("div",sh,[l("div",nh,[l("span",rh,[p(c(wr),{src:c(e).avatar.url,size:c(e).avatar.size},null,8,["src","size"])]),l("span",ih,_(c(Wo)(c(e).display_name,30)),1)]),t[1]||(t[1]=l("div",{class:"aioseo-seo-revision-list-item__date"}," 1 week ago (2 Dec, 2022 @ 18:28:57) ",-1)),l("div",ah,[t[0]||(t[0]=l("span",{class:"aioseo-seo-revision-list-item__action__compare"}," Compare ",-1)),l("span",lh,[p(c(mt),{width:"18"})]),l("span",ch,[p(c(ut),{width:"18"})])])]))}},uh=A(dh,[["__scopeId","data-v-20175fdb"]]),ph={components:{SeoRevisionListItem:uh}},gh={class:"aioseo-seo-revisions-list"};function mh(o,e,s,t,i,n){const m=h("seo-revision-list-item");return r(),v("div",gh,[(r(),v(re,null,xe(13,d=>p(m,{key:"seo-revision-list-item-"+d})),64))])}const hh=A(ph,[["render",mh],["__scopeId","data-v-7b502c37"]]),Qt="all-in-one-seo-pack",_h={setup(){return{seoRevisionsStore:Ot()}},components:{CoreBlur:gt,CoreModal:me,CoreSettingsRow:pe,SeoRevisionsList:hh,SeoRevisionsUpsell:Sr,SvgRightArrowShort:bo},data(){return{strings:{button:a("Open SEO Revisions",Qt),description:a("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.",Qt),seoRevisions:a("SEO Revisions",Qt)}}}},fh={key:0,class:"aioseo-seo-revisions-metabox"},yh={key:1,class:"aioseo-seo-revisions-sidebar"},vh={class:"aioseo-seo-revisions-sidebar__modal-body"},bh={class:"description"};function kh(o,e,s,t,i,n){const m=h("seo-revisions-list"),d=h("core-blur"),g=h("seo-revisions-upsell"),b=h("core-modal"),C=h("svg-right-arrow-short"),S=h("base-button"),x=h("core-settings-row");return o.$root.$data.screenContext==="metabox"?(r(),v("div",fh,[p(d,null,{default:u(()=>[p(m)]),_:1}),p(g,{"parent-component-context":"metabox"})])):o.$root.$data.screenContext==="sidebar"?(r(),v("div",yh,[p(b,{show:t.seoRevisionsStore.modalOpenSidebar,classes:[],onClose:e[0]||(e[0]=k=>t.seoRevisionsStore.modalOpenSidebar=!1)},{headerTitle:u(()=>[P(_(i.strings.seoRevisions),1)]),body:u(()=>[l("div",vh,[p(d,null,{default:u(()=>[p(m)]),_:1}),p(g,{"parent-component-context":"modal"})])]),_:1},8,["show"]),p(x,{align:""},{name:u(()=>[P(_(i.strings.seoRevisions),1)]),description:u(()=>[l("p",bh,_(i.strings.description),1)]),content:u(()=>[p(S,{class:"gray small",onClick:e[1]||(e[1]=te(k=>t.seoRevisionsStore.modalOpenSidebar=!0,["stop","exact"]))},{default:u(()=>[p(C,{width:"10"}),P(" "+_(i.strings.button),1)]),_:1})]),_:1})])):f("",!0)}const qo=A(_h,[["render",kh],["__scopeId","data-v-eda67d56"]]),wh={setup(){return{licenseStore:ge()}},components:{SeoRevisions:qo,SeoRevisionsLite:qo},props:{parentComponentContext:String},data(){return{license:it}}},Sh={class:"aioseo-seo-revisions aioseo-tab-content"};function Ch(o,e,s,t,i,n){const m=h("seo-revisions",!0),d=h("seo-revisions-lite");return r(),v("div",Sh,[!t.licenseStore.isUnlicensed&&i.license.hasCoreFeature("seo-revisions")?(r(),y(m,{key:0,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"])):(r(),y(d,{key:1,parentComponentContext:s.parentComponentContext},null,8,["parentComponentContext"]))])}const xh=A(wh,[["render",Ch],["__scopeId","data-v-463f2e4b"]]),Ph={__name:"CountBadge",setup(o){const{itemsTotalCount:e}=jo(Ot()),s=q(()=>99<e.value?"99+":e.value);return(t,i)=>c(e)?(r(),v("span",{key:0,class:Q(["aioseo-seo-revisions-count-badge",{"aioseo-seo-revisions-count-badge--ml":t.$root.$data.screenContext==="sidebar","aioseo-seo-revisions-count-badge--mr":t.$root.$data.screenContext==="metabox","aioseo-seo-revisions-count-badge--sm":99<c(e)}])},_(s.value),3)):f("",!0)}},nt="all-in-one-seo-pack",Ps=()=>{const o=q(()=>[{groupLabel:a("Default",nt),options:[{label:a("Default Object Type (Set in Social Networks)",nt),value:"default"}]}].concat(gn)),e=[{label:a("Default (Set under Social Networks)",nt),value:"default"},{label:a("Summary",nt),value:"summary"},{label:a("Summary with Large Image",nt),value:"summary_large_image"}];return{getObjectTypeLabelByOption:i=>{let n="";return o.value.forEach(m=>{const d=m.options.find(g=>g.value===i);d&&(n=d?.label||"")}),n},getTwitterCardLabelByOption:i=>e.find(n=>n.value===i)?.label||"",objectTypeOptions:o,twitterCardOptions:e}},ue="all-in-one-seo-pack",Th={setup(){const{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:s,imageUrl:t,loading:i,setImageUrl:n}=cs(),{maxRecommendedCount:m}=go(),{objectTypeOptions:d}=Ps(),{parseTags:g}=co({separator:void 0});return{getImageSourceOptionFiltered:o,getTermImageSourceOptions:e,imageSourceOptionsFiltered:s,imageUrl:t,loading:i,maxRecommendedCount:m,objectTypeOptions:d,optionsStore:Ke(),parseTags:g,postEditorStore:J(),rootStore:Pe(),setImageUrl:n}},components:{CoreAlert:le,CoreFacebookPreview:Cr,CoreHtmlTagsEditor:Et,CoreImageUploader:ds,CoreSettingsRow:pe},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:Jo,titleCount:0,descriptionCount:0,strings:{tabName:a("Facebook Preview",ue),imageSource:a("Image Source",ue),customFieldsName:a("Custom Field Name",ue),video:a("Video URL",ue),width:a("Width",ue),height:a("Height",ue),facebookObjectType:a("Object Type",ue),facebookImage:a("Facebook Image",ue),facebookTitle:a("Facebook Title",ue),facebookDescription:a("Facebook Description",ue),minimumSize:a("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.",ue),clickToAddSiteName:a("Click on the tags below to insert variables into your site name.",ue),clickToAddHomePageDescription:a("Click on the tags below to insert variables into your meta description.",ue),articleSection:a("Article Section",ue),articleTags:a("Article Tags",ue),tagPlaceholder:a("Press enter to create an article tag",ue),facebookDisabled:G(a("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",ue),a("Open Graph",ue),G('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#facebook",a("Go to Social Networks",ue)))}}},watch:{"postEditorStore.currentPost.og_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.og_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){return this.parseTags(this.postEditorStore.currentPost.og_title||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){return this.parseTags(this.postEditorStore.currentPost.og_description||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},shouldShowArticleSection(){const o=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[o][this.postEditorStore.currentPost.postType||this.postEditorStore.currentPost.termType]?.objectType==="article"}},methods:{scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveImageType(o){this.postEditorStore.currentPost.og_image_type=o},getObjectTypeOptions(o){let e=null;return this.objectTypeOptions.forEach(s=>{const t=s.options.find(i=>i.value===o);t&&(e=t)}),e},setObjectType(o){this.postEditorStore.currentPost.og_object_type=o},updateImage(o){this.postEditorStore.currentPost.og_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("facebook")}},mounted(){this.scrollToElement(),this.setImageUrl("facebook"),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate)},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate)}},Eh={class:"tab-facebook"},Ih={id:"aioseo-post-settings-facebook"},Ah=["innerHTML"],Lh=["innerHTML"];function Bh(o,e,s,t,i,n){const m=h("core-alert"),d=h("core-facebook-preview"),g=h("core-settings-row"),b=h("core-html-tags-editor"),C=h("base-select"),S=h("base-input"),x=h("core-image-uploader");return r(),v("div",Eh,[p(g,{class:"snippet-preview-row"},{name:u(()=>[l("span",null,_(i.strings.tabName),1)]),content:u(()=>[t.optionsStore.options.social.facebook.general.enable?f("",!0):(r(),y(m,{key:0,class:"facebook-disabled-warning",innerHTML:i.strings.facebookDisabled,type:"red"},null,8,["innerHTML"])),p(d,{description:n.previewDescription,image:t.imageUrl,loading:t.loading,title:n.previewTitle},null,8,["description","image","loading","title"])]),_:1}),l("div",Ih,[p(g,{name:i.strings.facebookTitle,class:"facebook-title-settings",align:""},{content:u(()=>[p(b,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_title,"onUpdate:modelValue":e[0]||(e[0]=k=>t.postEditorStore.currentPost.og_title=k),"line-numbers":!1,single:"",onCounter:e[1]||(e[1]=k=>i.titleCount=k.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":i.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},{"tags-description":u(()=>[P(_(i.strings.clickToAddSiteName),1)]),_:1},8,["modelValue","tags-context","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(i.titleCount,95)},null,8,Ah)]),_:1},8,["name"]),p(g,{name:i.strings.facebookDescription,class:"facebook-description-settings",align:""},{content:u(()=>[p(b,{class:"facebook-meta-input",modelValue:t.postEditorStore.currentPost.og_description,"onUpdate:modelValue":e[2]||(e[2]=k=>t.postEditorStore.currentPost.og_description=k),"line-numbers":!1,description:"",onCounter:e[3]||(e[3]=k=>i.descriptionCount=k.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":i.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":u(()=>[P(_(i.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(i.descriptionCount,200)},null,8,Lh)]),_:1},8,["name"]),p(g,{id:"aioseo-post-facebook-image-source",class:"facebook-image-source",name:i.strings.imageSource,align:""},{content:u(()=>[p(C,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.og_image_type),"onUpdate:modelValue":e[4]||(e[4]=k=>n.saveImageType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.og_image_type==="custom"?(r(),y(g,{key:0,name:i.strings.customFieldsName,align:""},{content:u(()=>[p(S,{type:"text",size:"medium",placeholder:i.strings.placeholder,modelValue:t.postEditorStore.currentPost.og_image_custom_fields,"onUpdate:modelValue":e[5]||(e[5]=k=>t.postEditorStore.currentPost.og_image_custom_fields=k)},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):f("",!0),t.postEditorStore.currentPost.og_image_type==="custom_image"?(r(),y(g,{key:1,class:"facebook-image",name:i.strings.facebookImage},{content:u(()=>[p(x,{description:i.strings.minimumSize,modelValue:t.postEditorStore.currentPost.og_image_custom_url,"onUpdate:modelValue":e[6]||(e[6]=k=>t.postEditorStore.currentPost.og_image_custom_url=k)},null,8,["description","modelValue"])]),_:1},8,["name"])):f("",!0),p(g,{class:"facebook-video",name:i.strings.video,align:""},{content:u(()=>[p(S,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_video,"onUpdate:modelValue":e[7]||(e[7]=k=>t.postEditorStore.currentPost.og_video=k)},null,8,["modelValue"])]),_:1},8,["name"]),p(g,{class:"facebook-object-type",name:i.strings.facebookObjectType,align:""},{content:u(()=>[p(C,{size:"medium","open-direction":"top",options:t.objectTypeOptions,"group-label":"groupLabel","group-values":"options",modelValue:n.getObjectTypeOptions(t.postEditorStore.currentPost.og_object_type),"onUpdate:modelValue":e[8]||(e[8]=k=>n.setObjectType(k.value))},null,8,["options","modelValue"])]),_:1},8,["name"]),n.shouldShowArticleSection?(r(),y(g,{key:2,name:i.strings.articleSection,align:""},{content:u(()=>[p(S,{type:"text",size:"medium",modelValue:t.postEditorStore.currentPost.og_article_section,"onUpdate:modelValue":e[9]||(e[9]=k=>t.postEditorStore.currentPost.og_article_section=k)},null,8,["modelValue"])]),_:1},8,["name"])):f("",!0),n.shouldShowArticleSection?(r(),y(g,{key:3,name:i.strings.articleTags,align:""},{content:u(()=>[p(C,{multiple:"",taggable:"",options:t.postEditorStore.currentPost.og_article_tags||[],modelValue:t.postEditorStore.currentPost.og_article_tags||[],"onUpdate:modelValue":e[10]||(e[10]=k=>t.postEditorStore.currentPost.og_article_tags=k),"tag-placeholder":i.strings.tagPlaceholder},null,8,["options","modelValue","tag-placeholder"])]),_:1},8,["name"])):f("",!0)])])}const Mh=A(Th,[["render",Bh]]),ke="all-in-one-seo-pack",Rh={setup(){const{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:s,loading:t,setImageUrl:i}=cs(),{maxRecommendedCount:n}=go(),{twitterCardOptions:m}=Ps(),{parseTags:d}=co({separator:void 0});return{getImageSourceOptionFiltered:o,imageSourceOptionsFiltered:e,imageUrl:s,loading:t,maxRecommendedCount:n,optionsStore:Ke(),parseTags:d,postEditorStore:J(),rootStore:Pe(),setImageUrl:i,twitterCardOptions:m}},components:{CoreAlert:le,CoreHtmlTagsEditor:Et,CoreImageUploader:ds,CoreSettingsRow:pe,CoreTwitterPreview:xr},props:{isMobilePreview:{type:Boolean,default(){return!1}}},data(){return{tags:Jo,titleCount:0,descriptionCount:0,facebookImageUrl:"",strings:{twitterPreview:a("X (Twitter) Preview",ke),twitterPreviewDescription:a("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.",ke),useFB:a("Use Data from Facebook Tab",ke),imageSource:a("Image Source",ke),customFieldsName:a("Custom Field Name",ke),twitterImage:a("X Image",ke),twitterTitle:a("X Title",ke),twitterDescription:a("X Description",ke),twitterCardType:a("X Card Type",ke),minimumSizeSummary:a("Minimum size: 144px x 144px, ideal ratio 1:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ke),minimumSizeSummaryWithLarge:a("Minimum size: 300px x 157px, ideal ratio 2:1, 5MB max. JPG, PNG, WEBP and GIF formats only.",ke),twitterDisabled:G(a("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",ke),a("X (Twitter)",ke),G('<a href="%1$s" target="_blank">%2$s<span class="link-right-arrow"> →</span></a>',this.rootStore.aioseo.urls.aio.socialNetworks+"#twitter",a("Go to Social Networks",ke)))}}},watch:{"postEditorStore.currentPost.twitter_use_og"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_type"(){this.handleImageUpdate()},"postEditorStore.currentPost.twitter_image_custom_url"(){this.handleImageUpdate()}},computed:{previewTitle(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_title?this.postEditorStore.currentPost.og_title:this.postEditorStore.currentPost.twitter_title;return this.parseTags(o||this.postEditorStore.currentPost.title||this.postEditorStore.currentPost.tags.title||"#post_title #separator_sa #site_title")},previewDescription(){const o=this.postEditorStore.currentPost.twitter_use_og||!this.postEditorStore.currentPost.twitter_description?this.postEditorStore.currentPost.og_description:this.postEditorStore.currentPost.twitter_description;return this.parseTags(o||this.postEditorStore.currentPost.description||this.postEditorStore.currentPost.tags.description||"#post_content")},previewImage(){return this.postEditorStore.currentPost.twitter_use_og||!this.imageUrl?this.facebookImageUrl:this.imageUrl},twitterImageUploaderDescription(){return this.postEditorStore.currentPost.twitter_card==="summary"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary"?this.strings.minimumSizeSummary:this.postEditorStore.currentPost.twitter_card==="summary_large_image"||this.postEditorStore.currentPost.twitter_card==="default"&&this.optionsStore.options.social.twitter.general.defaultCardType==="summary_large_image"?this.strings.minimumSizeSummaryWithLarge:""}},methods:{getCardOptions(o){return this.twitterCardOptions.find(e=>e.value===o)},cardSelect(o){this.postEditorStore.currentPost.twitter_card=o},scrollToElement(){const o=document.getElementsByClassName("component-wrapper")[0];setTimeout(()=>{o&&(o.firstChild.scrollTop=0)},10)},saveTwitterImageType(o){this.postEditorStore.currentPost.twitter_image_type=o},updateImage(o){this.postEditorStore.currentPost.twitter_image_custom_url=o,this.postEditorStore.savePostState()},handleImageUpdate(){this.setImageUrl("twitter")},updateImagePreview(o){o.social==="facebook"&&(this.facebookImageUrl=o.image)}},mounted(){window.aioseoBus.$on("updateSocialImagePreview",this.updateImagePreview),window.aioseoBus.$on("updateFeaturedImage",this.handleImageUpdate),this.scrollToElement(),this.setImageUrl("facebook").then(()=>{this.setImageUrl("twitter")})},beforeUnmount(){window.aioseoBus.$off("updateFeaturedImage",this.handleImageUpdate),window.aioseoBus.$off("updateSocialImagePreview",this.updateImagePreview)}},Oh={class:"tab-twitter"},Hh={id:"aioseo-post-settings-twitter"},Vh=["innerHTML"],$h=["innerHTML"];function Dh(o,e,s,t,i,n){const m=h("core-alert"),d=h("core-twitter-preview"),g=h("core-settings-row"),b=h("base-toggle"),C=h("core-html-tags-editor"),S=h("base-select"),x=h("base-input"),k=h("core-image-uploader");return r(),v("div",Oh,[p(g,{class:"snippet-preview-row"},{name:u(()=>[l("span",null,_(i.strings.twitterPreview),1)]),description:u(()=>[l("i",null,_(i.strings.twitterPreviewDescription),1)]),content:u(()=>[t.optionsStore.options.social.twitter.general.enable?f("",!0):(r(),y(m,{key:0,class:"twitter-disabled-warning",innerHTML:i.strings.twitterDisabled,type:"red"},null,8,["innerHTML"])),p(d,{card:t.postEditorStore.currentPost.twitter_card,description:n.previewDescription,image:n.previewImage,loading:t.loading,title:n.previewTitle},null,8,["card","description","image","loading","title"])]),_:1}),l("div",Hh,[p(g,{name:i.strings.useFB,class:"use-facebook"},{content:u(()=>[p(b,{modelValue:t.postEditorStore.currentPost.twitter_use_og,"onUpdate:modelValue":e[0]||(e[0]=E=>t.postEditorStore.currentPost.twitter_use_og=E)},null,8,["modelValue"])]),_:1},8,["name"]),t.postEditorStore.currentPost.twitter_use_og?f("",!0):(r(),y(g,{key:0,name:i.strings.twitterTitle,class:"twitter-title-settings",align:""},{content:u(()=>[p(C,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_title,"onUpdate:modelValue":e[1]||(e[1]=E=>t.postEditorStore.currentPost.twitter_title=E),"line-numbers":!1,single:"",onCounter:e[2]||(e[2]=E=>i.titleCount=E.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Title`,"default-tags":i.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"title")},null,8,["modelValue","tags-context","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(i.titleCount,70)},null,8,Vh)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?f("",!0):(r(),y(g,{key:1,name:i.strings.twitterDescription,class:"twitter-description-settings",align:""},{content:u(()=>[p(C,{class:"twitter-meta-input",modelValue:t.postEditorStore.currentPost.twitter_description,"onUpdate:modelValue":e[3]||(e[3]=E=>t.postEditorStore.currentPost.twitter_description=E),"line-numbers":!1,description:"",onCounter:e[4]||(e[4]=E=>i.descriptionCount=E.length),"tags-context":`${t.postEditorStore.currentPost.postType||t.postEditorStore.currentPost.termType}Description`,"default-tags":i.tags.getDefaultTags(t.postEditorStore.currentPost.context==="term"?"taxonomies":null,null,"description")},{"tags-description":u(()=>[P(_(i.strings.clickToAddHomePageDescription),1)]),_:1},8,["modelValue","tags-context","default-tags"]),l("div",{class:"max-recommended-count",innerHTML:t.maxRecommendedCount(i.descriptionCount,200)},null,8,$h)]),_:1},8,["name"])),t.postEditorStore.currentPost.twitter_use_og?f("",!0):(r(),y(g,{key:2,class:"twitter-image-source",name:i.strings.imageSource,align:""},{content:u(()=>[p(S,{size:"medium",options:t.imageSourceOptionsFiltered,modelValue:t.getImageSourceOptionFiltered(t.postEditorStore.currentPost.twitter_image_type),"onUpdate:modelValue":e[5]||(e[5]=E=>n.saveTwitterImageType(E.value))},null,8,["options","modelValue"])]),_:1},8,["name"])),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom"?(r(),y(g,{key:3,class:"twitter-custom-field",name:i.strings.customFieldsName,align:""},{content:u(()=>[p(x,{type:"text",size:"medium",placeholder:i.strings.placeholder,modelValue:t.postEditorStore.currentPost.twitter_image_custom_fields,"onUpdate:modelValue":e[6]||(e[6]=E=>t.postEditorStore.currentPost.twitter_image_custom_fields=E)},null,8,["placeholder","modelValue"])]),_:1},8,["name"])):f("",!0),!t.postEditorStore.currentPost.twitter_use_og&&t.postEditorStore.currentPost.twitter_image_type==="custom_image"?(r(),y(g,{key:4,class:"twitter-image",name:i.strings.twitterImage},{content:u(()=>[p(k,{description:n.twitterImageUploaderDescription,modelValue:t.postEditorStore.currentPost.twitter_image_custom_url,"onUpdate:modelValue":e[7]||(e[7]=E=>t.postEditorStore.currentPost.twitter_image_custom_url=E)},null,8,["description","modelValue"])]),_:1},8,["name"])):f("",!0),p(g,{class:"twitter-card-type",name:i.strings.twitterCardType,align:""},{content:u(()=>[p(S,{size:"medium","open-direction":"top",options:t.twitterCardOptions,modelValue:n.getCardOptions(t.postEditorStore.currentPost.twitter_card),"onUpdate:modelValue":e[8]||(e[8]=E=>n.cardSelect(E.value))},null,8,["options","modelValue"])]),_:1},8,["name"])])])}const Uh=A(Rh,[["render",Dh]]),Jt="all-in-one-seo-pack",Kh={setup(){return{postEditorStore:J(),settingsStore:Le()}},components:{CoreSettingsRow:pe,SvgPencil:lt},data(){return{strings:{title:a("Social Media",Jt),sidebarCopy:a("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.",Jt),editSnippet:a("Preview & Edit",Jt)}}},methods:{openModalEv(){this.settingsStore.changeTabSettings({setting:"modal",value:"social"}),this.postEditorStore.currentPost.modalOpen=!0}}},Fh={class:"aioseo-sidebar-content-title"};function qh(o,e,s,t,i,n){const m=h("svg-pencil"),d=h("base-button"),g=h("core-settings-row");return o.$root.$data.screenContext==="sidebar"?(r(),y(g,{key:0,name:i.strings.metaDescription,class:"snippet-description-row open-social-copy"},{content:u(()=>[l("div",Fh,_(i.strings.title),1),l("p",null,_(i.strings.sidebarCopy),1),p(d,{class:"open-social-modal gray small",onClick:n.openModalEv},{default:u(()=>[p(m),P(" "+_(i.strings.editSnippet),1)]),_:1},8,["onClick"])]),_:1},8,["name"])):f("",!0)}const Gh=A(Kh,[["render",qh]]),eo="all-in-one-seo-pack",zh={setup(){return{postEditorStore:J(),settingsStore:Le()}},components:{BaseRadioToggle:os,CoreMainTabs:Ue,CoreSettingsRow:pe,Facebook:Mh,Twitter:Uh,SocialSideBar:Gh},props:{parentComponentContext:String},data(){return{strings:{pageName:a("Social",eo)},tabs:[{slug:"facebook",name:a("Facebook",eo)},{slug:"twitter",name:a("X (Twitter)",eo)}]}},computed:{initTab:function(){let o=this.settingsStore.metaBoxTabs.social;return this.parentComponentContext==="modal"&&(o=this.settingsStore.metaBoxTabs.socialModal),o}},methods:{processChangeTab(o){this.parentComponentContext==="modal"?this.settingsStore.changeTabSettings({setting:"socialModal",value:o}):this.settingsStore.changeTabSettings({setting:"social",value:o})}},mounted(){Tt()["social-tab"]&&(this.processChangeTab(Tt()["social-tab"]),setTimeout(()=>{to("social-tab")},500))}},Nh={class:"aioseo-tab-content aioseo-post-social"};function jh(o,e,s,t,i,n){const m=h("core-main-tabs"),d=h("core-settings-row"),g=h("social-side-bar");return r(),v("div",Nh,[o.$root.$data.screenContext==="metabox"||s.parentComponentContext==="modal"?(r(),y(d,{key:0,"no-border":""},{content:u(()=>[p(m,{tabs:i.tabs,showSaveButton:!1,active:n.initTab,internal:"",onChanged:e[0]||(e[0]=b=>n.processChangeTab(b)),disableMobile:""},null,8,["tabs","active"])]),_:1})):f("",!0),o.$root.$data.screenContext==="metabox"||s.parentComponentContext==="modal"?(r(),y(rt,{key:1,name:"route-fade",mode:"out-in"},{default:u(()=>[(r(),y(ae(n.initTab)))]),_:1})):f("",!0),s.parentComponentContext!=="modal"?(r(),y(g,{key:2})):f("",!0)])}const Ts=A(zh,[["render",jh]]),Wh=Object.freeze(Object.defineProperty({__proto__:null,default:Ts},Symbol.toStringTag,{value:"Module"})),Zh={},Yh={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"2.25 4 17.75 16"};function Xh(o,e){return r(),v("svg",Yh,[...e[0]||(e[0]=[l("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)])])}const Qh=A(Zh,[["render",Xh]]),Jh={},e_={viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-circle-information-solid"};function t_(o,e){return r(),v("svg",e_,[...e[0]||(e[0]=[l("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)])])}const o_=A(Jh,[["render",t_]]),s_={},n_={viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-receipt"};function r_(o,e){return r(),v("svg",n_,[...e[0]||(e[0]=[l("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)])])}const i_=A(s_,[["render",r_]]),a_={},l_={viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-crossed-arrows"};function c_(o,e){return r(),v("svg",l_,[...e[0]||(e[0]=[l("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)])])}const d_=A(a_,[["render",c_]]),u_={class:"aioseo-app aioseo-post-settings"},p_={key:0,class:"aioseo-sidepanel"},g_=["onClick"],m_={class:"name"},h_={key:0,class:"label new"},__={key:0,class:"aioseo-tab-title"},f_={__name:"Main",setup(o){const e="all-in-one-seo-pack",s=lo(),t=Rt(),i=ge(),n=J(),m=uo(),d=Pe(),g=Ot(),b=Le(),C=N(!1),S=N("general"),x=N(!1),k=N(""),E=N(null),R={pageName:"General",modalTitle:a("Preview Snippet Editor",e),new:a("NEW!",e)},K=q(()=>No().root.data.screenContext),U=q(()=>{const L=[{slug:"general",icon:"svg-settings",name:a("General",e),permission:"aioseo_page_general_settings"},{slug:"social",icon:"svg-share",name:a("Social",e),permission:"aioseo_page_social_settings"},{slug:"schema",icon:"svg-receipt",name:a("Schema",e),permission:"aioseo_page_schema_settings"},{slug:"aiContent",icon:"svg-ai-content",name:a("AI Content",e),permission:"aioseo_page_ai_content_settings",label:"new"},{slug:"redirects",icon:"svg-redirect-crossed-arrows",name:a("Redirects",e),warning:0<m.rows.filter(D=>!!D.enabled).length,permission:"aioseo_page_redirects_manage"},{slug:"seoRevisions",icon:"svg-backup",name:a("SEO Revisions",e),badge:"seo-revisions-count-badge",permission:"aioseo_page_seo_revisions_settings"},{slug:"advanced",icon:"svg-build",name:a("Advanced",e),permission:"aioseo_page_advanced_settings"}];return!d.aioseo.integration&&!et()&&n.currentPost?.context==="post"&&!n.currentPost?.linkAssistant?.isExcludedPost&&n.currentPost?.postType!=="attachment"&&L.splice(4,0,{slug:"linkAssistant",icon:"svg-link-suggestion",name:a("Link Assistant",e),permission:"aioseo_page_link_assistant_settings"}),L}),O=q(()=>n.currentPost.context==="term"||n.currentPost.isWooCommercePageWithoutSchema?U.value.filter(L=>!["aiContent","schema"].includes(L.slug)&&we(ne(L.slug))):U.value.filter(L=>we(ne(L.slug))?!0:L.slug==="general"&&(we("aioseo_page_analysis")||we(ne(L.slug))))),H=q(()=>O.value[0].slug),M=L=>({general:Cs,social:Ts,schema:oh,redirects:B1,seoRevisions:xh,advanced:ti,aiContent:Wd,linkAssistant:zm,"seo-revisions-count-badge":Ph,"svg-settings":is,"svg-share":as,"svg-receipt":i_,"svg-redirect-crossed-arrows":d_,"svg-backup":Qh,"svg-build":Wn,"svg-ai-content":Vt,"svg-link-suggestion":ko})[L],F=()=>{window.wp.data.select("core/editor").isSavingPost()&&!window.wp.data.select("core/editor").isAutosavingPost()&&g.hasPermission&&(C.value=!0,setTimeout(()=>{g.fetch().finally(()=>{C.value=!1})},2500))},V=async(L,D=null)=>{if(L!==null&&typeof L=="object"){await V(L.main),await He(()=>{b.changeTabSettings({setting:L.main,value:L.sub})});return}const $=D||K.value;if($==="sidebar"?document.querySelectorAll(".components-panel__header").forEach(w=>{w.style.position=L===null?"sticky":"static"}):(S.value=L,b.changeTabSettings({setting:"main",value:L})),$==="sidebar"&&S.value!==L)switch(S.value=L,await He(),L){case"social":n.currentPost.modalOpen||(b.changeTabSettings({setting:"modal",value:"social"}),n.currentPost.modalOpen=!0);break;case"linkAssistant":n.currentPost.linkAssistant&&!n.currentPost.linkAssistant.modalOpen&&(n.currentPost.linkAssistant.modalOpen=!0);break;case"redirects":n.currentPost.redirects&&!n.currentPost.redirects.modalOpen&&(n.currentPost.redirects.modalOpen=!0);break;case"seoRevisions":await He(),!g.modalOpenSidebar&&(i.isUnlicensed||g.itemsLimit===0)&&(g.modalOpenSidebar=!0);break}},j=L=>{L||K.value==="sidebar"&&He(()=>{V(null)})},ie=()=>{n.currentPost.modalOpen=!1},ne=L=>{const D=U.value.find($=>$.slug===L);return typeof D.permission<"u"?D.permission:`aioseo_page_${D.slug}_settings`},Y=L=>U.value.find($=>$.slug===L)?.name;return Ie(()=>n.currentPost,()=>{mn(n.savePostState,250)},{deep:!0}),Ie(()=>n.currentPost.modalOpen,L=>{S.value!=="general"&&j(L)}),Ie(()=>n.currentPost.linkAssistant?.modalOpen,L=>{j(L)}),Ie(()=>n.currentPost.redirects?.modalOpen,L=>{j(L)}),Ie(()=>g.modalOpenSidebar,L=>{j(L)}),Ie(()=>b.metaBoxTabs.mainSidebar,L=>{K.value==="sidebar"&&k.value!==L.tab&&(k.value=L.tab,V(L.tab))},{deep:!0}),Bt(()=>{const L=document.querySelector(".interface-complementary-area__pin-unpin-item");L&&(L.style.display="block")}),We(async()=>{if(window.aioseoBus.$on("do-post-settings-main-tab-change",({name:L,context:D})=>{V(L,D)}),Ce()){const{extendImageBlockToolbar:L,extendImageBlockPlaceholder:D,extendFeaturedImageButton:$}=await Ve(async()=>{const{extendImageBlockToolbar:T,extendImageBlockPlaceholder:I,extendFeaturedImageButton:B}=await import("./extend-block-editor.c5187e68.js");return{extendImageBlockToolbar:T,extendImageBlockPlaceholder:I,extendFeaturedImageButton:B}},__vite__mapDeps([2,3,4,1,5,6,7,8,9]),import.meta.url),w=O.value.some(T=>T.slug==="aiContent");w&&L(),s.updateBlockHiddenByUser(),s.hasPermission&&Ir({aiAssistantStore:s}),E.value=window.wp.data.subscribe(()=>{!i.isUnlicensed&&!C.value&&F(),w&&(D(),$()),s.updateBlockHiddenByUser(),s.isBlockAvailable&&s.hasPermission&&(Ar({aiAssistantStore:s}),Lr({aiAssistantStore:s}))})}}),zo(()=>{window.aioseoBus.$off("do-post-settings-main-tab-change"),E.value!==null&&E.value()}),x.value=Tt()["aioseo-modaltab"]||x.value,x.value&&(b.changeTabSettings({setting:"modal",value:x.value}),n.currentPost.modalOpen=!0,setTimeout(()=>{to("aioseo-modaltab")},500)),He(()=>{b.metaBoxTabs.mainSidebar.tab&&V(b.metaBoxTabs.mainSidebar.tab)}),window.aioseoBus.$on("standalone-update-post",L=>{Object.keys(L).forEach(D=>{n.currentPost[D]=L[D]}),L?.primary_term&&hn()}),K.value==="sidebar"?S.value=null:(S.value=Tt()["aioseo-tab"]||b.metaBoxTabs.main||H.value,b.changeTabSettings({setting:"main",value:S.value}),setTimeout(()=>{to("aioseo-tab")},500)),(L,D)=>(r(),v("div",u_,[K.value!=="sidebar"?(r(),y(c(Ue),{key:0,tabs:O.value,showSaveButton:!1,active:S.value,internal:"",disableMobile:"",onChanged:D[0]||(D[0]=$=>V($))},{"var-tab-icon":u(({tab:$})=>[(r(),y(ae(M($.icon)),{class:Q({warning:$.warning})},null,8,["class"])),(r(),y(ae(M($.badge))))]),_:1},8,["tabs","active"])):f("",!0),p(rt,{name:"route-fade",mode:"out-in"},{default:u(()=>[K.value==="sidebar"&&S.value===null?(r(),v("div",p_,[(r(!0),v(re,null,xe(O.value,($,w)=>(r(),v("a",{key:w,class:"aioseo-sidepanel-button",href:"#",onClick:te(T=>V($.slug),["prevent"])},[(r(),y(ae(M($.icon)),{class:"icon"})),l("div",m_,[P(_($.name)+" ",1),$.label==="new"?(r(),v("span",h_,_(R.new),1)):f("",!0)]),(r(),y(ae(M($.badge)))),$.warning?(r(),y(c(o_),{key:0,width:"15",height:"15"})):f("",!0),p(c($t))],8,g_))),128))])):f("",!0)]),_:1}),p(rt,{name:"route-fade",mode:"out-in"},{default:u(()=>[S.value?(r(),v("div",{key:S.value,class:Q(["aioseo-tab",{"is-page-builder":!!c(d).aioseo.integration}])},[K.value==="sidebar"?(r(),v("div",__,[l("span",null,_(Y(S.value)),1),p(c(qe),{onClick:D[1]||(D[1]=$=>V(null))})])):f("",!0),K.value==="sidebar"?(r(),y(c(us),{key:1})):f("",!0),(r(),y(ae(M(S.value)),{"parent-component-context":K.value==="sidebar"?"sidebar":"metabox",onChangeTab:D[2]||(D[2]=$=>V($))},null,40,["parent-component-context"]))],2)):f("",!0)]),_:1}),p(c(me),{show:c(n).currentPost.modalOpen,onClose:ie,classes:["aioseo-post-settings-modal"],"modal-name":"preview-snippet-editor"},{headerTitle:u(()=>[P(_(R.modalTitle),1)]),body:u(()=>[p(c(Xm))]),_:1},8,["show"]),p(c(Zg),{"modal-open":c(t).modalOpenPostEdit,"onUpdate:modalOpen":D[3]||(D[3]=$=>c(t).toggleModal({modal:"modalOpenPostEdit",open:$})),"modal-name":"keyword-rank-tracker-modal"},null,8,["modal-open"])]))}},I3={__name:"App",emits:["beforeMount"],setup(o,{emit:e}){_n({scrollTimeout:1e3,scrollAndHighlightTimeout:2e3});const s=J(),t=e;return Bt(()=>{t("beforeMount")}),(i,n)=>(r(),v("div",{onClick:n[0]||(n[0]=te(()=>{},["stop"])),id:"main-settings-cont"},[i.$root.$data.screenContext!=="sidebar"?(r(),y(c(us),{key:0})):f("",!0),c(s).isFetchingPostData?(r(),y(c(Se),{key:1,dark:"",class:"aioseo-loading-spinner--post-settings"})):(r(),y(c(f_),{key:2}))]))}};export{I3 as _};
修改文件时间
将文件时间修改为当前时间的前一年
删除文件