Files
2026-04-28 15:13:50 +02:00

2 lines
22 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{u as ct,Q as H,ar as _t,i as yt,H as vt,b as Pt,q as St,c as Lt,h as mt,x as At}from"./app-core.b862f9c8.js";import{C as Ct}from"./Index.3967c277.js";import{C as xt}from"./Blur.92d1018b.js";import{C as It}from"./Tabs.37afc36c.js";import{C as kt}from"./Index.08267eee.js";import{C as Bt}from"./Index.d49bf7b5.js";import{C as Tt}from"./SettingsRow.1722e16a.js";import{S as $t}from"./Short.3da22f3f.js";import{_ as M}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as i,h as N,a as B}from"./vendor-other.7b559694.js";import{aq as _,f as d,i as P,Q as C,R as g,j as w,U as m,a0 as f,ae as x,M as y,o as Rt,r as z,u as at,T as rt,B as Et,v as p,P as lt,S as ut}from"./vendor-vue-ui.f00a1236.js";import{u as Ot}from"./PostTypes.54ea30b8.js";import{u as Dt}from"./WpTable.2336977f.js";import{C as gt}from"./Tooltip.cb3a78f6.js";import{C as Ut}from"./Table.1e9a92f1.js";import{S as Ht}from"./Close.de45e465.js";import{S as ft}from"./External.0671381e.js";import{S as ht}from"./App.0538f1c1.js";import{_ as Mt}from"./Trash.c3e8db0b.js";import{m as qt}from"./vendor-lodash.d3ad8b99.js";import{R as Wt}from"./RequiredPlans.24b8f4aa.js";import{S as Yt,a as Nt,b as zt}from"./InternalOutbound.811b0ad5.js";import"./Button.6c09d515.js";import"./ProBadge.838818f5.js";import"./Caret.e6c9f7cc.js";import"./Information.bbfb3caf.js";import"./Slide.805812ec.js";import"./Row.2a7735dd.js";import"./Pencil.1ca5815a.js";import"./ScrollTo.f4df02aa.js";import"./Download.c2e25109.js";/* empty css */import"./ScrollAndHighlight.8e80e729.js";import"./LicenseKeyBar.7c3c080c.js";import"./LogoGear.2987174d.js";import"./vendor-phone.9fd59521.js";import"./icon.5572a14b.js";import"./Settings.9b70c287.js";import"./Build.d28a416b.js";import"./AiContent.3a62156e.js";const it="all-in-one-seo-pack",Ft={setup(){return{postEditorStore:ct()}},components:{CoreSettingsRow:Tt,SvgRightArrowShort:$t},data(){return{strings:{title:i("Link Assistant",it),description:i("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.",it),button:i("Open Link Assistant",it)}}}},Vt={class:"aioseo-link-assistant-sidebar"},jt={class:"aioseo-sidebar-content-title"};function Qt(e,n,t,c,o,s){const u=_("svg-right-arrow-short"),k=_("base-button"),h=_("core-settings-row");return d(),P("div",Vt,[e.$root.$data.screenContext==="sidebar"?(d(),C(h,{key:0,class:"snippet-description-row open-link-assistant-copy"},{content:g(()=>[w("div",jt,m(o.strings.title),1),w("p",null,m(o.strings.description),1),f(k,{class:"open-link-assistant-modal gray small",onClick:n[0]||(n[0]=S=>c.postEditorStore.currentPost.linkAssistant.modalOpen=!0)},{default:g(()=>[f(u),x(" "+m(o.strings.button),1)]),_:1})]),_:1})):y("",!0)])}const Gt=M(Ft,[["render",Qt]]),Kt=()=>{const e=(n,t)=>{const c=H(t);let o=null;return n.forEach(s=>{if(o||!s.attributes)return;if(s.attributes.content&&s.attributes.content.search(c)!==-1){o=s.clientId;return}if(!s.innerBlocks)return;const u=e(s.innerBlocks,t);u&&(o=u)}),o};return{findTargetBlock:e}},I="all-in-one-seo-pack",Jt=(e={})=>{const{emit:n,linkType:t,linksReport:c,metabox:o,pageNumber:s,post:u,postIndex:k,postReport:h,refreshTable:S=()=>{},wpTableLoading:O}=e,D=z(""),q="linkAssistantPostsReport",b=z([]),W=z(!1),j=at(()=>{if(!o)return u.links[t].rows;const r=s.value===1?0:(s.value-1)*10;return u.links[t].rows.slice(r,r+10)}),Q={frontPage:i("Front Page",I),deleteLink:i("Delete Link",I)},G={areYouSureSingle:i("Are you sure you want to delete this link?",I),areYouSureMultiple:i("Are you sure you want to delete these links?",I),areYouSureAll:i("Are you sure you want to delete all links?",I),actionCannotBeUndone:i("This action cannot be undone.",I),yesSingle:i("Yes, I want to delete this link",I),yesMultiple:i("Yes, I want to delete these links",I),yesAll:i("Yes, I want to delete all links",I),noChangedMind:i("No, I changed my mind",I)},F=[{label:i("Delete",I),value:"delete"}],T=_t(),$=ct(),K=r=>{window.aioseoBus.$emit("updatingLinks",!0);const l={...r,additionalFilters:{postId:u.ID||$.currentPost.id,postIndex:k,type:t}};return T[h?"fetchPostReport":"fetchLinksReportInner"](l).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1)})},J=r=>{window.location.href=`#/post-report?postId=${u.ID}&postIndex=${k}&initialTab=${r}`},X=({action:r,selectedRows:l})=>{!l.length||!r||(D.value=r,b.value=l,W.value=!0)},Z=()=>{if(W.value=!1,!!b.value.length){if(typeof b.value=="number"){tt(b.value);return}if(o&&t!=="inboundInternal"){st(b.value).forEach(l=>{R(l)});return}window.aioseoBus.$emit("updatingLinks",!0),T.linksBulk({postIndex:k,postId:u.ID||$.currentPost.id,action:D.value,linkType:t,linkIds:b.value,linksReport:c,postReport:h}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),n("linksUpdated"),S()})}},tt=r=>{const l=u.links[t].rows[r].id;if(l){if(o&&t!=="inboundInternal"){R(r);return}window.aioseoBus.$emit("updatingLinks",!0),T.linkDelete({postIndex:k,postId:u.ID||$.currentPost.id,linkId:l,linksReport:c,postReport:h}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),n("linksUpdated"),S()})}},R=r=>{yt()&&(window.aioseoBus.$emit("updatingLinks",!1),et(r),window.aioseoBus.$emit("updatingLinks",!1)),vt()&&nt(r)},et=r=>{const l=$.currentPost.linkAssistant.links[t].rows[r];if(!l)return;window.aioseoBus.$emit("updatingLinks",!0);const v=H(l.anchor.trim()),a=l.phrase_html.trim(),A=H(a),U=window.wp.data.select("core/block-editor").getBlocks(),{findTargetBlock:ot}=Kt(),E=ot(U,a);if(!E){window.aioseoBus.$emit("updatingLinks",!1);return}const V=window.wp.data.select("core/block-editor").getBlock(E);if(!V){window.aioseoBus.$emit("updatingLinks",!1);return}let Y=new RegExp(`(<t?a[^<>]*>)(.*)?(${v})(.*)?(</t?a[^<>]*>)`,"i");const bt=a.replace(Y,"$2$3$4");Y=new RegExp(`${A}`,"i"),window.wp.data.dispatch("core/block-editor").updateBlockAttributes(E,{content:V.attributes.content.replace(Y,bt)}).then(()=>{u.links[t].rows.splice(r,1)}).catch(wt=>{console.error(`Couldn delete link with type "${t}" and index ${r}:`,wt)}).finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),n("linksUpdated")})},nt=r=>{const l=$.currentPost.linkAssistant.links[t].rows[r];if(!l||!window.tinyMCE)return;window.aioseoBus.$emit("updatingLinks",!0);let v="",a=null,A=null;if(document.querySelector("#wp-content-wrap.tmce-active")?(a=window.tinyMCE.get("content"),v=a.getContent({format:"raw"})):(A=document.querySelector("textarea#content"),v=A?A.value:""),!v){window.aioseoBus.$emit("updatingLinks",!1);return}let U=l.phrase_html.trim();a||(U=U.replace(/(\sdata-mce-href=".*")/gi,""));const ot=H(l.anchor.trim());let E=new RegExp(`(<t?a[^<>]*>)(.*)?(${ot})(.*)?(</t?a[^<>]*>)`,"i");const V=U.replace(E,"$2$3$4"),Y=H(U);E=new RegExp(`${Y}`,"i"),v=v.replace(E,V),a?a.setContent(v):A.value=v,u.links[t].rows.splice(r,1),T.postSettingsUpdate({postContent:v})?.finally(()=>{window.aioseoBus.$emit("updatingLinks",!1),n("linksUpdated")})},st=r=>{let l,v=[];return Array.isArray(r)&&(l=r.map(Number)),l&&u.links[t].rows.forEach((a,A)=>{l.includes(a.id)&&v.push(A)}),r==="all"&&(v=u.links[t].rows.map((a,A)=>A)),v.sort(function(a,A){return A-a})};return Rt(()=>{window.aioseoBus.$on("updatingLinks",r=>{O.value=r}),s.value=T.postReport[t].totals.page}),{bulkOptions:F,changeItemsPerPageSlug:q,doBulkAction:Z,fetchData:K,maybeDoBulkAction:X,modalStrings:G,openPostReport:J,rows:j,selectedRows:b,showModal:W,strings:Q}},Xt={emits:["closeModal","doBulkAction"],components:{CoreModal:kt,SvgClose:Ht},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}}},Zt={class:"aioseo-modal-body"},te=["innerHTML"];function ee(e,n,t,c,o,s){const u=_("svg-close"),k=_("base-button"),h=_("core-modal");return d(),C(h,{show:t.show,classes:["aioseo-link-assistant-confirmation-modal"],"no-header":"",onClose:n[4]||(n[4]=S=>e.$emit("closeModal",!0))},{body:g(()=>[w("div",Zt,[w("button",{class:"close",onClick:n[1]||(n[1]=rt(S=>e.$emit("closeModal",!0),["stop"]))},[f(u,{onClick:n[0]||(n[0]=S=>e.$emit("closeModal",!0))})]),w("h3",null,m(s.areYouSure),1),w("div",{class:"reset-description",innerHTML:t.strings.actionCannotBeUndone},null,8,te),f(k,{type:"blue",size:"medium",onClick:n[2]||(n[2]=S=>e.$emit("doBulkAction",S))},{default:g(()=>[x(m(s.confirmation),1)]),_:1}),f(k,{type:"gray",size:"medium",onClick:n[3]||(n[3]=S=>e.$emit("closeModal",!0))},{default:g(()=>[x(m(t.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])}const ne=M(Xt,[["render",ee]]),se={components:{CoreTooltip:gt},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 e=N.decode(this.anchor),n=H(e);return new RegExp(`(.*)(<t?a[^>]*>.*${n}.*</t?a>)(.*)`,"i")},firstPart(){return N.decode(this.stripTags(this.getPart(1)).trimStart())},linkAnchor(){return N.decode(this.stripTags(this.getPart(2)))},lastPart(){return N.decode(this.stripTags(this.getPart(3)).trimEnd())}},methods:{getPart(e){const t=N.decode(this.stripTags(this.phraseHtml,!0)).match(this.partPattern);return t?t[e]:""},stripTags(e,n=!1){return e=e.replace(/<br\s?\/?>/gi," "),n?e.replace(/<(?!a\s)(?!\/a)[^>]*>/gi,""):e.replace(/<[^>]*>/gi,"")},maybeOpenLink(){this.clickableAnchor&&window.open(this.url,"_blank").focus()}}},oe={class:"phrase"},ie={key:0,class:"first"},ae=["href"],re={key:2},le={class:"anchor"},ce={key:3,class:"last"};function ue(e,n,t,c,o,s){const u=_("core-tooltip");return d(),P("div",{class:"aioseo-link-assistant-phrase",onMouseover:n[1]||(n[1]=k=>e.$emit("mouseOver")),onMouseleave:n[2]||(n[2]=k=>e.$emit("mouseLeave"))},[w("span",oe,[s.firstPart?(d(),P("span",ie,m(s.firstPart),1)):y("",!0),t.tooltip?(d(),C(u,{key:1,type:"action"},{tooltip:g(()=>[w("a",{class:"tooltip-url",href:t.url,target:"_blank"},m(t.url),9,ae)]),default:g(()=>[w("span",{class:"anchor",onClick:n[0]||(n[0]=(...k)=>s.maybeOpenLink&&s.maybeOpenLink(...k))},m(s.linkAnchor),1)]),_:1})):y("",!0),t.tooltip?y("",!0):(d(),P("div",re,[w("span",le,m(s.linkAnchor),1)])),s.lastPart?(d(),P("span",ce,m(s.lastPart),1)):y("",!0)]),Et(e.$slots,"icons")],32)}const de=M(se,[["render",ue]]),pe={key:0},me={key:0,class:"row-actions"},ke={class:"view"},ge=["href"],fe={class:"edit"},he=["href"],be={key:0,class:"links-bottom"},we={class:"links-bottom-left"},_e={key:1},ye={class:"links-bottom-right"},ve="inboundInternal",dt="aioseo-post-report-inbound-internal",Pe={__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(e,{emit:n}){const t="all-in-one-seo-pack",c=Pt(),o=St(),s=e,u=n,k=z(1),h=z(!1),{bulkOptions:S,changeItemsPerPageSlug:O,doBulkAction:D,fetchData:q,maybeDoBulkAction:b,modalStrings:W,openPostReport:j,rows:Q,selectedRows:G,showModal:F,strings:T}=Jt({emit:u,linkType:ve,linksReport:s.linksReport,metabox:s.metabox,pageNumber:k,post:s.post,postIndex:s.postIndex,postReport:s.postReport,refreshTable:()=>Z(),wpTableLoading:h}),{editPost:$,viewPost:K}=Ot(),{processChangeItemsPerPage:J,processFetchTableData:X,refreshTable:Z,wpTableKey:tt}=Dt({changeItemsPerPageSlug:O,fetchData:q,pageNumber:k,tableId:dt,wpTableLoading:h}),R=qt(T,{deleteAllLinks:B(i("Delete All %1$s Links",t),i("Inbound Internal",t)),outboundSuggestions:B(i("%1$s Link Suggestions",t),i("Inbound",t))}),et=at(()=>[{slug:"post_title",label:i("Post Title",t)},{slug:"phrase",label:i("Phrase",t)},{slug:"delete",width:"50px"}]),nt=at(()=>B(i("See All %1$s %2$s Links",t),s.post.links.inboundInternal.totals.total,i("Inbound Internal",t))),st=r=>{k.value=r,!s.metabox&&(h.value=!0,X().then(()=>h.value=!1))};return(r,l)=>{const v=_("base-button");return d(),P("div",null,[(d(),C(p(Ut),{id:dt,key:p(tt),class:lt({"link-assistant-inner-table":!e.postReport}),columns:et.value,loading:h.value,rows:p(Q),totals:e.post.links.inboundInternal.totals,"bulk-options":p(S),"initial-items-per-page":p(o).settings.tablePagination.linkAssistantPostsReport,"initial-page-number":k.value,"show-pagination":!e.linksReport,"show-search":!1,"show-table-footer":e.postReport,"show-items-per-page":"",onPaginate:st,onProcessBulkAction:p(b),onProcessChangeItemsPerPage:p(J)},{post_title:g(({row:a})=>[w("span",null,[x(m(a.context.postTitle)+" ",1),a.context?.permalink?.replace(/\/$/,"")===p(c).aioseo.urls.home?(d(),P("span",pe,"("+m(p(R).frontPage)+")",1)):y("",!0)]),a.context?(d(),P("div",me,[w("span",ke,[w("a",{href:a.context.permalink,target:"_blank"},m(p(K)(a.context.postType.singular)),9,ge),l[4]||(l[4]=x(" | ",-1))]),w("span",fe,[w("a",{href:a.context.editLink,target:"_blank"},m(p($)(a.context.postType.singular)),9,he)])])):y("",!0)]),phrase:g(({row:a})=>[f(p(de),{phrase:a.phrase,phraseHtml:a.phrase_html||"",anchor:a.anchor,url:a.url,clickableAnchor:!0},null,8,["phrase","phraseHtml","anchor","url"])]),delete:g(({row:a})=>[f(p(gt),{type:"action"},{tooltip:g(()=>[x(m(p(R).deleteLink),1)]),default:g(()=>[f(p(Mt),{onClick:A=>p(b)({action:"delete",selectedRows:[a.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"])),e.postReport?y("",!0):(d(),P("div",be,[w("div",we,[e.post.links.inboundInternal.rows.length?(d(),C(v,{key:0,type:"blue",tag:"button",onClick:l[0]||(l[0]=a=>u("openSuggestions"))},{default:g(()=>[f(p(ht)),x(" "+m(p(R).outboundSuggestions),1)]),_:1})):y("",!0),e.post.links.inboundInternal.totals.total>5&&e.linksReport?(d(),P("div",_e,[f(p(ft)),w("a",{class:"link-view",href:"#",onClick:l[1]||(l[1]=rt(a=>p(j)("inbound-internal"),["prevent"]))},m(nt.value),1)])):y("",!0)]),w("div",ye,[e.post.links.inboundInternal.rows.length?(d(),P("a",{key:0,class:"link-delete",onClick:l[2]||(l[2]=rt(a=>p(b)({action:"delete",selectedRows:"all"}),["prevent"]))},m(p(R).deleteAllLinks),1)):y("",!0)])])),f(p(ne),{show:p(F),selectedRows:p(G),strings:p(W),onDoBulkAction:p(D),onCloseModal:l[3]||(l[3]=a=>F.value=!1)},null,8,["show","selectedRows","strings","onDoBulkAction"])])}}},L="all-in-one-seo-pack",Se={setup(){return{licenseStore:mt(),postEditorStore:ct(),links:Lt}},components:{CoreAlert:Ct,CoreBlur:xt,CoreMainTabs:It,CoreModal:kt,Cta:Bt,LinkAssistantInboundInternal:Pe,LinksSideBar:Gt,SvgLinkAffiliate:zt,SvgLinkExternal:ft,SvgLinkInternalInbound:Nt,SvgLinkInternalOutbound:Yt,SvgLinkSuggestion:ht,RequiredPlans:Wt},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:"Whats 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 lets 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:i("Unlock Link Assistant",L),ctaHeader:B(i("Link Assistant is a %1$s Feature",L),"PRO"),linkAssistantDescription:i("Get relevant suggestions for adding internal links to all your content as well as finding any orphaned posts that have no internal links.",L),thisFeatureRequires:i("This feature requires one of the following plans:",L),linkOpportunities:i("Actionable Link Suggestions",L),orphanedPosts:i("See Orphaned Posts",L),affiliateLinks:i("See Affiliate Links",L),domainReports:i("Top Domain Reports",L)}}},computed:{initialTab(){return"inbound-internal"},tabs(){return[{slug:"inbound-internal",icon:"svg-link-internal-inbound",name:B("%1$s %2$s",this.mockedPostData.links.inboundInternal.totals.total,i("Inbound Internal",L))},{slug:"outbound-internal",icon:"svg-link-internal-outbound",name:B("%1$s %2$s",this.mockedPostData.links.outboundInternal.totals.total,i("Outbound Internal",L))},{slug:"affiliate",icon:"svg-link-affiliate",name:B("%1$s %2$s",this.mockedPostData.links.affiliate.totals.total,i("Affiliate",L))},{slug:"external",icon:"svg-link-external",name:B("%1$s %2$s",this.mockedPostData.links.external.totals.total,i("External",L))},{slug:"link-suggestions",icon:"svg-link-suggestion",name:B("%1$s %2$s",this.mockedPostData.links.suggestionsOutbound.totals.total+this.mockedPostData.links.suggestionsInbound.totals.total,i("Link Suggestions",L))}]},modalHeader(){return B(i('Links & Suggestions for "%1$s"',L),window.wp.data.select("core/editor").getEditedPostAttribute("title"))}}},Le={class:"aioseo-tab-content aioseo-link-assistant"},Ae={key:0};function Ce(e,n,t,c,o,s){const u=_("core-main-tabs"),k=_("link-assistant-inbound-internal"),h=_("core-blur"),S=_("required-plans"),O=_("cta"),D=_("core-modal"),q=_("links-side-bar");return d(),P("div",Le,[e.$root.$data.screenContext==="metabox"?(d(),P("div",Ae,[f(h,null,{default:g(()=>[f(u,{class:"link-tabs",internal:"",tabs:s.tabs,active:s.initialTab,showSaveButton:!1},{"var-tab-icon":g(({tab:b})=>[(d(),C(ut(b.icon),{class:lt([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(d(),C(k,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):y("",!0)]),_:1}),f(O,{"cta-link":c.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox","liteUpgrade"),"button-text":o.strings.ctaButtonText,"learn-more-link":c.links.getUpsellUrl("link-assistant","metabox","liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!c.licenseStore.isUnlicensed},{"header-text":g(()=>[x(m(o.strings.ctaHeader),1)]),description:g(()=>[f(S,{addon:"aioseo-link-assistant"}),x(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])])):y("",!0),f(D,{show:c.postEditorStore.currentPost.linkAssistant.modalOpen&&e.$root.$data.screenContext==="sidebar",classes:["aioseo-link-assistant-modal"],onClose:n[0]||(n[0]=b=>c.postEditorStore.currentPost.linkAssistant.modalOpen=!1)},{headerTitle:g(()=>[x(m(s.modalHeader),1)]),body:g(()=>[f(h,null,{default:g(()=>[f(u,{class:"link-tabs",internal:"",tabs:s.tabs,active:s.initialTab,showSaveButton:!1},{"var-tab-icon":g(({tab:b})=>[(d(),C(ut(b.icon),{class:lt([{warning:b.warning}])},null,8,["class"]))]),_:1},8,["tabs","active"]),o.activeTab==="inbound-internal"?(d(),C(k,{key:0,post:o.mockedPostData,metabox:""},null,8,["post"])):y("",!0)]),_:1}),f(O,{"cta-link":c.links.getPricingUrl("link-assistant","link-assistant-upsell","metabox","liteUpgrade"),"button-text":o.strings.ctaButtonText,"learn-more-link":c.links.getUpsellUrl("link-assistant","metabox","liteUpgrade"),"feature-list":[o.strings.linkOpportunities,o.strings.domainReports,o.strings.orphanedPosts,o.strings.affiliateLinks],"hide-bonus":!c.licenseStore.isUnlicensed},{"header-text":g(()=>[x(m(o.strings.ctaHeader),1)]),description:g(()=>[f(S,{addon:"aioseo-link-assistant"}),x(" "+m(o.strings.linkAssistantDescription),1)]),_:1},8,["cta-link","button-text","learn-more-link","feature-list","hide-bonus"])]),_:1},8,["show"]),t.parentComponentContext!=="modal"?(d(),C(q,{key:1})):y("",!0)])}const pt=M(Se,[["render",Ce]]),xe={};function Ie(e,n){return d(),P("div")}const Be=M(xe,[["render",Ie]]),Te={setup(){return{addons:At,licenseStore:mt()}},components:{Links:pt,LinksActivate:Be,LinksLite:pt},props:{parentComponentContext:String}},$e={class:"aioseo-tab-content aioseo-link-assistant"};function Re(e,n,t,c,o,s){const u=_("Links",!0),k=_("LinksLite"),h=_("LinksActivate");return d(),P("div",$e,[!c.licenseStore.isUnlicensed&&c.addons.isActive("aioseo-link-assistant")&&!c.addons.requiresUpgrade("aioseo-link-assistant")?(d(),C(u,{key:0,parentComponentContext:t.parentComponentContext},null,8,["parentComponentContext"])):y("",!0),c.licenseStore.isUnlicensed||c.addons.requiresUpgrade("aioseo-link-assistant")?(d(),C(k,{key:1,parentComponentContext:t.parentComponentContext},null,8,["parentComponentContext"])):y("",!0),!c.licenseStore.isUnlicensed&&!c.addons.isActive("aioseo-link-assistant")&&c.addons.canActivate("aioseo-link-assistant")&&!c.addons.requiresUpgrade("aioseo-link-assistant")?(d(),C(h,{key:2,parentComponentContext:t.parentComponentContext},null,8,["parentComponentContext"])):y("",!0)])}const yn=M(Te,[["render",Re]]);export{yn as default};