(()=>{var e={4530:(e,t)=>{var s;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var a=typeof s;if("string"===a||"number"===a)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===a){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var i in s)r.call(s,i)&&s[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React;var t=s.n(e);const r=window.wp.i18n,o=window.wp.components,a=window.yoast.componentsNew,n=window.yoast.helpers,i=window.yoast.propTypes;var l=s.n(i);const c=window.wp.element,d=window.yoast.styledComponents;var u=s.n(d);const p=u().div`
	display: flex;
	margin-top: 8px;
`;class m extends c.Component{render(){return(0,e.createElement)(p,null,(0,e.createElement)(a.Toggle,{id:this.props.id,labelText:(0,r.__)("Mark as cornerstone content","wordpress-seo"),isEnabled:this.props.isEnabled,onSetToggleState:this.props.onToggle,onToggleDisabled:this.props.onToggleDisabled}))}}m.propTypes={id:l().string,isEnabled:l().bool,onToggle:l().func,onToggleDisabled:l().func},m.defaultProps={id:"cornerstone-toggle",isEnabled:!0,onToggle:()=>{},onToggleDisabled:()=>{}};const h=m,g=u()(a.Collapsible)`
	h2 > button {
		padding-left: 24px;
		padding-top: 16px;

		&:hover {
			background-color: #f0f0f0;
		}
	}

	div[class^="collapsible_content"] {
		padding: 24px 0;
		margin: 0 24px;
		border-top: 1px solid rgba(0,0,0,0.2);
	}

`,y=t=>(0,e.createElement)(g,{hasPadding:!0,hasSeparator:!0,...t}),w=t=>{const[s,r]=(0,c.useState)(!1),{prefixIcon:o}=t;return(0,e.createElement)("div",{className:"yoast components-panel__body "+(s?"is-opened":"")},(0,e.createElement)("h2",{className:"components-panel__body-title"},(0,e.createElement)("button",{onClick:function(){r(!s)},className:"components-button components-panel__body-toggle",type:"button",id:t.buttonId},(0,e.createElement)("span",{className:"yoast-icon-span",style:{fill:`${o&&o.color||""}`}},o&&(0,e.createElement)(a.SvgIcon,{icon:o.icon,color:o.color,size:o.size})),(0,e.createElement)("span",{className:"yoast-title-container"},(0,e.createElement)("div",{className:"yoast-title"},t.title),(0,e.createElement)("div",{className:"yoast-subtitle"},t.subTitle)),t.hasBetaBadgeLabel&&(0,e.createElement)(a.BetaBadge,null),(0,e.createElement)("span",{className:"yoast-chevron","aria-hidden":"true"}))),s&&t.children)},f=w;w.propTypes={title:l().string.isRequired,children:l().oneOfType([l().node,l().arrayOf(l().node)]).isRequired,prefixIcon:l().object,subTitle:l().string,hasBetaBadgeLabel:l().bool,buttonId:l().string},w.defaultProps={prefixIcon:null,subTitle:"",hasBetaBadgeLabel:!1,buttonId:null};const b=(0,n.makeOutboundLink)();function E({isCornerstone:t,onChange:s,learnMoreUrl:i,location:l}){const c="metabox"===l?y:f;return(0,e.createElement)(c,{id:(0,n.join)(["yoast-cornerstone-collapsible",l]),title:(0,r.__)("Cornerstone content","wordpress-seo")},(0,e.createElement)(a.HelpText,null,(0,r.__)("Cornerstone content should be the most important and extensive articles on your site.","wordpress-seo")+" ",(0,e.createElement)(b,{href:i},(0,r.__)("Learn more about Cornerstone Content.","wordpress-seo"))),(0,e.createElement)(h,{id:(0,n.join)(["yoast-cornerstone",l]),isEnabled:t,onToggle:s}),(0,e.createElement)(o.Slot,{name:"YoastAfterCornerstoneToggle"}))}E.propTypes={isCornerstone:l().bool,onChange:l().func,learnMoreUrl:l().string.isRequired,location:l().string},E.defaultProps={isCornerstone:!0,onChange:()=>{},location:""};const v=window.wp.compose,k=window.wp.data,x=window.yoast.externals.contexts,_=window.wp.url,S=window.wp.apiFetch;var C=s.n(S);const R=window.yoast.relatedKeyphraseSuggestions;class L extends c.Component{constructor(e){super(e),this.onModalOpen=this.onModalOpen.bind(this),this.onLinkClick=this.onLinkClick.bind(this),this.listenToMessages=this.listenToMessages.bind(this)}onModalOpen(){const{keyphrase:e,onOpenWithNoKeyphrase:t,onOpen:s,location:r,newRequest:o,countryCode:a}=this.props;e.trim()?(s(r),o(a,e)):t()}onLinkClick(e){if(e.preventDefault(),!this.props.keyphrase.trim())return void this.props.onOpenWithNoKeyphrase();const t=e.target.href,s=["top="+(window.top.outerHeight/2+window.top.screenY-285),"left="+(window.top.outerWidth/2+window.top.screenX-170),"width=340","height=570","resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(t,"SEMrush_login",s.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.listenToMessages,!1)}async listenToMessages(e){const{data:t,source:s,origin:r}=e;"https://oauth.semrush.com"===r&&this.popup===s&&("semrush:oauth:success"===t.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),await this.performAuthenticationRequest(t)),"semrush:oauth:denied"===t.type&&(this.popup.close(),window.removeEventListener("message",this.listenToMessages,!1),this.props.onAuthentication(!1)))}async performAuthenticationRequest(e){try{const t=new URL(e.url).searchParams.get("code"),s=await C()({path:"yoast/v1/semrush/authenticate",method:"POST",data:{code:t}});200===s.status?(this.props.onAuthentication(!0),this.onModalOpen(),this.popup.close()):console.error(s.error)}catch(e){console.error(e.message)}}render(){const{keyphrase:t,location:s,whichModalOpen:n,isLoggedIn:i,onClose:l,countryCode:d,learnMoreLink:u}=this.props,p=new URL("https://www.semrush.com/analytics/keywordoverview/");return p.searchParams.append("q",t),p.searchParams.append("db",d),(0,e.createElement)(c.Fragment,null,i&&(0,e.createElement)("div",{className:"yoast"},(0,e.createElement)(a.NewButton,{variant:"secondary",id:`yoast-get-related-keyphrases-${s}`,onClick:this.onModalOpen},(0,r.__)("Get related keyphrases","wordpress-seo"))),(0,e.createElement)(R.Modal,{isOpen:Boolean(t)&&n===s,onClose:l,insightsLink:p.toString(),learnMoreLink:u},(0,e.createElement)(o.Slot,{name:"YoastRelatedKeyphrases"})),!i&&(0,e.createElement)("div",{className:"yoast"},(0,e.createElement)(a.ButtonStyledLink,{variant:"secondary",id:`yoast-get-related-keyphrases-${s}`,href:"https://oauth.semrush.com/oauth2/authorize?ref=1513012826&client_id=yoast&redirect_uri=https%3A%2F%2Foauth.semrush.com%2Foauth2%2Fyoast%2Fsuccess&response_type=code&scope=user.id",onClick:this.onLinkClick},(0,r.__)("Get related keyphrases","wordpress-seo"),(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))))}}L.propTypes={keyphrase:l().string,location:l().string,whichModalOpen:l().oneOf(["none","metabox","sidebar"]),isLoggedIn:l().bool,onOpen:l().func.isRequired,onOpenWithNoKeyphrase:l().func.isRequired,onClose:l().func.isRequired,onAuthentication:l().func.isRequired,countryCode:l().string,learnMoreLink:l().string,newRequest:l().func.isRequired},L.defaultProps={keyphrase:"",location:"",whichModalOpen:"none",isLoggedIn:!1,countryCode:"en_US",learnMoreLink:""};const N=L,I=(0,v.compose)([(0,k.withSelect)((e=>{const{getSEMrushModalOpen:t,getSEMrushLoginStatus:s,getSEMrushSelectedCountry:r,getPreference:o,selectLinkParams:a,getFocusKeyphrase:n}=e("yoast-seo/editor");return{whichModalOpen:t(),isLoggedIn:s(),countryCode:r(),isRtl:o("isRtl",!1),learnMoreLink:(0,_.addQueryArgs)("https://yoa.st/3-v",a()),keyphrase:n()}})),(0,k.withDispatch)((e=>{const{setSEMrushNoKeyphraseMessage:t,setSEMrushOpenModal:s,setSEMrushDismissModal:r,setSEMrushLoginStatus:o,setSEMrushNewRequest:a}=e("yoast-seo/editor");return{onOpenWithNoKeyphrase:()=>{t()},onOpen:e=>{s(e)},onClose:()=>{r()},onAuthentication:e=>{o(e)},newRequest:(e,t)=>{a(e,t)}}}))])(N),M=window.yoast.styleGuide,T=(0,n.makeOutboundLink)(u().a`
	display: inline-block;
	position: relative;
	outline: none;
	text-decoration: none;
	border-radius: 100%;
	width: 24px;
	height: 24px;
	margin: -4px 0;
	vertical-align: middle;

	color: ${M.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${M.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${M.colors.$color_help_text};	
	}

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`),P=window.lodash,A=M.colors.$color_bad,O=M.colors.$palette_error_background,F=M.colors.$color_grey_text_light,B=M.colors.$palette_error_text,$=u().div`
	display: flex;
	flex-direction: column;
`,U=u().label`
	font-size: var(--yoast-font-size-default);
	font-weight: var(--yoast-font-weight-bold);
	${(0,n.getDirectionalStyle)("margin-right: 4px","margin-left: 4px")};
`,q=u().span`
	margin-bottom: 0.5em;
`,W=u()(a.InputField)`
	flex: 1 !important;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0; // Reset margins inherited from WordPress.

	// Hide native X in Edge and IE11.
	&::-ms-clear {
		display: none;
	}

	&.has-error {
		border-color: ${A} !important;
		background-color: ${O} !important;

		&:focus {
			box-shadow: 0 0 2px ${A} !important;
		}
	}
`,H=u().ul`
	color: ${B};
	list-style-type: disc;
	list-style-position: outside;
	margin: 0;
	margin-left: 1.2em;
`,D=u().li`
	color: ${B};
	margin: 0 0 0.5em 0;
`,z=(0,a.addFocusStyle)(u().button`
		border: 1px solid transparent;
		box-shadow: none;
		background: none;
		flex: 0 0 32px;
		height: 32px;
		max-width: 32px;
		padding: 0;
		cursor: pointer;
	`);z.propTypes={type:l().string,focusColor:l().string,focusBackgroundColor:l().string,focusBorderColor:l().string},z.defaultProps={type:"button",focusColor:M.colors.$color_button_text_hover,focusBackgroundColor:"transparent",focusBorderColor:M.colors.$color_blue};const K=u()(a.SvgIcon)`
	margin-top: 4px;
`,j=u().div`
	display: flex;
	flex-direction: row;
	align-items: center;

	&.has-remove-keyword-button {
		${W} {
			${(0,n.getDirectionalStyle)("padding-right: 40px","padding-left: 40px")};
		}

		${z} {
			${(0,n.getDirectionalStyle)("margin-left: -32px","margin-right: -32px")};
		}
	}
`;class Y extends c.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){this.props.onChange(e.target.value)}renderLabel(){const{id:t,label:s,helpLink:r}=this.props;return(0,e.createElement)(q,null,(0,e.createElement)(U,{htmlFor:t},s),r)}renderErrorMessages(){const t=[...this.props.errorMessages];return!(0,P.isEmpty)(t)&&(0,e.createElement)(H,null,t.map(((t,s)=>(0,e.createElement)(D,{key:s},(0,e.createElement)("span",{role:"alert"},t)))))}render(){const{id:t,showLabel:s,keyword:r,onRemoveKeyword:o,onBlurKeyword:a,onFocusKeyword:n,hasError:i}=this.props,l=!s,c=o!==P.noop;return(0,e.createElement)($,null,s&&this.renderLabel(),i&&this.renderErrorMessages(),(0,e.createElement)(j,{className:c?"has-remove-keyword-button":null},(0,e.createElement)(W,{"aria-label":l?this.props.label:null,type:"text",id:t,className:i?"has-error":null,onChange:this.handleChange,onFocus:n,onBlur:a,value:r,autoComplete:"off"}),c&&(0,e.createElement)(z,{onClick:o,focusBoxShadowColor:"#084A67"},(0,e.createElement)(K,{size:"18px",icon:"times-circle",color:F}))))}}Y.propTypes={id:l().string.isRequired,showLabel:l().bool,keyword:l().string,onChange:l().func.isRequired,onRemoveKeyword:l().func,onBlurKeyword:l().func,onFocusKeyword:l().func,label:l().string.isRequired,helpLink:l().node,hasError:l().bool,errorMessages:l().arrayOf(l().string)},Y.defaultProps={showLabel:!0,keyword:"",onRemoveKeyword:P.noop,onBlurKeyword:P.noop,onFocusKeyword:P.noop,helpLink:null,hasError:!1,errorMessages:[]};const G=Y,V=u().div`
	padding: 16px;
	/* Necessary to compensate negative top margin of the collapsible after the keyword input. */
	border-bottom: 1px solid transparent;
`;class Z extends c.Component{constructor(e){super(e),this.validate=this.validate.bind(this)}static renderHelpLink(){return(0,e.createElement)(T,{href:wpseoAdminL10n["shortlinks.focus_keyword_info"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Help on choosing the perfect focus keyphrase","wordpress-seo")))}validate(){const e=[...this.props.errors];return 0===this.props.keyword.trim().length&&this.props.displayNoKeyphraseMessage&&e.push((0,r.__)("Please enter a focus keyphrase first to get related keyphrases","wordpress-seo")),0===this.props.keyword.trim().length&&this.props.displayNoKeyphrasForTrackingMessage&&e.push((0,r.__)("Please enter a focus keyphrase first to track keyphrase performance","wordpress-seo")),this.props.keyword.includes(",")&&e.push((0,r.__)("Are you trying to use multiple keyphrases? You should add them separately below.","wordpress-seo")),this.props.keyword.length>191&&e.push((0,r.__)("Your keyphrase is too long. It can be a maximum of 191 characters.","wordpress-seo")),e}render(){const t=this.validate();return(0,e.createElement)(x.LocationConsumer,null,(s=>(0,e.createElement)("div",{style:"sidebar"===s?{borderBottom:"1px solid #f0f0f0"}:{}},(0,e.createElement)(V,{location:s},(0,e.createElement)(G,{id:`focus-keyword-input-${s}`,onChange:this.props.onFocusKeywordChange,keyword:this.props.keyword,label:(0,r.__)("Focus keyphrase","wordpress-seo"),helpLink:Z.renderHelpLink(),onBlurKeyword:this.props.onBlurKeyword,onFocusKeyword:this.props.onFocusKeyword,hasError:t.length>0,errorMessages:t}),this.props.isSEMrushIntegrationActive&&(0,e.createElement)(I,{location:s,keyphrase:this.props.keyword})),(0,e.createElement)(o.Slot,{name:`YoastAfterKeywordInput${s.charAt(0).toUpperCase()+s.slice(1)}`}))))}}Z.propTypes={keyword:l().string,onFocusKeywordChange:l().func.isRequired,onFocusKeyword:l().func.isRequired,onBlurKeyword:l().func.isRequired,isSEMrushIntegrationActive:l().bool,displayNoKeyphraseMessage:l().bool,displayNoKeyphrasForTrackingMessage:l().bool,errors:l().arrayOf(l().string)},Z.defaultProps={keyword:"",isSEMrushIntegrationActive:!1,displayNoKeyphraseMessage:!1,displayNoKeyphrasForTrackingMessage:!1,errors:[]};const Q=(0,v.compose)([(0,k.withSelect)((e=>{const{getFocusKeyphrase:t,getSEMrushNoKeyphraseMessage:s,hasWincherNoKeyphrase:r,getFocusKeyphraseErrors:o}=e("yoast-seo/editor");return{keyword:t(),displayNoKeyphraseMessage:s(),displayNoKeyphrasForTrackingMessage:r(),errors:o()}})),(0,k.withDispatch)((e=>{const{setFocusKeyword:t,setMarkerPauseStatus:s}=e("yoast-seo/editor");return{onFocusKeywordChange:t,onFocusKeyword:()=>s(!0),onBlurKeyword:()=>s(!1)}}))])(Z);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t,s){return r=function(e,t){if("object"!=J(e)||!e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==J(r)?r:String(r))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e;var r}const ee=window.yoast.analysis;function te(e,t=""){const s=e.getIdentifier(),r={score:e.score,rating:ee.interpreters.scoreToRating(e.score),hasMarks:e.hasMarks(),marker:e.getMarker(),id:s,text:e.text,markerId:t.length>0?`${t}:${s}`:s,hasBetaBadge:e.hasBetaBadge(),hasJumps:e.hasJumps(),hasAIFixes:e.hasAIFixes(),editFieldName:e.editFieldName};return"ok"===r.rating&&(r.rating="OK"),r}function se(e,t){switch(e.rating){case"error":t.errorsResults.push(e);break;case"feedback":t.considerationsResults.push(e);break;case"bad":t.problemsResults.push(e);break;case"OK":t.improvementsResults.push(e);break;case"good":t.goodResults.push(e)}return t}function re(e){switch(e){case"loading":return{icon:"loading-spinner",color:M.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:M.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:M.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:M.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:M.colors.$color_ok};default:return{icon:"seo-score-bad",color:M.colors.$color_red}}}function oe(e,t=""){let s={errorsResults:[],problemsResults:[],improvementsResults:[],goodResults:[],considerationsResults:[]};if(!e)return s;for(let r=0;r<e.length;r++){const o=e[r];o.text&&(s=se(te(o,t),s))}return s}function ae({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,c.createPortal)(t,s):null}ae.propTypes={target:l().oneOfType([l().string,l().object]).isRequired,children:l().node.isRequired};const ne=({target:t,scoreIndicator:s})=>(0,e.createElement)(ae,{target:t},(0,e.createElement)(a.SvgIcon,{...re(s)}));ne.propTypes={target:l().string.isRequired,scoreIndicator:l().string.isRequired};const ie=ne,le=window.yoast.analysisReport,ce=window.yoast.uiLibrary,de=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))})),ue=window.wp.hooks,pe=(u().div`
	min-width: 600px;

	@media screen and ( max-width: 680px ) {
		min-width: 0;
		width: 86vw;
	}
`,u().div`
	@media screen and ( min-width: 600px ) {
		max-width: 420px;
	}
`),me=(u()(a.Icon)`
	float: ${(0,n.getDirectionalStyle)("right","left")};
	margin: ${(0,n.getDirectionalStyle)("0 0 16px 16px","0 16px 16px 0")};

	&& {
		width: 150px;
		height: 150px;

		@media screen and ( max-width: 680px ) {
			width: 80px;
			height: 80px;
		}
	}
`,"yoast yoast-gutenberg-modal"),he=t=>{const{title:s,className:r,showYoastIcon:a,additionalClassName:n,...i}=t,l=a?(0,e.createElement)("span",{className:"yoast-icon"}):null;return(0,e.createElement)(o.Modal,{title:s,className:`${r} ${n}`,icon:l,...i},t.children)};he.propTypes={title:l().string,className:l().string,showYoastIcon:l().bool,children:l().oneOfType([l().node,l().arrayOf(l().node)]),additionalClassName:l().string},he.defaultProps={title:"Yoast SEO",className:me,showYoastIcon:!0,children:null,additionalClassName:""};const ge=he,ye=[(0,r.__)("AI tools included","wordpress-seo"),(0,r.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */
(0,r.__)("%1$s access","wordpress-seo"),"Yoast SEO academy"),(0,r.__)("24/7 support","wordpress-seo")],we=[(0,r.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,r.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,r.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,r.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,r.__)("Internal links and redirect management, easy","wordpress-seo"),(0,r.__)("Access to friendly help when you need it, day or night","wordpress-seo")],fe=(e=!1)=>e?ye:we,be=(e=!1)=>{if(e)return ye;const t=[...we];return t[1]=(0,r.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t},Ee=(e,t)=>{try{return(0,c.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}},ve=u().div`
  padding: 25px 32px 32px;
  color: #303030;
`,ke=u().ul`
  margin: 0;
  padding: 0;

  li {
    list-style-image: var(--yoast-svg-icon-check);
    margin: 0.5rem 0 0 1.5rem;
    line-height: 1.4em;

    &::marker {
      font-size: 1.5rem;
    }
  }
`,xe=u().span`
  display: block;
  margin-top: 4px;
`,_e=u().h2`
  margin-top: 0;
  margin-bottom: 0.25rem;
  color: #303030;
  font-size: 0.8125rem;
  font-weight: 600;
`,Se=u().p`
  display: block;
  margin: 0.25rem 0 1rem 0 !important;
  max-width: 420px;
`,Ce=u().hr`
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-top: 0;
  border-bottom: 1px solid #E2E8F0;
`,Re=u().div`
  text-align: center;
`,Le=u().a`
  width: 100%;
`,Ne=(0,n.makeOutboundLink)(Le);class Ie extends c.Component{constructor(e){super(e)}createBenefitsList(t){return t.length>0&&(0,e.createElement)(ke,{role:"list"},t.map(((t,s)=>(0,e.createElement)("li",{key:`upsell-benefit-${s}`},Ee(t,{strong:(0,e.createElement)("strong",null)})))))}render(){const t=(0,k.select)("yoast-seo/editor").isPromotionActive("black-friday-2024-promotion");return(0,e.createElement)(c.Fragment,null,t&&(0,e.createElement)("div",{className:"yst-flex  yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6"},(0,e.createElement)("div",{className:"yst-mx-auto"},(0,r.__)("30% OFF - BLACK FRIDAY","wordpress-seo"))),(0,e.createElement)(ve,null,(0,e.createElement)(_e,null,this.props.title),(0,e.createElement)(Se,null,this.props.description),(0,e.createElement)(Re,null,(0,e.createElement)(Ne,{...this.props.upsellButton},this.props.upsellButtonText,this.props.upsellButtonHasCaret&&(0,e.createElement)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})),(0,e.createElement)(xe,{id:this.props.upsellButton["aria-describedby"]},this.props.upsellButtonLabel)),(0,e.createElement)(Ce,null),(0,e.createElement)(_e,null,this.props.benefitsTitle),this.createBenefitsList(this.props.benefits)))}}Ie.propTypes={title:l().node,benefits:l().array,benefitsTitle:l().node,description:l().node,upsellButton:l().object,upsellButtonText:l().string.isRequired,upsellButtonLabel:l().string,upsellButtonHasCaret:l().bool},Ie.defaultProps={title:null,description:null,benefits:[],benefitsTitle:null,upsellButton:{href:"",className:"button button-primary"},upsellButtonLabel:"",upsellButtonHasCaret:!0};const Me=Ie,Te=(0,r.__)("Check your text on even more SEO criteria and get an enhanced keyphrase analysis, making it easier to optimize your content.","wordpress-seo"),Pe=t=>{const{locationContext:s}=(0,x.useRootContext)(),o=(0,_.addQueryArgs)(wpseoAdminL10n[t.buyLink],{context:s});return(0,e.createElement)(Me,{title:(0,r.__)("Get more help with writing content that ranks","wordpress-seo"),description:t.description,benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:o,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year of premium support and updates included!","wordpress-seo")})};Pe.propTypes={buyLink:l().string.isRequired,description:l().string},Pe.defaultProps={description:Te};const Ae=Pe;class Oe extends c.Component{constructor(e){super(e);const t=this.props.results;this.state={mappedResults:{}},null!==t&&(this.state={mappedResults:oe(t,this.props.keywordKey)}),this.handleMarkButtonClick=this.handleMarkButtonClick.bind(this),this.handleEditButtonClick=this.handleEditButtonClick.bind(this),this.handleResultsChange=this.handleResultsChange.bind(this),this.renderHighlightingUpsell=this.renderHighlightingUpsell.bind(this),this.createMarkButton=this.createMarkButton.bind(this)}componentDidUpdate(e){null!==this.props.results&&this.props.results!==e.results&&this.setState({mappedResults:oe(this.props.results,this.props.keywordKey)})}createMarkButton({ariaLabel:t,id:s,className:r,status:o,onClick:n,isPressed:i}){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(a.IconButtonToggle,{marksButtonStatus:o,className:r,onClick:n,id:s,icon:"eye",pressed:i,ariaLabel:t}),this.props.shouldUpsellHighlighting&&(0,e.createElement)("div",{className:"yst-root"},(0,e.createElement)(ce.Badge,{className:"yst-absolute yst-px-[3px] yst-py-[3px] yst--end-[6.5px] yst--top-[6.5px]",size:"small",variant:"upsell"},(0,e.createElement)(de,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",role:"img","aria-hidden":!0,focusable:!1}))))}deactivateMarker(){this.props.setActiveMarker(null),this.props.setMarkerPauseStatus(!1),this.removeMarkers()}activateMarker(e,t){this.props.setActiveMarker(e),t()}handleMarkButtonClick(e,t){const s=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;this.props.activeAIFixesButton&&this.props.setActiveAIFixesButton(null),s===this.props.activeMarker?this.deactivateMarker():this.activateMarker(s,t)}handleResultsChange(e,t,s){const r=this.props.keywordKey.length>0?`${this.props.keywordKey}:${e}`:e;r===this.props.activeMarker&&(s?(0,P.isUndefined)(t)||this.activateMarker(r,t):this.deactivateMarker())}focusOnKeyphraseField(e){const t=this.props.keywordKey,s=""===t?"focus-keyword-input-"+e:"yoast-keyword-input-"+t+"-"+e,r=document.getElementById(s);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}focusOnGooglePreviewField(e,t){let s;s="metaDescriptionKeyword"===e||"metaDescriptionLength"===e?"description":"titleWidth"===e||"keyphraseInSEOTitle"===e?"title":"slug";const r=document.getElementById("yoast-google-preview-"+s+"-"+t);r.focus(),r.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}handleEditButtonClick(e){const t=this.props.location;"functionWordsInKeyphrase"!==e&&"keyphraseLength"!==e?(["metaDescriptionKeyword","metaDescriptionLength","titleWidth","keyphraseInSEOTitle","slugKeyword"].includes(e)&&this.handleGooglePreviewFocus(t,e),(0,ue.doAction)("yoast.focus.input",e)):this.focusOnKeyphraseField(t)}handleGooglePreviewFocus(e,t){if("sidebar"===e)document.getElementById("yoast-search-appearance-modal-open-button").click(),setTimeout((()=>this.focusOnGooglePreviewField(t,"modal")),500);else{const s=document.getElementById("yoast-snippet-editor-metabox");s&&"false"===s.getAttribute("aria-expanded")?(s.click(),setTimeout((()=>this.focusOnGooglePreviewField(t,e)),100)):this.focusOnGooglePreviewField(t,e)}}removeMarkers(){window.YoastSEO.analysis.applyMarks(new ee.Paper("",{}),[])}renderHighlightingUpsell(t,s){const o=(0,r.__)("Highlight areas of improvement in your text, no more searching for a needle in a haystack, straight to optimizing! Now also in Elementor!","wordpress-seo");return t&&(0,e.createElement)(ge,{title:(0,r.__)("Unlock Premium SEO analysis","wordpress-seo"),onRequestClose:s,additionalClassName:"",className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,id:"yoast-premium-seo-analysis-highlighting-modal",shouldCloseOnClickOutside:!0},(0,e.createElement)(pe,null,(0,e.createElement)(Ae,{buyLink:this.props.highlightingUpsellLink,description:o})))}render(){const{mappedResults:t}=this.state,{errorsResults:s,improvementsResults:o,goodResults:a,considerationsResults:n,problemsResults:i}=t,{upsellResults:l,resultCategoryLabels:d}=this.props,u={errors:(0,r.__)("Errors","wordpress-seo"),problems:(0,r.__)("Problems","wordpress-seo"),improvements:(0,r.__)("Improvements","wordpress-seo"),considerations:(0,r.__)("Considerations","wordpress-seo"),goodResults:(0,r.__)("Good results","wordpress-seo")},p=Object.assign(u,d);let m=this.props.marksButtonStatus;return"enabled"===m&&this.props.shortcodesForParsing.length>0&&(m="disabled"),(0,e.createElement)(c.Fragment,null,(0,e.createElement)(le.ContentAnalysis,{errorsResults:s,problemsResults:i,upsellResults:l,improvementsResults:o,considerationsResults:n,goodResults:a,activeMarker:this.props.activeMarker,onMarkButtonClick:this.handleMarkButtonClick,onEditButtonClick:this.handleEditButtonClick,marksButtonClassName:this.props.marksButtonClassName,editButtonClassName:this.props.editButtonClassName,marksButtonStatus:m,headingLevel:3,keywordKey:this.props.keywordKey,isPremium:this.props.isPremium,resultCategoryLabels:p,onResultChange:this.handleResultsChange,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.props.renderAIOptimizeButton,renderHighlightingUpsell:this.renderHighlightingUpsell,markButtonFactory:this.createMarkButton}))}}Oe.propTypes={results:l().array,upsellResults:l().array,marksButtonClassName:l().string,editButtonClassName:l().string,marksButtonStatus:l().oneOf(["enabled","disabled","hidden"]),setActiveMarker:l().func.isRequired,setMarkerPauseStatus:l().func.isRequired,setActiveAIFixesButton:l().func.isRequired,activeMarker:l().string,activeAIFixesButton:l().string,keywordKey:l().string,location:l().string,isPremium:l().bool,resultCategoryLabels:l().shape({errors:l().string,problems:l().string,improvements:l().string,considerations:l().string,goodResults:l().string}),shortcodesForParsing:l().array,shouldUpsellHighlighting:l().bool,highlightingUpsellLink:l().string,renderAIOptimizeButton:l().func},Oe.defaultProps={results:null,upsellResults:[],marksButtonStatus:"enabled",marksButtonClassName:"",editButtonClassName:"",activeMarker:null,activeAIFixesButton:null,keywordKey:"",location:"",isPremium:!1,resultCategoryLabels:{},shortcodesForParsing:[],shouldUpsellHighlighting:!1,highlightingUpsellLink:"",renderAIOptimizeButton:()=>{}};const Fe=Oe,Be=(0,v.compose)([(0,k.withSelect)((e=>{const{getActiveMarker:t,getIsPremium:s,getShortcodesForParsing:r,getActiveAIFixesButton:o}=e("yoast-seo/editor");return{activeMarker:t(),isPremium:s(),shortcodesForParsing:r(),activeAIFixesButton:o()}})),(0,k.withDispatch)((e=>{const{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}=e("yoast-seo/editor");return{setActiveMarker:t,setMarkerPauseStatus:s,setActiveAIFixesButton:r}}))])(Fe);function $e(e){return(0,P.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,r.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,r.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,r.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,r.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,r.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(ee.interpreters.scoreToRating(e))}function Ue({target:t,children:s}){return(0,e.createElement)(ae,{target:t},s)}function qe(){return(0,P.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}Ue.propTypes={target:l().string.isRequired,children:l().node.isRequired};const We="yoast-seo/ai-generator",He="yoast-seo/editor",De="google",ze="social",Ke="twitter",je="title",Ye="description",Ge="post",Ve="term",Ze={post:"title",term:"term_title"},Qe=(0,P.mapValues)(Ze,(e=>`%%${e}%%`)),Je={mobile:"mobile",desktop:"desktop"},Xe={idle:"idle",loading:"loading",success:"success",error:"error"},et="success",tt="error",st="abort";window.wp.sanitize;const{stripHTMLTags:rt}=n.strings;let ot,at=!1;const nt=["_formal","_informal","_ao90"],it=e=>{for(const t of nt)if(e.endsWith(t))return e.slice(0,-t.length);return e},lt="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。｡！‼？⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽｛｝｜～｟｠｢｣､［］･￥＄％＠＆＇（）＊／：；＜＞＼\\<>";lt.split(""),new RegExp("^["+lt+"]+"),new RegExp("["+lt+"]+$");new RegExp("["+lt+"#$%&*+/=@^`{|}~ -¿–-⁊ -⁯₠-⃀]","g");const ct=e=>{const t={...e};return""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(t.value="%%"+e.name+"%%"),t.badge=`<badge>${e.label}</badge>`,t},dt=()=>{const e=(0,k.useSelect)((e=>e(He).getReplaceVars()),[]),t=(0,c.useMemo)((()=>e.map(ct)),[e]);return(0,c.useCallback)(((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:a=je,contentType:n=Ge}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,P.escapeRegExp)(o.name)+"%%","g"),(0,P.get)(r,o.name,o[s]));return n===Ve&&(e=e.replace(" Archives","")),o?((e,t=je)=>{const s=function(e){const t=(0,P.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,P.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,P.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],P.identity);return{url:e.url,title:rt(t(e.title)),description:rt(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?rt(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:rt(s("data_page_title",e.title)),description:rt(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?rt(s("data_page_title",e.filteredSEOTitle)):""}}({title:"",description:"",[t]:ee.languageProcessing.stripSpaces(e)});return(0,P.get)(s,t,e)})(e,a):e}),[t])},ut={editType:je,previewType:De,postType:"post",contentType:Ge},pt=(0,c.createContext)(ut),mt=(pt.Provider,()=>(0,c.useContext)(pt)),ht=()=>(0,c.useContext)(x.LocationContext),gt=e=>{const t=(0,c.useRef)(null);return(0,c.useCallback)((s=>{(0,P.attempt)((()=>t.current&&t.current.disconnect())),null!==s&&(t.current=new ResizeObserver((t=>{(0,P.forEach)(t,(t=>e(t)))})),t.current.observe(s))}),[e])},yt=(e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))})),window.yoast.aiFrontend,"error"),wt="loading",ft="showPlay",bt="askPermission",Et="isPlaying",vt=window.yoast.reduxJsToolkit,kt="usageCount",xt="fetchUsageCount",_t=`${xt}/success`,St={errorCode:null,errorIdentifier:null,errorMessage:null},Ct=(0,vt.createSlice)({name:kt,initialState:{status:"idle",count:0,limit:10,endpoint:"yoast/v1/ai_generator/get_usage",error:St},reducers:{addUsageCount:(e,{payload:t=1})=>{e.count+=t},setUsageCount:(e,{payload:t})=>{e.count=t},setUsageCountEndpoint:(e,{payload:t})=>{e.endpoint=t},setUsageCountLimit:(e,{payload:t})=>{e.limit=t}},extraReducers:e=>{e.addCase(`${xt}/request`,(e=>{e.status=wt,e.error=St})),e.addCase(_t,((e,{payload:t})=>{e.status="success",e.count=t.count,e.limit=t.limit,e.error=St})),e.addCase(`${xt}/${yt}`,((e,{payload:t})=>{e.status="error",e.error={errorCode:502,...t}}))}}),Rt=(Ct.getInitialState,{selectUsageCountStatus:e=>(0,P.get)(e,[kt,"status"],Ct.getInitialState()),selectUsageCount:e=>(0,P.get)(e,[kt,"count"],Ct.getInitialState().count),selectUsageCountLimit:e=>(0,P.get)(e,[kt,"limit"],Ct.getInitialState().limit),selectUsageCountEndpoint:e=>(0,P.get)(e,[kt,"endpoint"],Ct.getInitialState().endpoint),selectUsageCountError:e=>(0,P.get)(e,[kt,"error"],Ct.getInitialState().error)});Rt.selectUsageCountRemaining=(0,vt.createSelector)([Rt.selectUsageCount,Rt.selectUsageCountLimit],((e,t)=>Math.max(t-e,0))),Rt.isUsageCountLimitReached=(0,vt.createSelector)([Rt.selectUsageCount,Rt.selectUsageCountLimit,Rt.selectUsageCountError],((e,t,s)=>429===s.errorCode||e>=t)),Ct.actions,Ct.reducer;l().string.isRequired;const Lt=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))})),Nt=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),It=({learnMoreLink:t,thumbnail:s,wistiaEmbedPermission:o,upsellLink:a,upsellLabel:n,newToText:i,ctbId:l})=>{const{onClose:c,initialFocus:d}=(0,ce.useModalContext)(),u={a:(0,e.createElement)(Yt,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,e.createElement)(Nt,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,e.createElement)("br",null)};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,e.createElement)("div",{className:"yst-relative yst-w-full"},(0,e.createElement)(_s,{videoId:"vun9z1dpfh",thumbnail:s,wistiaEmbedPermission:o}),(0,e.createElement)(ce.Badge,{className:"yst-absolute yst-end-4 yst-text-center yst-justify-center",variant:"info",style:{top:"-8px"}},(0,r.__)("Beta","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-mt-6 yst-text-xs yst-font-medium yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("span",{className:"yst-introduction-modal-uppercase yst-flex yst-gap-2 yst-items-center"},(0,e.createElement)("span",{className:"yst-logo-icon"}),i))),(0,e.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,e.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},(0,r.sprintf)(/* translators: %s: Expands to "Yoast AI" */
(0,r.__)("Optimize your SEO content with %s","wordpress-seo"),"Yoast AI")),(0,e.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},Ee((0,r.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tags; %4$s is the arrow icon. */
(0,r.__)("Make content editing a breeze! Optimize your SEO content with quick, actionable suggestions at the click of a button.%1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),u))),(0,e.createElement)("div",{className:"yst-w-full yst-flex yst-mt-6"},(0,e.createElement)(ce.Button,{as:"a",className:"yst-grow",size:"extra-large",variant:"upsell",href:a,target:"_blank",ref:d,"data-action":"load-nfd-ctb","data-ctb-id":l},(0,e.createElement)(Lt,{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5"}),n,(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))),(0,e.createElement)(ce.Button,{as:"a",className:"yst-mt-4",variant:"tertiary",onClick:c},(0,r.__)("Close","wordpress-seo"))))};It.propTypes={learnMoreLink:l().string.isRequired,upsellLink:l().string.isRequired,thumbnail:l().shape({src:l().string.isRequired,width:l().string,height:l().string}).isRequired,wistiaEmbedPermission:l().shape({value:l().bool.isRequired,status:l().string.isRequired,set:l().func.isRequired}).isRequired,upsellLabel:l().string,newToText:l().string,ctbId:l().string},It.defaultProps={upsellLabel:(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"};const Mt=({handleRefreshClick:t,supportLink:s})=>(0,e.createElement)("div",{className:"yst-flex yst-gap-2"},(0,e.createElement)(ce.Button,{onClick:t},(0,r.__)("Refresh this page","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"secondary",as:"a",href:s,target:"_blank",rel:"noopener"},(0,r.__)("Contact support","wordpress-seo")));Mt.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const Tt=({handleRefreshClick:t,supportLink:s})=>(0,e.createElement)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2"},(0,e.createElement)(ce.Button,{className:"yst-order-last",onClick:t},(0,r.__)("Refresh this page","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"secondary",as:"a",href:s,target:"_blank",rel:"noopener"},(0,r.__)("Contact support","wordpress-seo")));Tt.propTypes={handleRefreshClick:l().func.isRequired,supportLink:l().string.isRequired};const Pt=({error:t,children:s})=>(0,e.createElement)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4"},(0,e.createElement)(ce.Title,null,(0,r.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")),(0,e.createElement)("p",null,(0,r.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")),(0,e.createElement)(ce.Alert,{variant:"error"},(null==t?void 0:t.message)||(0,r.__)("Undefined error message.","wordpress-seo")),(0,e.createElement)("p",null,(0,r.__)("Unfortunately, this means that any unsaved changes in this section will be lost. You can try and refresh this page to resolve the problem. If this error still occurs, please get in touch with our support team, and we'll get you all the help you need!","wordpress-seo")),s);Pt.propTypes={error:l().object.isRequired,children:l().node},Pt.VerticalButtons=Tt,Pt.HorizontalButtons=Mt;var At;function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ot.apply(this,arguments)}l().string,l().node.isRequired,l().node.isRequired,l().node,l().oneOf(Object.keys({lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}));const Ft=t=>e.createElement("svg",Ot({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1000 1000"},t),At||(At=e.createElement("path",{fill:"#fff",d:"M500 0C223.9 0 0 223.9 0 500s223.9 500 500 500 500-223.9 500-500S776.1 0 500 0Zm87.2 412.4c0-21.9 4.3-40.2 13.1-54.4s24-27.1 45.9-38.2l10.1-4.9c17.8-9 22.4-16.7 22.4-26 0-11.1-9.5-19.1-25-19.1-18.3 0-32.2 9.5-41.8 28.9l-24.7-24.8c5.4-11.6 14.1-20.9 25.8-28.1a70.8 70.8 0 0 1 38.9-11.1c17.8 0 33.3 4.6 45.9 14.2s19.4 22.7 19.4 39.4c0 26.6-15 42.9-43.1 57.3l-15.7 8c-16.8 8.5-25.1 16-27.4 29.4h85.4v35.4H587.2Zm-82.1 373.3c-157.8 0-285.7-127.9-285.7-285.7s127.9-285.7 285.7-285.7a286.4 286.4 0 0 1 55.9 5.5l-55.9 116.9c-90 0-163.3 73.3-163.3 163.3s73.3 163.3 163.3 163.3a162.8 162.8 0 0 0 106.4-39.6l61.8 107.2a283.9 283.9 0 0 1-168.2 54.8ZM705 704.1l-70.7-122.5H492.9l70.7-122.4H705l70.7 122.4Z"}))),Bt=window.ReactDOM;var $t,Ut,qt;(Ut=$t||($t={})).Pop="POP",Ut.Push="PUSH",Ut.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(qt||(qt={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const Wt=["post","put","patch","delete"],Ht=(new Set(Wt),["get",...Wt]);new Set(Ht),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),e.Component,e.startTransition,new Promise((()=>{})),e.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var Dt,zt,Kt,jt;new Map,e.startTransition,Bt.flushSync,e.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(jt=Dt||(Dt={})).UseScrollRestoration="useScrollRestoration",jt.UseSubmit="useSubmit",jt.UseSubmitFetcher="useSubmitFetcher",jt.UseFetcher="useFetcher",jt.useViewTransitionState="useViewTransitionState",(Kt=zt||(zt={})).UseFetcher="useFetcher",Kt.UseFetchers="useFetchers",Kt.UseScrollRestoration="useScrollRestoration",l().string.isRequired,l().string;const Yt=({href:t,children:s,...o})=>(0,e.createElement)(ce.Link,{target:"_blank",rel:"noopener noreferrer",...o,href:t},s,(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")));Yt.propTypes={href:l().string.isRequired,children:l().node},Yt.defaultProps={children:null};const Gt=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))}));var Vt,Zt,Qt;function Jt(){return Jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Jt.apply(this,arguments)}const Xt=t=>e.createElement("svg",Jt({xmlns:"http://www.w3.org/2000/svg",id:"star-rating-half_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 500 475.53"},t),Vt||(Vt=e.createElement("defs",null,e.createElement("style",null,".star-rating-half_svg__cls-1{fill:#fbbf24}"))),Zt||(Zt=e.createElement("path",{d:"M250 392.04 98.15 471.87l29-169.09L4.3 183.03l169.77-24.67L250 4.52l75.93 153.84 169.77 24.67-122.85 119.75 29 169.09L250 392.04z",className:"star-rating-half_svg__cls-1"})),Qt||(Qt=e.createElement("path",{d:"m250 9.04 73.67 149.27.93 1.88 2.08.3 164.72 23.94-119.19 116.19-1.51 1.47.36 2.07 28.14 164.06-147.34-77.46-1.86-1-1.86 1-147.34 77.46 28.14-164.06.36-2.07-1.51-1.47L8.6 184.43l164.72-23.9 2.08-.3.93-1.88L250 9.04m0-9-77.25 156.49L0 181.64l125 121.89-29.51 172L250 394.3l154.51 81.23-29.51-172 125-121.89-172.75-25.11L250 0Z",className:"star-rating-half_svg__cls-1"})),e.createElement("path",{d:"m500 181.64-172.75-25.11L250 0v394.3l154.51 81.23L375 303.48l125-121.84z",style:{fill:"#f3f4f6"}}));function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},es.apply(this,arguments)}const ts=t=>e.createElement("svg",es({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 500 475.53"},t),e.createElement("path",{d:"m250 0 77.25 156.53L500 181.64 375 303.48l29.51 172.05L250 394.3 95.49 475.53 125 303.48 0 181.64l172.75-25.11L250 0z",style:{fill:"#fbbf24"}}));var ss,rs,os;function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},as.apply(this,arguments)}const ns=t=>e.createElement("svg",as({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},t),ss||(ss=e.createElement("g",{clipPath:"url(#yoast-premium-logo-new_svg__a)"},e.createElement("path",{fill:"url(#yoast-premium-logo-new_svg__b)",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),e.createElement("path",{fill:"#6C2548",d:"m56.016.125-36.06 63.75H64v-53.76c0-4.88-3.414-8.96-7.984-9.987",opacity:.35}),e.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),e.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),e.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),e.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),e.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),e.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),e.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),e.createElement("path",{fill:"#CD82AB",d:"M57.402 58.086H43.888v1.197h13.514v-1.197ZM53.75 53.366l-3.103-5.76v.004l-.004-.004-3.104 5.76-4.777-3.42 1.126 7.702h13.514l1.126-7.702-4.777 3.42Z"}))),rs||(rs=e.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),os||(os=e.createElement("defs",null,e.createElement("linearGradient",{id:"yoast-premium-logo-new_svg__b",x1:-2.912,x2:68.509,y1:25.843,y2:38.438,gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#5D237A"}),e.createElement("stop",{offset:.08,stopColor:"#702175"}),e.createElement("stop",{offset:.22,stopColor:"#872070"}),e.createElement("stop",{offset:.36,stopColor:"#981E6C"}),e.createElement("stop",{offset:.51,stopColor:"#A21E69"}),e.createElement("stop",{offset:.7,stopColor:"#A61E69"})),e.createElement("clipPath",{id:"yoast-premium-logo-new_svg__a"},e.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"})))));var is,ls,cs;function ds(){return ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ds.apply(this,arguments)}const us=t=>e.createElement("svg",ds({xmlns:"http://www.w3.org/2000/svg",width:64,height:64,fill:"none"},t),is||(is=e.createElement("g",{clipPath:"url(#woo-seo-logo-new_svg__a)"},e.createElement("path",{fill:"#0E1E65",d:"M64 64H10.24C4.586 64 0 59.414 0 53.76V10.24C0 4.586 4.586 0 10.24 0h43.52C59.414 0 64 4.586 64 10.24V64Z"}),e.createElement("path",{fill:"#0075B3",d:"M56.016.253 19.956 64H64V10.24c0-4.88-3.414-8.96-7.984-9.987Z"}),e.createElement("path",{fill:"#fff",d:"M9.523 43.174v4.468c2.765-.116 4.928-1.024 6.759-2.88 1.83-1.856 3.507-4.864 5.107-9.332L33.242 3.686h-5.735L17.96 30.208l-4.736-14.874H7.975l6.963 17.895a7.352 7.352 0 0 1 0 5.35c-.704 1.818-1.971 3.955-5.415 4.595Z"}),e.createElement("path",{fill:"#9FDA4F",d:"M53.274 5.11c-5.99-3.382-13.59-1.27-16.976 4.72-3.386 5.99-1.27 13.59 4.72 16.976 5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),e.createElement("path",{fill:"#FEC228",d:"M37.731 32.608s-.012-.006-.019-.013c-.006 0-.01-.006-.016-.01a8.134 8.134 0 0 0-11.091 3.085 8.145 8.145 0 0 0 3.104 11.108 8.139 8.139 0 0 0 11.075-3.095 8.14 8.14 0 0 0-3.05-11.072"}),e.createElement("path",{fill:"#FF4E47",d:"M28.454 57.61a4.89 4.89 0 0 0-2.477-4.256 4.863 4.863 0 0 0-2.4-.634c-2.69 0-4.892 2.18-4.892 4.883a4.882 4.882 0 0 0 4.883 4.893 4.882 4.882 0 0 0 4.893-4.883"}),e.createElement("path",{fill:"#77B227",d:"M53.274 5.11 41.018 26.806c5.99 3.386 13.59 1.27 16.976-4.72 3.382-5.99 1.27-13.59-4.72-16.976Z"}),e.createElement("path",{fill:"#F49A00",d:"m37.696 32.586-8.01 14.179a8.145 8.145 0 0 0 11.095-3.085 8.144 8.144 0 0 0-3.085-11.094Z"}),e.createElement("path",{fill:"#ED261F",d:"m25.971 53.35-4.806 8.51a4.882 4.882 0 0 0 6.656-1.854 4.882 4.882 0 0 0-1.853-6.656"}),e.createElement("path",{fill:"#A1CCE3",d:"M58.102 46.806a1.26 1.26 0 0 0-1.219.938l-.157.582a40.97 40.97 0 0 0-10.857 1.261c-.013 0-.023.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.86c.083.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.011h10.592a.507.507 0 0 0 .506-.505c0-1.149-.775-2.15-1.888-2.442L57.862 48a.25.25 0 0 1 .243-.186h.932a.507.507 0 0 0 0-1.01h-.931l-.004.002ZM57.018 59.92a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),ls||(ls=e.createElement("path",{stroke:"#fff",d:"M10 .5h44a9.5 9.5 0 0 1 9.5 9.5v53.5H10A9.5 9.5 0 0 1 .5 54V10A9.5 9.5 0 0 1 10 .5Z"})),cs||(cs=e.createElement("defs",null,e.createElement("clipPath",{id:"woo-seo-logo-new_svg__a"},e.createElement("path",{fill:"#fff",d:"M0 10C0 4.477 4.477 0 10 0h44c5.523 0 10 4.477 10 10v54H10C4.477 64 0 59.523 0 54V10Z"}))))),ps=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));var ms=s(4530),hs=s.n(ms);const gs=({link:t,linkProps:s,isPromotionActive:o,isWooCommerceActive:a})=>{const n=a?be:fe;let i=(0,c.useMemo)((()=>(0,r.__)("Now with Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")),[]),l=Ee(a?(0,r.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,r.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast WooCommerce SEO"):(0,r.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,r.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,e.createElement)("span",{className:"yst-whitespace-nowrap"})});const d=o("black-friday-2024-promotion");return d&&(i=(0,c.useMemo)((()=>(0,r.__)("If you were thinking about upgrading, now's the time! 30% OFF ends 3rd Dec 11am (CET)","wordpress-seo")),[]),l=Ee((0,r.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,r.__)("%1$sBuy%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,e.createElement)("span",{className:"yst-whitespace-nowrap"})})),(0,e.createElement)("div",{className:hs()("yst-p-6 yst-rounded-lg yst-text-white  yst-shadow",a?"yst-bg-[#0e1e65]":"yst-bg-primary-500")},(0,e.createElement)("figure",{className:"yst-logo-square yst-w-16 yst-h-16 yst-mx-auto yst-overflow-hidden yst-relative yst-z-10 yst-mt-[-2.6rem]"},a?(0,e.createElement)(us,null):(0,e.createElement)(ns,null)),d&&(0,e.createElement)("div",{className:"sidebar__sale_banner_container"},(0,e.createElement)("div",{className:"sidebar__sale_banner"},(0,e.createElement)("span",{className:"banner_text"},(0,r.__)("30% OFF - BLACK FRIDAY","wordpress-seo")))),(0,e.createElement)(ce.Title,{as:"h2",className:"yst-mt-6 yst-text-base yst-font-extrabold yst-text-white"},l),(0,e.createElement)("p",{className:"yst-mt-2 yst-font-medium"},i),(0,e.createElement)("ul",{className:"yst-ps-[1em] yst-list-outside yst-text-white yst-mt-2"},n(!0).map(((t,s)=>(0,e.createElement)("li",{key:`upsell-benefit-${s}`,className:"yst-flex yst-items-center yst-gap-2"},(0,e.createElement)(ps,{className:"yst-w-4 yst-h-4 yst-text-green-400"}),(0,e.createElement)("span",null,t))))),(0,e.createElement)(ce.Button,{as:"a",variant:"upsell",href:t,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...s},(0,e.createElement)("span",null,(0,r.__)("Buy now","wordpress-seo")),(0,e.createElement)(Gt,{className:"yst-w-4 yst-h-4 yst-icon-rtl"})),(0,e.createElement)("p",{className:"yst-text-center yst-text-xs yst-mx-2 yst-font-light yst-leading-5 yst-mt-2"},(0,r.__)("30-day money back guarantee","wordpress-seo")),(0,e.createElement)("hr",{className:"yst-border-t yst-border-primary-300 yst-my-4"}),(0,e.createElement)("a",{className:"yst-block yst-mt-4 yst-no-underline",href:"https://www.g2.com/products/yoast-yoast/reviews",target:"_blank",rel:"noopener noreferrer"},(0,e.createElement)("span",{className:"yst-flex yst-gap-2 yst-mt-2 yst-items-center"},(0,e.createElement)(Ft,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)("span",{className:"yst-flex yst-gap-1"},(0,e.createElement)(ts,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(ts,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(ts,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(ts,{className:"yst-w-5 yst-h-5"}),(0,e.createElement)(Xt,{className:"yst-w-5 yst-h-5"})),(0,e.createElement)("span",{className:"yst-text-sm yst-font-semibold yst-text-white"},"4.6 / 5"))))};var ys;function ws(){return ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ws.apply(this,arguments)}gs.propTypes={link:l().string.isRequired,linkProps:l().object,isPromotionActive:l().func},gs.defaultProps={linkProps:{},isPromotionActive:P.noop};const fs=t=>e.createElement("svg",ws({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},t),ys||(ys=e.createElement("path",{fill:"#CD82AB",d:"M10.989 6.74 7.885.98v.002L7.882.98 4.778 6.74 0 3.32l1.126 7.702H14.64l1.126-7.703L10.99 6.74Z"})));var bs;function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Es.apply(this,arguments)}const vs=t=>e.createElement("svg",Es({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},t),bs||(bs=e.createElement("path",{fill:"#0075B3",d:"M12.613.445a1.26 1.26 0 0 0-1.22.937l-.156.583A40.97 40.97 0 0 0 .379 3.225c-.013 0-.022.007-.035.01a.503.503 0 0 0-.317.64 40.344 40.344 0 0 0 1.99 4.861c.084.173.26.282.455.282h7.542c.64 0 1.213.403 1.427 1.008h-10a.507.507 0 0 0 0 1.01h10.592a.507.507 0 0 0 .506-.505c0-1.149-.774-2.15-1.888-2.441l1.722-6.452a.25.25 0 0 1 .243-.185h.931a.507.507 0 0 0 0-1.011h-.931l-.003.003Zm-1.085 13.114a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Zm-8.573 0a1.008 1.008 0 1 1 0-2.016 1.008 1.008 0 0 1 0 2.016Z"}))),ks=({premiumLink:t,premiumUpsellConfig:s,isPromotionActive:o,isWooCommerceActive:a})=>{const n=o("black-friday-2024-promotion"),i=a?be:fe;return(0,e.createElement)(ce.Paper,{as:"div",className:"xl:yst-max-w-3xl"},n&&(0,e.createElement)("div",{className:"yst-rounded-t-lg yst-h-9 yst-flex yst-justify-between yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-semibold"},(0,e.createElement)("div",null,(0,r.__)("30% OFF","wordpress-seo")),(0,e.createElement)("div",null,(0,r.__)("BLACK FRIDAY","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-p-6 yst-flex yst-flex-col"},(0,e.createElement)("div",{className:"yst-flex yst-items-center"},a?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ce.Title,{as:"h2",size:"4",className:"yst-text-xl yst-text-primary-500"},(0,r.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,r.__)("Upgrade to %s","wordpress-seo"),"Yoast WooCommerce SEO")),(0,e.createElement)(vs,{className:"yst-ml-2 yst-w-4 yst-h-3"})):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ce.Title,{as:"h2",size:"4",className:"yst-text-xl yst-text-primary-500"},(0,r.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,r.__)("Upgrade to %s","wordpress-seo"),"Yoast SEO Premium")),(0,e.createElement)(fs,{className:"yst-ml-2 yst-w-4 yst-h-3"}))),(0,e.createElement)("span",{className:"yst-font-medium yst-text-slate-500 yst-text-xs yst-leading-5 yst-uppercase yst-mt-2"},(0,r.__)("Now includes Local, News & Video SEO + 1 Google Docs seat!","wordpress-seo")),(0,e.createElement)("ul",{className:"yst-grid yst-grid-cols-1 sm:yst-grid-cols-2 yst-gap-x-6 yst-list-none yst-list-outside yst-text-slate-600 yst-mt-6"},i().map(((t,s)=>(0,e.createElement)("li",{key:`upsell-benefit-${s}`},(0,e.createElement)("span",{className:"yst-mx-2"},"•"),t)))),(0,e.createElement)(ce.Button,{as:"a",variant:"upsell",size:"extra-large",href:t,className:"yst-gap-2 yst-mt-4",target:"_blank",rel:"noopener",...s},a?(0,r.sprintf)(/* translators: %s expands to "Yoast WooCommerce SEO" */
(0,r.__)("Explore %s now!","wordpress-seo"),"Yoast WooCommerce SEO"):(0,r.sprintf)(/* translators: %s expands to "Yoast SEO" Premium */
(0,r.__)("Explore %s now!","wordpress-seo"),"Yoast SEO Premium"),(0,e.createElement)(Gt,{className:"yst-w-4 yst-h-4 yst-icon-rtl"}))))};ks.propTypes={premiumLink:l().string.isRequired,premiumUpsellConfig:l().object,isPromotionActive:l().func,isWooCommerceActive:l().bool.isRequired},ks.defaultProps={premiumUpsellConfig:{},isPromotionActive:P.noop},l().string.isRequired,l().object.isRequired,l().string.isRequired,l().func.isRequired,l().bool.isRequired,e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))})),l().bool.isRequired,l().func,l().func,l().string.isRequired,l().string.isRequired,l().string.isRequired,l().string.isRequired;const xs=window.yoast.reactHelmet,_s=({videoId:t,thumbnail:s,wistiaEmbedPermission:o})=>{const[a,n]=(0,c.useState)(o.value?Et:ft),i=(0,c.useCallback)((()=>n(Et)),[n]),l=(0,c.useCallback)((()=>{o.value?i():n(bt)}),[o.value,i,n]),d=(0,c.useCallback)((()=>n(ft)),[n]),u=(0,c.useCallback)((()=>{o.set(!0),i()}),[o.set,i]);return(0,e.createElement)(e.Fragment,null,o.value&&(0,e.createElement)(xs.Helmet,null,(0,e.createElement)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})),(0,e.createElement)("div",{className:"yst-relative yst-w-full yst-h-0 yst-pt-[56.25%] yst-overflow-hidden yst-rounded-md yst-drop-shadow-md yst-bg-white"},a===ft&&(0,e.createElement)("button",{type:"button",className:"yst-absolute yst-inset-0 yst-button yst-p-0 yst-border-none yst-bg-white yst-transition-opacity yst-duration-1000 yst-opacity-100",onClick:l},(0,e.createElement)("img",{className:"yst-w-full yst-h-auto",alt:"",loading:"lazy",decoding:"async",...s})),a===bt&&(0,e.createElement)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white"},(0,e.createElement)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center"},o.status===wt&&(0,e.createElement)(ce.Spinner,null),o.status!==wt&&(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,r.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")),(0,e.createElement)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4"},(0,e.createElement)(ce.Button,{type:"button",variant:"secondary",onClick:d,disabled:o.status===wt},(0,r.__)("Deny","wordpress-seo")),(0,e.createElement)(ce.Button,{type:"button",variant:"primary",onClick:u,disabled:o.status===wt},(0,r.__)("Allow","wordpress-seo")))),o.value&&a===Et&&(0,e.createElement)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0"},null===t&&(0,e.createElement)(ce.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==t&&(0,e.createElement)("div",{className:`wistia_embed wistia_async_${t} videoFoam=true`}))))};_s.propTypes={videoId:l().string.isRequired,thumbnail:l().shape({src:l().string.isRequired,width:l().string,height:l().string}).isRequired,wistiaEmbedPermission:l().shape({value:l().bool.isRequired,status:l().string.isRequired,set:l().func.isRequired}).isRequired},e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))})),l().bool.isRequired,l().func.isRequired,l().func,l().string;const Ss=({onGiveConsent:t,learnMoreLink:s,privacyPolicyLink:o,termsOfServiceLink:a,imageLink:n})=>{const{onClose:i,initialFocus:l}=(0,ce.useModalContext)(),[d,u]=(0,ce.useToggleState)(!1),p=(0,c.useMemo)((()=>({src:n,width:"432",height:"244"})),[n]),m=Ee((0,r.sprintf)(/* translators: %1$s and %2$s are a set of anchor tags and %3$s and %4$s are a set of anchor tags. */
(0,r.__)("I approve the %1$sTerms of Service%2$s & %3$sPrivacy Policy%4$s of the Yoast AI service. This includes consenting to the collection and use of data to improve user experience.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,e.createElement)(Yt,{href:a}),a2:(0,e.createElement)(Yt,{href:o})}),[h,g]=(0,ce.useToggleState)(!1),y=(0,c.useCallback)((async()=>{g(),await t(),g()}),[t]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center"},(0,e.createElement)("div",{className:"yst-relative yst-w-full"},(0,e.createElement)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...p}))),(0,e.createElement)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center"},(0,e.createElement)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center"},(0,e.createElement)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium"},(0,r.sprintf)(/* translators: %s expands to Yoast AI. */
(0,r.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")),(0,e.createElement)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm"},Ee((0,r.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */
(0,r.__)("Enable AI-powered SEO! Use all AI Generate and Optimize features to boost your efficiency. Just give us the green light. %1$s%2$sLearn more%3$s%4$s","wordpress-seo"),"<br/>","<a>","<ArrowNarrowRightIcon />","</a>"),{a:(0,e.createElement)(Yt,{href:s,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,e.createElement)(Nt,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,e.createElement)("br",null)}))),(0,e.createElement)("div",{className:"yst-flex yst-w-full yst-mt-6"},(0,e.createElement)("hr",{className:"yst-w-full yst-text-gray-200"})),(0,e.createElement)("div",{className:"yst-flex yst-items-start yst-mt-4"},(0,e.createElement)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:d,value:d?"true":"false",onChange:u,className:"yst-checkbox__input",ref:l}),(0,e.createElement)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500"},m)),(0,e.createElement)("div",{className:"yst-w-full yst-flex yst-mt-4"},(0,e.createElement)(ce.Button,{as:"button",className:"yst-grow",size:"large",disabled:!d,onClick:y},h&&(0,e.createElement)(ce.Spinner,{className:"yst-me-2"}),(0,r.__)("Grant consent","wordpress-seo"))),(0,e.createElement)(ce.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:i},(0,r.__)("Close","wordpress-seo"))))};Ss.propTypes={onGiveConsent:l().func.isRequired,learnMoreLink:l().string.isRequired,privacyPolicyLink:l().string.isRequired,termsOfServiceLink:l().string.isRequired,imageLink:l().string.isRequired};const Cs=()=>{const t=(0,k.useSelect)((e=>e(He).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,e.createElement)(Yt,{variant:"error",href:t}),a2:(0,e.createElement)(Yt,{variant:"error",href:s})})))},Rs=()=>{const t=(0,k.useSelect)((e=>e(He).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Not enough content","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("Please add more content to ensure a valuable AI suggestion. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,e.createElement)(Yt,{variant:"error",href:t}),a2:(0,e.createElement)(Yt,{variant:"error",href:s})})))},Ls=()=>{const t=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_settings#/site-features#card-wpseo-keyword_analysis_active")),[]),s=(0,c.useCallback)((()=>{window.location.reload()}),[]),{onClose:o}=(0,ce.useModalContext)();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("SEO analysis required","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(
/**
   * translators:
   * %1$s expands to Yoast SEO.
   * %2$s and %3$s expand to an opening and closing anchor tag, respectively, that links to the settings page.
   * %4$s expands to Yoast AI.
   */
(0,r.__)("%4$s requires the SEO analysis to be enabled. To enable it, please navigate to %2$sSite features%3$s in %1$s, turn on the SEO analysis, and click 'Save changes'. If it's disabled in your WordPress user profile, access your profile and enable it there. Please contact your administrator if you don't have access to these settings.","wordpress-seo"),"Yoast SEO","<a>","</a>","Yoast AI"),{a:(0,e.createElement)(Yt,{variant:"error",href:t})}))),(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:o},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{className:"yst-revoke-button",variant:"primary",onClick:s},(0,r.__)("Refresh page","wordpress-seo"))))},Ns=()=>{const t=(0,k.useSelect)((e=>e(He).selectLink("https://yoa.st/ai-generator-rate-limit-help")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("You've reached the Yoast AI rate limit","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,r.__)("You might have reached your Yoast AI rate limit for a specific time frame or your sparks limit for this month. If you have reached your rate limit, please reduce the frequency of your requests to continue using Yoast AI features. Our %1$shelp article%2$s provides guidance on effectively planning and pacing your requests for an optimized workflow.","wordpress-seo"),"<a>","</a>"),{a:(0,e.createElement)(Yt,{variant:"error",href:t})})))},Is=({invalidSubscriptions:t=[]})=>{const{newYoastWooLink:s,activateYoastWooLink:o,newPremiumLink:a,activatePremiumLink:n}=(0,k.useSelect)((e=>{const t=e(He);return{newYoastWooLink:t.selectLink("https://yoa.st/ai-generator-new-yoast-woocommerce"),activateYoastWooLink:t.selectLink("https://yoa.st/ai-generator-activate-yoast-woocommerce"),newPremiumLink:t.selectLink("https://yoa.st/ai-generator-new-premium"),activatePremiumLink:t.selectLink("https://yoa.st/ai-generator-activate-premium")}}),[]),{onClose:i}=(0,ce.useModalContext)(),l=(0,c.useCallback)((async()=>{try{await C()({path:"yoast/v1/ai_generator/bust_subscription_cache",method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()}),[]);let d,u,p;return t.includes("Yoast WooCommerce SEO")?(d="Yoast WooCommerce SEO",u=o,p=s):t.includes("Yoast SEO Premium")&&(d="Yoast SEO Premium",u=n,p=a),(0,e.createElement)(c.Fragment,null,(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Subscription required","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(
/**
   * translators:
   * %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO.
   * %2$s expands to MyYoast.
   * %3$s and %4$s expand to an opening and closing anchor tag, respectively, to activate your subscription.
   * %5$s and %6$s expand to an opening and closing anchor tag, respectively, to get a new subscription.
   **/
(0,r.__)("To access this feature, you need an active %1$s subscription. Please %3$sactivate your subscription in %2$s%4$s or %5$sget a new %1$s subscription%6$s. Afterward, refresh this page. It may take up to 30 seconds for the feature to function correctly.","wordpress-seo"),d,"MyYoast","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,e.createElement)(Yt,{variant:"error",href:u}),New:(0,e.createElement)(Yt,{variant:"error",href:p})}))),(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:i},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"primary",onClick:l},(0,r.__)("Refresh page","wordpress-seo"))))};Is.propTypes={invalidSubscriptions:l().arrayOf(l().string)};const Ms=()=>{const t=(0,k.useSelect)((e=>e(He).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Connection timeout","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("It seems that a connection timeout has occurred. Please check your internet connection and try again later. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,e.createElement)(Yt,{variant:"error",href:t}),a2:(0,e.createElement)(Yt,{variant:"error",href:s})})))},Ts=()=>{const t=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Usage policy violation","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
   * %5$s expands to OpenAI.
   */
(0,r.__)("Due to %5$s's strict ethical guidelines and %1$susage policies%2$s, we cannot generate suggestions for the content on this page. If you intend to use AI, kindly avoid the use of explicit, violent, copyrighted, or sexually explicit content. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>","OpenAI"),{a1:(0,e.createElement)(Yt,{variant:"error",href:"https://openai.com/policies/usage-policies"}),a2:(0,e.createElement)(Yt,{variant:"error",href:t})})))},Ps=({errorMessage:t=""})=>{const s=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},(0,r.sprintf)(/* translators: %s is the error response of the request. */
(0,r.__)("The request came back with the following error: '%s'.","wordpress-seo"),t)),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,r.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,e.createElement)(Yt,{variant:"error",href:s})})))};Ps.propTypes={errorMessage:l().string};const As=()=>{const t=(0,k.useSelect)((e=>e(He).selectAdminLink("plugins.php")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Something went wrong","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. %2$s expands to an opening link tag. %3$s expands to a closing link tag. */
(0,r.__)("The version of %1$s is outdated. Please upgrade %1$s %2$shere%3$s!","wordpress-seo"),"Yoast SEO Premium","<a>","</a>"),{a:(0,e.createElement)(Yt,{variant:"error",href:t})})))},Os=()=>{const t=(0,k.useSelect)((e=>e(He).selectLink("https://yoa.st/ai-common-errors")),[]),s=(0,k.useSelect)((e=>e(He).selectAdminLink("?page=wpseo_page_support")),[]);return(0,e.createElement)(ce.Alert,{variant:"error"},(0,e.createElement)("span",{className:"yst-block yst-font-medium"},(0,r.__)("Yoast AI cannot reach your site","wordpress-seo")),(0,e.createElement)("p",{className:"yst-mt-2"},Ee((0,r.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,r.__)("To use this feature, your site must be publicly accessible. This applies to both test sites and instances where your REST API is password-protected. Please ensure your site is accessible to the public and try again. Learn more on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,e.createElement)(Yt,{variant:"error",href:t}),a2:(0,e.createElement)(Yt,{variant:"error",href:s})})))},Fs=({errorCode:t,errorIdentifier:s="",errorMessage:r=""})=>{switch(t){case 400:switch(s){case"SITE_UNREACHABLE":return(0,e.createElement)(Os,null);case"WP_HTTP_REQUEST_ERROR":return(0,e.createElement)(Ps,{errorMessage:r});default:return(0,e.createElement)(Cs,null)}case 429:return(0,e.createElement)(Ns,null);default:return(0,e.createElement)(Cs,null)}};Fs.propTypes={errorCode:l().number.isRequired,errorIdentifier:l().string,errorMessage:l().string};const Bs=({currentSubscriptions:t,isSeoAnalysisActive:s=!0})=>{const{isPremium:r,usageCountStatus:o,usageCountError:a,isWooProductEntity:n,isWooSeoActive:i}=(0,k.useSelect)((e=>{const t=e(He);return{isPremium:t.getIsPremium(),usageCountStatus:e(We).selectUsageCountStatus(),usageCountError:e(We).selectUsageCountError(),isWooProductEntity:t.getIsWooProductEntity(),isWooSeoActive:t.getIsWooSeoActive()}}),[]),l=(0,c.useMemo)((()=>!t.wooCommerceSubscription&&n),[t.wooCommerceSubscription]),d=(0,c.useMemo)((()=>{const e=[];return!r&&!n||t.premiumSubscription||e.push("Yoast SEO Premium"),l&&i&&e.push("Yoast WooCommerce SEO"),e}),[r,t.premiumSubscription,l,i,n]);return d.length>0?(0,e.createElement)(Is,{invalidSubscriptions:d}):s?o===Xe.error?(0,e.createElement)(Fs,{...a}):void 0:(0,e.createElement)(Ls,null)};Bs.propTypes={currentSubscriptions:l().object.isRequired,isSeoAnalysisActive:l().bool};const $s=({onStartGenerating:t})=>{const{termsOfServiceLink:s,privacyPolicyLink:r,learnMoreLink:o,imageLink:a,consentEndpoint:n}=(0,k.useSelect)((e=>({termsOfServiceLink:e(He).selectLink("https://yoa.st/ai-generator-terms-of-service"),privacyPolicyLink:e(He).selectLink("https://yoa.st/ai-generator-privacy-policy"),learnMoreLink:e(He).selectLink("https://yoa.st/ai-generator-learn-more"),imageLink:e(He).selectImageLink("ai-consent.png"),consentEndpoint:e(We).selectAiGeneratorConsentEndpoint()})),[]),{storeAiGeneratorConsent:i}=(0,k.useDispatch)(We),l=(0,c.useCallback)((async()=>{await i(!0,n),t()}),[i,t,n]);return(0,e.createElement)(Ss,{termsOfServiceLink:s,privacyPolicyLink:r,learnMoreLink:o,imageLink:a,onGiveConsent:l})};$s.propTypes={onStartGenerating:l().func.isRequired};const Us=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))})),qs=e.forwardRef((function(t,s){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))})),Ws=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,Hs=({total:t,current:s,onNavigate:o,disabled:a=!1,...n})=>(0,e.createElement)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start"},(0,e.createElement)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1"},(0,r.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")),t>1&&(0,e.createElement)(ce.Pagination,{className:"yst-shrink-0",current:s,total:t,onNavigate:o,disabled:a,variant:"text"
/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,r.__)("Previous","wordpress-seo")
/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,r.__)("Next","wordpress-seo"),...n})),Ds=({height:t})=>{const[s,o]=(0,c.useState)(""),{onClose:a}=(0,ce.useModalContext)(),{editType:n,previewType:i,contentType:l}=mt(),d=(()=>{const{editType:e,previewType:t}=mt();let s="SEO";switch(t){case ze:s="social";break;case Ke:s="X"}switch(e){case je:return(0,r.sprintf)(/* translators: %s is the type of title. */
(0,r.__)("Generated %s titles","wordpress-seo"),s);case Ye:return t===De&&(s="meta"),(0,r.sprintf)(/* translators: %s is the type of description. */
(0,r.__)("Generated %s descriptions","wordpress-seo"),s)}})(),u=(()=>{const{editType:e,previewType:t}=mt();let s="SEO";switch(t){case ze:s="social";break;case Ke:s="X"}switch(e){case je:return(0,r.sprintf)(/* translators: %s is the type of title. */
(0,r.__)("Apply %s title","wordpress-seo"),s);case Ye:return t===De&&(s="meta"),(0,r.sprintf)(/* translators: %s is the type of description. */
(0,r.__)("Apply %s description","wordpress-seo"),s)}})(),p=ht(),{suggestions:m,fetchSuggestions:h,setSelectedSuggestion:g}=ho(),y=co(),{addAppliedSuggestion:w,addUsageCount:f}=(0,k.useDispatch)(We),{isUsageCountLimitReached:b,isWooProductEntity:E,hasValidPremiumSubscription:v,hasValidWooSubscription:x}=(0,k.useSelect)((e=>{const t=e(We),s=e(He);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]),_=(0,c.useMemo)((()=>m.status===Xe.loading||!(x||!b||!E)||!(v||!b)),[v,b,m.status,E,x]),S=(0,ce.usePrevious)(t),C=m.status===Xe.success?t:S,R=`calc(${0===C?"50%":C/2+"px"} - 40vh)`,[L,N]=(0,c.useState)(!1),I=(0,c.useCallback)((e=>{N(e.target.offsetHeight!==e.target.scrollHeight)}),[N]),M=gt(I),T=yo(),A=(()=>{const e=(()=>{const{previewType:e}=mt();return(0,c.useMemo)((()=>{switch(e){case De:return()=>(0,k.select)(He).getSnippetEditorData().description;case ze:return(0,k.select)(He).getFacebookDescriptionOrFallback;case Ke:return(0,k.select)(He).getTwitterDescriptionOrFallback;default:return(0,P.constant)("")}}),[e])})();return(0,c.useMemo)(e,[e])})(),O=dt(),F=(0,c.useMemo)((()=>n===je?{[Ze[l]]:m.selected}:{}),[n,l,m.selected]),B=(0,c.useMemo)((()=>O(T,{overrides:F,contentType:l})),[O,T,n,l,m.selected]),$=(0,c.useMemo)((()=>O(T,{overrides:{...F,sep:"",sitename:""},contentType:l})),[O,T,n,l,m.selected]),U=(0,c.useMemo)((()=>n===Ye?m.selected:O(A,{editType:Ye})),[O,A,n,m.selected]),q=(0,c.useCallback)((e=>O(T,{overrides:{[Ze[l]]:e},key:"badge",applyPluggable:!1,contentType:l})),[O,T,l]),{currentPage:W,setCurrentPage:H,isOnLastPage:D,totalPages:z,getItemsOnCurrentPage:K}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,c.useState)(1),o=(0,c.useMemo)((()=>Math.ceil(e/t)),[e,t]),a=(0,c.useMemo)((()=>s*t),[s,t]),n=(0,c.useMemo)((()=>a-t),[a,t]),i=(0,c.useMemo)((()=>1===s),[s]),l=(0,c.useMemo)((()=>s===o),[s,o]),d=(0,c.useCallback)((()=>{s>1&&r(s-1)}),[s,r]),u=(0,c.useCallback)((()=>{s<o&&r(s+1)}),[s,r,o]),p=(0,c.useCallback)((e=>(0,P.slice)(e,n,a)),[n,a]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:i,isOnLastPage:l,previousPage:d,nextPage:u,firstOnPage:n,lastOnPage:a,getItemsOnCurrentPage:p}})({totalItems:m.status===Xe.loading||m.status===Xe.error?m.entities.length+5:m.entities.length,perPage:5}),j=(0,c.useMemo)((()=>(0,P.map)(K(m.entities),(t=>{let s=t;return n===je&&(s=q(t),s=s.replace(Ws,((e,t,s,r,o,a,{start:n,wrap:i,end:l})=>{const c=i.trim();return 0===c.length?`${n}${i}${l}`:`${n}<span>${c}</span>${l}`})),s=Ee(s,{badge:(0,e.createElement)(ce.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain"}," "),span:(0,e.createElement)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:t,label:s}}))),[m.entities,K,n,q]),Y=(0,c.useMemo)((()=>m.status!==Xe.error||m.status===Xe.error&&!D),[m.status,D]),G=(0,c.useMemo)((()=>m.status===Xe.loading&&D),[m.status,D]),V=(0,c.useMemo)((()=>m.status===Xe.error&&D),[m.status,D]),Z=(0,c.useCallback)((()=>{_||(H(m.status===Xe.error?z:z+1),h().then((e=>{e===et&&f()})))}),[h,m.status,z,H,g,b]),Q=(0,c.useCallback)((()=>o("")),[o]),J=uo(),X=(0,c.useCallback)((()=>{const e=n===je?T.replace(new RegExp(Qe[l]+"( Archives)?"),m.selected):m.selected;J(e),w({editType:n,previewType:i,suggestion:m.selected}),a()}),[J,n,i,m.selected,T,a,w]);return((e,t=[])=>{const s=(0,c.useRef)(!1);(0,c.useEffect)((()=>{s.current||(s.current=!0,e().finally((()=>{s.current=!1})))}),[e,t])})((()=>""===s?h().then((e=>{o(e),e===et&&f()})):Promise.resolve()),[s,f,h]),s===tt||m.status===Xe.error&&402===m.error.code?(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-space-y-6 yst-mt-6"},(0,e.createElement)(Yr,{errorCode:m.error.code,errorIdentifier:m.error.errorIdentifier,invalidSubscriptions:m.error.missingLicenses,showActions:!0,onRetry:Q,errorMessage:m.error.message})):(0,e.createElement)(c.Fragment,null,(0,e.createElement)(ce.Modal.Container.Content,{ref:M,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2"},(0,e.createElement)(y,{title:B,description:U,status:m.status,titleForLength:$,showPreviewSkeleton:""===s,showLengthProgress:!G}),Y&&(G?(0,e.createElement)(Jr,{idSuffix:p,suggestionClassNames:n===je?[["yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-8/12"]]:void 0}):(0,e.createElement)(c.Fragment,null,(0,e.createElement)("div",{className:"yst-flex yst-space-y-4"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto"},d),(0,e.createElement)(ce.Button,{variant:"secondary",size:"small",onClick:m.status===Xe.loading?P.noop:Z,isLoading:m.status===Xe.loading,disabled:_},m.status!==Xe.loading&&(0,e.createElement)(Us,{className:"yst--ms-1 yst-me-2 yst-h-4 yst-w-4 yst-text-gray-400"}),(0,r.__)("Generate 5 more","wordpress-seo"))),(0,e.createElement)(Zr,{idSuffix:p,suggestions:j,selected:m.selected,onChange:g}),(0,e.createElement)(Hs,{current:W,total:z,onNavigate:H,disabled:m.status===Xe.loading||V}))),m.status===Xe.error&&D&&(0,e.createElement)(c.Fragment,null,(0,e.createElement)("div",{className:"yst-mt-8"}),(0,e.createElement)(Yr,{errorCode:m.error.code,errorIdentifier:m.error.errorIdentifier,invalidSubscriptions:m.error.missingLicenses,errorMessage:m.error.message}),(0,e.createElement)(Hs,{current:W,total:z,onNavigate:H,disabled:m.status===Xe.loading}))),(0,e.createElement)(ce.Modal.Container.Footer,null,L&&(0,e.createElement)("div",{className:"yst-absolute yst-inset-x-0 yst--mt-10 yst-me-[calc(2.5rem-1px)] yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-slate-50"}),(0,e.createElement)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,e.createElement)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse"},(0,e.createElement)("div",{className:"yst-hidden sm:yst-inline"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:a},(0,r.__)("Close","wordpress-seo"))),(0,e.createElement)("div",{className:"yst-block sm:yst-inline"},(0,e.createElement)(ce.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:X,disabled:""===m.selected||m.status===Xe.loading||V},(0,e.createElement)(qs,{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),u)),(0,e.createElement)("div",{className:"yst-mt-3 sm:yst-hidden"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:a,className:"yst-w-full sm:yst-w-auto"},(0,r.__)("Close","wordpress-seo"))))),(0,e.createElement)(ce.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{marginTop:R},position:"bottom-left"},m.status!==Xe.loading&&(0,e.createElement)(lo,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(m.status===Xe.success||m.status===Xe.loading)&&(0,e.createElement)(eo,null)))};Ds.propTypes={height:l().number.isRequired};l().func.isRequired;const zs=({title:t,description:s,status:o,titleForLength:a,showPreviewSkeleton:n,showLengthProgress:i})=>{const l=(0,k.useSelect)((e=>e(He).getSnippetEditorMode()),[]),[d,u]=(0,c.useState)(l),{editType:p}=mt(),m=ht(),h=go({editType:p,title:a,description:s});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"yst-mb-2 lg:yst-flex"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("Google preview","wordpress-seo")),(0,e.createElement)(Zs,{mode:d,idSuffix:m,onChange:u,disabled:o===Xe.loading})),n?(0,e.createElement)(Gs,null):(0,e.createElement)(Ys,{mode:d,title:t,description:s}),(0,e.createElement)("div",{className:"yst-pt-4"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},p===je?(0,r.__)("SEO title width","wordpress-seo"):(0,r.__)("Meta description length","wordpress-seo")),(0,e.createElement)(Vs,{className:"yst-mt-2",progress:i?h.actual:0,min:0,max:h.max,score:h.score})))};zs.propTypes={title:l().string.isRequired,description:l().string.isRequired,status:l().oneOf(Object.keys(Xe)).isRequired,titleForLength:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired,showLengthProgress:l().bool.isRequired};const Ks=window.yoast.searchMetadataPreviews,js=/mobi/i,Ys=({mode:t,title:s,description:r})=>{var o,a;const n=(0,k.useSelect)((e=>e(He).getBaseUrlFromSettings()),[]),i=(0,k.useSelect)((e=>e(He).getSnippetEditorData().slug||""),[]),l=(0,k.useSelect)((e=>e(He).getDateFromSettings()),[]),d=(0,k.useSelect)((e=>e(He).getFocusKeyphrase()),[]),u=(0,k.useSelect)((e=>e(He).getSnippetEditorPreviewImageUrl()),[]),p=(0,k.useSelect)((e=>e(He).getSiteIconUrlFromSettings()),[]),m=(0,k.useSelect)((e=>e(He).getShoppingData()),[]),h=(0,k.useSelect)((e=>e(He).getSnippetEditorWordsToHighlight()),[]),g=(0,k.useSelect)((e=>e(He).getSiteName()),[]),y=(0,k.useSelect)((e=>e(He).getContentLocale()),[]),w=(0,c.useMemo)((()=>n+i),[n,i]),f=(0,c.useMemo)((()=>{var e,t;return js.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)}),[null===(o=window)||void 0===o||null===(a=o.navigator)||void 0===a?void 0:a.userAgent]);return(0,e.createElement)("div",{className:`yst-bg-slate-200 yst--mx-6 ${t}${f?" yst-user-agent__mobile":""}`},(0,e.createElement)(Ks.SnippetPreview,{title:s,description:r,mode:t,url:w,keyword:d,date:l,faviconSrc:p,mobileImageSrc:u,wordsToHighlight:h,siteName:g,locale:y,shoppingData:m,onMouseUp:P.noop}))};Ys.propTypes={mode:l().oneOf(Object.keys(Je)).isRequired,title:l().string.isRequired,description:l().string.isRequired};const Gs=()=>(0,e.createElement)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto"},(0,e.createElement)("div",{className:"yst-flex yst-gap-x-3"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"}))),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})),Vs=({className:t="",progress:s,max:r,score:o})=>{const a=(0,c.useMemo)((()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(o)),[o]);return(0,e.createElement)(ce.ProgressBar,{className:hs()("yst-length-progress-bar",a,t),progress:s,min:0,max:r})};Vs.propTypes={className:l().string,progress:l().number.isRequired,max:l().number.isRequired,score:l().number.isRequired};const Zs=({idSuffix:t,mode:s,onChange:o,disabled:a})=>{const n=(0,c.useCallback)((({target:e})=>e.checked&&o(e.value)),[o]);return(0,e.createElement)(ce.RadioGroup,{id:`yst-ai-mode__${t}`,className:"yst-ai-mode yst-pt-2 lg:yst-pt-0",disabled:a},(0,e.createElement)(ce.RadioGroup.Radio,{id:`yst-ai-mode__mobile__${t}`,name:`yst-ai-mode__${t}`,label:(0,r.__)("Mobile result","wordpress-seo"),value:Je.mobile,checked:s===Je.mobile,onChange:n,disabled:a}),(0,e.createElement)(ce.RadioGroup.Radio,{id:`yst-ai-mode__desktop__${t}`,name:`yst-ai-mode__${t}`,label:(0,r.__)("Desktop result","wordpress-seo"),value:Je.desktop,checked:s===Je.desktop,onChange:n,disabled:a}))};Zs.propTypes={idSuffix:l().string.isRequired,mode:l().oneOf(Object.keys(Je)).isRequired,onChange:l().func.isRequired,disabled:l().bool.isRequired};const Qs=({title:t,description:s,showPreviewSkeleton:o})=>(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"yst-flex yst-mb-6"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("Social preview","wordpress-seo"))),o?(0,e.createElement)(Kr,null):(0,e.createElement)(zr,{title:t,description:s}));Qs.propTypes={title:l().string.isRequired,description:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired};const Js=u().p`
	color: #606770;
	flex-shrink: 0;
	font-size: 12px;
	line-height: 16px;
	overflow: hidden;
	padding: 0;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	margin: 0;
	position: ${e=>"landscape"===e.mode?"relative":"static"};
`,Xs=t=>{const{siteUrl:s}=t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{className:"screen-reader-text"},s),(0,e.createElement)(Js,{"aria-hidden":"true"},(0,e.createElement)("span",null,s)))};Xs.propTypes={siteUrl:l().string.isRequired};const er=Xs,tr=window.yoast.socialMetadataForms,sr=u().img`
	&& {
		max-width: ${e=>e.width}px;
		height: ${e=>e.height}px;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		max-width: none;
	}
`,rr=u().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,or=u().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,ar=({imageProps:t,width:s,height:r,imageMode:o="landscape"})=>"landscape"===o?(0,e.createElement)(or,{aspectRatio:t.aspectRatio},(0,e.createElement)(rr,{src:t.src,alt:t.alt})):(0,e.createElement)(sr,{src:t.src,alt:t.alt,width:s,height:r,imageProperties:t});function nr(e,t,s){return"landscape"===s?{widthRatio:t.width/e.landscapeWidth,heightRatio:t.height/e.landscapeHeight}:"portrait"===s?{widthRatio:t.width/e.portraitWidth,heightRatio:t.height/e.portraitHeight}:{widthRatio:t.width/e.squareWidth,heightRatio:t.height/e.squareHeight}}function ir(e,t){return t.widthRatio<=t.heightRatio?{width:Math.round(e.width/t.widthRatio),height:Math.round(e.height/t.widthRatio)}:{width:Math.round(e.width/t.heightRatio),height:Math.round(e.height/t.heightRatio)}}async function lr(e,t,s=!1){const r=await function(e){return new Promise(((t,s)=>{const r=new Image;r.onload=()=>{t({width:r.width,height:r.height})},r.onerror=s,r.src=e}))}(e);let o=s?"landscape":"square";"Facebook"===t&&(o=(0,tr.determineFacebookImageMode)(r));const a=function(e){return"Twitter"===e?tr.TWITTER_IMAGE_SIZES:tr.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:ir(t,nr(e,t,s))}(a,r,o);return{mode:o,height:n.height,width:n.width}}async function cr(e,t,s=!1){try{return{imageProperties:await lr(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}ar.propTypes={imageProps:l().shape({src:l().string.isRequired,alt:l().string.isRequired,aspectRatio:l().number.isRequired}).isRequired,width:l().number.isRequired,height:l().number.isRequired,imageMode:l().string};const dr=u().div`
	position: relative;
	${e=>"landscape"===e.mode?`max-width: ${e.dimensions.width}`:`min-width: ${e.dimensions.width}; height: ${e.dimensions.height}`};
	overflow: hidden;
	background-color: ${M.colors.$color_white};
`,ur=u().div`
	box-sizing: border-box;
	max-width: ${tr.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${tr.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${M.colors.$color_grey};
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	display: flex;
	justify-content: center;
	align-items: center;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class pr extends e.Component{constructor(e){super(e),this.state={imageProperties:null,status:"loading"},this.socialMedium="Facebook",this.handleFacebookImage=this.handleFacebookImage.bind(this),this.setState=this.setState.bind(this)}async handleFacebookImage(){try{const e=await cr(this.props.src,this.socialMedium);this.setState(e),this.props.onImageLoaded(e.imageProperties.mode||"landscape")}catch(e){this.setState(e),this.props.onImageLoaded("landscape")}}componentDidUpdate(e){e.src!==this.props.src&&this.handleFacebookImage()}componentDidMount(){this.handleFacebookImage()}retrieveContainerDimensions(e){switch(e){case"square":return{height:tr.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:tr.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:tr.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:tr.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:tr.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:tr.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:t,status:s}=this.state;if("loading"===s||""===this.props.src||"errored"===s)return(0,e.createElement)(ur,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,r.__)("Select image","wordpress-seo"));const o=this.retrieveContainerDimensions(t.mode);return(0,e.createElement)(dr,{mode:t.mode,dimensions:o,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick},(0,e.createElement)(ar,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:tr.FACEBOOK_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode}))}}pr.propTypes={src:l().string,alt:l().string,onImageLoaded:l().func,onImageClick:l().func,onMouseEnter:l().func,onMouseLeave:l().func},pr.defaultProps={src:"",alt:"",onImageLoaded:P.noop,onImageClick:P.noop,onMouseEnter:P.noop,onMouseLeave:P.noop};const mr=pr,hr=u().span`
	line-height: ${20}px;
	min-height : ${20}px;
	color: #1d2129;
	font-weight: 600;
	overflow: hidden;
	font-size: 16px;
	margin: 3px 0 0;
	letter-spacing: normal;
	white-space: normal;
	flex-shrink: 0;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;
`,gr=u().p`
	line-height: ${16}px;
	min-height : ${16}px;
	color: #606770;
	font-size: 14px;
	padding: 0;
	text-overflow: ellipsis;
	margin: 3px 0 0 0;
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;

	@media all and ( max-width: ${e=>e.maxWidth} ) {
		display: none;
	}
`,yr=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},wr=u().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,fr=u().div`
	box-sizing: border-box;
	background-color: #f2f3f5;
	margin: 0;
	padding: 10px 12px;
	position: relative;
	border-bottom: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-top: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border-right: ${e=>"landscape"===e.mode?"":"1px solid #dddfe2"};
	border: ${e=>"landscape"===e.mode?"1px solid #dddfe2":""};
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: ${e=>"landscape"===e.mode?"flex-start":"center"};
	font-size: 12px;
	overflow: hidden;
`;class br extends e.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=t().createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:t}=this.state,s="landscape"===e?2:5;s!==t&&this.setState({maxLineCount:s})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:t,imageMode:s}=this.state,r=this.getTitleLineCount();let o=t-r;"portrait"===s&&(o=5===r?0:4),o!==e&&this.setState({descriptionLineCount:o})}componentDidUpdate(){this.maybeSetMaxLineCount(),this.maybeSetDescriptionLineCount()}render(){const{imageMode:t,maxLineCount:s,descriptionLineCount:r}=this.state;return(0,e.createElement)(wr,{id:"facebookPreview",mode:t},(0,e.createElement)(mr,{src:this.props.imageUrl||this.props.imageFallbackUrl,alt:this.props.alt,onImageLoaded:this.onImageLoaded,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,e.createElement)(fr,{mode:t},(0,e.createElement)(er,{siteUrl:this.props.siteUrl,mode:t}),(0,e.createElement)(hr,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:s},this.props.title),r>0&&(0,e.createElement)(gr,{maxWidth:yr(t),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:r},this.props.description)))}}br.propTypes={siteUrl:l().string.isRequired,title:l().string.isRequired,description:l().string,imageUrl:l().string,imageFallbackUrl:l().string,alt:l().string,onSelect:l().func,onImageClick:l().func,onMouseHover:l().func},br.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const Er=br,vr=u().div`
	text-transform: lowercase;
	color: rgb(83, 100, 113);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	fill: currentcolor;
	display: flex;
	flex-direction: row;
	align-items: flex-end;
`,kr=t=>(0,e.createElement)(vr,null,(0,e.createElement)("span",null,t.siteUrl));kr.propTypes={siteUrl:l().string.isRequired};const xr=kr,_r=(e,t=!0)=>e?`\n\t\t\tmax-width: ${tr.TWITTER_IMAGE_SIZES.landscapeWidth}px;\n\t\t\t${t?"border-bottom: 1px solid #E1E8ED;":""}\n\t\t\tborder-radius: 14px 14px 0 0;\n\t\t\t`:`\n\t\twidth: ${tr.TWITTER_IMAGE_SIZES.squareWidth}px;\n\t\t${t?"border-right: 1px solid #E1E8ED;":""}\n\t\tborder-radius: 14px 0 0 14px;\n\t\t`,Sr=u().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>_r(e.isLarge)}
`,Cr=u().div`
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0;
	padding: 1em;
	text-align: center;
	font-size: 1rem;
	${e=>_r(e.isLarge,!1)}
