Advanced.a423e04a.js 15.6 KB
import{c as a,a as r}from"./vuex.esm.8fdeb4b6.js";import{v as l}from"./helpers.de7566d0.js";import{B as d}from"./Checkbox.60ba2f56.js";import{B as c}from"./RadioToggle.e6e54396.js";import{C as p,a as u}from"./index.3c70e00e.js";import{C as h}from"./Card.27307535.js";import{C as _}from"./PostTypeOptions.cdf711b8.js";import{C as m}from"./ProBadge.66f48bdc.js";import{C as g}from"./SettingsRow.edbb3005.js";import{C as y}from"./Tooltip.68a8a92b.js";import{G as $,a as v}from"./Row.830f6397.js";import{n as f}from"./_plugin-vue2_normalizer.61652a7c.js";import"./Checkmark.f26f6201.js";import"./client.e62d6c37.js";import"./_commonjsHelpers.f84db168.js";import"./translations.c394afe3.js";import"./default-i18n.3a91e0e5.js";import"./Caret.19b10233.js";import"./index.ec9852b3.js";import"./isArrayLikeObject.9b4b678d.js";import"./constants.0d8c074c.js";import"./portal-vue.esm.98f2e05b.js";import"./Slide.15a07930.js";import"./HighlightToggle.62b97732.js";import"./Radio.7965b35c.js";const b={components:{BaseCheckbox:d,BaseRadioToggle:c,CoreAlert:p,CoreCard:h,CorePostTypeOptions:_,CoreProBadge:m,CoreSettingsRow:g,CoreTooltip:y,GridColumn:$,GridRow:v,SvgCircleQuestionMark:u},data(){return{openAiKeyInvalid:!1,strings:{advanced:this.$t.__("Advanced Settings",this.$td),truSeo:this.$t.__("TruSEO Score & Content",this.$td),truSeoDescription:this.$t.__("Enable our TruSEO score to help you optimize your content for maximum traffic.",this.$td),headlineAnalyzer:this.$t.__("Headline Analyzer",this.$td),headlineAnalyzerDescription:this.$t.__("Enable our Headline Analyzer to help you write irresistible headlines and rank better in search results.",this.$td),seoAnalysis:this.$t.__("SEO Analysis",this.$td),postTypeColumns:this.$t.__("Post Type Columns",this.$td),includeAllPostTypes:this.$t.__("Include All Post Types",this.$td),selectPostTypes:this.$t.sprintf(this.$t.__("Select which Post Types you want to use the %1$s columns with.",this.$td),"AIOSEO"),usageTracking:this.$t.__("Usage Tracking",this.$td),adminBarMenu:this.$t.__("Admin Bar Menu",this.$td),adminBarMenuDescription:this.$t.sprintf(this.$t.__("This adds %1$s to the admin toolbar for easy access to your SEO settings.",this.$td),"AIOSEO"),dashboardWidgets:this.$t.__("Dashboard Widgets",this.$td),dashboardWidgetsDescription:this.$t.sprintf(this.$t.__("Select which %1$s widgets to display on the dashboard.",this.$td),"AIOSEO"),announcements:this.$t.__("Announcements",this.$td),announcementsDescription:this.$t.__("This allows you to hide plugin announcements and update details.",this.$td),automaticUpdates:this.$t.__("Automatic Updates",this.$td),all:this.$t.__("All (recommended)",this.$td),allDescription:this.$t.__("You are getting the latest features, bugfixes, and security updates as they are released.",this.$td),minor:this.$t.__("Minor Only",this.$td),minorDescription:this.$t.__("You are getting bugfixes and security updates, but not major features.",this.$td),none:this.$t.__("None",this.$td),noneDescription:this.$t.__("You will need to manually update everything.",this.$td),usageTrackingDescription:this.$t.__("By allowing us to track usage data we can better help you because we know with which WordPress configurations, themes and plugins we should test.",this.$td),usageTrackingTooltip:this.$t.sprintf(this.$t.__("Complete documentation on usage tracking is available %1$shere%2$s.",this.$td),this.$t.sprintf('<strong><a href="%1$s" target="_blank">',this.$links.getDocUrl("usageTracking")),"</a></strong>"),adminBarMenuUpsell:this.$t.sprintf(this.$t.__("The Admin Bar feature is only available for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("general-settings-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"admin-bar-menu",!0)),dashboardWidgetsUpsell:this.$t.sprintf(this.$t.__("The Dashboard Widget feature is only available for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("general-settings-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"dashboard-widget",!0)),taxonomyColumns:this.$t.__("Taxonomy Columns",this.$td),includeAllTaxonomies:this.$t.__("Include All Taxonomies",this.$td),selectTaxonomies:this.$t.sprintf(this.$t.__("Select which Taxonomies you want to use the %1$s columns with.",this.$td),"AIOSEO"),taxonomyColumnsUpsell:this.$t.sprintf(this.$t.__("This feature is only for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("general-settings-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"taxonomy-columns",!0)),uninstallAioseo:this.$t.sprintf(this.$t.__("Uninstall %1$s",this.$td),"AIOSEO"),uninstallAioseoDescription:this.$t.sprintf(this.$t.__("Check this if you would like to remove ALL %1$s data upon plugin deletion. All settings and SEO data will be unrecoverable.",this.$td),"AIOSEO"),headlineAnalyzerWarning:this.$t.sprintf(this.$t.__("The Headline Analyzer is only available in %1$s and up. %2$s",this.$td),"WordPress 5.2",this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"updateWordPress",!0)),openAiKey:this.$t.__("OpenAI API Key",this.$td),openAiKeyDescription:this.$t.sprintf(this.$t.__("Enter an OpenAI API key in order to automatically generate SEO titles and meta descriptions for your pages. %1$s",this.$td),this.$links.getDocLink(this.$constants.GLOBAL_STRINGS.learnMore,"openAi",!0)),openAiKeyUpsell:this.$t.sprintf(this.$t.__("The OpenAI integration is only available for licensed %1$s users. %2$s",this.$td),"<strong>AIOSEO Pro</strong>",this.$links.getUpsellLink("general-settings-advanced",this.$constants.GLOBAL_STRINGS.learnMore,"open-ai",!0)),openAiKeyInvalid:this.$t.__("The API key you have entered is invalid. Please check your API key and try again.",this.$tdPro)}}},computed:{...a(["settings","isUnlicensed"]),...r(["options"]),adminBarMenu:{get(){return this.isUnlicensed?!0:this.options.advanced.adminBarMenu},set(n){this.options.advanced.adminBarMenu=n}},widgets(){return[{key:"seoSetup",label:this.$t.__("SEO Setup Wizard",this.$td),tooltip:this.$t.__("Our SEO Setup Wizard dashboard widget helps you remember to finish setting up some initial crucial settings for your site to help you rank higher in search results. Once the setup wizard is completed this widget will automatically disappear.",this.$td)},{key:"seoOverview",label:this.$t.__("SEO Overview",this.$td),tooltip:this.$t.__("Our SEO Overview widget helps you determine which posts or pages you should focus on for content updates to help you rank higher in search results.",this.$td)},{key:"seoNews",label:this.$t.__("SEO News",this.$td),tooltip:this.$t.__("Our SEO News widget provides helpful links that enable you to get the most out of your SEO and help you continue to rank higher than your competitors in search results.",this.$td)}]}},methods:{versionCompare:l,updateDashboardWidgets(n,e){if(n){const s=this.options.advanced.dashboardWidgets;s.push(e.key),this.$set(this.options.advanced,"dashboardWidgets",s);return}const t=this.options.advanced.dashboardWidgets.findIndex(s=>s===e.key);t!==-1&&this.$delete(this.options.advanced.dashboardWidgets,t)},isDashboardWidgetChecked(n){return this.isUnlicensed?!0:this.options.advanced.dashboardWidgets.includes(n.key)},validateOpenAiKey(){this.options.advanced.openAiKey&&this.options.advanced.openAiKey.match(/^sk-[a-zA-Z0-9]{48}$/)===null?this.openAiKeyInvalid=!0:this.openAiKeyInvalid=!1}},beforeMount(){this.validateOpenAiKey()}};var k=function(){var e=this,t=e._self._c;return t("div",{staticClass:"aioseo-advanced"},[t("core-card",{attrs:{slug:"advanced","header-text":e.strings.advanced}},[t("core-settings-row",{attrs:{name:e.strings.truSeo},scopedSlots:e._u([{key:"content",fn:function(){return[t("base-toggle",{model:{value:e.options.advanced.truSeo,callback:function(s){e.$set(e.options.advanced,"truSeo",s)},expression:"options.advanced.truSeo"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.truSeoDescription)+" ")])]},proxy:!0}])}),t("core-settings-row",{attrs:{name:e.strings.headlineAnalyzer},scopedSlots:e._u([{key:"content",fn:function(){return[t("base-toggle",{attrs:{disabled:e.versionCompare(e.$aioseo.wpVersion,"5.2","<")},model:{value:e.options.advanced.headlineAnalyzer,callback:function(s){e.$set(e.options.advanced,"headlineAnalyzer",s)},expression:"options.advanced.headlineAnalyzer"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.headlineAnalyzerDescription)+" ")]),e.versionCompare(e.$aioseo.wpVersion,"5.2","<")?t("core-alert",{staticClass:"warning",attrs:{type:"yellow"}},[t("div",{domProps:{innerHTML:e._s(e.strings.headlineAnalyzerWarning)}})]):e._e()]},proxy:!0}])}),t("core-settings-row",{attrs:{name:e.strings.postTypeColumns},scopedSlots:e._u([{key:"content",fn:function(){return[t("base-checkbox",{attrs:{size:"medium"},model:{value:e.options.advanced.postTypes.all,callback:function(s){e.$set(e.options.advanced.postTypes,"all",s)},expression:"options.advanced.postTypes.all"}},[e._v(" "+e._s(e.strings.includeAllPostTypes)+" ")]),e.options.advanced.postTypes.all?e._e():t("core-post-type-options",{attrs:{options:e.options.advanced,type:"postTypes"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.selectPostTypes)+" "),t("span",{domProps:{innerHTML:e._s(e.$links.getDocLink(e.$constants.GLOBAL_STRINGS.learnMore,"selectPostTypesColumns",!0))}})])]},proxy:!0}])}),t("core-settings-row",{scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.taxonomyColumns)+" "),e.isUnlicensed?t("core-pro-badge"):e._e()]},proxy:!0},{key:"content",fn:function(){return[e.isUnlicensed?t("base-checkbox",{attrs:{disabled:"",size:"medium",value:!0}},[e._v(" "+e._s(e.strings.includeAllTaxonomies)+" ")]):e._e(),e.isUnlicensed?e._e():t("base-checkbox",{attrs:{size:"medium"},model:{value:e.options.advanced.taxonomies.all,callback:function(s){e.$set(e.options.advanced.taxonomies,"all",s)},expression:"options.advanced.taxonomies.all"}},[e._v(" "+e._s(e.strings.includeAllTaxonomies)+" ")]),!e.options.advanced.taxonomies.all&&!e.isUnlicensed?t("core-post-type-options",{attrs:{options:e.options.advanced,type:"taxonomies"}}):e._e(),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.selectTaxonomies)+" "),t("span",{domProps:{innerHTML:e._s(e.$links.getDocLink(e.$constants.GLOBAL_STRINGS.learnMore,"selectTaxonomiesColumns",!0))}})]),e.isUnlicensed?t("core-alert",{staticClass:"inline-upsell",attrs:{type:"blue"}},[t("div",{domProps:{innerHTML:e._s(e.strings.taxonomyColumnsUpsell)}})]):e._e()]},proxy:!0}])}),t("core-settings-row",{attrs:{align:""},scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.adminBarMenu)+" "),e.isUnlicensed?t("core-pro-badge"):e._e()]},proxy:!0},{key:"content",fn:function(){return[t("base-radio-toggle",{attrs:{disabled:e.isUnlicensed,name:"adminBarMenu",options:[{label:e.$constants.GLOBAL_STRINGS.hide,value:!1,activeClass:"dark"},{label:e.$constants.GLOBAL_STRINGS.show,value:!0}]},model:{value:e.adminBarMenu,callback:function(s){e.adminBarMenu=s},expression:"adminBarMenu"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.adminBarMenuDescription)+" ")]),e.isUnlicensed?t("core-alert",{staticClass:"inline-upsell",attrs:{type:"blue"}},[t("div",{domProps:{innerHTML:e._s(e.strings.adminBarMenuUpsell)}})]):e._e()]},proxy:!0}])}),t("core-settings-row",{attrs:{align:""},scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.dashboardWidgets)+" "),e.isUnlicensed?t("core-pro-badge"):e._e()]},proxy:!0},{key:"content",fn:function(){return[t("grid-row",e._l(e.widgets,function(s,i){return t("grid-column",{key:i},[t("base-checkbox",{attrs:{size:"medium",disabled:e.isUnlicensed,value:e.isDashboardWidgetChecked(s)},on:{input:o=>e.updateDashboardWidgets(o,s)}},[e._v(" "+e._s(s.label)+" "),t("core-tooltip",{scopedSlots:e._u([{key:"tooltip",fn:function(){return[e._v(" "+e._s(s.tooltip)+" ")]},proxy:!0}],null,!0)},[t("svg-circle-question-mark")],1)],1)],1)}),1),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.dashboardWidgetsDescription)+" ")]),e.isUnlicensed?t("core-alert",{staticClass:"inline-upsell",attrs:{type:"blue"}},[t("div",{domProps:{innerHTML:e._s(e.strings.dashboardWidgetsUpsell)}})]):e._e()]},proxy:!0}])}),t("core-settings-row",{attrs:{name:e.strings.announcements,align:""},scopedSlots:e._u([{key:"content",fn:function(){return[t("base-radio-toggle",{attrs:{name:"announcements",options:[{label:e.$constants.GLOBAL_STRINGS.hide,value:!1,activeClass:"dark"},{label:e.$constants.GLOBAL_STRINGS.show,value:!0}]},model:{value:e.options.advanced.announcements,callback:function(s){e.$set(e.options.advanced,"announcements",s)},expression:"options.advanced.announcements"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.announcementsDescription)+" ")])]},proxy:!0}])}),e.$isPro?t("core-settings-row",{attrs:{align:""},scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.automaticUpdates)+" ")]},proxy:!0},{key:"content",fn:function(){return[t("base-radio-toggle",{attrs:{name:"autoUpdates",options:[{label:e.strings.all,value:"all"},{label:e.strings.minor,value:"minor"},{label:e.strings.none,value:"none",activeClass:"dark"}]},model:{value:e.options.advanced.autoUpdates,callback:function(s){e.$set(e.options.advanced,"autoUpdates",s)},expression:"options.advanced.autoUpdates"}}),t("div",{staticClass:"aioseo-description"},[e.options.advanced.autoUpdates==="all"?t("span",[e._v(e._s(e.strings.allDescription))]):e._e(),e.options.advanced.autoUpdates==="minor"?t("span",[e._v(e._s(e.strings.minorDescription))]):e._e(),e.options.advanced.autoUpdates==="none"?t("span",[e._v(e._s(e.strings.noneDescription))]):e._e()])]},proxy:!0}],null,!1,89936591)}):e._e(),e.$isPro?e._e():t("core-settings-row",{scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.usageTracking)+" "),t("core-tooltip",{scopedSlots:e._u([{key:"tooltip",fn:function(){return[t("div",{domProps:{innerHTML:e._s(e.strings.usageTrackingTooltip)}})]},proxy:!0}],null,!1,1886299547)},[t("svg-circle-question-mark")],1)]},proxy:!0},{key:"content",fn:function(){return[t("base-toggle",{model:{value:e.options.advanced.usageTracking,callback:function(s){e.$set(e.options.advanced,"usageTracking",s)},expression:"options.advanced.usageTracking"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.usageTrackingDescription)+" ")])]},proxy:!0}],null,!1,309685458)}),t("core-settings-row",{attrs:{id:"aioseo-open-ai-api-key",name:e.strings.openAiKey},scopedSlots:e._u([{key:"name",fn:function(){return[e._v(" "+e._s(e.strings.openAiKey)+" "),e.isUnlicensed?t("core-pro-badge"):e._e()]},proxy:!0},{key:"content",fn:function(){return[t("base-input",{staticClass:"openAiKey",attrs:{type:"text",size:"medium",disabled:e.isUnlicensed},on:{blur:e.validateOpenAiKey},model:{value:e.options.advanced.openAiKey,callback:function(s){e.$set(e.options.advanced,"openAiKey",s)},expression:"options.advanced.openAiKey"}}),t("div",{staticClass:"aioseo-description",domProps:{innerHTML:e._s(e.strings.openAiKeyDescription)}}),!e.isUnlicensed&&e.options.advanced.openAiKey&&e.openAiKeyInvalid?t("core-alert",{staticClass:"inline-upsell",attrs:{type:"red"}},[t("div",[e._v(e._s(e.strings.openAiKeyInvalid))])]):e._e(),e.isUnlicensed?t("core-alert",{staticClass:"inline-upsell",attrs:{type:"blue"}},[t("div",{domProps:{innerHTML:e._s(e.strings.openAiKeyUpsell)}})]):e._e()]},proxy:!0}])}),t("core-settings-row",{attrs:{name:e.strings.uninstallAioseo},scopedSlots:e._u([{key:"content",fn:function(){return[t("base-toggle",{model:{value:e.options.advanced.uninstall,callback:function(s){e.$set(e.options.advanced,"uninstall",s)},expression:"options.advanced.uninstall"}}),t("div",{staticClass:"aioseo-description"},[e._v(" "+e._s(e.strings.uninstallAioseoDescription)+" ")])]},proxy:!0}])})],1)],1)},A=[],S=f(b,k,A,!1,null,null,null,null);const Q=S.exports;export{Q as default};