2 lines
43 KiB
JavaScript
2 lines
43 KiB
JavaScript
import{f as Ve,h as Ye,d as z,_ as r,s as d,m as ge,b as X,e as He,i as Ne,u as le,j as $e}from"./index.ZNJz487u.js";import{C as pe,a as me}from"./Index.DjT4_3hb.js";import{o as u,c as b,e as fe,j as R,r as c,f as l,F as $,g as ee,h as w,w as _,t as h,d as g,l as E,a as p,n as q,i as ae,z as K}from"./runtime-dom.esm-bundler.DYN7TRGp.js";import{u as _e}from"./LicenseUpgrade.DwCB6v67.js";import{C as ke,a as je,S as ze,_ as We,L as Ge,I as Qe,E as Ke,b as Je,u as Ze}from"./LinksTable.DIJ1l1eR.js";import{a as Xe}from"./allowed.BLuajkg5.js";import{C as be}from"./luxon.D0U2KiOE.js";import{C as re,_ as et}from"./Button.Bac-oBXH.js";import{C as tt}from"./Tooltip.C0YGz9iO.js";import{R as Se,G as we,a as st,b as rt}from"./constants.DAg4IXD1.js";import{S as oe,a as ot}from"./Check.BHN-SUwW.js";import{C as nt}from"./Card.B6u2gR-f.js";import{i as it,b as lt,a as at,S as ue,u as ve,c as H,s as Y,l as W,d as G,e as ut,f as ne,g as ye,h as ct,j as dt,k as ht}from"./Gear.DbutvnqS.js";import{d as Re}from"./debounce.DK1RwK91.js";import{B as gt}from"./Checkbox.Tp09nh4Y.js";import{_ as pt,B as Le}from"./Input.Cq2G8d2G.js";import{_ as P}from"./_plugin-vue_export-helper.BN1snXvA.js";import{S as mt}from"./External.RKqGp4cV.js";import{S as Ue}from"./Close.DIUMfQ03.js";import{T as ft}from"./Slide.h5rY55cR.js";import{S as _t}from"./QuestionMark.DkH01Mbm.js";import{u as Ce}from"./LicenseStore.DAzcp1Mc.js";import"./Row.BtyZfqw7.js";import"./numbers.Bx2B3lvf.js";import"./Caret.1NgHEodt.js";const kt=Ve("RedirectsStore",{actions:{getRedirectUrl(e){return Ye.post(z.restUrl("redirects/url")).send({linkStatusUrl:e}).then(t=>{if(!t.body.success)throw console.error("Could not get redirect URL."),new Error;return t.body.redirectUrl})}}});var bt="[object Symbol]";function St(e){return typeof e=="symbol"||it(e)&<(e)==bt}function wt(e,t){for(var s=-1,o=e==null?0:e.length,n=Array(o);++s<o;)n[s]=t(e[s],s,e);return n}var ce=ue?ue.prototype:void 0,de=ce?ce.toString:void 0;function Te(e){if(typeof e=="string")return e;if(at(e))return wt(e,Te)+"";if(St(e))return de?de.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function xe(e){return e==null?"":Te(e)}function vt(e,t,s){var o=-1,n=e.length;t<0&&(t=-t>n?0:n+t),s=s>n?n:s,s<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var a=Array(n);++o<n;)a[o]=e[o+t];return a}function yt(e,t,s){var o=e.length;return s=s===void 0?o:s,!t&&s>=o?e:vt(e,t,s)}var Rt="\\ud800-\\udfff",Lt="\\u0300-\\u036f",Ut="\\ufe20-\\ufe2f",Ct="\\u20d0-\\u20ff",Tt=Lt+Ut+Ct,xt="\\ufe0e\\ufe0f",At="\\u200d",Pt=RegExp("["+At+Rt+Tt+xt+"]");function Ae(e){return Pt.test(e)}function Ot(e){return e.split("")}var Pe="\\ud800-\\udfff",It="\\u0300-\\u036f",Et="\\ufe20-\\ufe2f",Mt="\\u20d0-\\u20ff",Bt=It+Et+Mt,Dt="\\ufe0e\\ufe0f",Ft="["+Pe+"]",te="["+Bt+"]",se="\\ud83c[\\udffb-\\udfff]",qt="(?:"+te+"|"+se+")",Oe="[^"+Pe+"]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="\\u200d",Me=qt+"?",Be="["+Dt+"]?",Yt="(?:"+Vt+"(?:"+[Oe,Ie,Ee].join("|")+")"+Be+Me+")*",Ht=Be+Me+Yt,Nt="(?:"+[Oe+te+"?",te,Ie,Ee,Ft].join("|")+")",$t=RegExp(se+"(?="+se+")|"+Nt+Ht,"g");function jt(e){return e.match($t)||[]}function zt(e){return Ae(e)?jt(e):Ot(e)}function Wt(e){return function(t){t=xe(t);var s=Ae(t)?zt(t):void 0,o=s?s[0]:t.charAt(0),n=s?yt(s,1).join(""):t.slice(1);return o[e]()+n}}var Gt=Wt("toUpperCase"),De=/[\\^$.*+?()[\]{}|]/g,Qt=RegExp(De.source);function Kt(e){return e=xe(e),e&&Qt.test(e)?e.replace(De,"\\$&"):e}const Jt=(e,t=null)=>{try{e=JSON.parse(e)}catch{e=t}return e},he={individual:0,business:1,agency:2,basic:3,plus:4,pro:5,elite:6},ie=(e="")=>{const t=ve(),o=H().aioseo.data.isNetworkLicensed&&!t.options.general.licenseKey?t.internalNetworkOptions.internal.license?.features||[]:t.internalOptions.internal.license?.features||[];let n=Jt(o,[]);return e&&(n=n[e]||[]),n},Zt=(e,t=null)=>{const s=ie("core");for(const o in s)if(e===o&&!t||e===o&&s[o].find(n=>n===t||-1<n.indexOf(t)))return!0;return!1},Xt=(e,t)=>{const s=ie("addons");for(const o in s)if(e===o&&s[o].includes(t))return!0;return!1},es=e=>{const t=ve(),o=H().aioseo.data.isNetworkLicensed&&!t.options.general.licenseKey?t.internalNetworkOptions.internal.license?.level:t.internalOptions.internal.license?.level;return o?he[o]>=he[e]:!1},ts=(e,t="")=>{const s=[];H().aioseo.features.forEach(a=>{a.section===e&&(t&&a.feature!==t||s.push(Gt(a.license_level)))});const n=["Basic","Plus","Pro","Elite"];return s.sort((a,S)=>n.indexOf(a)-n.indexOf(S)),[...new Set(s)]},ss={getFeatures:ie,getPlansForFeature:ts,hasAddonFeature:Xt,hasCoreFeature:Zt,hasMinimumLevel:es},rs=function(e,t){if(typeof e!="string")return e;const s=new RegExp("^"+t.replace(/\/$/,""),"i");return e.replace(s,"")},F="broken-link-checker-seo",os=()=>({redirectHasUnPublishedPost:s=>s.post_id&&s.postStatus!=="publish",validateRedirect:s=>{const o=[];if(!s.url.url)return o;if(s.url.regex)try{new RegExp(s.url.url)}catch{return o.push(r("The regex syntax is invalid.",F)),o}if(!s.url.regex&&!Y(s.url.url))return o.push(r("Your URL is invalid.",F)),o;s.url.url.substr(0,4)==="http"&&o.push(r("Please enter a valid relative source URL.",F));const n=/%[a-zA-Z_]+%/,a=/%[0-9A-Fa-f]{2}/;if(s.url.url.match(n)&&!s.url.url.match(a)&&o.push(r("Permalinks are not currently supported.",F)),(s.url.url==="/(.*)"||s.url.url==="^/(.*)")&&o.push(r("This redirect is supported using the Relocate Site feature under Full Site Redirect tab.",F)),s.url.url&&s.url.url.length&&s.targetUrl&&s.targetUrl.length){let f=s.url.ignoreSlash?W.unTrailingSlashIt(s.url.url):s.url.url,m=s.url.ignoreSlash?W.unTrailingSlashIt(s.targetUrl):s.targetUrl;f=s.url.ignoreCase?f.toLowerCase():f,m=s.url.ignoreCase?m.toLowerCase():m,s.url.regex||(f=f.replace(/#.*?$/,"")),m=m.replace(/#.*?$/,""),(f===m||s.url.regex&&m.match(f))&&o.push(r("Your source is the same as a target and this will create a loop.",F))}const S=G();if(0<S?.protectedPaths.length){const f=S.protectedPaths.map(m=>m.replace(/\/$/,""));s.url.url.match(new RegExp("^("+f.join("|")+")"))&&o.push(r("Your source is a protected path and cannot be redirected.",F))}return o}}),ns={},is={class:"aioseo-pro-badge"};function ls(e,t){return u(),b("div",is,[fe(e.$slots,"default",{},()=>[t[0]||(t[0]=R(" PRO ",-1))])])}const as=P(ns,[["render",ls]]),J="broken-link-checker-seo",us={emits:["set-url"],components:{CoreProBadge:as,SvgExternal:mt},props:{results:{type:Array,required:!0},url:String},data(){return{strings:{DRAFT:r("DRAFT",J),PENDING:r("PENDING",J),FUTURE:r("FUTURE",J)}}},methods:{getOptionTitle(e){e=Y(e);const t=Y(this.url),s=new RegExp(`(${Kt(t)})`,"gi");return e.replace(s,'<span class="search-term">$1</span>')},getStatusLabel(e){switch(e.toLowerCase()){case"draft":return this.strings.DRAFT;case"future":return this.strings.FUTURE;case"pending":return this.strings.PENDING}}}},cs={class:"aioseo-add-redirection-url-results"},ds=["onClick"],hs={class:"option"},gs={class:"option-title"},ps=["innerHTML"],ms={class:"option-details"},fs=["href"];function _s(e,t,s,o,n,a){const S=c("core-pro-badge"),f=c("svg-external");return u(),b("div",cs,[l("ul",null,[(u(!0),b($,null,ee(s.results,(m,U)=>(u(),b("li",{key:U,onClick:x=>e.$emit("set-url",m.link)},[l("span",null,[l("div",hs,[l("div",gs,[l("div",{innerHTML:a.getOptionTitle(m.label)},null,8,ps),m.status!=="publish"?(u(),w(S,{key:0},{default:_(()=>[R(h(a.getStatusLabel(m.status)),1)]),_:2},1024)):g("",!0)]),l("div",ms,[l("span",null,h(m.link),1)])]),l("a",{class:"option-permalink",href:m.link,target:"_blank",onClick:E(()=>{},["stop"])},[p(f)],8,fs)])],8,ds))),128))])])}const Fe=P(us,[["render",_s]]),A="broken-link-checker-seo",ks={emits:["updated-url","remove-url","updated-option"],setup(){const{validateRedirect:e}=os(),{decodeUrl:t}=ye();return{redirectsStore:G(),rootStore:H(),validateRedirect:e,decodeUrl:t}},components:{BaseCheckbox:gt,BaseInput:Le,CoreAddRedirectionUrlResults:Fe,CoreAlert:be,CoreLoader:re,SvgCircleCheck:oe,SvgCircleClose:Ue,SvgCircleExclamation:ne,SvgGear:ut,SvgTrash:pt,TransitionSlide:ft},props:{url:{type:Object,default(){return{id:null,url:null,regex:!1,ignoreSlash:!0,ignoreCase:!0,errors:[],warnings:[]}}},allowDelete:Boolean,targetUrl:String,log404:Boolean,disableSource:Boolean,disableSearch:Boolean},data(){return{showResults:!1,isLoading:!1,showOptions:!1,strings:{ignoreSlash:r("Ignore Slash",A),ignoreCase:r("Ignore Case",A),regex:r("Regex",A)},results:[]}},watch:{targetUrl(){this.updateSourceUrl(this.url.url)}},computed:{maybeRegex(){return this.url.url.match(/[*\\()[\]^$]/)!==null||this.url.url.indexOf(".?")!==-1},iffyUrl(){if(!this.url.url||this.disableSource)return[];const e=[];return this.url.url.substr(0,4)!=="http"&&this.url.url.substr(0,1)!=="/"&&0<this.url.url.length&&!this.url.regex&&e.push(d(r("The source URL should probably start with a %1$s",A),"<code>/</code>")),this.url.url.indexOf("#")!==-1&&e.push(r("Anchor values are not sent to the server and cannot be redirected.",A)),!this.log404&&this.maybeRegex&&!this.url.regex&&e.push(d(r("Remember to enable the %1$s option if this is a regular expression.",A),"<code>Regex</code>")),this.url.regex&&(this.url.url.indexOf("^")===-1&&this.url.url.indexOf("$")===-1&&e.push(d(r("To prevent a greedy regular expression you can use %1$s to anchor it to the start of the URL. For example: %2$s",A),"<code>^/</code>","<code>^/"+Y(this.url.url.replace(/^\//,""))+"</code>")),0<this.url.url.indexOf("^")&&e.push(d(r("The caret %1$s should be at the start. For example: %2$s",A),"<code>^/</code>","<code>^/"+Y(this.url.url.replace("^","").replace(/^\//,""))+"</code>")),this.url.url.indexOf("^")===0&&this.url.url.indexOf("^/")===-1&&e.push(d(r("The source URL should probably start with a %1$s",A),"<code>^/</code>")),this.url.url.length-1!==this.url.url.indexOf("$")&&this.url.url.indexOf("$")!==-1&&e.push(d(r("The dollar symbol %1$s should be at the end. For example: %2$s",A),"<code>$</code>","<code>"+Y(this.url.url.replace(/\$/g,""))+"$</code>"))),this.url.url.match(/(\.html|\.htm|\.php|\.pdf|\.jpg)$/)!==null&&e.push(r("Some servers may be configured to serve file resources directly, preventing a redirect occurring.",A)),e},urlOptionsActive(){return this.url.regex||this.showOptions}},methods:{updateSourceUrl(e){!this.disableSource&&e&&(e&&(e=e.replace(/(https?:\/)(\/)+|(\/)+/g,"$1$2$3")),!this.url.regex&&e.startsWith("/")&&(e=e.replace(/\s+/g,"")),e=rs(e,this.rootStore.aioseo.urls.home)),this.url.url=e,this.url.errors=this.validateRedirect(this),this.url.warnings=this.iffyUrl,this.$emit("updated-url",this.url)},updateOption(e,t){this.url[e]=t,this.updateSourceUrl(this.url.url),this.$emit("updated-option",this.url)},searchChange(){if(!this.disableSearch){if(!this.url.url||this.url.regex){this.isLoading=!1,this.showResults=!1,this.results=[];return}if(this.url.url.startsWith("/")||this.url.url.startsWith("^")||this.url.url.startsWith("http:")||this.url.url.startsWith("https:")){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.isLoading=!0,Re(()=>{if(!this.url.url){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.showResults=!0,this.ajaxSearch(this.url.url).then(()=>this.isLoading=!1)},500)}},ajaxSearch(e){return this.redirectsStore.getPosts({query:e}).then(t=>{this.results=t.body.objects})},setUrl(e){this.showResults=!1,this.updateOption("url",e.replace(this.rootStore.aioseo.urls.home,"",e))},documentClick(e){if(!this.showResults)return;const t=e&&e.target?e.target:null,s=this.$refs["redirect-source-url"];s&&s!==t&&!s.contains(t)&&(this.showResults=!1)}},mounted(){this.url.showOptions&&(this.showOptions=!0,this.updateSourceUrl(this.url.url)),document.addEventListener("click",this.documentClick)},beforeUnmount(){document.removeEventListener("click",this.documentClick)}},bs={class:"aioseo-redirect-source-url",ref:"redirect-source-url"},Ss={class:"append-icon"};function ws(e,t,s,o,n,a){const S=c("svg-circle-close"),f=c("svg-circle-check"),m=c("svg-circle-exclamation"),U=c("svg-gear"),x=c("svg-trash"),O=c("core-loader"),C=c("base-input"),M=c("core-add-redirection-url-results"),B=c("base-checkbox"),D=c("transition-slide"),V=c("core-alert");return u(),b("div",bs,[p(C,{modelValue:o.decodeUrl(s.url.url),"onUpdate:modelValue":t[2]||(t[2]=v=>a.updateSourceUrl(o.decodeUrl(v))),onKeyup:a.searchChange,onFocus:t[3]||(t[3]=v=>n.showResults=!0),disabled:s.log404||s.disableSource,size:"medium",placeholder:"/source-page/",class:q({"aioseo-error":s.url.errors.length,"aioseo-active":!s.url.errors.length&&!s.url.warnings.length&&s.url.url,"aioseo-warning":s.url.warnings.length})},{"append-icon":_(()=>[l("div",Ss,[n.isLoading?g("",!0):(u(),b($,{key:0},[s.url.errors.length?(u(),w(S,{key:0})):g("",!0),!s.url.errors.length&&!s.url.warnings.length&&s.url.url?(u(),w(f,{key:1})):g("",!0),s.url.warnings.length?(u(),w(m,{key:2})):g("",!0),p(U,{class:q({active:a.urlOptionsActive}),onClick:t[0]||(t[0]=v=>n.showOptions=!n.showOptions)},null,8,["class"]),s.allowDelete?(u(),w(x,{key:3,onClick:t[1]||(t[1]=v=>e.$emit("remove-url"))})):g("",!0)],64)),n.isLoading?(u(),w(O,{key:1,dark:""})):g("",!0)])]),_:1},8,["modelValue","onKeyup","disabled","class"]),!s.url.regex&&n.showResults&&n.results.length?(u(),w(M,{key:0,results:n.results,url:s.url.url,onSetUrl:a.setUrl},null,8,["results","url","onSetUrl"])):g("",!0),s.log404?g("",!0):fe(e.$slots,"source-url-description",{key:1}),p(D,{active:n.showOptions,class:"source-url-options"},{default:_(()=>[p(B,{size:"medium",modelValue:s.url.ignoreSlash,"onUpdate:modelValue":t[4]||(t[4]=v=>a.updateOption("ignoreSlash",v))},{default:_(()=>[R(h(n.strings.ignoreSlash),1)]),_:1},8,["modelValue"]),p(B,{size:"medium",modelValue:s.url.ignoreCase,"onUpdate:modelValue":t[5]||(t[5]=v=>a.updateOption("ignoreCase",v))},{default:_(()=>[R(h(n.strings.ignoreCase),1)]),_:1},8,["modelValue"]),!s.log404&&!s.disableSource?(u(),w(B,{key:0,size:"medium",modelValue:s.url.regex,"onUpdate:modelValue":t[6]||(t[6]=v=>a.updateOption("regex",v))},{default:_(()=>[R(h(n.strings.regex),1)]),_:1},8,["modelValue"])):g("",!0)]),_:1},8,["active"]),p(D,{active:!!s.url.errors.length},{default:_(()=>[(u(!0),b($,null,ee(s.url.errors,(v,k)=>(u(),w(V,{key:k,class:"source-url-error",type:"red",size:"small",innerHTML:v},null,8,["innerHTML"]))),128))]),_:1},8,["active"]),p(D,{active:!!s.url.warnings.length},{default:_(()=>[(u(!0),b($,null,ee(s.url.warnings,(v,k)=>(u(),w(V,{key:k,class:"source-url-warning",type:"yellow",size:"small",innerHTML:v},null,8,["innerHTML"]))),128))]),_:1},8,["active"])],512)}const vs=P(ks,[["render",ws]]),ys={setup(){const{decodeUrl:e}=ye();return{postEditorStore:ct(),redirectsStore:G(),rootStore:H(),decodeUrl:e}},components:{BaseInput:Le,CoreAddRedirectionUrlResults:Fe,CoreLoader:re,SvgCircleCheck:oe,SvgCircleClose:Ue,SvgCircleExclamation:ne},props:{url:String,errors:Array,warnings:Array,disableSearch:Boolean},data(){return{showResults:!1,isLoading:!1,value:null,results:[]}},watch:{value(){this.value&&(this.value=this.value.replace(/(https?:\/)(\/)+|(\/)+/g,"$1$2$3"),this.value.startsWith("/")&&(this.value=this.value.replace(/\s+/g,"")))},url:{immediate:!0,handler(){this.value=this.url}}},methods:{onBlur(){setTimeout(()=>{this.$emit("update:modelValue",this.value)},150)},searchChange(){if(!this.disableSearch){if(!this.value){this.isLoading=!1,this.showResults=!1,this.results=[];return}if(this.value.startsWith("/")||this.value.startsWith("http:")||this.value.startsWith("https:")){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.isLoading=!0,Re(()=>{if(!this.value){this.isLoading=!1,this.showResults=!1,this.results=[];return}this.showResults=!0,this.ajaxSearch(this.value).then(()=>this.isLoading=!1)},500)}},ajaxSearch(e){return this.redirectsStore.getPosts({query:e,postId:this.postEditorStore.currentPost.id}).then(t=>{this.results=t.body.objects})},setUrl(e){this.showResults=!1,this.value=e.replace(this.rootStore.aioseo.urls.home,"",e),this.$emit("update:modelValue",this.value)},inputEventDecodeUrl(e){this.value="",this.value=this.decodeUrl(e)},documentClick(e){if(!this.showResults)return;const t=e&&e.target?e.target:null,s=this.$refs["redirect-target-url"];s&&s!==t&&!s.contains(t)&&(this.showResults=!1)}},mounted(){document.addEventListener("click",this.documentClick);const e=document.querySelector("#aioseo-modal-portal .modal-wrapper");e&&e.addEventListener("click",this.documentClick);const t=document.querySelector("#main-settings-cont");t&&t.addEventListener("click",this.documentClick)},beforeUnmount(){document.removeEventListener("click",this.documentClick);const e=document.querySelector("#aioseo-modal-portal .modal-wrapper");e&&e.removeEventListener("click",this.documentClick);const t=document.querySelector("#main-settings-cont");t&&t.removeEventListener("click",this.documentClick)}},Rs={class:"aioseo-add-redirection-target-url",ref:"redirect-target-url"},Ls={class:"append-icon"};function Us(e,t,s,o,n,a){const S=c("svg-circle-close"),f=c("svg-circle-check"),m=c("svg-circle-exclamation"),U=c("core-loader"),x=c("base-input"),O=c("core-add-redirection-url-results");return u(),b("div",Rs,[p(x,{modelValue:n.value,"onUpdate:modelValue":[t[0]||(t[0]=C=>n.value=C),t[2]||(t[2]=C=>e.$emit("update:modelValue",o.decodeUrl(n.value)))],onKeyup:a.searchChange,onFocus:t[1]||(t[1]=C=>n.showResults=!0),onInput:t[3]||(t[3]=C=>a.inputEventDecodeUrl(C.target.value)),size:"medium",placeholder:"/target-page/",class:q({"aioseo-error":s.errors.length,"aioseo-active":!s.errors.length&&!s.warnings.length&&s.url,"aioseo-warning":s.warnings.length})},{"append-icon":_(()=>[l("div",Ls,[n.isLoading?g("",!0):(u(),b($,{key:0},[s.errors.length?(u(),w(S,{key:0})):g("",!0),!s.errors.length&&!s.warnings.length&&s.url?(u(),w(f,{key:1})):g("",!0),s.warnings.length?(u(),w(m,{key:2})):g("",!0)],64)),n.isLoading?(u(),w(U,{key:1,dark:""})):g("",!0)])]),_:1},8,["modelValue","onKeyup","class"]),n.showResults&&n.results.length?(u(),w(O,{key:0,results:n.results,url:n.value,onSetUrl:a.setUrl},null,8,["results","url","onSetUrl"])):g("",!0)],512)}const Cs=P(ys,[["render",Us]]),Ts={},xs={width:"36",height:"16",viewBox:"0 0 36 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-right-arrow"};function As(e,t){return u(),b("svg",xs,[...t[0]||(t[0]=[l("path",{d:"M36 8L28.4211 0.5V6.125H0V9.875H28.4211V15.5L36 8Z",fill:"currentColor"},null,-1)])])}const Ps=P(Ts,[["render",As]]),L="broken-link-checker-seo",Os={setup(){return{license:ss,links:W,softSanitizeHtml:dt,redirectsStore:G(),rootStore:H(),licenseStore:ht()}},components:{BaseButton:et,CoreAddRedirectionUrl:vs,CoreAddRedirectionTargetUrl:Cs,SvgRightArrow:Ps},data(){return{strings:{sourceUrl:r("Source URL",L),sourceUrlDescription:d(r("Enter a relative URL to redirect from or start by typing in page or post title, slug or ID. You can also use regex (%1$s)",L),W.getDocLink(r("what's this?",L),"redirectManagerRegex")),targetUrl:r("Target URL",L),targetUrlDescription:r("Enter a URL or start by typing a page or post title, slug or ID.",L),addUrl:r("Add URL",L),addRedirect:r("Add Redirect",L),advancedSettings:r("Advanced Settings",L)},REDIRECT_TYPES:rt,REDIRECT_QUERY_PARAMS:st}},computed:{sourceUrl(){return{id:null,url:null,regex:!1,ignoreSlash:!1,ignoreCase:!1,errors:[],warnings:[],showOptions:!0}},columns(){return[{slug:"source_url",label:r("Source URL",L)},{slug:"target_url",label:r("Target URL",L)},{slug:"hits",label:r("Hits",L),width:"97px"},{slug:"type",label:r("Type",L),width:"100px"},{slug:"group",label:r("Group",L),width:"150px"},{slug:"enabled",label:we.enabled,width:"80px"}]},additionalFilters(){return[{label:r("Filter by Group",L),name:"group",options:[{label:r("All Groups",L),value:"all"}].concat(Se)}]}}},Is={class:"aioseo-add-redirection"},Es={class:"urls"},Ms={class:"source"},Bs={class:"aioseo-settings-row no-border no-margin small-padding"},Ds={class:"settings-name"},Fs={class:"name small-margin"},qs={class:"url-arrow"},Vs={class:"target"},Ys={class:"aioseo-settings-row no-border no-margin small-padding"},Hs={class:"settings-name"},Ns={class:"name small-margin"},$s={class:"url"},js={class:"aioseo-description"},zs={class:"source"},Ws=["innerHTML"],Gs={class:"aioseo-add-redirection__settings"},Qs={class:"aioseo-add-redirection__actions"};function Ks(e,t,s,o,n,a){const S=c("core-add-redirection-url"),f=c("base-button"),m=c("svg-right-arrow"),U=c("core-add-redirection-target-url"),x=c("base-toggle");return u(),b("div",Is,[l("div",Es,[l("div",Ms,[l("div",Bs,[l("div",Ds,[l("div",Fs,h(n.strings.sourceUrl),1)]),p(S,{url:a.sourceUrl,"allow-delete":!1,onRemoveUrl:()=>{},"disable-search":!0},null,8,["url"]),p(f,{size:"small",type:"gray",onClick:()=>{}},{default:_(()=>[R(h(n.strings.addUrl),1)]),_:1})])]),l("div",qs,[p(m)]),l("div",Vs,[l("div",Ys,[l("div",Hs,[l("div",Ns,h(n.strings.targetUrl),1)]),l("div",$s,[p(U,{url:"",errors:[],warnings:[],"onUpdate:modelValue":()=>{},"disable-search":!0}),l("div",js,h(n.strings.targetUrlDescription),1)])])]),t[0]||(t[0]=l("div",{class:"break"},null,-1)),l("div",zs,[l("div",{class:"aioseo-description source-description",innerHTML:o.softSanitizeHtml(n.strings.sourceUrlDescription)},null,8,Ws)]),t[1]||(t[1]=l("div",{class:"url-arrow"},null,-1)),t[2]||(t[2]=l("div",{class:"target"},null,-1))]),t[3]||(t[3]=l("hr",{class:"aioseo-add-redirection__separator"},null,-1)),l("div",Gs,[p(x,{modelValue:!1}),l("span",null,h(n.strings.advancedSettings),1)]),t[4]||(t[4]=l("hr",{class:"aioseo-add-redirection__separator"},null,-1)),l("div",Qs,[p(f,{size:"medium",type:"blue",onClick:()=>{},disabled:!0},{default:_(()=>[R(h(n.strings.addRedirect),1)]),_:1})])])}const Js=P(Os,[["render",Ks],["__scopeId","data-v-07416ee2"]]),y="broken-link-checker-seo",Zs={emits:["closeModal","doAction"],setup(){return{strings:{ctaHeader:r("Unlock AIOSEO Redirects on Your Site",y),serverRedirects:r("Fast Server Redirects",y),automaticRedirects:r("Automatic Redirects",y),redirectMonitoring:r("Redirect Monitoring",y),monitoring404:r("404 Monitoring",y),fullSiteRedirects:r("Full Site Redirects",y),siteAliases:r("Site Aliases",y),ctaDescription:r("Redirection Manager by AIOSEO is a premium addon that lets you easily create redirects for broken links to avoid confusing search engines & users and prevent losing backlinks.",y),unlockNow:r("Unlock Redirects",y),addNewRedirection:r("Add New Redirect",y),searchUrls:r("Search URLs",y)}}},components:{CoreModal:je,CoreBlur:me,CoreCard:nt,CoreWpTable:ke,Cta:pe,SvgClose:ot,UpsellAddRedirection:Js},props:{show:Boolean},computed:{columns(){return[{slug:"source_url",label:r("Source URL",y)},{slug:"target_url",label:r("Target URL",y)},{slug:"hits",label:r("Hits",y),width:"97px"},{slug:"type",label:r("Type",y),width:"100px"},{slug:"group",label:r("Group",y),width:"150px"},{slug:"enabled",label:we.enabled,width:"80px"}]},additionalFilters(){return[{label:r("Filter by Group",y),name:"group",options:[{label:r("All Groups",y),value:"all"}].concat(Se)}]}}},Xs={class:"aioseo-modal-body"},er={class:q({"aioseo-redirects":!0,"core-card":!1})};function tr(e,t,s,o,n,a){const S=c("svg-close"),f=c("upsell-add-redirection"),m=c("core-card"),U=c("core-blur"),x=c("core-wp-table"),O=c("cta"),C=c("core-modal");return u(),w(C,{show:s.show,classes:["aioseo-blc-redirects-cta-modal"],"no-header":"",onClose:t[2]||(t[2]=M=>e.$emit("closeModal",!0))},{body:_(()=>[l("div",Xs,[l("button",{class:"close",onClick:t[1]||(t[1]=E(M=>e.$emit("closeModal",!0),["stop"]))},[p(S,{onClick:t[0]||(t[0]=M=>e.$emit("closeModal",!0))})]),l("div",er,[p(U,null,{default:_(()=>[p(m,{slug:"addNewRedirection","header-text":o.strings.addNewRedirection,noSlide:!0},{default:_(()=>[p(f)]),_:1},8,["header-text"])]),_:1}),e.noCoreCard?g("",!0):(u(),w(U,{key:0},{default:_(()=>[p(x,{filters:[],totals:{total:0,pages:0,page:1},columns:a.columns,rows:[],"search-label":o.strings.searchUrls,"additional-filters":a.additionalFilters},null,8,["columns","search-label","additional-filters"])]),_:1})),p(O,{"cta-button-visible":!0,"cta-button-visible-warning":"testing","cta-link":"https://aioseo.com/pricing?utm_source=WordPress&utm_campaign=broken-link-checker&utm_medium=add-redirects-modal","align-top":"","button-text":o.strings.unlockNow,"feature-list":[o.strings.serverRedirects,o.strings.automaticRedirects,o.strings.redirectMonitoring,o.strings.monitoring404,o.strings.fullSiteRedirects,o.strings.siteAliases]},{"header-text":_(()=>[R(h(o.strings.ctaHeader),1)]),description:_(()=>[R(h(o.strings.ctaDescription),1)]),"learn-more-text":_(()=>[R(h(),1)]),_:1},8,["button-text","feature-list"])])])]),_:1},8,["show"])}const sr=P(Zs,[["render",tr]]),j="broken-link-checker-seo",rr={setup(){return{licenseUpgradeComposable:_e(),optionsStore:X()}},components:{SvgCircleCheck:oe,SvgCircleExclamation:ne,SvgCircleInfo:ze},props:{row:{type:Object,required:!0}},data(){return{strings:ge({ok:r("This link is working perfectly!",j),warning:r("This link is working with a redirect.",j),broken:r("This link is broken!",j),pending:r("This link still needs to be checked.",j)},this.licenseUpgradeComposable.strings)}},computed:{isPending(){return parseInt(this.row.checked)===0},status(){return parseInt(this.row.scanning)===1||!this.row.last_scan_date?"pending":parseInt(this.row.broken)===1?"broken":0<parseInt(this.row.redirect_count)?"redirected":"ok"}}},or={class:"status"},nr={key:0,class:"ok"},ir={key:1,class:"redirected"},lr={key:2,class:"broken"},ar={key:3,class:"pending"};function ur(e,t,s,o,n,a){const S=c("svg-circle-check"),f=c("svg-circle-info"),m=c("svg-circle-exclamation");return u(),b("div",or,[a.status==="ok"?(u(),b("div",nr,[p(S),l("span",null,h(n.strings.ok),1)])):g("",!0),a.status==="redirected"?(u(),b("div",ir,[p(f),l("span",null,h(n.strings.warning),1)])):g("",!0),a.status==="broken"?(u(),b("div",lr,[p(m),l("span",null,h(n.strings.broken),1)])):g("",!0),a.status==="pending"?(u(),b("div",ar,[t[0]||(t[0]=l("span",{class:"bullet"},"•",-1)),l("span",null,h(n.strings.pending),1)])):g("",!0)])}const cr=P(rr,[["render",ur]]),i="broken-link-checker-seo",dr={setup(){const e=X(),t=Ne(),s=le(),o="brokenLinks",{filter:n,orderBy:a,orderDir:S,pageNumber:f,processChangeItemsPerPage:m,processFilterTable:U,processPagination:x,processSearch:O,processSort:C,resultsPerPage:M,searchTerm:B,wpTableKey:D,wpTableLoading:V}=Ze({changeItemsPerPageSlug:"brokenLinks",fetchData:t.fetchData,tableId:o}),v=K(()=>(e.internalOptions.internal.license.quotaRemaining/e.internalOptions.internal.license.quota*100).toFixed(2)),k=K(()=>0>=v.value?d(r("You have run out of link quota. %1$s to avoid scanning limits or interruptions.",i),d('<a href="%s" target="_blank">%s</a>',z.getPricingUrl("broken-links-report","links-quota-alert"),r("Upgrade to a higher plan",i))):d(r("You are approaching your link quota limit. %1$s to avoid scanning limits or interruptions.",i),d('<a href="%s" target="_blank">%s</a>',z.getPricingUrl("broken-links-report","links-quota-alert"),r("Upgrade to a higher plan",i)))),T=K(()=>s.aioseoBrokenLinkChecker.totalLinks>e.internalOptions.internal.license.quota),I=d(r("Your current link quota (%1$s) is lower than the number of links (%2$s) on your site. We recommend that you %3$s to ensure all links on your site are monitored. Otherwise, only the first %4$s links will be monitored.",i),parseInt(e.internalOptions.internal.license.quota).toLocaleString(),parseInt(s.aioseoBrokenLinkChecker.totalLinks).toLocaleString(),d('<a href="%s" target="_blank">%s</a>',z.getPricingUrl("broken-links-report","links-quota-lower-than-links-alert"),r("upgrade to a higher plan",i)),parseInt(e.internalOptions.internal.license.quota).toLocaleString());return{filter:n,licenseStore:Ce(),licenseUpgradeComposable:_e(),linkStatusTableStore:t,optionsStore:X(),orderBy:a,orderDir:S,pageNumber:f,processChangeItemsPerPage:m,processFilterTable:U,processPagination:x,processSearch:O,processSort:C,resultsPerPage:M,rootStore:le(),searchTerm:B,settingsStore:$e(),tableId:o,wpTableKey:D,wpTableLoading:V,allowed:Xe,remainingQuotaPercentage:v,remainingQuotaAlert:k,quotaLowerThanLinks:T,quotaLowerThanLinksAlert:I}},components:{ConfirmationModal:Je,CoreAlert:be,CoreLoader:re,CoreTooltip:tt,CoreWpTable:ke,EditRow:Ke,InfoColumn:Qe,LinksTable:Ge,PostsColumn:We,RedirectsCtaModal:sr,StatusColumn:cr,SvgCircleQuestionMark:_t},data(){return{loadingRowIndexes:[],confirmationModalOpen:!1,bulkRows:[],bulkAction:"",editRowAction:"",showUpsellModal:!1,strings:ge({editUrl:r("Edit URL",i),unlink:r("Unlink",i),check:r("Check",i),recheck:r("Recheck",i),dismiss:r("Dismiss",i),undismiss:r("Undismiss",i),addRedirect:r("Add Redirect",i),quotaTooltip:r("This is your links quota, which is reset every month. Every URL on your site that is actively monitored counts against your quota.",i),noResults:r("Scanning for links...",i),noPosts:r("You do not have sufficient permissions to edit any of the posts for this URL.",i)},this.licenseUpgradeComposable.strings),modal:{recheck:{areYouSureSingle:d(r("Are you sure you want to %1$s this URL?",i),r("(re)check",i)),areYouSureMultiple:d(r("Are you sure you want to %1$s these URLs?",i),r("(re)check",i)),yesSingle:d(r("Yes, I want to %1$s this URL",i),r("(re)check",i)),yesMultiple:d(r("Yes, I want to %1$s these URLs",i),r("(re)check",i)),actionCannotBeUndone:r("This action cannot be undone.",i),noChangedMind:r("No, I changed my mind",i)},dismiss:{areYouSureSingle:d(r("Are you sure you want to %1$s this URL?",i),r("dismiss",i)),areYouSureMultiple:d(r("Are you sure you want to %1$s these URLs?",i),r("dismiss",i)),yesSingle:d(r("Yes, I want to %1$s this URL",i),r("dismiss",i)),yesMultiple:d(r("Yes, I want to %1$s these URLs",i),r("dismiss",i)),actionCannotBeUndone:r("This action cannot be undone.",i),noChangedMind:r("No, I changed my mind",i)},undismiss:{areYouSureSingle:d(r("Are you sure you want to %1$s this URL?",i),r("undismiss",i)),areYouSureMultiple:d(r("Are you sure you want to %1$s these URLs?",i),r("undismiss",i)),yesSingle:d(r("Yes, I want to %1$s this URL",i),r("undismiss",i)),yesMultiple:d(r("Yes, I want to %1$s these URLs",i),r("undismiss",i)),actionCannotBeUndone:r("This action cannot be undone.",i),noChangedMind:r("No, I changed my mind",i)},unlink:{areYouSureSingle:d(r("Are you sure you want to %1$s this URL?",i),r("unlink",i)),areYouSureMultiple:d(r("Are you sure you want to %1$s these URLs?",i),r("unlink",i)),yesSingle:d(r("Yes, I want to %1$s this URL",i),r("unlink",i)),yesMultiple:d(r("Yes, I want to %1$s these URLs",i),r("unlink",i)),actionCannotBeUndone:r("This action cannot be undone.",i),noChangedMind:r("No, I changed my mind",i)}}}},watch:{wpTableLoading(e){e&&(this.loadingRowIndexes=[])}},computed:{tooltipText(){return d(r("To unlock a higher quota, consider %1$s.",i),this.link)},columns(){return[{slug:"url",label:r("URL",i),width:"400px",sortable:!0,sortDir:this.orderBy==="url"?this.orderDir:"asc",sorted:this.orderBy==="url"},{slug:"posts",label:r("Posts",i),width:"400px"},{slug:"status",label:r("Status",i)},{slug:"info",width:"140px",label:this.optionsStore.internalOptions.internal.quota+"/200",show:!0},{slug:"loader",width:"0px"}]},bulkOptions(){const e=[{label:r("Unlink",i),value:"unlink"},{label:r("(Re)check",i),value:"recheck"}];return this.isDismissedFilterActive?e.push({label:r("Undismiss",i),value:"undismiss"}):e.push({label:r("Dismiss",i),value:"dismiss"}),e},isDismissedFilterActive(){return this.linkStatusTableStore.linkStatuses.filters.find(t=>t.slug==="dismissed").active},modalStrings(){const e=this.modal[this.bulkAction]||this.modal.recheck;return 1<this.bulkRows.length?(e.areYouSure=e.areYouSureMultiple,e.confirmation=e.yesMultiple):(e.areYouSure=e.areYouSureSingle,e.confirmation=e.yesSingle),e},quota(){return this.optionsStore.internalOptions.internal.license.quotaRemaining.toLocaleString()+"/"+this.optionsStore.internalOptions.internal.license.quota.toLocaleString()}},methods:{processBulkAction({action:e,selectedRows:t}){!t.length||!e||(this.bulkAction=e,this.bulkRows=t,this.confirmationModalOpen=!0)},doBulkAction(){if(this.confirmationModalOpen=!1,!this.bulkRows.length||!this.bulkAction)return;const e=this.bulkRows.map(t=>this.linkStatusTableStore.linkStatuses.rows.find(s=>s.id===t));this.wpTableLoading=!0,this.linkStatusTableStore.runBulkAction({action:this.bulkAction,rows:e,limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,orderBy:this.orderBy,orderDir:this.orderDir}).then(()=>{this.wpTableLoading=!1,this.editRowAction="",this.$refs.linkStatusTable.editRow(null)}).finally(()=>{this.editRowAction="",this.bulkAction="",this.bulkRows=[]})},getRowHeight(e){const t=document.querySelector(`tr[data-row-index="${e}"`);return t?getComputedStyle(t).getPropertyValue("height"):"0px"},dismiss(e){this.wpTableLoading=!0,this.linkStatusTableStore.dismiss({linkStatusId:e.id,limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,filter:this.filter,orderBy:this.orderBy,orderDir:this.orderDir}).then(()=>{this.wpTableLoading=!1,this.editRowAction="",this.$refs.linkStatusTable.editRow(null)})},undismiss(e){this.wpTableLoading=!0,this.linkStatusTableStore.undismiss({linkStatusId:e.id,limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,filter:this.filter,orderBy:this.orderBy,orderDir:this.orderDir}).then(()=>{this.wpTableLoading=!1,this.editRowAction="",this.$refs.linkStatusTable.editRow(null)})},unlink(e){this.wpTableLoading=!0,this.linkStatusTableStore.unlink({linkStatusId:e.id,limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,filter:this.filter,orderBy:this.orderBy,orderDir:this.orderDir}).then(()=>{this.wpTableLoading=!1,this.editRowAction="",this.$refs.linkStatusTable.editRow(null)}).catch(()=>{this.wpTableLoading=!1;let t="";1<e.totalLinks?t=r("The links could not be removed successfully. Please try again or remove the links by editing the posts manually.",i):t=d(r("The link could not be removed successfully. Please try again or remove the link by %1$sediting the post%2$s manually.",i),'<a href="'+e.link.context.editLink+'" target="_blank">',"</a>"),this.showErrorAlert(this.linkStatusTableStore.linkStatuses.rows.findIndex(s=>s.id===e.id),t)})},recheck(e,t){this.loadingRowIndexes.push(e),this.linkStatusTableStore.recheck({linkStatusId:t.id,limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,filter:this.filter,orderBy:this.orderBy,orderDir:this.orderDir}).finally(()=>{const s=this.loadingRowIndexes.indexOf(e);s&&this.loadingRowIndexes.splice(s,1)})},addRedirect(e){const t=He();if(!t.plugins.isAioseoActive){this.showUpsellModal=!0;return}const s="admin.php?page=aioseo-redirects";if(!t.plugins.isAioseoRedirectsActive){window.open(s,"_blank").focus();return}const o=this.rootStore.aioseoBrokenLinkChecker.user.roles;if(!this.rootStore.aioseoBrokenLinkChecker.user.capabilities.aioseo_redirects&&!o.includes("administrator")){window.open(s,"_blank").focus();return}kt().getRedirectUrl(e.url).then(S=>{window.open(S,"_blank").focus()}).catch(()=>{window.open(s,"_blank").focus()})},toggleEditRow(e,t){if(this.editRowAction==="edit-row"){this.editRowAction="",t(null);return}this.editRowAction!==""&&t(e),this.editRowAction="edit-row",t(e)},toggleShowAllPosts(e,t){if(this.editRowAction==="show-all-posts"){this.editRowAction="",t(null);return}this.editRowAction!==""&&t(e),this.editRowAction="show-all-posts",t(e)},doFetchData(){this.wpTableLoading=!0,this.linkStatusTableStore.fetchData({limit:this.resultsPerPage,offset:this.offset,searchTerm:this.searchTerm,filter:this.filter,orderBy:this.orderBy,orderDir:this.orderDir}).then(()=>{this.wpTableLoading=!1})},showErrorAlert(e,t){const s=[];s.position="bottom",s.description=t,s.color="red",this.linkStatusTableStore.linkStatuses.rows[e].alert=s,setTimeout(()=>{this.linkStatusTableStore.linkStatuses.rows[e].alert=null},5e3)},showEditErrorAlert(e){const t=d(r("The link could not be updated successfully. Please try again or update the link by %1$sediting the post%2$s manually.",i),'<a href="'+e.link.context.editLink+'" target="_blank">',"</a>");this.showErrorAlert(this.linkStatusTableStore.linkStatuses.rows.findIndex(s=>s.id===e.id),t)}},beforeMount(){if(this.pageNumber=this.linkStatusTableStore.linkStatuses.totals.page,!this.$route.query)return;const e=this.$route.query.filter;e&&["all","broken","redirects","good","dismissed"].includes(e)&&this.processFilterTable({slug:e})},updated(){this.loadingRowIndexes=[]}},hr={class:"url"},gr=["href","title"],pr={key:0},mr=["onClick"],fr={key:1},_r=["onClick"],kr=["onClick"],br={key:0},Sr={key:1},wr=["onClick"],vr={key:2},yr=["onClick"],Rr={key:3},Lr=["onClick"],Ur={key:1},Cr={class:"table-quota-info"},Tr={key:0};function xr(e,t,s,o,n,a){const S=c("core-alert"),f=c("edit-row"),m=c("links-table"),U=c("posts-column"),x=c("status-column"),O=c("info-column"),C=c("svg-circle-question-mark"),M=c("core-tooltip"),B=c("core-loader"),D=c("core-wp-table"),V=c("confirmation-modal"),v=c("redirects-cta-modal");return u(),b("div",{class:q(["aioseo-blc-broken-links",[{"edit-row":n.editRowAction==="edit-row"},{"show-all-posts":n.editRowAction==="show-all-posts"}]])},[5>=o.remainingQuotaPercentage?(u(),w(S,{key:0,type:0>=o.remainingQuotaPercentage?"red":"yellow",innerHTML:o.remainingQuotaAlert},null,8,["type","innerHTML"])):o.quotaLowerThanLinks?(u(),w(S,{key:1,type:"yellow",innerHTML:o.quotaLowerThanLinksAlert},null,8,["innerHTML"])):g("",!0),(u(),w(D,{id:o.tableId,ref:"linkStatusTable",columns:a.columns,rows:o.linkStatusTableStore.linkStatuses.rows,totals:o.linkStatusTableStore.linkStatuses.totals,filters:o.linkStatusTableStore.linkStatuses.filters,"bulk-options":a.bulkOptions,"initial-items-per-page":o.settingsStore.settings.tablePagination.brokenLinks,"initial-page-number":o.pageNumber,key:o.wpTableKey,loading:o.wpTableLoading,noResultsLabel:n.strings.noResults,"show-table-footer":"","show-pagination":"","show-search":"","show-items-per-page":"",onProcessBulkAction:a.processBulkAction,onFilterTable:o.processFilterTable,onPaginate:o.processPagination,onSearch:o.processSearch,onProcessChangeItemsPerPage:o.processChangeItemsPerPage,onSortColumn:o.processSort},{"edit-row":_(({row:k,editRow:T})=>[n.editRowAction==="edit-row"?(u(),w(f,{key:0,linkStatus:k,onClose:I=>{n.editRowAction="",T(null)},onUpdateLink:a.doFetchData,onUpdateLinkError:I=>a.showEditErrorAlert(k)},null,8,["linkStatus","onClose","onUpdateLink","onUpdateLinkError"])):g("",!0),n.editRowAction==="show-all-posts"?(u(),w(m,{key:1,linkStatus:k,inlineTable:"",onDeletePost:a.doFetchData,onUpdateLink:a.doFetchData},null,8,["linkStatus","onDeletePost","onUpdateLink"])):g("",!0)]),url:_(({column:k,row:T,index:I,editRow:Q})=>[l("div",hr,[l("a",{href:k,title:k,target:"_blank",rel:"noreferrer noopener"},h(k),9,gr)]),l("div",{class:"row-actions",style:ae({visibility:n.loadingRowIndexes.includes(I)?"hidden":"visible"})},[o.allowed("edit_posts")?(u(),b("span",pr,[l("a",{class:"edit",href:"#",onClick:E(N=>a.toggleEditRow(I,Q),["prevent"])},[l("span",null,h(n.strings.editUrl),1)],8,mr)])):g("",!0),o.allowed("edit_posts")?(u(),b("span",fr,[t[3]||(t[3]=R(" | ",-1)),l("a",{class:"unlink",href:"#",onClick:E(N=>a.unlink(T),["prevent"])},[l("span",null,h(n.strings.unlink),1)],8,_r)])):g("",!0),l("span",null,[t[4]||(t[4]=R(" | ",-1)),l("a",{class:"recheck",href:"#",onClick:E(N=>a.recheck(I,T),["prevent"])},[T.last_scan_date?(u(),b("span",br,h(n.strings.recheck),1)):g("",!0),T.last_scan_date?g("",!0):(u(),b("span",Sr,h(n.strings.check),1))],8,kr)]),l("span",null,[t[5]||(t[5]=R(" | ",-1)),l("a",{class:"add-redirect",href:"#",onClick:E(N=>a.addRedirect(T),["prevent"])},[l("span",null,h(n.strings.addRedirect),1)],8,wr)]),a.isDismissedFilterActive?g("",!0):(u(),b("span",vr,[t[6]||(t[6]=R(" | ",-1)),l("a",{class:"dismiss",href:"#",onClick:E(N=>a.dismiss(T),["prevent"])},[l("span",null,h(n.strings.dismiss),1)],8,yr)])),a.isDismissedFilterActive?(u(),b("span",Rr,[t[7]||(t[7]=R(" | ",-1)),l("a",{class:"undismiss",href:"#",onClick:E(N=>a.undismiss(T),["prevent"])},[l("span",null,h(n.strings.undismiss),1)],8,Lr)])):g("",!0)],4)]),posts:_(({row:k,index:T,editRow:I})=>[k.link||k.totalLinks>1?(u(),w(U,{key:0,row:k,index:T,loadingRowIndexes:n.loadingRowIndexes,isLinkStatusTable:"",onShowAllPosts:Q=>a.toggleShowAllPosts(Q,I),onDeletePost:a.doFetchData},null,8,["row","index","loadingRowIndexes","onShowAllPosts","onDeletePost"])):(u(),b("span",Ur,h(n.strings.noPosts),1))]),status:_(({row:k})=>[p(x,{row:k},null,8,["row"])]),info:_(({row:k})=>[parseInt(k.scanning)!==1&&k.last_scan_date?(u(),w(O,{key:0,linkStatus:k},null,8,["linkStatus"])):g("",!0)]),infoHeaderFooter:_(()=>[l("div",Cr,[l("span",{class:q([{sufficient:25<o.remainingQuotaPercentage},{warning:25>=o.remainingQuotaPercentage&&5<o.remainingQuotaPercentage},{depleted:5>=o.remainingQuotaPercentage},{small:4>=o.optionsStore.internalOptions.internal.license.quota.toString().length},{medium:o.optionsStore.internalOptions.internal.license.quota.toString().length===5},{high:6<=o.optionsStore.internalOptions.internal.license.quota.toString().length}])},h(a.quota),3),p(M,{offset:"-80px,0"},{tooltip:_(()=>[l("span",null,h(n.strings.quotaTooltip)+" ",1),o.optionsStore.internalOptions.internal.license.level&&o.optionsStore.internalOptions.internal.license.level.toLowerCase()!=="elite"?(u(),b("span",Tr,[l("span",null,h(n.strings.toUnlock)+" ",1),l("strong",null,[l("a",{href:"#",onClick:t[0]||(t[0]=E(k=>o.licenseUpgradeComposable.openLicenseUpgradePopup("broken-links-report","quota-tooltip"),["prevent","stop"]))},h(o.licenseUpgradeComposable.upgradeAnchor.value),1)]),t[8]||(t[8]=R(". ",-1))])):g("",!0)]),default:_(()=>[p(C,{class:q([{sufficient:25<o.remainingQuotaPercentage},{warning:25>=o.remainingQuotaPercentage&&5<o.remainingQuotaPercentage},{depleted:5>=o.remainingQuotaPercentage},{small:4>=o.optionsStore.internalOptions.internal.license.quota.toString().length},{medium:o.optionsStore.internalOptions.internal.license.quota.toString().length===5},{high:6<=o.optionsStore.internalOptions.internal.license.quota.toString().length}])},null,8,["class"])]),_:1})])]),loader:_(({index:k})=>[n.loadingRowIndexes.includes(k)?(u(),b("div",{key:0,class:"loader-overlay-row",style:ae({height:a.getRowHeight(k)})},[p(B)],4)):g("",!0)]),_:1},8,["id","columns","rows","totals","filters","bulk-options","initial-items-per-page","initial-page-number","loading","noResultsLabel","onProcessBulkAction","onFilterTable","onPaginate","onSearch","onProcessChangeItemsPerPage","onSortColumn"])),p(V,{show:n.confirmationModalOpen,strings:a.modalStrings,onDoAction:a.doBulkAction,onCloseModal:t[1]||(t[1]=k=>n.confirmationModalOpen=!1)},null,8,["show","strings","onDoAction"]),p(v,{show:n.showUpsellModal,onCloseModal:t[2]||(t[2]=k=>n.showUpsellModal=!1)},null,8,["show"])],2)}const qe=P(dr,[["render",xr]]),Z="broken-link-checker-seo",Ar={components:{CoreBlur:me,CoreCta:pe,LinkStatusTable:qe},data(){return{loading:!1,strings:{ctaButtonText:r("Go to Settings",Z),ctaHeader:d(r("Connect Your Site with %1$s",Z),"Broken Link Checker"),ctaDescription:d(r("Before you can start using %1$s, you need to connect the plugin to your account.",Z),"Broken Link Checker")}}},methods:{goToSettings(){this.$router.push("/settings")}}},Pr={class:"aioseo-blc-broken-links"},Or={class:"licence-cta"};function Ir(e,t,s,o,n,a){const S=c("link-status-table"),f=c("core-blur"),m=c("core-cta");return u(),b("div",Pr,[l("div",Or,[p(f,null,{default:_(()=>[p(S)]),_:1}),p(m,{"cta-button-action":"",onCtaButtonClick:a.goToSettings,"cta-button-loading":n.loading,"show-link":!1,"button-text":n.strings.ctaButtonText,"align-top":"",hideBonus:""},{"header-text":_(()=>[R(h(n.strings.ctaHeader),1)]),description:_(()=>[R(h(n.strings.ctaDescription),1)]),_:1},8,["onCtaButtonClick","cta-button-loading","button-text"])])])}const Er=P(Ar,[["render",Ir]]),Mr={setup(){return{licenseStore:Ce()}},components:{CallToAction:Er,LinkStatusTable:qe}};function Br(e,t,s,o,n,a){const S=c("call-to-action"),f=c("link-status-table");return u(),b("div",null,[o.licenseStore.isUnlicensed?(u(),w(S,{key:0})):(u(),w(f,{key:1}))])}const ao=P(Mr,[["render",Br]]);export{ao as default};
|