`,Rr=u()(Cr)`
	${e=>e.isLarge&&`height: ${tr.TWITTER_IMAGE_SIZES.landscapeHeight}px;`}
	border-top-left-radius: 14px;
	${e=>e.isLarge?"border-top-right-radius":"border-bottom-left-radius"}: 14px;
	border-style: dashed;
	border-width: 1px;
	// We're not using standard colors to increase contrast for accessibility.
	color: #006DAC;
	// We're not using standard colors to increase contrast for accessibility.
	background-color: #f1f1f1;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
`;class Lr extends t().Component{constructor(e){super(e),this.state={status:"loading"},this.socialMedium="Twitter",this.handleTwitterImage=this.handleTwitterImage.bind(this),this.setState=this.setState.bind(this)}async handleTwitterImage(){if(null===this.props.src)return;const e=await cr(this.props.src,this.socialMedium,this.props.isLarge);this.setState(e)}componentDidUpdate(e){e.src!==this.props.src&&this.handleTwitterImage()}componentDidMount(){this.handleTwitterImage()}render(){const{status:t,imageProperties:s}=this.state;return"loading"===t||""===this.props.src||"errored"===t?(0,e.createElement)(Rr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,r.__)("Select image","wordpress-seo")):(0,e.createElement)(Sr,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},(0,e.createElement)(ar,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:tr.TWITTER_IMAGE_SIZES.aspectRatio},width:s.width,height:s.height,imageMode:s.mode}))}}Lr.propTypes={isLarge:l().bool.isRequired,src:l().string,alt:l().string,onImageClick:l().func,onMouseEnter:l().func,onMouseLeave:l().func},Lr.defaultProps={src:"",alt:"",onMouseEnter:P.noop,onImageClick:P.noop,onMouseLeave:P.noop};const Nr=u().div`
	display: flex;
	flex-direction: column;
	padding: 12px;
	justify-content: center;
	margin: 0;
	box-sizing: border-box;
	flex: auto;
	min-width: 0px;
	gap:2px;
	> * {
		line-height:20px;
		min-height:20px;
		font-size:15px;
    }
`,Ir=t=>(0,e.createElement)(Nr,null,t.children);Ir.propTypes={children:l().array.isRequired};const Mr=Ir,Tr=u().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`,Pr=u().p`
	max-height: 55px;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(83, 100, 113);
	display: -webkit-box;
	cursor: pointer;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;

	@media all and ( max-width: ${tr.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`,Ar=u().div`
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	max-width: 507px;
	border: 1px solid #E1E8ED;
	box-sizing: border-box;
	border-radius: 14px;
	color: #292F33;
	background: #FFFFFF;
	text-overflow: ellipsis;
	display: flex;

	&:hover {
		background: #f5f8fa;
		border: 1px solid rgba(136,153,166,.5);
	}
`,Or=u()(Ar)`
	flex-direction: column;
	max-height: 370px;
`,Fr=u()(Ar)`
	flex-direction: row;
	height: 125px;
`;class Br extends e.Component{constructor(e){super(e),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}render(){const{isLarge:t,imageUrl:s,imageFallbackUrl:r,alt:o,title:a,description:n,siteUrl:i}=this.props,l=t?Or:Fr;return(0,e.createElement)(l,{id:"twitterPreview"},(0,e.createElement)(Lr,{src:s||r,alt:o,isLarge:t,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,e.createElement)(Mr,null,(0,e.createElement)(xr,{siteUrl:i}),(0,e.createElement)(Tr,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle},a),(0,e.createElement)(Pr,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription},n)))}}Br.propTypes={siteUrl:l().string.isRequired,title:l().string.isRequired,description:l().string,isLarge:l().bool,imageUrl:l().string,imageFallbackUrl:l().string,alt:l().string,onSelect:l().func,onImageClick:l().func,onMouseHover:l().func},Br.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const $r=Br,Ur=window.yoast.replacementVariableEditor;class qr extends e.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?Er:$r,this.setHoveredField=this.setHoveredField.bind(this),this.setActiveField=this.setActiveField.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.setEditorFocus=this.setEditorFocus.bind(this)}setHoveredField(e){e!==this.state.hoveredField&&this.setState({hoveredField:e})}setActiveField(e){e!==this.state.activeField&&this.setState({activeField:e},(()=>this.setEditorFocus(e)))}setEditorFocus(e){switch(e){case"title":this.titleEditorRef.focus();break;case"description":this.descriptionEditorRef.focus()}}setEditorRef(e,t){switch(e){case"title":this.titleEditorRef=t;break;case"description":this.descriptionEditorRef=t}}render(){const{onDescriptionChange:s,onTitleChange:r,onSelectImageClick:o,onRemoveImageClick:n,socialMediumName:i,imageWarnings:l,siteUrl:c,description:d,descriptionInputPlaceholder:u,descriptionPreviewFallback:p,imageUrl:m,imageFallbackUrl:h,alt:g,title:y,titleInputPlaceholder:w,titlePreviewFallback:f,replacementVariables:b,recommendedReplacementVariables:E,applyReplacementVariables:v,onReplacementVariableSearchChange:k,isPremium:x,isLarge:_,socialPreviewLabel:S,idSuffix:C,activeMetaTabId:R}=this.props,L=v({title:y||f,description:d||p});return(0,e.createElement)(t().Fragment,null,S&&(0,e.createElement)(a.SimulatedLabel,null,S),(0,e.createElement)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:o,siteUrl:c,title:L.title,description:L.description,imageUrl:m,imageFallbackUrl:h,alt:g,isLarge:_,activeMetaTabId:R}),(0,e.createElement)(tr.SocialMetadataPreviewForm,{onDescriptionChange:s,socialMediumName:i,title:y,titleInputPlaceholder:w,onRemoveImageClick:n,imageSelected:!!m,imageUrl:m,imageFallbackUrl:h,onTitleChange:r,onSelectImageClick:o,description:d,descriptionInputPlaceholder:u,imageWarnings:l,replacementVariables:b,recommendedReplacementVariables:E,onReplacementVariableSearchChange:k,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:C}))}}qr.propTypes={title:l().string.isRequired,onTitleChange:l().func.isRequired,description:l().string.isRequired,onDescriptionChange:l().func.isRequired,imageUrl:l().string.isRequired,imageFallbackUrl:l().string.isRequired,onSelectImageClick:l().func.isRequired,onRemoveImageClick:l().func.isRequired,socialMediumName:l().string.isRequired,alt:l().string,isPremium:l().bool,imageWarnings:l().array,isLarge:l().bool,siteUrl:l().string,descriptionInputPlaceholder:l().string,titleInputPlaceholder:l().string,descriptionPreviewFallback:l().string,titlePreviewFallback:l().string,replacementVariables:Ur.replacementVariablesShape,recommendedReplacementVariables:Ur.recommendedReplacementVariablesShape,applyReplacementVariables:l().func,onReplacementVariableSearchChange:l().func,socialPreviewLabel:l().string,idSuffix:l().string,activeMetaTabId:l().string},qr.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const Wr={},Hr=(e,t,{log:s=console.warn}={})=>{Wr[e]||(Wr[e]=!0,s(t))},Dr=(e,t=P.noop)=>{const s={};for(const r in e)Object.hasOwn(e,r)&&Object.defineProperty(s,r,{set:s=>{e[r]=s,t("set",r,s)},get:()=>(t("get",r),e[r])});return s};Dr({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},((e,t)=>Hr(`@yoast/social-metadata-previews/TWITTER_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "TWITTER_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`))),Dr({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},((e,t)=>Hr(`@yoast/social-metadata-previews/FACEBOOK_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "FACEBOOK_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`)));const zr=({title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(He).getSiteUrl()),[]),o=(0,k.useSelect)((e=>e(He).getFacebookImageUrl()),[]),a=(0,k.useSelect)((e=>e(He).getEditorDataImageFallback()),[]),n=(0,k.useSelect)((e=>e(He).getFacebookAltText()),[]);return(0,e.createElement)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6 yst-mx-auto"},(0,e.createElement)(Er,{title:t,description:s,siteUrl:r,imageUrl:o,imageFallbackUrl:a,alt:n,onSelect:P.noop,onImageClick:P.noop,onMouseHover:P.noop}))};zr.propTypes={title:l().string.isRequired,description:l().string.isRequired};const Kr=()=>(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,e.createElement)("div",{className:"yst-w-full yst-p-4 yst-space-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}))),jr=({children:t,onRetry:s})=>{const{onClose:o}=(0,ce.useModalContext)();return(0,e.createElement)(c.Fragment,null,t,(0,e.createElement)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end"},(0,e.createElement)(ce.Button,{variant:"secondary",onClick:o},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{variant:"primary",onClick:s},(0,r.__)("Try again","wordpress-seo"))))};jr.propTypes={children:l().node.isRequired,onRetry:l().func.isRequired};const Yr=({errorCode:t,errorIdentifier:s,invalidSubscriptions:r=[],showActions:o=!1,onRetry:a=P.noop,errorMessage:n=""})=>{switch(t){case 400:switch(s){case"AI_CONTENT_FILTER":return(0,e.createElement)(Ts,null);case"NOT_ENOUGH_CONTENT":return(0,e.createElement)(Rs,null);case"SITE_UNREACHABLE":return(0,e.createElement)(Os,null);case"WP_HTTP_REQUEST_ERROR":return o?(0,e.createElement)(jr,{onRetry:a},(0,e.createElement)(Ps,{errorMessage:n})):(0,e.createElement)(Ps,{errorMessage:n});default:return o?(0,e.createElement)(jr,{onRetry:a},(0,e.createElement)(Cs,null)):(0,e.createElement)(Cs,null)}case 402:return(0,e.createElement)(Is,{invalidSubscriptions:r});case 408:return o?(0,e.createElement)(jr,{onRetry:a},(0,e.createElement)(Ms,null)):(0,e.createElement)(Ms,null);case 429:return"USAGE_LIMIT_REACHED"===s?(0,e.createElement)(Is,{invalidSubscriptions:r}):(0,e.createElement)(Ns,null);case 410:return(0,e.createElement)(As,null);default:return o?(0,e.createElement)(jr,{onRetry:a},(0,e.createElement)(Cs,null)):(0,e.createElement)(Cs,null)}};Yr.propTypes={errorCode:l().number.isRequired,errorIdentifier:l().string.isRequired,invalidSubscriptions:l().array,showActions:l().bool,onRetry:l().func,errorMessage:l().string};const Gr=l().shape({value:l().string.isRequired,label:l().node.isRequired}),Vr=({id:t,name:s,suggestion:r,isChecked:o,onChange:a})=>{const n=(0,c.useCallback)((()=>a(r.value)),[r,a]);return(0,e.createElement)("label",{htmlFor:t,className:hs()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",o&&"yst-z-10 yst-border-primary-500")},(0,e.createElement)("input",{type:"radio",id:t,name:s,className:"yst-radio__input",value:r.value,checked:o,onChange:n}),(0,e.createElement)("div",{className:hs()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!o&&"yst-text-slate-600")},r.label))};Vr.propTypes={id:l().string.isRequired,name:l().string.isRequired,suggestion:Gr.isRequired,isChecked:l().bool.isRequired,onChange:l().func.isRequired};const Zr=({idSuffix:t,suggestions:s,selected:r,onChange:o})=>(0,e.createElement)("div",null,(0,e.createElement)(ce.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${t}`},s.map(((s,a)=>(0,e.createElement)(Vr,{key:`yst-ai-suggestions-radio-${t}__${a}`,id:`yst-ai-suggestions-radio-${t}__${a}`,name:`ai-suggestion__${t}`,isChecked:s.value===r,onChange:o,suggestion:s})))));Zr.propTypes={idSuffix:l().string.isRequired,suggestions:l().arrayOf(Gr).isRequired,selected:l().string.isRequired,onChange:l().func.isRequired};const Qr=[["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-9/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-7/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-10/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-11/12"],["yst-h-3 yst-w-full","yst-mt-2.5 yst-h-3 yst-w-8/12"]],Jr=({suggestionClassNames:t=Qr})=>(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]"},t.map(((t,s)=>(0,e.createElement)("div",{key:`yst-ai-suggestion-radio-skeleton__${s}`,className:"yst-flex yst-p-4 yst-gap-x-3 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md"},(0,e.createElement)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-w-full"},t.map(((t,r)=>(0,e.createElement)(ce.SkeletonLoader,{key:`yst-ai-suggestion-radio-skeleton-${s}__${r}`,className:t}))))))));Jr.propTypes={suggestionClassNames:l().arrayOf(l().arrayOf(l().string))};const Xr="ai_generator_tip_notification",eo=()=>{const t=(0,k.useSelect)((e=>e(He).isAlertDismissed(Xr)),[]),s=(0,k.useSelect)((e=>e(He).getEditorDataContent()),[]),o=(0,k.useSelect)((e=>e(He).getIsWooProductEntity()),[]),[a,,,n]=(0,ce.useToggleState)(!1),{editType:i,contentType:l}=mt(),{dismissAlert:d}=(0,k.useDispatch)(He),u=(0,c.useCallback)((()=>{d(Xr)}),[d]),p=(0,c.useMemo)((()=>i===Ye?(0,r.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,r.__)("%1$sTip%2$s: Improve the accuracy of your generated AI titles by writing more content in your page.","wordpress-seo")
/* translators: %1$s and %2$s expand to opening and closing of a span in order to emphasise the word. */),[i]),m=(0,c.useMemo)((()=>((e,t)=>e||t===Ve?150:300)(o,l)),[l,o]);return t||a||s.length>m?null:(0,e.createElement)(ce.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,r.__)("Dismiss","wordpress-seo")},Ee((0,r.sprintf)(p,"<span>","</span>"),{span:(0,e.createElement)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,e.createElement)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1"},(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",onClick:u},(0,r.__)("Don’t show again","wordpress-seo")),(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:n},(0,r.__)("Dismiss","wordpress-seo"))))},to=({title:t,description:s,showPreviewSkeleton:o})=>(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"yst-flex yst-mb-6"},(0,e.createElement)(ce.Label,{as:"span",className:"yst-flex-grow yst-cursor-default"},(0,r.__)("X preview","wordpress-seo"))),o?(0,e.createElement)(ro,null):(0,e.createElement)(so,{title:t,description:s}));to.propTypes={title:l().string.isRequired,description:l().string.isRequired,showPreviewSkeleton:l().bool.isRequired};const so=({title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(He).getSiteUrl()),[]),o=(0,k.useSelect)((e=>e(He).getTwitterImageUrl()),[]),a=(0,k.useSelect)((e=>e(He).getFacebookImageUrl()),[]),n=(0,k.useSelect)((e=>e(He).getEditorDataImageFallback()),[]),i=(0,k.useSelect)((e=>e(He).getTwitterImageType()),[]),l=(0,k.useSelect)((e=>e(He).getTwitterAltText()),[]);return(0,e.createElement)("div",{className:"yst-bg-slate-200 yst-p-2 yst--mx-6"},(0,e.createElement)($r,{title:t,description:s,siteUrl:r,imageUrl:o,imageFallbackUrl:a||n,isLarge:"summary"!==i,alt:l,onSelect:P.noop,onImageClick:P.noop,onMouseHover:P.noop}))};so.propTypes={title:l().string.isRequired,description:l().string.isRequired};const ro=()=>(0,e.createElement)("div",{className:"yst-flex yst-flex-col yst-max-h-[370px] yst-w-[507px] yst-border yst-rounded-t-[14px] yst-overflow-hidden yst-mx-auto"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,e.createElement)("div",{className:"yst-w-full yst-p-4 yst-space-y-1"},(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,e.createElement)(ce.SkeletonLoader,{className:"yst-h-3 yst-w-full"}))),oo="yst-mt-1 yst-mb-3",ao="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",no=({onClose:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:oo},(0,r.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")),(0,e.createElement)("div",{className:ao},(0,e.createElement)(ce.Button,{type:"button",variant:"primary",size:"small",onClick:t},(0,r.__)("Got it!","wordpress-seo")))),io=({onClose:t,upsellLink:s,isWooProductEntity:o=!1,ctbId:a="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const n=(0,ce.useSvgAria)();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",{className:oo},(0,r.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,r.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),o?"Yoast WooCommerce SEO":"Yoast SEO Premium")),(0,e.createElement)("div",{className:ao},(0,e.createElement)(ce.Button,{type:"button",variant:"tertiary",size:"small",onClick:t},(0,r.__)("Close","wordpress-seo")),(0,e.createElement)(ce.Button,{as:"a",size:"small",variant:"upsell",href:s,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":a},(0,e.createElement)(Lt,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...n}),(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),o?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,e.createElement)("span",{className:"yst-sr-only"},/* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")))))},lo=({className:t=""})=>{const{isUsageCountLimitReached:s,usageCount:o,usageCountLimit:a,premiumUpsellLink:n,wooUpsellLink:i,isWooProductEntity:l,hasValidPremiumSubscription:d,hasValidWooSubscription:u}=(0,k.useSelect)((e=>{const t=e(We),s=e(He);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),usageCount:t.selectUsageCount(),usageCountLimit:t.selectUsageCountLimit(),premiumUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks"),wooUpsellLink:s.selectLink("https://yoa.st/ai-toast-out-of-free-sparks-woo"),isWooProductEntity:s.getIsWooProductEntity(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}}),[]),p=(0,c.useMemo)((()=>d&&!l||l&&u&&d),[d,l,u]),[m,,h,,g]=(0,ce.useToggleState)(o===a);(0,c.useEffect)((()=>{h(p&&o===a||!p&&s)}),[o,a,p,s]);const y=(0,c.useMemo)((()=>l?i:n),[l,i,n]),w=(0,c.useMemo)((()=>l&&!u),[l,u]);return m&&(0,e.createElement)(ce.Notifications.Notification,{id:"ai-sparks-limit",className:t,variant:"info",dismissScreenReaderLabel:(0,r.__)("Close","wordpress-seo"),title:p?(0,r.sprintf)(/* translators: %s is the number of the sparks. */
(0,r._n)("You've used %s spark this month.","You've used %s sparks this month.",a,"wordpress-seo"),a):(0,r.__)("You're out of free sparks!","wordpress-seo"),size:p?"default":"large"},p?(0,e.createElement)(no,{onClose:g}):(0,e.createElement)(io,{onClose:g,upsellLink:y,isWooUpsell:w}))},co=()=>{const{previewType:e}=mt();switch(e){case ze:return Qs;case Ke:return to;default:return zs}},uo=()=>{const{editType:e}=mt();switch(e){case je:return(()=>{const{previewType:e}=mt(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,k.useDispatch)(He);return(0,c.useMemo)((()=>{switch(e){case De:return e=>t({title:e});case ze:return s;case Ke:return r;default:return P.noop}}),[e,t,s,r])})();case Ye:return(()=>{const{previewType:e}=mt(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,k.useDispatch)(He);return(0,c.useMemo)((()=>{switch(e){case De:return e=>t({description:e});case ze:return s;case Ke:return r;default:return P.noop}}),[e,t,s,r])})();default:return P.noop}},po=(0,vt.createSlice)({name:"suggestions",initialState:{status:Xe.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=Xe.loading},setSuccess:(e,{payload:t})=>{e.status=Xe.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=Xe.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),mo=e=>{switch(e){case ze:return"Facebook";case Ke:return"Twitter";default:return"Google"}},ho=()=>{const[e,t]=(0,c.useReducer)(po.reducer,po.getInitialState()),{editType:s,previewType:r,postType:o,contentType:a}=mt(),n=(0,k.useSelect)((e=>e(We).selectPromptContent()),[]),{contentLocale:i,focusKeyphrase:l,isWooCommerceActive:d,isGutenberg:u,isElementor:p}=(0,k.useSelect)((e=>({contentLocale:e(He).getContentLocale(),focusKeyphrase:e(He).getFocusKeyphrase(),isWooCommerceActive:e(He).getIsWooCommerceActive(),isGutenberg:e(He).getIsBlockEditor(),isElementor:e(He).getIsElementorEditor()})),[]);let m,h=ee.languageProcessing.helpers.processExactMatchRequest(l).keyphrase;h.length>191&&(h=h.slice(0,191)),m=p?"elementor":u?"gutenberg":"classic";const g=((e,t,s,r)=>{const o=e===Ye?"meta-description":"seo-title";let a=((e,t)=>{if(e)switch(t){case"product":return"product-";case"product_cat":case"product_tag":return"product-taxonomy-"}return""})(t,s);return a&&t||r!==Ve||(a="taxonomy-"),`${a}${o}`})(s,d,o,a);return{suggestions:e,fetchSuggestions:(0,c.useCallback)((async(e=!0)=>{t(po.actions.setLoading());const{status:s,payload:o}=await(async({endpoint:e,data:t})=>{let s;const r=1e3*(0,P.get)(window,"wpseoAiGenerator.requestTimeout",30);try{ot&&ot.abort(),ot=new AbortController,at=!1,s=setTimeout((()=>{at=!0,ot.abort()}),r);const o=await C()({path:e,method:"POST",data:t,parse:!1,signal:ot.signal}),a=await o.json();return{status:et,payload:a}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return at?{status:tt,payload:{message:"timeout",code:408}}:{status:st};const{message:t,missingLicenses:s,errorIdentifier:r}=await(async e=>{try{const t=e.body.getReader(),{value:s}=await t.read(),r=new TextDecoder("utf-8").decode(s);return console.error(r),JSON.parse(r)}catch(e){return{message:"Unknown"}}})(e);return{status:tt,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}})({endpoint:"yoast/v1/ai_generator/get_suggestions/",canAbort:e,data:{type:g,prompt_content:n,focus_keyphrase:h,platform:mo(r),language:it(i).replace("_","-"),editor:m}});switch(s){case st:break;case tt:t(po.actions.setError(o));break;case et:t(po.actions.setSuccess(o))}return s}),[t]),setSelectedSuggestion:(0,c.useCallback)((e=>t(po.actions.setSelected(e))),[t])}},go=({editType:e,title:t,description:s})=>{const r=(0,k.useSelect)((e=>e(He).getDateFromSettings()),[]),o=(0,k.useSelect)((e=>e(He).getContentLocale()),[]),a=(0,k.useSelect)((e=>e(He).isCornerstoneContent()),[]),n=(0,k.useSelect)((e=>e(He).getIsTerm()),[]);return(0,c.useMemo)((()=>e===Ye?(0,Ks.getDescriptionProgress)(s,r,a,n,o):(0,Ks.getTitleProgress)(t)),[e,t,s,r,a,n,o])},yo=()=>{const{editType:e,previewType:t,contentType:s}=mt(),r=(()=>{const{previewType:e}=mt();return(0,c.useMemo)((()=>{switch(e){case De:return()=>(0,k.select)(He).getSnippetEditorData().title;case ze:return(0,k.select)(He).getFacebookTitleOrFallback;case Ke:return(0,k.select)(He).getTwitterTitleOrFallback;default:return(0,P.constant)("")}}),[e])})(),o=(0,k.useSelect)((s=>s(We).selectAppliedSuggestionFor({editType:e,previewType:t})),[e,t]);return(0,c.useMemo)((()=>{let t=r();return e===Ye?t:(o&&(t=t.replace(o,Qe[s])),((e,t)=>e.includes(Qe[t])?e:Qe[t])(t,s))}),[e,r])},wo=e=>{const{isWooProductEntity:t,isProductPost:s,hasValidWooSubscription:o}=(0,k.useSelect)((e=>{const t=e(He),s=e(We);return{isWooProductEntity:t.getIsWooProductEntity(),isProductPost:t.getIsProduct(),hasValidWooSubscription:s.selectWooCommerceSubscription()}}),[]);return(0,c.useMemo)((()=>{const a={upsellLink:e.premium,upsellLabel:(0,r.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),newToText:"Yoast SEO Premium",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",title:(0,r.__)("Use AI to generate your titles & descriptions!","wordpress-seo")};return t&&(s&&(a.title=(0,r.__)("Generate product titles & descriptions with AI!","wordpress-seo")),o||(a.newToText="Yoast WooCommerce SEO",a.upsellLabel=(0,r.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,r.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO"),a.upsellLink=e.woo,a.ctbId="5b32250e-e6f0-44ae-ad74-3cefc8e427f9")),a}),[t,s,e.premium,e.woo])},fo=()=>{const{premiumUpsellLink:t,wooUpsellLink:s,learnMoreLink:r,imageLink:o,wistiaEmbedPermissionValue:a,wistiaEmbedPermissionStatus:n}=(0,k.useSelect)((e=>{const t=e(He);return{premiumUpsellLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell"),wooUpsellLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell-woo-seo"),learnMoreLink:t.selectLink("https://yoa.st/ai-fix-assessments-upsell-learn-more"),imageLink:t.selectImageLink("ai-fix-assessments-thumbnail.png"),wistiaEmbedPermissionValue:t.selectWistiaEmbedPermissionValue(),wistiaEmbedPermissionStatus:t.selectWistiaEmbedPermissionStatus()}}),[]),i=wo({premium:t,woo:s}),l=(0,c.useMemo)((()=>({src:o,width:"432",height:"244"})),[o]),{setWistiaEmbedPermission:d}=(0,k.useDispatch)(He),u=(0,c.useMemo)((()=>({value:a,status:n,set:d})),[a,n,d]);return(0,e.createElement)(It,{learnMoreLink:r,thumbnail:l,wistiaEmbedPermission:u,...i})},bo=e=>{let t=[...e];return e.forEach((e=>{e.innerBlocks&&e.innerBlocks.length>0&&(t=[...t,...bo(e.innerBlocks)])})),t};P.noop,P.noop,P.noop,window.yoast.externals.redux;const Eo=({id:t,isPremium:s=!1})=>{const o=t+"AIFixes",[n,,,i,l]=(0,ce.useToggleState)(!1),{activeMarker:d,activeAIButtonId:u,editorType:p,isWooSeoUpsellPost:m}=(0,k.useSelect)((e=>({activeMarker:e("yoast-seo/editor").getActiveMarker(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton(),editorType:e("yoast-seo/editor").getEditorType(),isWooSeoUpsellPost:e("yoast-seo/editor").getIsWooSeoUpsell()})),[]),h=(()=>{const e=(0,k.useSelect)((e=>e("yoast-seo/editor").getEditorType()),[]);return"blockEditor"===e?(0,k.useSelect)((e=>e("core/edit-post").getEditorMode()),[]):"classicEditor"===e?function(){const e=document.getElementById("wp-content-wrap");return!!e&&e.classList.contains("html-active")}()?"text":"visual":""})(),g=!s||m,{setActiveAIFixesButton:y,setActiveMarker:w,setMarkerPauseStatus:f,setMarkerStatus:b}=(0,k.useDispatch)("yoast-seo/editor"),E=(0,c.useRef)(null),[v,x]=(0,c.useState)(""),_=(0,r.__)("Optimize with AI","wordpress-seo"),S=(0,r.__)("Please switch to the visual editor to optimize with AI.","wordpress-seo"),C=u===o,{isEnabled:R,ariaLabel:L}=(0,k.useSelect)((e=>{if(null!==u&&!C)return{isEnabled:!1,ariaLabel:null};const t=e("yoast-seo/editor").getDisabledAIFixesButtons();if(Object.keys(t).includes(o))return{isEnabled:!1,ariaLabel:t[o]};if("visual"!==h)return{isEnabled:!1,ariaLabel:S};if("blockEditor"===p){const t=bo(e("core/block-editor").getBlocks()).every((t=>"visual"===e("core/block-editor").getBlockMode(t.clientId)));return{isEnabled:t,ariaLabel:t?_:S}}return{isEnabled:!0,ariaLabel:_}}),[C,u,h]),N=()=>{d&&(w(null),f(!1),window.YoastSEO.analysis.applyMarks(new ee.Paper("",{}),[])),o===u?(y(null),b("enabled")):(y(o),b("disabled")),x("")},I=(0,c.useCallback)((()=>{g?i():((0,ue.doAction)("yoast.ai.fixAssessments",o),N())}),[N,i]),M=(0,c.useCallback)((()=>{L&&x("yoast-tooltip yoast-tooltip-multiline "+(R?"yoast-tooltip-w":"yoast-tooltip-nw"))}),[R,L]),T=(0,c.useCallback)((()=>{x("")}),[]);return(0,e.createElement)(a.IconAIFixesButton,{onClick:I,ariaLabel:L,onPointerEnter:M,onPointerLeave:T,id:o,className:`ai-button ${v}`,pressed:C,disabled:!R},g&&(0,e.createElement)(de,{className:"yst-fixes-button__lock-icon yst-text-amber-900"}),(0,e.createElement)(a.SparklesIcon,{pressed:C}),n&&(0,e.createElement)(ce.Modal,{className:"yst-introduction-modal",isOpen:n,onClose:l,initialFocus:E},(0,e.createElement)(ce.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl yst-introduction-modal-panel"},(0,e.createElement)(fo,{onClose:l,focusElementRef:E}))))};Eo.propTypes={id:l().string.isRequired,isPremium:l().bool};const vo=Eo,ko=(e,t,s)=>{const r=document.body.classList.contains("elementor-editor-active");return e&&!t&&!r&&!s},xo=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,_o=u().div`
	padding: 16px;
`,So=u()(T)`
	margin: -8px 0 -4px 4px;
`;class Co extends c.Component{constructor(...t){super(...t),X(this,"renderAIOptimizeButton",((t,s)=>{const{isElementor:r,isAiFeatureEnabled:o,isTerm:a}=this.props,n=qe().isPremium;if(!n||o)return ko(t,r,a)&&(0,e.createElement)(vo,{id:s,isPremium:n})}))}renderResults(t){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(xo,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(So,{href:wpseoAdminL10n["shortlinks.readability_analysis_info"],className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the readability analysis","wordpress-seo")))),(0,e.createElement)(Be,{results:this.props.results,upsellResults:t,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_readability_analysis",shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,renderAIOptimizeButton:this.renderAIOptimizeButton}))}getUpsellResults(e,t){let s=wpseoAdminL10n["shortlinks.upsell.metabox.word_complexity"];return"sidebar"===e&&(s=wpseoAdminL10n["shortlinks.upsell.sidebar.word_complexity"]),s=(0,_.addQueryArgs)(s,{context:t}),function(){const e=ee.helpers.getLanguagesWithWordComplexity(),t=window.wpseoScriptData.metabox.contentLocale,s=ee.languageProcessing.getLanguage(t);return e.includes(s)}()?[{score:0,rating:"upsell",hasMarks:!1,id:"wordComplexity",text:(0,r.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Word complexity', %2$s is a closing span tag.
       %3$s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,r.__)("%1$sWord complexity%2$s: Is your vocabulary suited for a larger audience? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${s}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"wordComplexity"}]:[]}render(){const t=$e(this.props.overallScore);return(0,P.isNil)(this.props.overallScore)&&(t.className="loading"),(0,e.createElement)(x.LocationConsumer,null,(s=>(0,e.createElement)(x.RootContext.Consumer,null,(({locationContext:o})=>{let a=[];return this.props.shouldUpsell&&(a=this.getUpsellResults(s,o)),"sidebar"===s?(0,e.createElement)(f,{title:(0,r.__)("Readability analysis","wordpress-seo"),titleScreenReaderText:t.screenReaderReadabilityText,prefixIcon:re(t.className),prefixIconCollapsed:re(t.className),id:`yoast-readability-analysis-collapsible-${s}`},this.renderResults(a)):"metabox"===s?(0,e.createElement)(Ue,{target:"wpseo-metabox-readability-root"},(0,e.createElement)(_o,null,(0,e.createElement)(ie,{target:"wpseo-readability-score-icon",scoreIndicator:t.className}),this.renderResults(a))):void 0}))))}}Co.propTypes={results:l().array.isRequired,marksButtonStatus:l().string.isRequired,overallScore:l().number,shouldUpsell:l().bool,shouldUpsellHighlighting:l().bool,isAiFeatureEnabled:l().bool,isElementor:l().bool,isTerm:l().bool},Co.defaultProps={overallScore:null,shouldUpsell:!1,shouldUpsellHighlighting:!1,isAiFeatureEnabled:!1,isElementor:!1,isTerm:!1};const Ro=(0,k.withSelect)((e=>{const{getReadabilityResults:t,getMarkButtonStatus:s,getIsElementorEditor:r,getIsAiFeatureEnabled:o,getIsTerm:a}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s(),isElementor:r(),isAiFeatureEnabled:o(),isTerm:a()}}))(Co),Lo=u().p`
	color: ${M.colors.$color_upsell_text};
	margin: 0;
	padding-right: 8px;
`,No=u().div`
	font-size: 1em;
	display: flex;
	flex-direction: ${e=>"horizontal"===e.alignment?"row":"column"};
	${(0,n.getDirectionalStyle)("border-left","border-right")}: 4px solid ${M.colors.$color_pink_dark};
	margin: 16px 0;
	padding: 0 0 0 8px;
	max-width: 600px;

	> ${Lo} {
		margin-bottom: ${e=>"vertical"===e.alignment&&"16px"};
	}
`,Io=u()(a.SvgIcon)`
	margin: ${(0,n.getDirectionalStyle)("0 0 0 4px","0 4px 0 0")};
	transform: ${(0,n.getDirectionalStyle)("rotate(0deg)","rotate(180deg)")};
`,Mo=(0,n.makeOutboundLink)(a.UpsellLinkButton),To=t=>{const{alignment:s,url:o}=t;return(0,e.createElement)(No,{alignment:s},(0,e.createElement)(Lo,null,(0,r.sprintf)(/* translators: %s expands to Yoast SEO Premium */
(0,r.__)("%s looks at more than just your main keyword. It analyzes different word forms, plurals, and past tenses. This helps your website perform even better in searches!","wordpress-seo"),"Yoast SEO Premium")),(0,e.createElement)("div",null,(0,e.createElement)(Mo,{href:o,className:"UpsellLinkButton","data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"},(0,r.sprintf)(/* translators: %s expands to Premium */
(0,r.__)("Go %s!","wordpress-seo"),"Premium"),(0,e.createElement)(Io,{icon:"arrow-right",size:"8px",color:M.colors.$color_black}))))};To.propTypes={alignment:l().oneOf(["horizontal","vertical"]),url:l().string.isRequired},To.defaultProps={alignment:"vertical"};const Po=To,Ao=t=>(0,e.createElement)(Me,{title:(0,r.__)("Write more natural and engaging content","wordpress-seo"),description:(0,r.sprintf)(/* translators: %s expands to "Yoast SEO Premium" */
(0,r.__)("Synonyms help users understand your copy better. It’s easier to read for both users and Google. In %s, you can add synonyms for your focus keyphrase, and we’ll help you optimize for them.","wordpress-seo"),"Yoast SEO Premium"),benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:t.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year free support and updates included!","wordpress-seo")});Ao.propTypes={buyLink:l().string.isRequired};const Oo=Ao,Fo=t=>(0,e.createElement)(Me,{title:(0,r.__)("Reach a wider audience","wordpress-seo"),description:(0,r.__)("Get help optimizing for up to 5 related keyphrases. This helps you reach a wider audience and get more traffic.","wordpress-seo"),benefitsTitle:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("%s also gives you:","wordpress-seo"),"Yoast SEO Premium"),benefits:fe(),upsellButtonText:(0,r.sprintf)(/* translators: %s expands to 'Yoast SEO Premium'. */
(0,r.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),upsellButton:{href:t.buyLink,className:"yoast-button-upsell",rel:null,"data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2","data-action":"load-nfd-ctb"},upsellButtonLabel:(0,r.__)("1 year free support and updates included!","wordpress-seo")});Fo.propTypes={buyLink:l().string.isRequired};const Bo=Fo,$o=u().button`
	// Increase specificity to override WP rules.
	&& {
		display: flex;
		align-items: center;
	}

	.yoast-svg-icon {
		margin: 1px 7px 0 0;
		fill: currentColor;
	}
`,Uo={open:(0,r.__)("Open","wordpress-seo"),heading:"",closeIconButton:(0,r.__)("Close","wordpress-seo"),closeButton:""},qo=t=>{const[s,r]=(0,c.useState)(!1),o=Object.assign({},Uo,t.labels),n=(0,c.useCallback)((()=>r(!1)),[]),i=(0,c.useCallback)((()=>r(!0)),[]);return(0,e.createElement)(c.Fragment,null,(0,e.createElement)($o,{type:"button",onClick:i,className:`${t.classes.openButton} yoast-modal__button-open`},t.openButtonIcon&&(0,e.createElement)(a.SvgIcon,{icon:t.openButtonIcon,size:"13px"}),o.open),s&&(0,e.createElement)(ge,{onRequestClose:n,className:t.className,title:o.heading},t.children))};qo.propTypes={openButtonIcon:l().string,labels:l().shape({open:l().string,modalAriaLabel:l().string.isRequired,heading:l().string,closeIconButton:l().string,closeButton:l().string}).isRequired,classes:l().shape({openButton:l().string,closeIconButton:l().string,closeButton:l().string}),className:l().string,children:l().any.isRequired},qo.defaultProps={className:me,openButtonIcon:"",classes:{}};const Wo=qo;function Ho({location:t}){return(0,e.createElement)(o.Slot,{name:`yoast-synonyms-${t}`})}Ho.propTypes={location:l().string.isRequired};const Do=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 1.5em 0 1em;
	display: block;
`;class zo extends c.Component{constructor(...t){super(...t),X(this,"renderAIOptimizeButton",((t,s)=>{const{isElementor:r,isAiFeatureEnabled:o,isPremium:a,isTerm:n}=this.props;if(!a||o)return ko(t,r,n)&&(0,e.createElement)(vo,{id:s,isPremium:a})}))}renderSynonymsUpsell(t,s){const o={className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-keyword-synonyms button-link"},labels:{open:"+ "+(0,r.__)("Add synonyms","wordpress-seo"),modalAriaLabel:(0,r.__)("Add synonyms","wordpress-seo"),heading:(0,r.__)("Add synonyms","wordpress-seo")}},a=wpseoAdminL10n["sidebar"===t.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_synonyms_button":"shortlinks.upsell.metabox.focus_keyword_synonyms_button"];return(0,e.createElement)(Wo,{...o},(0,e.createElement)(pe,null,(0,e.createElement)(Oo,{buyLink:(0,_.addQueryArgs)(a,{context:s})})))}renderMultipleKeywordsUpsell(t,s){const o={className:`${me} yoast-gutenberg-modal__box yoast-gutenberg-modal__no-padding`,classes:{openButton:"wpseo-multiple-keywords button-link"},labels:{open:"+ "+(0,r.__)("Add related keyphrase","wordpress-seo"),modalAriaLabel:(0,r.__)("Add related keyphrases","wordpress-seo"),heading:(0,r.__)("Add related keyphrases","wordpress-seo")}},a=wpseoAdminL10n["sidebar"===t.toLowerCase()?"shortlinks.upsell.sidebar.focus_keyword_additional_button":"shortlinks.upsell.metabox.focus_keyword_additional_button"];return(0,e.createElement)(Wo,{...o},(0,e.createElement)(pe,null,(0,e.createElement)(Bo,{buyLink:(0,_.addQueryArgs)(a,{context:s})})))}renderWordFormsUpsell(t,s){let r="sidebar"===t?wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_sidebar"]:wpseoAdminL10n["shortlinks.upsell.sidebar.morphology_upsell_metabox"];return r=(0,_.addQueryArgs)(r,{context:s}),(0,e.createElement)(Po,{url:r,alignment:"sidebar"===t?"vertical":"horizontal"})}renderTabIcon(t,s){return"metabox"!==t?null:(0,e.createElement)(ie,{target:"wpseo-seo-score-icon",scoreIndicator:s})}getUpsellResults(e,t){let s=wpseoAdminL10n["shortlinks.upsell.metabox.keyphrase_distribution"];return"sidebar"===e&&(s=wpseoAdminL10n["shortlinks.upsell.sidebar.keyphrase_distribution"]),s=(0,_.addQueryArgs)(s,{context:t}),[{score:0,rating:"upsell",hasMarks:!1,hasJumps:!1,id:"keyphraseDistribution",text:(0,r.sprintf)(
/* Translators: %1$s is a span tag that adds styling to 'Keyphrase distribution', %2$s is a closing span tag.
     %3%s is an anchor tag with a link to yoast.com, %4$s is a closing anchor tag.*/
(0,r.__)("%1$sKeyphrase distribution%2$s: Have you evenly distributed your focus keyphrase throughout the whole text? %3$sYoast SEO Premium will tell you!%4$s","wordpress-seo"),"<span style='text-decoration: underline'>","</span>",`<a href="${s}" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" target="_blank">`,"</a>"),markerId:"keyphraseDistribution"}]}render(){const t=$e(this.props.overallScore),{isPremium:s}=this.props;return"loading"!==t.className&&""===this.props.keyword&&(t.className="na",t.screenReaderReadabilityText=(0,r.__)("Enter a focus keyphrase to calculate the SEO score","wordpress-seo")),(0,e.createElement)(x.LocationConsumer,null,(o=>(0,e.createElement)(x.RootContext.Consumer,null,(({locationContext:a})=>{const n="metabox"===o?y:f;let i=[];return this.props.shouldUpsell&&(i=this.getUpsellResults(o,a)),(0,e.createElement)(c.Fragment,null,(0,e.createElement)(n,{title:s?(0,r.__)("Premium SEO analysis","wordpress-seo"):(0,r.__)("SEO analysis","wordpress-seo"),titleScreenReaderText:t.screenReaderReadabilityText,prefixIcon:re(t.className),prefixIconCollapsed:re(t.className),subTitle:this.props.keyword,id:`yoast-seo-analysis-collapsible-${o}`},(0,e.createElement)(Ho,{location:o}),this.props.shouldUpsell&&(0,e.createElement)(c.Fragment,null,this.renderSynonymsUpsell(o,a),this.renderMultipleKeywordsUpsell(o,a)),this.props.shouldUpsellWordFormRecognition&&this.renderWordFormsUpsell(o,a),(0,e.createElement)(Do,null,(0,r.__)("Analysis results","wordpress-seo")),(0,e.createElement)(Be,{results:this.props.results,upsellResults:i,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",editButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:this.props.marksButtonStatus,location:o,shouldUpsellHighlighting:this.props.shouldUpsellHighlighting,highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_seo_analysis",renderAIOptimizeButton:this.renderAIOptimizeButton})),this.renderTabIcon(o,t.className))}))))}}zo.propTypes={results:l().array,marksButtonStatus:l().string,keyword:l().string,shouldUpsell:l().bool,shouldUpsellWordFormRecognition:l().bool,overallScore:l().number,shouldUpsellHighlighting:l().bool,isElementor:l().bool,isAiFeatureEnabled:l().bool,isPremium:l().bool,isTerm:l().bool},zo.defaultProps={results:[],marksButtonStatus:null,keyword:"",shouldUpsell:!1,shouldUpsellWordFormRecognition:!1,overallScore:null,shouldUpsellHighlighting:!1,isElementor:!1,isAiFeatureEnabled:!1,isPremium:!1,isTerm:!1};const Ko=(0,k.withSelect)(((e,t)=>{const{getFocusKeyphrase:s,getMarksButtonStatus:r,getResultsForKeyword:o,getIsElementorEditor:a,getIsPremium:n,getIsAiFeatureEnabled:i,getIsTerm:l}=e("yoast-seo/editor"),c=s();return{...o(c),marksButtonStatus:t.hideMarksButtons?"disabled":r(),keyword:c,isElementor:a(),isPremium:n(),isAiFeatureEnabled:i(),isTerm:l()}}))(zo);function jo(){const e=qe();return(0,P.get)(e,"multilingualPluginActive",!1)}const Yo=u().span`
	font-size: 1em;
	font-weight: bold;
	margin: 0 0 8px;
	display: block;
`,Go=u().div`
	padding: 16px;
`,Vo=u()(T)`
	margin: -8px 0 -4px 4px;
`,Zo=u().p`
	min-height: 24px;
	margin: 12px 0 0 0;
	padding: 0;
	display: flex;
	align-items: flex-start;
`,Qo=u()(a.SvgIcon)`
	margin: 3px 11px 0 0; // icon 13 + 11 right margin = 24 for the 8px grid.
`,Jo=t=>{const s=wpseoAdminL10n["shortlinks.inclusive_language_analysis_info"];function o(){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(Yo,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(Vo,{href:s,className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,e.createElement)(Be,{results:t.results,marksButtonClassName:"yoast-tooltip yoast-tooltip-w",marksButtonStatus:t.marksButtonStatus,resultCategoryLabels:{problems:(0,r.__)("Non-inclusive","wordpress-seo"),improvements:(0,r.__)("Potentially non-inclusive","wordpress-seo")},highlightingUpsellLink:"shortlinks.upsell.sidebar.highlighting_inclusive_analysis",shouldUpsellHighlighting:t.shouldUpsellHighlighting}))}const n=Ee((0,r.sprintf)(/* Translators: %1$s expands to a link on yoast.com, %2$s expands to the anchor end tag. */
(0,r.__)("%1$sInclusive language%2$s: We haven't detected any potentially non-inclusive phrases. Great work!","wordpress-seo"),"<a>","</a>"),{a:(0,e.createElement)("a",{href:s,target:"_blank",rel:"noreferrer"})});function i(){const t=(0,r.__)("We noticed that you are using a multilingual plugin. Please be aware that this analysis feedback is intended only for texts written in English.","wordpress-seo");return(0,e.createElement)(a.Alert,{type:"info"},t)}function l(){return(0,e.createElement)(c.Fragment,null,(0,e.createElement)(Yo,null,(0,r.__)("Analysis results","wordpress-seo"),(0,e.createElement)(Vo,{href:s,className:"dashicons"},(0,e.createElement)("span",{className:"screen-reader-text"},/* translators: Hidden accessibility text. */
(0,r.__)("Learn more about the inclusive language analysis","wordpress-seo")))),(0,e.createElement)(Zo,null,(0,e.createElement)(Qo,{icon:"circle",color:"#7ad03a",size:"13px"}),(0,e.createElement)("span",null,n)))}const d=$e(t.overallScore);return(0,P.isNil)(t.overallScore)&&(d.className="loading"),(0,e.createElement)(x.LocationConsumer,null,(s=>{return"sidebar"===s?(a=t.results,n=d,(0,e.createElement)(f,{title:(0,r.__)("Inclusive language","wordpress-seo"),titleScreenReaderText:n.screenReaderInclusiveLanguageText,prefixIcon:re(n.className),prefixIconCollapsed:re(n.className),id:"yoast-inclusive-language-analysis-collapsible-sidebar"},jo()?i():null,a.length>=1?o():l())):"metabox"===s?function(t,s){return(0,e.createElement)(ae,{target:"wpseo-metabox-inclusive-language-root"},(0,e.createElement)(Go,null,(0,e.createElement)(ie,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:s.className}),jo()?i():null,t.length>=1?o():l()))}(t.results,d):void 0;var a,n}))};Jo.propTypes={results:l().array,marksButtonStatus:l().oneOf(["enabled","disabled","hidden"]).isRequired,overallScore:l().number,shouldUpsellHighlighting:l().bool},Jo.defaultProps={results:[],overallScore:null,shouldUpsellHighlighting:!1};const Xo=(0,k.withSelect)((e=>{const{getInclusiveLanguageResults:t,getMarkButtonStatus:s}=e("yoast-seo/editor");return{...t(),marksButtonStatus:s()}}))(Jo);window.yoast=window.yoast||{},window.yoast.externals=window.yoast.externals||{},window.yoast.externals.components={CollapsibleCornerstone:E,KeywordInput:Q,ReadabilityAnalysis:Ro,SeoAnalysis:Ko,InclusiveLanguageAnalysis:Xo}})()})();