(()=>{var e={2(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.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:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))})},244(e,t,s){"use strict";s.d(t,{t:()=>p});var r=s(4369),o=s(6087),n=s(7723),i=s(5831),a=s(1802),l=s.n(a),c=s(3657),d=s(2458),u=s(790);const p=({onGiveConsent:e,learnMoreLink:t,privacyPolicyLink:s,termsOfServiceLink:a,imageLink:l})=>{const{onClose:p,initialFocus:h}=(0,i.useModalContext)(),[m,g]=(0,i.useToggleState)(!1),y=(0,o.useMemo)(()=>({src:l,width:"432",height:"244"}),[l]),f=(0,d.x)((0,n.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. */ /* 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,n.__)("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,u.jsx)(c.rd,{href:a}),a2:(0,u.jsx)(c.rd,{href:s})}),[x,w]=(0,i.useToggleState)(!1),b=(0,o.useCallback)(async()=>{w(),await e(),w()},[e]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"yst-px-10 yst-pt-10 yst-introduction-gradient yst-text-center",children:(0,u.jsx)("div",{className:"yst-relative yst-w-full",children:(0,u.jsx)("img",{className:"yst-w-full yst-h-auto yst-rounded-md yst-drop-shadow-md",alt:"",loading:"lazy",decoding:"async",...y})})}),(0,u.jsxs)("div",{className:"yst-px-10 yst-pb-4 yst-flex yst-flex-col yst-items-center",children:[(0,u.jsxs)("div",{className:"yst-mt-4 yst-mx-1.5 yst-text-center",children:[(0,u.jsx)("h3",{className:"yst-text-slate-900 yst-text-lg yst-font-medium",children:(0,n.sprintf)(/* translators: %s expands to Yoast AI. */ /* translators: %s expands to Yoast AI. */
(0,n.__)("Grant consent for %s","wordpress-seo"),"Yoast AI")}),(0,u.jsx)("div",{className:"yst-mt-2 yst-text-slate-600 yst-text-sm",children:(0,d.x)((0,n.sprintf)(/* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */ /* translators: %1$s is a break tag; %2$s and %3$s are anchor tag; %4$s is the arrow icon. */
(0,n.__)("Enable AI-powered SEO! Use all Yoast AI 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,u.jsx)(c.rd,{href:t,className:"yst-inline-flex yst-items-center yst-gap-1 yst-no-underline yst-font-medium",variant:"primary"}),ArrowNarrowRightIcon:(0,u.jsx)(r.A,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180"}),br:(0,u.jsx)("br",{})})})]}),(0,u.jsx)("div",{className:"yst-flex yst-w-full yst-mt-6",children:(0,u.jsx)("hr",{className:"yst-w-full yst-text-gray-200"})}),(0,u.jsxs)("div",{className:"yst-flex yst-items-start yst-mt-4",children:[(0,u.jsx)("input",{type:"checkbox",id:"yst-ai-consent-checkbox",name:"yst-ai-consent-checkbox",checked:m,value:m?"true":"false",onChange:g,className:"yst-checkbox__input",ref:h}),(0,u.jsx)("label",{htmlFor:"yst-ai-consent-checkbox",className:"yst-label yst-checkbox__label yst-text-xs yst-font-normal yst-text-slate-500",children:f})]}),(0,u.jsx)("div",{className:"yst-w-full yst-flex yst-mt-4",children:(0,u.jsxs)(i.Button,{as:"button",className:"yst-grow",size:"large",disabled:!m,onClick:b,children:[x&&(0,u.jsx)(i.Spinner,{className:"yst-me-2"}),(0,n.__)("Grant consent","wordpress-seo")]})}),(0,u.jsx)(i.Button,{as:"button",className:"yst-mt-4",variant:"tertiary",onClick:p,children:(0,n.__)("Close","wordpress-seo")})]})]})};p.propTypes={onGiveConsent:l().func.isRequired,learnMoreLink:l().string.isRequired,privacyPolicyLink:l().string.isRequired,termsOfServiceLink:l().string.isRequired,imageLink:l().string.isRequired}},476(e,t,s){"use strict";s(2996),s(7723),s(5831);var r=s(1802),o=s.n(r);s(4370),s(3550),s(790),o().bool.isRequired,o().func.isRequired,o().func,o().string},790(e){"use strict";e.exports=window.ReactJSXRuntime},889(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1679);const o=s.n(r)().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;
	}
`},963(e,t,s){"use strict";s.d(t,{A:()=>d}),s(1609);var r=s(1679),o=s.n(r),n=s(1802),i=s.n(n),a=s(790);const l=o().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;
    }
`,c=e=>(0,a.jsx)(l,{children:e.children});c.propTypes={children:i().array.isRequired};const d=c},1137(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.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:t},e),r.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"}))})},1426(e,t,s){"use strict";s.d(t,{WG:()=>o.A,Xi:()=>r.A});var r=s(7415),o=s(1709);s(9498),s(6377)},1455(e){"use strict";e.exports=window.wp.apiFetch},1480(e,t,s){"use strict";s.d(t,{Z:()=>n});var r=s(7143),o=s(6087);const n=e=>{var t,s;const n=null===(t=(0,r.useDispatch)("core/edit-post"))||void 0===t?void 0:t.openGeneralSidebar,i=null===(s=(0,r.useDispatch)("core/editor"))||void 0===s?void 0:s.closePublishSidebar,{openEditorModal:a}=(0,r.useDispatch)("yoast-seo/editor");return(0,o.useCallback)(()=>{i(),n("yoast-seo/seo-sidebar"),e&&a("yoast-search-appearance-modal")},[i,n,a])}},1609(e){"use strict";e.exports=window.React},1679(e){"use strict";e.exports=window.yoast.styledComponents},1704(e,t,s){"use strict";s(2485),s(790)},1709(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(1609),o=s(1802),n=s.n(o),i=s(1679),a=s.n(i),l=s(4281),c=s(9e3),d=s(963),u=s(3103),p=s(7343),h=s(790);const m=a().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);
	}
`,g=a()(m)`
	flex-direction: column;
	max-height: 370px;
`,y=a()(m)`
	flex-direction: row;
	height: 125px;
`;class f extends r.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:e,imageUrl:t,imageFallbackUrl:s,alt:r,title:o,description:n,siteUrl:i}=this.props,a=e?g:y;return(0,h.jsxs)(a,{id:"twitterPreview",children:[(0,h.jsx)(c.A,{src:t||s,alt:r,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,h.jsxs)(d.A,{children:[(0,h.jsx)(l.A,{siteUrl:i}),(0,h.jsx)(u.A,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,h.jsx)(p.A,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:n})]})]})}}f.propTypes={siteUrl:n().string.isRequired,title:n().string.isRequired,description:n().string,isLarge:n().bool,imageUrl:n().string,imageFallbackUrl:n().string,alt:n().string,onSelect:n().func,onImageClick:n().func,onMouseHover:n().func},f.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const x=f},1802(e){"use strict";e.exports=window.yoast.propTypes},1855(e,t,s){"use strict";s(4631),s(7723),s(5831),s(8468);var r=s(1802),o=s.n(r);s(790),o().bool.isRequired,o().func,o().func,o().string.isRequired,o().string.isRequired,o().string.isRequired,o().string.isRequired},1949(e,t,s){"use strict";s(1609)},1969(e,t,s){"use strict";s.d(t,{cP:()=>a});var r=s(2379);function o(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 n(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 i(e,t,s=!1){const i=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 a=s?"landscape":"square";"Facebook"===t&&(a=(0,r.determineFacebookImageMode)(i));const l=function(e){return"Twitter"===e?r.TWITTER_IMAGE_SIZES:r.FACEBOOK_IMAGE_SIZES}(t),c=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:n(t,o(e,t,s))}(l,i,a);return{mode:a,height:c.height,width:c.width}}async function a(e,t,s=!1){try{return{imageProperties:await i(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}},2279(e){"use strict";e.exports=window.wp.plugins},2310(e){"use strict";e.exports=window.wp.sanitize},2379(e){"use strict";e.exports=window.yoast.socialMetadataForms},2450(e,t,s){"use strict";s.d(t,{x:()=>d});var r=s(7723),o=s(5831),n=s(1802),i=s.n(n),a=s(790);const l=({handleRefreshClick:e,supportLink:t})=>(0,a.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,a.jsx)(o.Button,{onClick:e,children:(0,r.__)("Refresh this page","wordpress-seo")}),(0,a.jsx)(o.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,r.__)("Contact support","wordpress-seo")})]});l.propTypes={handleRefreshClick:i().func.isRequired,supportLink:i().string.isRequired};const c=({handleRefreshClick:e,supportLink:t})=>(0,a.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,a.jsx)(o.Button,{className:"yst-order-last",onClick:e,children:(0,r.__)("Refresh this page","wordpress-seo")}),(0,a.jsx)(o.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,r.__)("Contact support","wordpress-seo")})]});c.propTypes={handleRefreshClick:i().func.isRequired,supportLink:i().string.isRequired};const d=({error:e,children:t=null})=>(0,a.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,a.jsx)(o.Title,{children:(0,r.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,a.jsx)("p",{children:(0,r.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,a.jsx)(o.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,r.__)("Undefined error message.","wordpress-seo")}),(0,a.jsx)("p",{children:(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")}),t]});d.propTypes={error:i().object.isRequired,children:i().node},d.VerticalButtons=c,d.HorizontalButtons=l},2458(e,t,s){"use strict";s.d(t,{x:()=>o}),s(7723);var r=s(6087);s(8468);const o=(e,t)=>{try{return(0,r.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}}},2485(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 n=typeof s;if("string"===n||"number"===n)e.push(s);else if(Array.isArray(s)){if(s.length){var i=o.apply(null,s);i&&e.push(i)}}else if("object"===n){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)r.call(s,a)&&s[a]&&e.push(a)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(s=function(){return o}.apply(t,[]))||(e.exports=s)}()},2505(e,t,s){"use strict";s(2),s(7695),s(7723),s(5831),s(2485);var r=s(1802),o=s.n(r);s(8629),s(4289),s(8519),s(790),o().string.isRequired,o().object,o().func.isRequired,o().bool.isRequired},2547(e){"use strict";e.exports=window.yoast.replacementVariableEditor},2619(e){"use strict";e.exports=window.wp.hooks},2996(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))})},2998(e){"use strict";e.exports=window.yoast.reactHelmet},3023(e,t,s){"use strict";s.d(t,{p:()=>f});var r=s(4369),o=s(7695),n=s(6087),i=s(7723),a=s(8629),l=s(2458),c=s(5831),d=s(1802),u=s.n(d),p=s(6633),h=s(7410),m=s(2485),g=s.n(m),y=s(790);const f=({link:e,linkProps:t,isPromotionActive:s,isWooCommerceActive:d})=>{const u=d?a.l:a.g,m=(0,n.useMemo)(()=>d?(0,i.__)("Grow your store's visibility!","wordpress-seo"):(0,i.__)("Spend less time on SEO tasks!","wordpress-seo"),[d]),f=(0,n.useMemo)(()=>d?(0,i.__)("Help ready-to-buy shoppers and search engines find your product.","wordpress-seo"):(0,i.__)("Optimize your site faster, smarter, and with more confidence.","wordpress-seo"),[d]);let x=(0,i.__)("Buy now","wordpress-seo");const w=(0,n.useMemo)(()=>d?(0,i.__)("Less friction. Smarter optimization.","wordpress-seo"):(0,i.__)("Less friction. Faster publishing.","wordpress-seo"),[d]),b=d?(0,l.x)((0,i.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */ /* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,i.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast WooCommerce SEO"),{nowrap:(0,y.jsx)("span",{className:"yst-whitespace-nowrap"})}):(0,l.x)((0,i.sprintf)(/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */ /* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
(0,i.__)("%1$s%2$s %3$s","wordpress-seo"),"<nowrap>","</nowrap>","Yoast SEO Premium"),{nowrap:(0,y.jsx)("span",{className:"yst-whitespace-nowrap"})}),v=s("black-friday-promotion");return v&&(x=(0,i.__)("Buy now for 30% off","wordpress-seo")),(0,y.jsxs)("div",{className:g()("yst-p-6 yst-rounded-lg yst-text-slate-600 yst-bg-white yst-shadow yst-border",d?"yst-border-woo-light yst-border-opacity-50":"yst-border-primary-300"),children:[(0,y.jsx)("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]",children:d?(0,y.jsx)(h.h,{}):(0,y.jsx)(p.h,{})}),v&&(0,y.jsx)("div",{className:"sidebar__sale_banner_container",children:(0,y.jsx)("div",{className:"sidebar__sale_banner",children:(0,y.jsx)("span",{className:"banner_text",children:(0,i.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})})}),(0,y.jsx)(c.Title,{as:"h2",className:g()("yst-mt-6 yst-text-xl yst-font-semibold",d?"yst-text-woo-light":"yst-text-primary-500"),children:b}),(0,y.jsx)("p",{className:"yst-mt-3 yst-font-medium yst-text-slate-800",children:m}),(0,y.jsx)("p",{className:"yst-mt-1 yst-font-normal",children:f}),(0,y.jsx)("ul",{className:"yst-list-outside yst-text-slate-600 yst-mt-4 yst-flex yst-flex-col yst-gap-2",children:u(!0).map((e,t)=>(0,y.jsxs)("li",{className:"yst-flex yst-items-start",children:[(0,y.jsx)(o.A,{className:"yst-mr-2 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),e]},`upsell-benefit-${t}`))}),(0,y.jsxs)(c.Button,{as:"a",variant:"upsell",href:e,target:"_blank",rel:"noopener",className:"yst-flex yst-justify-center yst-gap-2 yst-mt-4 focus:yst-ring-offset-primary-500",...t,children:[(0,y.jsx)("span",{children:x}),(0,y.jsx)(r.A,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"})]}),(0,y.jsx)("p",{className:"yst-text-center yst-text-xs yst-font-normal yst-leading-5 yst-text-slate-500 yst-italic yst-mt-3 yst-mb-2",children:w}),(0,y.jsx)("hr",{className:"yst-border-t yst-border-slate-200 yst-my-4"}),(0,y.jsxs)("ul",{className:"yst-text-center yst-text-xs yst-font-medium yst-text-slate-800 yst-list-none",children:[(0,y.jsx)("li",{children:(0,i.__)("30-day money back guarantee","wordpress-seo")}),(0,y.jsx)("li",{children:(0,i.__)("24/7 support","wordpress-seo")})]})]})};f.propTypes={link:u().string.isRequired,linkProps:u().object.isRequired,isPromotionActive:u().func.isRequired}},3103(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1679);const o=s.n(r)().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`},3301(e,t,s){"use strict";s.d(t,{Qo:()=>o,Tf:()=>i,bw:()=>r,pb:()=>n,x_:()=>a});const r="yoast-seo/content-planner",o={idle:"idle",consent:"consent",contentSuggestions:"content-suggestions",contentOutline:"content-outline"},n={errorCode:null,errorIdentifier:null,errorMessage:null,missingLicenses:[]},i=4,a="yoast-seo-tailwind-css"},3313(e,t,s){"use strict";s.d(t,{al:()=>a,au:()=>n,mY:()=>i,qj:()=>o});const r=e=>{const t=document.getElementById(e);t&&(t.value="1")},o=()=>{const e=document.getElementById("yoast_wpseo_is_content_planner_banner_dismissed");return null===e||"1"===e.value},n=()=>{return"1"===(null===(e=document.getElementById("yoast_wpseo_is_content_planner_banner_rendered"))||void 0===e?void 0:e.value);var e},i=()=>{r("yoast_wpseo_is_content_planner_banner_rendered")},a=()=>{r("yoast_wpseo_is_content_planner_banner_dismissed")}},3335(e){"use strict";e.exports=window.yoast.helpers},3387(e,t,s){"use strict";s.d(t,{q:()=>h});var r=s(6087),o=s(7723),n=s(5831),i=s(2485),a=s.n(i),l=s(1802),c=s.n(l),d=s(2998),u=s(8334),p=s(790);const h=({videoId:e,thumbnail:t,wistiaEmbedPermission:s,className:i=""})=>{const[l,c]=(0,r.useState)(s.value?u.BG.isPlaying:u.BG.showPlay),h=(0,r.useCallback)(()=>c(u.BG.isPlaying),[c]),m=(0,r.useCallback)(()=>{s.value?h():c(u.BG.askPermission)},[s.value,h,c]),g=(0,r.useCallback)(()=>c(u.BG.showPlay),[c]),y=(0,r.useCallback)(()=>{s.set(!0),h()},[s.set,h]);return(0,p.jsxs)(p.Fragment,{children:[s.value&&(0,p.jsx)(d.Helmet,{children:(0,p.jsx)("script",{src:"https://fast.wistia.com/assets/external/E-v1.js",async:!0})}),(0,p.jsxs)("div",{className:a()("yst-relative yst-w-full yst-h-0 yst-pt-[47.25%] yst-overflow-hidden yst-rounded-md yst-drop-shadow-md yst-bg-white",i),children:[l===u.BG.showPlay&&(0,p.jsx)("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:m,children:(0,p.jsx)("img",{className:"yst-w-full yst-h-auto yst-object-contain",alt:"",loading:"lazy",decoding:"async",...t})}),l===u.BG.askPermission&&(0,p.jsxs)("div",{className:"yst-absolute yst-inset-0 yst-flex yst-flex-col yst-items-center yst-justify-center yst-bg-white",children:[(0,p.jsxs)("p",{className:"yst-max-w-xs yst-mx-auto yst-text-center",children:[s.status===u.$H.loading&&(0,p.jsx)(n.Spinner,{}),s.status!==u.$H.loading&&(0,o.sprintf)(/* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */ /* translators: %1$s expands to Yoast SEO. %2$s expands to Wistia. */
(0,o.__)("To see this video, you need to allow %1$s to load embedded videos from %2$s.","wordpress-seo"),"Yoast SEO","Wistia")]}),(0,p.jsxs)("div",{className:"yst-flex yst-mt-6 yst-gap-x-4",children:[(0,p.jsx)(n.Button,{type:"button",variant:"secondary",onClick:g,disabled:s.status===u.$H.loading,children:(0,o.__)("Deny","wordpress-seo")}),(0,p.jsx)(n.Button,{type:"button",variant:"primary",onClick:y,disabled:s.status===u.$H.loading,children:(0,o.__)("Allow","wordpress-seo")})]})]}),s.value&&l===u.BG.isPlaying&&(0,p.jsxs)("div",{className:"yst-absolute yst-w-full yst-h-full yst-top-0 yst-right-0",children:[null===e&&(0,p.jsx)(n.Spinner,{className:"yst-h-full yst-mx-auto"}),null!==e&&(0,p.jsx)("div",{className:`wistia_embed wistia_async_${e} videoFoam=true`})]})]})]})};h.propTypes={videoId:c().string.isRequired,thumbnail:c().shape({src:c().string.isRequired,width:c().string,height:c().string}).isRequired,wistiaEmbedPermission:c().shape({value:c().bool.isRequired,status:c().string.isRequired,set:c().func.isRequired}).isRequired,hasPadding:c().bool}},3478(e,t,s){"use strict";s(1609)},3550(e,t,s){"use strict";s.d(t,{r:()=>l});var r=s(7723),o=s(5831),n=s(1802),i=s.n(n),a=s(790);const l=({href:e,children:t=null,...s})=>(0,a.jsxs)(o.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,a.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,r.__)("(Opens in a new browser tab)","wordpress-seo")})]});l.propTypes={href:i().string.isRequired,children:i().node}},3552(e,t,s){"use strict";s(5831);var r=s(1802),o=s.n(r);s(790);o().string,o().node.isRequired,o().node.isRequired,o().node,o().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"}}))},3601(e,t,s){"use strict";s(6087),s(5831),s(8468);var r=s(1802),o=s.n(r);s(4976),s(790),o().string.isRequired,o().string},3657(e,t,s){"use strict";s.d(t,{eN:()=>r.e,pk:()=>i.p,qc:()=>a.q,rd:()=>n.r,ve:()=>l.v,xP:()=>o.x});var r=s(5768),o=(s(6789),s(2450)),n=(s(3552),s(3478),s(3601),s(3550)),i=s(3023),a=(s(2505),s(4432),s(1855),s(3387)),l=(s(1949),s(476),s(1704),s(244),s(3999))},3832(e){"use strict";e.exports=window.wp.url},3838(e){"use strict";e.exports=window.yoast.searchMetadataPreviews},3999(e,t,s){"use strict";s.d(t,{v:()=>d});var r=s(7143),o=s(6087),n=s(1802),i=s.n(n),a=s(244),l=s(790);const c={termsOfService:"https://yoa.st/ai-generator-terms-of-service",privacyPolicy:"https://yoa.st/ai-generator-privacy-policy",learnMore:"https://yoa.st/ai-generator-learn-more"},d=({storeName:e,onConsentGranted:t,linkStoreName:s,links:n={}})=>{const i=(0,o.useMemo)(()=>({...c,...n}),[n]),{termsOfServiceLink:d,privacyPolicyLink:u,learnMoreLink:p,imageLink:h,endpoint:m}=(0,r.useSelect)(t=>{const r=t(s),o=t(e);return{termsOfServiceLink:r.selectLink(i.termsOfService),privacyPolicyLink:r.selectLink(i.privacyPolicy),learnMoreLink:r.selectLink(i.learnMore),imageLink:r.selectImageLink("ai-consent.png"),endpoint:o.selectAiGeneratorConsentEndpoint()}},[s,e,i]),{storeAiGeneratorConsent:g}=(0,r.useDispatch)(e),y=(0,o.useCallback)(async()=>{await g(!0,m),t()},[g,t,m]);return(0,l.jsx)(a.t,{termsOfServiceLink:d,privacyPolicyLink:u,learnMoreLink:p,imageLink:h,onGiveConsent:y})};d.propTypes={storeName:i().string.isRequired,onConsentGranted:i().func.isRequired,linkStoreName:i().string.isRequired,links:i().shape({termsOfService:i().string,privacyPolicy:i().string,learnMore:i().string})}},4080(e,t,s){"use strict";s.d(t,{h:()=>a});var r,o,n=s(1609);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},i.apply(null,arguments)}const a=e=>n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),r||(r=n.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),o||(o=n.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"})))},4281(e,t,s){"use strict";s.d(t,{A:()=>d}),s(1609);var r=s(1679),o=s.n(r),n=s(1802),i=s.n(n),a=s(790);const l=o().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;
`,c=e=>(0,a.jsx)(l,{children:(0,a.jsx)("span",{children:e.siteUrl})});c.propTypes={siteUrl:i().string.isRequired};const d=c},4289(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),r||(r=o.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"})))},4369(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.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"}))})},4370(e,t,s){"use strict";s.d(t,{h:()=>be});var r,o,n,i,a,l,c,d,u,p,h,m,g,y,f,x,w,b,v,_,k,j,S,C,E,T,R,L,I,A,P,N,M,O,F,D,q,$,B,U,z,W,H,K,Y,V,G,Z,Q,X,J,ee,te,se,re,oe,ne,ie,ae,le,ce,de,ue,pe,he,me,ge,ye,fe,xe=s(1609);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},we.apply(null,arguments)}const be=e=>xe.createElement("svg",we({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",fill:"none",viewBox:"0 0 252 60"},e),r||(r=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__a"},xe.createElement("stop",{offset:0,stopColor:"#570732"}),xe.createElement("stop",{offset:.04,stopColor:"#610b39"}),xe.createElement("stop",{offset:.15,stopColor:"#79164b"}),xe.createElement("stop",{offset:.29,stopColor:"#8c1e59"}),xe.createElement("stop",{offset:.44,stopColor:"#9a2463"}),xe.createElement("stop",{offset:.63,stopColor:"#a22768"}),xe.createElement("stop",{offset:1,stopColor:"#a4286a"}))),o||(o=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__b",x1:49.556,x2:49.556,y1:36.267,y2:23.152,gradientUnits:"userSpaceOnUse"})),n||(n=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__c",x1:82.801,x2:82.801,y1:38.819,y2:20.113,gradientUnits:"userSpaceOnUse"})),i||(i=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__d",x1:62.504,x2:62.504,y1:36.222,y2:23.113,gradientUnits:"userSpaceOnUse"})),a||(a=xe.createElement("linearGradient",{xlinkHref:"#yoast-connect-google-site-kit_svg__a",id:"yoast-connect-google-site-kit_svg__e",x1:73.951,x2:73.951,y1:36.276,y2:23.046,gradientUnits:"userSpaceOnUse"})),l||(l=xe.createElement("linearGradient",{id:"yoast-connect-google-site-kit_svg__f",x1:25.237,x2:25.237,y1:16.169,y2:36.914,gradientUnits:"userSpaceOnUse"},xe.createElement("stop",{offset:0,stopColor:"#77b227"}),xe.createElement("stop",{offset:.47,stopColor:"#75b027"}),xe.createElement("stop",{offset:.64,stopColor:"#6eab27"}),xe.createElement("stop",{offset:.75,stopColor:"#63a027"}),xe.createElement("stop",{offset:.85,stopColor:"#529228"}),xe.createElement("stop",{offset:.93,stopColor:"#3c8028"}),xe.createElement("stop",{offset:1,stopColor:"#246b29"}))),c||(c=xe.createElement("clipPath",{id:"yoast-connect-google-site-kit_svg__g"},xe.createElement("path",{d:"M169.334 22h14.973v15.909h-14.973z"}))),d||(d=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__b)",fillRule:"evenodd",d:"M36.765 29.643c0-3.42 1.83-6.49 6.405-6.49 4.402 0 6.375 2.8 6.386 6.698.008 3.2-1.785 6.416-6.386 6.416-4.602 0-6.405-3.072-6.405-6.624zm8.432-2.74c-1.174-1.64-4.688-1.64-4.8 2.932.046 2.582 1.245 3.614 2.773 3.63 3.316.039 3.092-5.067 2.027-6.562z",clipRule:"evenodd"})),u||(u=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__c)",d:"M80.278 33.094v-6.631h2.368v-2.874h-2.368v-3.476h-3.66v3.476h-1.856v2.876h1.857v6.258c0 3.553 2.477 5.665 5.092 6.102l1.092-2.948c-1.524-.194-2.51-1.333-2.525-2.783z"})),p||(p=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__d)",fillRule:"evenodd",d:"M61.81 27.062v4.981c0 .7.196 1.67.426 2.803.088.436.182.897.27 1.376h-3.523l-.611-1.472c-4.118 2.994-8.053.974-8.053-2.168 0-4.131 4.01-4.632 7.777-4.632l.003-.249c.01-.465.02-.985-.24-1.336v-.007l-.034-.04-.011-.013c-.602-.675-2.327-1.028-5.21.341l-1.283-2.575c4.428-1.546 10.143-1.555 10.46 2.47.019.174.028.347.03.52zm-6.52 3.81c-2.718 1.331-.064 4.384 2.835 1.14v-1.425c-.949 0-2.035.012-2.835.284z",clipRule:"evenodd"})),h||(h=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__e)",d:"M67.439 26.794c0-1.227 1.966-1.8 5.064-.386l1.072-2.605c-4.17-1.262-9.866-1.371-9.904 2.991-.017 2.091 1.324 3.216 3.255 3.934 1.337.497 3.268.754 3.262 1.82-.007 1.391-3 1.604-5.725-.268l-1.101 2.823c3.716 1.85 10.627 1.902 10.59-2.734-.03-4.583-6.513-3.798-6.513-5.575z"})),m||(m=xe.createElement("path",{fill:"url(#yoast-connect-google-site-kit_svg__f)",d:"m35.218 16.875-5.305 14.734-2.54-7.956h-3.779l4.23 10.866a3.956 3.956 0 0 1 0 2.877c-.474 1.213-1.26 2.25-3.177 2.508v3.221c3.734 0 5.753-2.295 7.554-7.326l7.06-18.924z"})),g||(g=xe.createElement("path",{fill:"#f0ecf0",d:"M124.088 57.357c15.427 0 27.934-12.506 27.934-27.933S139.515 1.49 124.088 1.49 96.155 13.997 96.155 29.424s12.506 27.933 27.933 27.933z"})),y||(y=xe.createElement("path",{fill:"#9e005d",d:"M122.68 23.422c5.075-5.662 3.282-.196 13.081-2.26 2.792-.587 7.802-1.905 9.067.833 1.427 3.092 4.014 3.471 3.211 5.47-1.412 3.512-6.46 4.52-7.887.556-1.819-1.232-8.98 2.24-11.167 2.775-.813.198-.868-2.038-1.675-2.168-.529-.085-.462-.17-.939-.575-4.613-3.918-4.904-3.277-5.22-4.126.482-.115.95-.396 1.531-.503z"})),f||(f=xe.createElement("path",{fill:"#6c2548",d:"M145.465 25.27c-1.744-.556-3.859.788-3.015 2.668.204.456 1.233 2.392 1.665 2.536 1.633.552 5.651-2.227 1.35-5.204z"})),x||(x=xe.createElement("path",{fill:"#ffc399",d:"M145.972 26.652c-.452-.226-2.526.313-2.3 1.188.281 1.084.758 1.655 1.395 1.998 1.627.875 1.365 2.531 3.684 2.5 1.12-.015 4.022-1.557 4.118-.456.157 1.823.464 3.564.792 3.17.792-.951 1.109-1.03 1.188-4.2.021-.887-2.14-1.506-3.013-2.854-.473-.733-2.932-.714-5.866-1.348z"})),w||(w=xe.createElement("path",{fill:"#be1e2d",d:"M109.348 16.345c-2.102-1.797-8.454 4.23-7.974 6.137.479-.51 1.186-1.505 1.973-1.316-2.719 1.838-3.191 6.484-1.784 9.259.158-.735.439-1.525.897-2.123-.778 3.037.466 8.256 4.271 10.873-.26-1.915-1.201-5.028.477-6.267 2.485-1.836 5.651-2.398 7.153-5.43 3.716-7.506-7.675-12.913-5.013-11.135z"})),b||(b=xe.createElement("path",{fill:"#9e005d",d:"M111.503 27.227c-1.65.136-7.152 11.633.475 20.362 1.067 1.222 2.372 3.568 3.92 3.78 3.256.442 11.848-1.813 15.059-3.189 12.146-5.202 1.267-10.842-.308-16.792-1.421-5.366-1.725-8.762-7.928-8.997-2.92-.11-11.15 1.768-11.95 5.058-.224.108-.109-.08.732-.224z"})),v||(v=xe.createElement("path",{fill:"#6c2548",d:"M123.196 23.817c3.828 1.233 6.256 5.375 7.755 8.771-1.38-4.316-2.059-8.262-7.932-8.95-.013-.072.419-.694.177.18z"})),_||(_=xe.createElement("path",{fill:"#6c2548",d:"M127.718 23.362c1.071.893 1.961 2.794 2.438 3.984.522 1.306.088 3.329.571 4.638-1.292-3.232-1.307-5.14-3.007-8.622z"})),k||(k=xe.createElement("path",{fill:"#ffc399",d:"M125.772 33.468c-1.058.375-2.898.677-4.103 1.248-2.187 1.037-4.936-1.725-7.313-1.188-.858.194-3.845-.873-4.082-1.942-.293-1.325-.745-1.352-.078-2.22 2.619-3.402 2.815-1.566 2.932-6.896.019-.886-.2-1.312.079-2.061.279-.75.21.017 1.09-.143.879-.16 2.996-1.05 3.869-.652 1.533.699.513 3.972 1.61 5.107 1.139 1.177 3.841-.028 4.989 1.128 1.439 1.45 1.324 6.848 1.005 7.621z"})),j||(j=xe.createElement("path",{fill:"#e57c57",d:"M123.021 27.88c.285-.57.221-1.564-.026-2.586-1.175-.034-2.504.164-3.217-.575-.65-.671-.558-2.085-.692-3.277a3.502 3.502 0 0 1-.607-.122c-1.263-.372-2.67-.835-4.069-1.077-.039.008-.077.017-.111.023-.405.075-.605-.057-.733-.143l-.213-.017c-.04.05-.085.141-.144.303-.271.728-.073 1.156-.079 1.995 1.386 3.614 6.644 11.98 9.895 5.477z"})),S||(S=xe.createElement("path",{fill:"#f1f2f2",d:"M116.06 33.648c7.293 3.488 11.969 5.47 13.635 9.989-1.031-4.757-.893-8.622-4.459-15.161.675 7.425-8.761 5.37-9.176 5.172z"})),C||(C=xe.createElement("path",{fill:"#6c2548",d:"M129.697 43.002c.157-3.884-1.057-18.564-4.44-20.057-1.056-.466-10.726 1.174-7.768 1.348 4.625.27 7.293 2.775 7.928 4.28.792 1.11 3.081 8.599 4.28 14.427z"})),E||(E=xe.createElement("path",{fill:"#9e005d",d:"M129.616 43.001c.157-3.884-1.93-18.723-5.311-20.214-1.056-.467-9.776 1.333-6.819 1.505 4.626.27 7.294 2.775 7.928 4.28.792 1.11 3.003 8.599 4.202 14.427z"})),T||(T=xe.createElement("path",{fill:"#ffc399",d:"M126.288 12.877c.555 2.457-.397 1.902.078 3.488.375 1.25.729 2.066.635 3.488-.241 3.656-2.983 6.876-3.086 6.978-1.45 1.45-3.132 1.295-5.476.077-4.364-2.266-6.898-4.994-7.532-11.823-.471-5.072 3.763-8.847 9.014-8.313 3.249.332 5.449 2.04 6.367 6.103z"})),R||(R=xe.createElement("path",{fill:"#be1e2d",d:"M114.461 9.389c3.944-.179 3.02 1.925 6.539 2.973 2.794.832 5.707-1.012 5.173 3.745-.475 4.212 9.401-4.116 1.46-7.591-1.269-.556-1.137-1.414-2.378-3.013-2.598-3.343-11.337-7.055-15.061-.873-.944 1.567 2.657 4.101 4.265 4.757z"})),L||(L=xe.createElement("path",{fill:"#be1e2d",d:"M114.282 9.508c.912 3.597-.161 4.23-.653 5.47-.541 1.364-.803 2.65-1.487 3.925-.992-2.07-2.184-.317-5.276-4.36-5.537-7.24 9.782-16.915 7.416-5.035z"})),I||(I=xe.createElement("path",{fill:"#ffc399",d:"M112.336 19.497c.617-1.633-4.029-4.43-3.599-1.043.209 1.642 1.516 2.574 2.913 3.152 2.294.945 1.195-1.676.569-3.058l.119.952z"})),A||(A=xe.createElement("path",{fill:"#be1e2d",d:"M113.168 14.026c.309 1.25-.03 6.814 1.785 8.997-3.152-1.714-2.37-5.13-1.785-8.997z"})),P||(P=xe.createElement("path",{fill:"#be1e2d",d:"M112.691 15.573c-.728.415-1.441 3.388-.323 5.705.006-.021.483-4.91.323-5.705z"})),N||(N=xe.createElement("path",{fill:"#9e005d",d:"M117.012 34.121c-2.877-1.74-5.509-2.068-4.725-7.2.867-1.004.747-1.897.807-3.383-1.109.396-4.086 1.948-5.434 2.655-1.985 1.04-4.361 3.41-2.458 5.39.703.73-1.758 1.923.937 6.759 1.506-2.617 2.711-4.855 3.661-4.934 3.33-.079 4.431 1.667 7.372 2.378 7.214 1.744 11.654 6.501 12.525 8.164.036-1.051-1.269-4.914-12.683-9.829z"})),M||(M=xe.createElement("path",{fill:"#9e005d",d:"M108.45 34.202c-8.258 11.429 2.709 12.432 5.351 22.998.119.48.656 1.17 1.503 1.322 5.051.903 10.884-1.744 15.862-6.92 1.408-1.463.247-4.902-1.546-5.648-2.319-1.546-7.378 4.023-13.006 2.992-.677-1.02-1.505-13.477-8.164-14.744z"})),O||(O=xe.createElement("path",{fill:"#a0c9cb",d:"m155.213 40.425-.27 9.99-6.399-1.368-.094-9.712z"})),F||(F=xe.createElement("path",{fill:"#75b0b3",d:"m155.48 50.235-.509.238c.085-11.096-.171-10.3.509-10.166v9.93z"})),D||(D=xe.createElement("path",{fill:"#66a7ab",d:"M150.965 40.959c2.473.277 3.211 6.54 2.498 9.037-.119-.12-3.567-.833-3.686-.713-1.718-1.964-.992-8.57 1.188-8.324z"})),q||(q=xe.createElement("path",{fill:"#467d7f",d:"M154.983 40.783s.153-1.902 0-2.02c-.153-.12-6.641-.655-6.641-.655-.776 1.706-.431 1.282 6.641 2.675z"})),$||($=xe.createElement("path",{fill:"#67a8ac",d:"m152.371 30.436 2.881 8.443-6.729-1.15-3.307-9.016z"})),B||(B=xe.createElement("path",{fill:"#55989b",d:"m152.988 32.518.101.02-.716-2.1-7.155-1.725.656 1.786z"})),U||(U=xe.createElement("path",{fill:"#519093",d:"m148.766 37.79-1.127.713-2.679-8.541 1.25-.893z"})),z||(z=xe.createElement("path",{fill:"#b1d3d4",d:"m152.794 30.08-.922 1.069-6.552-1.01.869-1.011z"})),W||(W=xe.createElement("path",{fill:"#a0c9cb",d:"M155.648 39.988c0 1.052-1.046 1.052-1.046 0s1.046-1.052 1.046 0z"})),H||(H=xe.createElement("path",{fill:"#a0c9cb",d:"M147.639 38.502c1.501-.95.058-.881 7.713.317-1.38 1.189-.053 1.07-7.713-.317z"})),K||(K=xe.createElement("path",{fill:"#75b0b3",d:"m155.354 38.879-1.037.832-2.444-8.681.922-1.07z"})),Y||(Y=xe.createElement("path",{fill:"#6b1523",d:"M117.374 55.11c1.071-.299.06-1.962.713-4.862-1.972 4.042-1.699 5.134-.713 4.862z"})),V||(V=xe.createElement("path",{fill:"#6b1523",d:"M119.989 48.095c.059-.594-2.913-8.918-9.097-9.276 3.448.12 10.494 9.176 8.452 9.395-1.853.535-6.076 2.32-4.41 3.925 1.307.773 1.605-3.152 4.627-3.895 4.567.882 7.438-3.94 10.415-1.874-2.809-3.503-5.362 2.14-9.989 1.725z"})),G||(G=xe.createElement("path",{fill:"#6c2548",d:"M127.793 46.647c.309-.639 1.427-.396 2.336-1.56.449-.576.948-.203 1.687-.222 1.541-.043 2.544 2.996 1.737 4.15-.445.635-2.745 1.297-3.62 1.518-1.771.445-3.511-3.036-2.14-3.884z"})),Z||(Z=xe.createElement("path",{fill:"#c44c31",d:"M123.081 15.099c-.993 1.109 1.35 4.64.988 6.262-.284 1.27-1.827.705-2.617-.157.694.027 1.78.445 1.982.078.76-1.384-1.539-4.914-.353-6.183z"})),Q||(Q=xe.createElement("path",{fill:"#be1e2d",d:"M124.031 23.074c-2.5.504-4.483.504-5.69-.194.579.55 1.976 1.906 3.268 1.887 1.293-.02 1.235-.569 1.355-1.11.076-.206.528-.326 1.064-.586z"})),X||(X=xe.createElement("path",{fill:"#e57c57",d:"M117.389 23.045c0-.616.545-.83 1.075-.93-.441.295-.092.88-.098.904-.481-.272-.62-.174-.977.026z"})),J||(J=xe.createElement("path",{fill:"#35602c",d:"m150.614 40.5-2.973-.396.428 8.839 2.736-.024c2.241-.23 2.479-8.077-.191-8.42z"})),ee||(ee=xe.createElement("path",{fill:"#569d48",d:"M149.867 44.427c.285 5.88-3.738 6.075-4.023.194-.285-5.88 3.737-6.075 4.023-.194z"})),te||(te=xe.createElement("path",{fill:"#e57c57",d:"M136.434 42.288c5.055-.658 5.866-2.932 6.341-1.11.315.786-1.069 1.442-1.903 1.755-.443.164-1.044-.055-1.551-.104-1.12-.109-1.822.562-2.885.65-.123-.631.296-1.046 0-1.189z"})),se||(se=xe.createElement("path",{fill:"#35602c",d:"M139.873 43.184c.168-.905 5.647-1.784 7.051-1.867 1.803-.107 2.161 6.066.475 6.184-2.362.164-4.487.357-6.872-.392-1.388-.435-1.904-.588-1.927-2.106-.017-1.12.749-2.068 1.273-1.819z"})),re||(re=xe.createElement("g",{fill:"#ffc399"},xe.createElement("path",{d:"M131.123 45.597c3.759-1.073 7.006-4.783 7.689-4.023 1.091 1.212-.543 2.16-1.06 3.489-.698 1.797 1.054-.037-.403 1.784-.634.792-1.961.179-2.793.179-.556.157-1.863 1.328-2.498 1.486-1.031-.158-2.364-2.042-.937-2.913z"}),xe.createElement("path",{d:"M138.898 41.243c3.239.682 4.923-.098 5.189 1.152.181.856 1.606 3.358 1.559 4.323-1.725.462-2.504-2.683-3.13-3.156-.426-.321-2.909.188-3.733.077-.824-.111-1.378-2.191.115-2.396z"}),xe.createElement("path",{d:"M141.004 43.042c.573 1.983 2.144 3.145 1.51 3.79-.848.863-1.691 1.404-2.013 1.263-1.976-.87.322-1.169-.004-1.496-.326-.328-1.995-2.12-2.34-2.198.24-.924-.094-1.263-.303-2.212.211.07 2.865.35 3.152.853z"}),xe.createElement("path",{d:"M137.707 42.446c.958-.115 1.457 1.48 1.546 1.784.166.567 1.348 1.806 1.427 2.379.179 1.277-1.071 1.188-1.755 1.456-.564.298-1.991-.743-.683-1.576-.935-.019-3.073-1.497-2.694-2.016.241-.004 1.148-2.383 2.157-2.025z"}),xe.createElement("path",{d:"M137.599 43.08c.556 1.11 1.03 3.964.873 4.28-.271.544-.865 1.07-1.51 1.34s-1.026-.943-1.978-1.893c.792-.713 1.691-.128 1.665.239-.03.438.079-.318.396-.239-.238-.317-.884-1.365-1.188-1.982-.434-.88.635-2.536 1.744-1.744zM143.91 28.315c.475 1.744-.187 2.5-.238 3.092-.085.99.758 1.205 1.348 1.901.873 1.031.792 2.22 1.505 2.775 1.983-.873.015-3.264-.193-3.786-.158-.396.034-2.875 2.016-3.032-1.348-1.665-3.249-2.22-4.44-.952z"}))),oe||(oe=xe.createElement("path",{fill:"#6b1523",d:"M112.653 25.483c-1.903.93-5.883 2.474-6.737 4.518-.599 1.431 5.707 1.11 13.081 5.31-3.805-2.774-9.996-4.01-10.307-4.992-.106-.335 2.715-4.87 3.963-4.836zM105.279 31.507c.839 1.118 2.3 1.11 4.202 1.586-.878-.434-4.779.837-4.361 0 .157-.317-.167-.875.157-1.586z"})),ne||(ne=xe.createElement("path",{fill:"#f1f2f2",d:"M116.341 17.639c.007-.03.462-.848 2.206-1.014.678-.064 1.896.509 1.795 1.169-1.007.43-1.888.675-4.001-.155z"})),ie||(ie=xe.createElement("path",{fill:"#231f20",d:"M120.347 17.688c-.062-.337-.441-.754-.918-.767-.526-.015-1.035.55-1.044.897-.004.153.086.276.224.37.684.015 1.19-.162 1.733-.394a.422.422 0 0 0 .005-.106z"})),ae||(ae=xe.createElement("path",{fill:"#231f20",d:"M120.368 17.667c-.102-.768-1.512-1.3-2.404-1.303-1.244 0-1.491 1.171-2.272.735.177.703 1.141.928 1.801.933-2.327-.695 2.14-2.302 2.875-.365z"})),le||(le=xe.createElement("path",{fill:"#f1f2f2",d:"M123.27 17.549c.977.332 2.076-.19 2.44-.741.592-.899-1.629-2.066-2.44.74z"})),ce||(ce=xe.createElement("path",{fill:"#231f20",d:"M124.226 17.238a.33.33 0 0 0 .122.373c.604-.115 1.132-.452 1.365-.803a.576.576 0 0 0 .093-.245c-.323-.585-1.245-.539-1.58.675z"})),de||(de=xe.createElement("path",{fill:"#231f20",d:"M123.249 17.568c.092-.724.417-1.478 1.329-1.887 1.175-.528 1.537.92 1.938-.268-.147 1.467-.592 1.476-1.523 1.987 1.022-.356.958-1.906-.373-1.403-1.062.402-1.196 1.152-1.369 1.571z"})),ue||(ue=xe.createElement("path",{fill:"#be1e2d",d:"M126.024 14.621c.517.586-.337-.17-1.304-.06-.321.039-.841.352-1.122.365.554-1.076 1.663-1.17 2.426-.305zM119.708 14.939c-3.103-.776-3.531.176-4.685 1.79 2.238-2.446 3.518-.587 5.132-1.94-.245.024-.473.103-.447.15z"})),pe||(pe=xe.createElement("path",{fill:"#6b1523",d:"M106.375 37.808c.416-1.427 1.651-3.48 2.315-3.607 4.108-.792 14.097 5.034 17.246 5.866-5.053-1.248-12.544-5.41-17.122-4.876-.586.192-2.081 1.901-2.439 2.617z"})),he||(he=xe.createElement("path",{fill:"#642243",d:"M140.501 28.713c-.421-1.256-1.179-2.587-.805-4.042.379-1.475 2.232-2.05 2.815-3.43-1.65-.713-1.58 1.923-2.468 2.349-.038-.782-.142-1.516-.129-2.324-1.54 2.028-.703 4.913.589 7.45zM127.184 21.222c7.849.713 7.253 7.135 12.485 6.303-5.471 1.426-7.017-6.303-12.485-6.303z"})),me||(me=xe.createElement("path",{fill:"#c44c31",d:"M120.525 19.497c0 .236-.594.236-.594 0s.594-.237.594 0zM118.622 19.852c0 .236-.358.236-.358 0s.358-.236.358 0zM124.39 19.02c0 .316-.474.316-.474 0 0-.315.474-.315.474 0zM125.28 19.972c0 .237-.475.237-.475 0s.475-.236.475 0zM125.638 18.784c0 .236-.474.236-.474 0 0-.237.474-.237.474 0zM120.406 20.685c0 .236-.475.236-.475 0s.475-.236.475 0z"})),ge||(ge=xe.createElement("path",{fill:"#569d48",d:"M136.975 46.802c-.364-.268-.53-.656-.498-1.16-4.862.762-12.996 10.236-26.102 8.07.919.613 1.743 1.082 2.706 1.382 10.638 1.337 19.676-7.331 23.896-8.292z"})),ye||(ye=xe.createElement("path",{fill:"#5f6368",d:"M238.632 23.565h2.267v.074l-5.066 5.844 5.405 7.63v.075h-2.151l-4.437-6.357-2.094 2.419v3.94h-1.754V23.564h1.754v7.027h.074zm5.892 1.084c0 .339-.124.637-.364.877s-.529.364-.877.364c-.34 0-.638-.124-.877-.364a1.198 1.198 0 0 1-.365-.877c0-.348.124-.637.365-.878.239-.24.53-.364.877-.364.339 0 .637.124.877.364.248.249.364.538.364.878zm-.355 3.22v9.327h-1.755v-9.328zm5.604 9.477c-.762 0-1.392-.232-1.896-.704-.505-.472-.762-1.126-.77-1.962v-5.215h-1.639v-1.597h1.639v-2.856h1.754v2.856h2.285v1.597h-2.284v4.644c0 .62.124 1.043.364 1.266.24.224.513.332.819.332.141 0 .273-.017.414-.05a2.19 2.19 0 0 0 .373-.124l.554 1.564c-.471.166-1.001.249-1.613.249zm-55.489-.878c-.969-.704-1.631-1.697-1.995-2.972l2.151-.878c.216.803.597 1.448 1.151 1.962.547.505 1.209.761 1.978.761.721 0 1.324-.182 1.829-.554.505-.373.754-.886.754-1.531 0-.596-.224-1.085-.662-1.474-.439-.389-1.209-.778-2.31-1.167l-.91-.323c-.977-.338-1.796-.827-2.459-1.464-.662-.637-.992-1.473-.992-2.515 0-.721.198-1.383.587-1.995.389-.613.935-1.093 1.639-1.458.695-.355 1.482-.538 2.367-.538 1.275 0 2.293.306 3.046.927.761.621 1.266 1.308 1.522 2.087l-2.051.868c-.15-.464-.43-.87-.853-1.217-.421-.356-.96-.53-1.622-.53s-1.224.166-1.68.505c-.455.34-.679.77-.679 1.3 0 .504.207.91.612 1.241.406.323 1.043.638 1.913.935l.911.306c1.249.431 2.209 1.002 2.896 1.698.687.695 1.027 1.63 1.027 2.797 0 .952-.241 1.747-.729 2.383a4.482 4.482 0 0 1-1.862 1.433 5.981 5.981 0 0 1-2.326.463c-1.209 0-2.293-.348-3.253-1.05zm9.924-11.571a1.45 1.45 0 0 1-.439-1.067c0-.423.149-.779.439-1.069a1.444 1.444 0 0 1 1.067-.439c.422 0 .778.15 1.067.44.291.289.439.645.439 1.067 0 .422-.149.778-.438 1.067a1.455 1.455 0 0 1-1.067.44c-.423-.01-.779-.15-1.068-.44zm-.05 1.937h2.234v10.362h-2.234zm7.093 10.304a2.898 2.898 0 0 1-.993-.588c-.579-.579-.878-1.373-.878-2.375v-5.372h-1.812v-1.97h1.812v-2.92h2.235v2.93h2.517v1.97h-2.517v4.874c0 .555.108.952.323 1.176.207.273.555.405 1.06.405.231 0 .43-.033.612-.091.174-.058.364-.157.571-.298v2.177c-.447.207-.985.306-1.622.306a3.735 3.735 0 0 1-1.308-.224zm6.133-.33a4.946 4.946 0 0 1-1.887-1.962c-.455-.836-.679-1.771-.679-2.814 0-.994.224-1.904.662-2.756.439-.845 1.052-1.523 1.838-2.02s1.68-.754 2.682-.754c1.043 0 1.945.232 2.714.688a4.572 4.572 0 0 1 1.747 1.887c.397.803.596 1.697.596 2.707 0 .19-.017.43-.058.711h-7.946c.083.96.423 1.706 1.026 2.227.58.512 1.33.79 2.103.778.637 0 1.192-.141 1.655-.439a3.185 3.185 0 0 0 1.126-1.192l1.887.894c-.488.853-1.126 1.523-1.912 2.011-.786.489-1.73.729-2.823.729-1.018.016-1.927-.215-2.731-.695zm5.397-6.01a2.497 2.497 0 0 0-.348-1.084 2.486 2.486 0 0 0-.927-.902c-.413-.24-.918-.364-1.515-.364-.72 0-1.324.215-1.821.637-.496.422-.836 1.001-1.026 1.714z"})),fe||(fe=xe.createElement("g",{fillRule:"evenodd",clipPath:"url(#yoast-connect-google-site-kit_svg__g)",clipRule:"evenodd"},xe.createElement("path",{fill:"#fbbc05",d:"m170.119 26.56 2.576 1.97a4.563 4.563 0 0 0 0 2.85l-2.576 1.97a7.667 7.667 0 0 1-.785-3.395c0-1.22.283-2.373.785-3.394z"}),xe.createElement("path",{fill:"#ea4335",d:"m172.696 28.53-2.577-1.97a7.64 7.64 0 0 1 6.877-4.266c1.95 0 3.691.731 5.049 1.915l-2.229 2.229a4.428 4.428 0 0 0-2.82-1.01 4.518 4.518 0 0 0-4.3 3.103z"}),xe.createElement("path",{fill:"#34a853",d:"m170.118 33.347 2.576-1.975a4.514 4.514 0 0 0 4.301 3.11c2.124 0 3.726-1.08 4.109-2.96h-4.109v-2.96h7.139c.104.452.174.94.174 1.392 0 4.875-3.482 7.661-7.313 7.661a7.637 7.637 0 0 1-6.877-4.268z"}),xe.createElement("path",{fill:"#4285f4",d:"m181.988 35.707-2.446-1.893c.8-.505 1.357-1.284 1.562-2.293h-4.109v-2.96h7.138c.105.453.175.94.175 1.393 0 2.497-.914 4.446-2.32 5.753z"}))))},4432(e,t,s){"use strict";var r=s(1802),o=s.n(r);s(3657),s(790),o().string.isRequired,o().object.isRequired,o().string.isRequired,o().func.isRequired,o().bool.isRequired},4631(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.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:t},e),r.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"}))})},4976(e,t,s){"use strict";s.d(t,{N_:()=>u});var r=s(1609),o=s(5795),n=s(7767),i=s(5588);function a(){return a=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},a.apply(this,arguments)}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const l=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}new Map,r.startTransition,o.flushSync,r.useId;const c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,u=r.forwardRef(function(e,t){let s,{onClick:o,relative:u,reloadDocument:p,replace:h,state:m,target:g,to:y,preventScrollReset:f,unstable_viewTransition:x}=e,w=function(e,t){if(null==e)return{};var s,r,o={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(o[s]=e[s]);return o}(e,l),{basename:b}=r.useContext(n.jb),v=!1;if("string"==typeof y&&d.test(y)&&(s=y,c))try{let e=new URL(window.location.href),t=y.startsWith("//")?new URL(e.protocol+y):new URL(y),s=(0,i.pb)(t.pathname,b);t.origin===e.origin&&null!=s?y=s+t.search+t.hash:v=!0}catch(e){}let _=(0,n.$P)(y,{relative:u}),k=function(e,t){let{target:s,replace:o,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d}=void 0===t?{}:t,u=(0,n.Zp)(),p=(0,n.zy)(),h=(0,n.x$)(e,{relative:c});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,s)){t.preventDefault();let s=void 0!==o?o:(0,i.AO)(p)===(0,i.AO)(h);u(e,{replace:s,state:a,preventScrollReset:l,relative:c,unstable_viewTransition:d})}},[p,u,h,o,a,s,e,l,c,d])}(y,{replace:h,state:m,target:g,preventScrollReset:f,relative:u,unstable_viewTransition:x});return r.createElement("a",a({},w,{href:s||_,onClick:v||p?o:function(e){o&&o(e),e.defaultPrevented||k(e)},ref:t,target:g}))});var p,h;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p||(p={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(h||(h={}))},4997(e){"use strict";e.exports=window.wp.blocks},5103(e,t,s){"use strict";s.d(t,{A:()=>u});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(790);const c=n().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"};
`,d=e=>{const{siteUrl:t}=e;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("span",{className:"screen-reader-text",children:t}),(0,l.jsx)(c,{"aria-hidden":"true",children:(0,l.jsx)("span",{children:t})})]})};d.propTypes={siteUrl:a().string.isRequired};const u=d},5588(e,t,s){"use strict";function r(){return r=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},r.apply(this,arguments)}var o,n;function i(e,t){if(!1===e||null==e)throw new Error(t)}function a(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function l(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function c(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&"/"!==r?null:e.slice(s)||"/"}function d(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+s+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function u(e,t){let s=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?s.map((e,t)=>t===s.length-1?e.pathname:e.pathnameBase):s.map(e=>e.pathnameBase)}function p(e,t,s,o){let n;void 0===o&&(o=!1),"string"==typeof e?n=l(e):(n=r({},e),i(!n.pathname||!n.pathname.includes("?"),d("?","pathname","search",n)),i(!n.pathname||!n.pathname.includes("#"),d("#","pathname","hash",n)),i(!n.search||!n.search.includes("#"),d("#","search","hash",n)));let a,c=""===e||""===n.pathname,u=c?"/":n.pathname;if(null==u)a=s;else{let e=t.length-1;if(!o&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}a=e>=0?t[e]:"/"}let p=function(e,t){void 0===t&&(t="/");let{pathname:s,search:r="",hash:o=""}="string"==typeof e?l(e):e,n=s?s.startsWith("/")?s:function(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?s.length>1&&s.pop():"."!==e&&s.push(e)}),s.length>1?s.join("/"):"/"}(s,t):t;return{pathname:n,search:m(r),hash:g(o)}}(n,a),h=u&&"/"!==u&&u.endsWith("/"),y=(c||"."===u)&&s.endsWith("/");return p.pathname.endsWith("/")||!h&&!y||(p.pathname+="/"),p}s.d(t,{AO:()=>a,Gh:()=>p,HS:()=>h,Oi:()=>i,pb:()=>c,tH:()=>y,yD:()=>u}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(n||(n={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const h=e=>e.join("/").replace(/\/\/+/g,"/"),m=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",g=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class y extends Error{}const f=["post","put","patch","delete"],x=(new Set(f),["get",...f]);new Set(x),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred")},5674(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(1609),o=s(1679),n=s.n(o),i=s(1802),a=s.n(i),l=s(7723),c=s(8468),d=s(2379),u=s(8495),p=s(7558),h=s(1969),m=s(790);const g=n().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: ${u.colors.$color_white};
`,y=n().div`
	box-sizing: border-box;
	max-width: ${d.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${d.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${u.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 f extends r.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(0,h.cP)(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:d.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:d.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:d.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:d.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,m.jsx)(y,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,l.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,m.jsx)(g,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,m.jsx)(p.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:d.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}f.propTypes={src:a().string,alt:a().string,onImageLoaded:a().func,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},f.defaultProps={src:"",alt:"",onImageLoaded:c.noop,onImageClick:c.noop,onMouseEnter:c.noop,onMouseLeave:c.noop};const x=f},5768(e,t,s){"use strict";s.d(t,{e:()=>u});var r=s(6513),o=s(6087),n=s(2458),i=s(7723),a=s(5831),l=s(1802),c=s.n(l),d=s(790);const u=({link:e})=>{const t=(0,o.useMemo)(()=>(0,n.x)((0,i.sprintf)(/* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */ /* translators: %1$s expands to "Yoast SEO" academy, which is a clickable link. */
(0,i.__)("Want to learn SEO from Team Yoast? Check out our %1$s!","wordpress-seo"),"<link/>"),{link:(0,d.jsx)("a",{href:e,target:"_blank",rel:"noopener",children:"Yoast SEO academy"})}),[]);return(0,d.jsxs)(a.Paper,{as:"div",className:"yst-p-6 yst-space-y-3",children:[(0,d.jsx)(a.Title,{as:"h2",size:"4",className:"yst-text-base yst-text-primary-500",children:(0,i.__)("Learn SEO","wordpress-seo")}),(0,d.jsxs)("p",{children:[t,(0,d.jsx)("br",{}),(0,i.__)("We have both free and premium online courses to learn everything you need to know about SEO.","wordpress-seo")]}),(0,d.jsxs)(a.Link,{href:e,className:"yst-block yst-font-medium",target:"_blank",rel:"noopener",children:[(0,i.sprintf)(/* translators: %1$s expands to "Yoast SEO academy". */ /* translators: %1$s expands to "Yoast SEO academy". */
(0,i.__)("Check out %1$s","wordpress-seo"),"Yoast SEO academy"),(0,d.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,i.__)("(Opens in a new browser tab)","wordpress-seo")}),(0,d.jsx)(r.A,{className:"yst-w-3 yst-h-3 yst-mb-[1px] yst-icon-rtl yst-inline-block"})]})]})};u.propTypes={link:c().string.isRequired}},5795(e){"use strict";e.exports=window.ReactDOM},5831(e){"use strict";e.exports=window.yoast.uiLibrary},5979(e,t,s){"use strict";s.d(t,{applyReplaceUsingPlugin:()=>g,excerptFromContent:()=>m,fillReplacementVariables:()=>d,mapCustomFields:()=>h,mapCustomTaxonomies:()=>p});var r=s(8468),o=s(2310),n=s(9183),i=s(6250),a=s(3335);const{stripHTMLTags:l}=a.strings,c=["slug","content","contentImage","snippetPreviewImageURL"];function d(e,t){(0,r.forEach)(e,(e,s)=>{c.includes(s)||t.dispatch((0,n.us)(s,e))})}function u(e,t="_"){return e.replace(/\s/g,t)}function p(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,r.forEach)(e.custom_taxonomies,(e,t)=>{const{name:r,label:o,descriptionName:n,descriptionLabel:l}=function(e){const t=u(e);return{name:"ct_"+t,label:(0,i.GG)(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:(0,i.GG)(e+" description (custom taxonomy)")}}(t),c="string"==typeof e.name?(0,a.decodeHTML)(e.name):e.name,d="string"==typeof e.description?(0,a.decodeHTML)(e.description):e.description;s[r]={value:c,label:o},s[n]={value:d,label:l}}),t.dispatch((0,n.t$)(s)),(0,r.omit)({...e},"custom_taxonomies")}function h(e,t){return e.custom_fields?((0,r.forEach)(e.custom_fields,(e,s)=>{const{name:r,label:o}=function(e){return{name:"cf_"+u(e),label:(0,i.GG)(e+" (custom field)")}}(s);t.dispatch((0,n.us)(r,e,o))}),(0,r.omit)({...e},"custom_fields")):e}function m(e,t=156){return(e=(e=(0,o.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const g=function(e){const t=(0,r.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,r.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,r.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],r.identity);return{url:e.url,title:l(t(e.title)),description:l(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?l(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:l(s("data_page_title",e.title)),description:l(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?l(s("data_page_title",e.filteredSEOTitle)):""}}},5986(e){"use strict";e.exports=window.yoast.externals.contexts},6087(e){"use strict";e.exports=window.wp.element},6093(e,t,s){"use strict";s.d(t,{A:()=>n,Y:()=>o});var r=s(1679);const o=20,n=s.n(r)().span`
	line-height: ${o}px;
	min-height : ${o}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;
`},6250(e,t,s){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}s.d(t,{GG:()=>r}),s(2458),s(790)},6377(e,t,s){"use strict";var r=s(7948);(0,r.r)({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},(e,t)=>(0,r.u)(`@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.`)),(0,r.r)({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},(e,t)=>(0,r.u)(`@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.`))},6513(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.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:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))})},6554(e){"use strict";e.exports=window.yoast.componentsNew},6633(e,t,s){"use strict";s.d(t,{h:()=>a});var r,o,n=s(1609);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},i.apply(null,arguments)}const a=e=>n.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",id:"yoast-premium-logo-new_svg__Layer_1","data-name":"Layer 1",viewBox:"0 0 200 200"},e),r||(r=n.createElement("defs",null,n.createElement("radialGradient",{id:"yoast-premium-logo-new_svg__radial-gradient",cx:116.36,cy:44.04,r:36.58,fx:116.36,fy:44.04,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{offset:0,stopColor:"#9fda4f"}),n.createElement("stop",{offset:1,stopColor:"#77b227"})),n.createElement("radialGradient",{id:"yoast-premium-logo-new_svg__radial-gradient-2",cx:92.08,cy:114.68,r:29.3,fx:92.08,fy:114.68,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{offset:0,stopColor:"#fec228"}),n.createElement("stop",{offset:.22,stopColor:"#fbb81e"}),n.createElement("stop",{offset:1,stopColor:"#f49a00"})),n.createElement("radialGradient",{id:"yoast-premium-logo-new_svg__radial-gradient-3",cx:60.52,cy:156.68,r:14.35,fx:60.52,fy:156.68,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{offset:0,stopColor:"#ff4e47"}),n.createElement("stop",{offset:1,stopColor:"#ed261f"})),n.createElement("linearGradient",{id:"yoast-premium-logo-new_svg__linear-gradient",x1:-7.73,x2:218.16,y1:59.99,y2:143.88,gradientUnits:"userSpaceOnUse"},n.createElement("stop",{offset:.17,stopColor:"#5d237a"}),n.createElement("stop",{offset:.42,stopColor:"#7c2072"}),n.createElement("stop",{offset:.71,stopColor:"#9a1e6b"}),n.createElement("stop",{offset:.87,stopColor:"#a61e69"})),n.createElement("style",null,".yoast-premium-logo-new_svg__cls-6{fill:#cd82ab}"))),n.createElement("path",{d:"M200 200H32c-17.67 0-32-14.33-32-32V32C0 14.33 14.33 0 32 0h136c17.67 0 32 14.33 32 32v168Z",style:{fill:"url(#yoast-premium-logo-new_svg__linear-gradient)"}}),n.createElement("path",{d:"M156.41 26.63c-17.59-9.93-39.9-3.73-49.84 13.86-9.94 17.59-3.73 39.9 13.86 49.84 17.59 9.94 39.9 3.73 49.84-13.86 9.93-17.59 3.73-39.9-13.86-49.84",style:{fill:"url(#yoast-premium-logo-new_svg__radial-gradient)"}}),n.createElement("path",{d:"M119.44 102.75s-.04-.02-.06-.04c-.02 0-.03-.02-.05-.03-12.13-6.71-26.33-1.98-32.56 9.06-6.49 11.5-2.43 26.07 9.06 32.57s.02 0 .03.02c0 0 .02 0 .03.02 11.49 6.45 26.03 2.4 32.51-9.08 6.47-11.46 2.46-25.98-8.95-32.5",style:{fill:"url(#yoast-premium-logo-new_svg__radial-gradient-2)"}}),n.createElement("path",{d:"M85.91 163.76c0-5-2.62-9.85-7.27-12.49a14.278 14.278 0 0 0-7.05-1.86c-7.9 0-14.36 6.4-14.36 14.34s6.4 14.36 14.34 14.36 14.36-6.4 14.36-14.34",style:{fill:"url(#yoast-premium-logo-new_svg__radial-gradient-3)"}}),n.createElement("path",{d:"M29.52 136.99v13.02c8.06-.34 14.36-2.98 19.7-8.39s10.22-14.18 14.89-27.2L98.65 21.9H81.94L54.11 99.2l-13.8-43.35h-15.3l20.29 52.16a21.402 21.402 0 0 1 0 15.59c-2.05 5.3-5.74 11.53-15.78 13.39Z",style:{fill:"#fff"}}),o||(o=n.createElement("path",{d:"M172.2 175.15h-33.59v2.95h33.59v-2.95ZM163.12 163.51l-7.72-14.2-7.72 14.2-11.88-8.44 2.8 18.99h33.59l2.8-18.99-11.88 8.44Z",className:"yoast-premium-logo-new_svg__cls-6"})))},6692(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 54 24"},e),r||(r=o.createElement("path",{fill:"currentColor",d:"M17.854 5.72c-4.173 0-5.842 2.798-5.842 5.913 0 3.116 1.645 6.036 5.842 6.036 4.196 0 5.831-2.93 5.824-5.846-.01-3.551-1.809-6.104-5.824-6.104v.001Zm-2.528 6.09c.101-4.169 3.306-4.165 4.377-2.672.976 1.36 1.176 6.013-1.85 5.98-1.392-.016-2.486-.956-2.527-3.309Zm36.371 2.968V8.74h2.161V6.117h-2.16V2.951H48.36v3.166h-1.694V8.74h1.694v5.696c0 3.239 2.26 5.162 4.643 5.56l.997-2.68c-1.39-.176-2.29-1.214-2.303-2.537Zm-16.84-.957v-4.54c0-.165-.01-.32-.026-.472-.29-3.668-5.503-3.66-9.54-2.252l1.166 2.346c2.63-1.248 4.203-.926 4.753-.311.014.016.028.031.04.048l.005.007c.28.379.213.975.213 1.445-3.436 0-7.093.455-7.093 4.22 0 2.862 3.59 4.703 7.34 1.976l.556 1.341h3.215c-.286-1.575-.63-2.925-.63-3.808h.002Zm-3.362-.025c-2.643 2.955-5.064.174-2.585-1.04.73-.248 1.72-.26 2.585-.26v1.3Zm8.492-4.759c0-1.118 1.792-1.64 4.619-.351l.977-2.371c-3.804-1.15-8.998-1.252-9.033 2.722-.016 1.905 1.208 2.93 2.969 3.585 1.22.453 2.98.687 2.975 1.657-.006 1.268-2.736 1.463-5.221-.243l-1.004 2.572c3.39 1.686 9.692 1.733 9.66-2.49-.034-4.176-5.94-3.46-5.94-5.08h-.002ZM10.638 0 5.783 13.471 3.46 6.196H0l3.872 9.935c.33.846.33 1.784 0 2.63-.433 1.11-1.153 2.057-2.908 2.294V24c3.418 0 5.265-2.1 6.913-6.699L14.337 0h-3.7Z"})))},6752(e){"use strict";e.exports=window.yoast.analysis},6789(e,t,s){"use strict";s(1137),s(4369),s(7723),s(5831);var r=s(1802),o=s.n(r);s(3657),s(2458),s(790),o().string.isRequired,o().string.isRequired,o().shape({src:o().string.isRequired,width:o().string,height:o().string}).isRequired,o().shape({value:o().bool.isRequired,status:o().string.isRequired,set:o().func.isRequired}).isRequired,o().string,o().string,o().string},7143(e){"use strict";e.exports=window.wp.data},7343(e,t,s){"use strict";s.d(t,{A:()=>n});var r=s(2379),o=s(1679);const n=s.n(o)().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: ${r.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`},7410(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 200 200"},e),r||(r=o.createElement("defs",null,o.createElement("radialGradient",{id:"woo-seo-logo-new_svg__b",cx:116.36,cy:44.04,r:36.58,fx:116.36,fy:44.04,gradientUnits:"userSpaceOnUse"},o.createElement("stop",{offset:0,stopColor:"#9fda4f"}),o.createElement("stop",{offset:1,stopColor:"#77b227"})),o.createElement("radialGradient",{id:"woo-seo-logo-new_svg__c",cx:92.08,cy:114.68,r:29.3,fx:92.08,fy:114.68,gradientUnits:"userSpaceOnUse"},o.createElement("stop",{offset:0,stopColor:"#fec228"}),o.createElement("stop",{offset:.22,stopColor:"#fbb81e"}),o.createElement("stop",{offset:1,stopColor:"#f49a00"})),o.createElement("radialGradient",{id:"woo-seo-logo-new_svg__d",cx:60.52,cy:156.68,r:14.35,fx:60.52,fy:156.68,gradientUnits:"userSpaceOnUse"},o.createElement("stop",{offset:0,stopColor:"#ff4e47"}),o.createElement("stop",{offset:1,stopColor:"#ed261f"})),o.createElement("linearGradient",{id:"woo-seo-logo-new_svg__a",x1:-7.73,x2:218.16,y1:59.99,y2:143.88,gradientUnits:"userSpaceOnUse"},o.createElement("stop",{offset:.17,stopColor:"#0e1e65"}),o.createElement("stop",{offset:.48,stopColor:"#064b8d"}),o.createElement("stop",{offset:.73,stopColor:"#0169a8"}),o.createElement("stop",{offset:.87,stopColor:"#0075b3"})))),o.createElement("path",{d:"M200 200H32c-17.67 0-32-14.33-32-32V32C0 14.33 14.33 0 32 0h136c17.67 0 32 14.33 32 32v168Z",style:{fill:"url(#woo-seo-logo-new_svg__a)"}}),o.createElement("path",{d:"M156.41 26.63c-17.59-9.93-39.9-3.73-49.84 13.86-9.94 17.59-3.73 39.9 13.86 49.84 17.59 9.94 39.9 3.73 49.84-13.86 9.93-17.59 3.73-39.9-13.86-49.84",style:{fill:"url(#woo-seo-logo-new_svg__b)"}}),o.createElement("path",{d:"M119.44 102.75s-.04-.02-.06-.04c-.02 0-.03-.02-.05-.03-12.13-6.71-26.33-1.98-32.56 9.06-6.49 11.5-2.43 26.07 9.06 32.57s.02 0 .03.02c0 0 .02 0 .03.02 11.49 6.45 26.03 2.4 32.51-9.08 6.47-11.46 2.46-25.98-8.95-32.5",style:{fill:"url(#woo-seo-logo-new_svg__c)"}}),o.createElement("path",{d:"M85.91 163.76c0-5-2.62-9.85-7.27-12.49a14.278 14.278 0 0 0-7.05-1.86c-7.9 0-14.36 6.4-14.36 14.34s6.4 14.36 14.34 14.36 14.36-6.4 14.36-14.34",style:{fill:"url(#woo-seo-logo-new_svg__d)"}}),o.createElement("path",{d:"M29.52 136.99v13.02c8.06-.34 14.36-2.98 19.7-8.39s10.22-14.18 14.89-27.2L98.65 21.9H81.94L54.11 99.2l-13.8-43.35h-15.3l20.29 52.16a21.402 21.402 0 0 1 0 15.59c-2.05 5.3-5.74 11.53-15.78 13.39Z",style:{fill:"#fff"}}),o.createElement("path",{d:"M171.68 147.89a2.9 2.9 0 0 0-2.81 2.16l-.36 1.34c-8.43-.15-16.85.83-25.01 2.9-.03 0-.05.01-.08.02-.61.21-.94.86-.73 1.47a90.79 90.79 0 0 0 4.59 11.2c.19.4.6.65 1.05.65h17.38c1.47 0 2.79.93 3.29 2.32h-23.04a1.16 1.16 0 0 0 0 2.32h24.4c.64 0 1.16-.52 1.16-1.16 0-2.65-1.78-4.95-4.35-5.62l3.97-14.86a.58.58 0 0 1 .56-.43h2.14a1.16 1.16 0 0 0 0-2.32h-2.15Zm-2.5 30.21c-1.28 0-2.32-1.04-2.32-2.32s1.04-2.32 2.32-2.32 2.32 1.04 2.32 2.32-1.04 2.32-2.32 2.32Zm-19.75 0c-1.28 0-2.32-1.04-2.32-2.32s1.04-2.32 2.32-2.32 2.32 1.04 2.32 2.32-1.04 2.32-2.32 2.32Z",style:{fill:"#a1cce3"}}))},7415(e,t,s){"use strict";s.d(t,{A:()=>x});var r=s(1609),o=s.n(r),n=s(1802),i=s.n(n),a=s(1679),l=s.n(a),c=s(5103),d=s(5674),u=s(6093),p=s(889),h=s(790);const m=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},g=l().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,y=l().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 f extends r.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=o().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/u.Y}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:e,maxLineCount:t,descriptionLineCount:s}=this.state;return(0,h.jsxs)(g,{id:"facebookPreview",mode:e,children:[(0,h.jsx)(d.A,{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,h.jsxs)(y,{mode:e,children:[(0,h.jsx)(c.A,{siteUrl:this.props.siteUrl,mode:e}),(0,h.jsx)(u.A,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,h.jsx)(p.A,{maxWidth:m(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}f.propTypes={siteUrl:i().string.isRequired,title:i().string.isRequired,description:i().string,imageUrl:i().string,imageFallbackUrl:i().string,alt:i().string,onSelect:i().func,onImageClick:i().func,onMouseHover:i().func},f.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const x=f},7558(e,t,s){"use strict";s.d(t,{N:()=>u});var r=s(1802),o=s.n(r),n=(s(1609),s(1679)),i=s.n(n),a=s(790);const l=i().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;
	}
`,c=i().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,d=i().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,u=({imageProps:e,width:t,height:s,imageMode:r="landscape"})=>"landscape"===r?(0,a.jsx)(d,{aspectRatio:e.aspectRatio,children:(0,a.jsx)(c,{src:e.src,alt:e.alt})}):(0,a.jsx)(l,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});u.propTypes={imageProps:o().shape({src:o().string.isRequired,alt:o().string.isRequired,aspectRatio:o().number.isRequired}).isRequired,width:o().number.isRequired,height:o().number.isRequired,imageMode:o().string}},7695(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))})},7723(e){"use strict";e.exports=window.wp.i18n},7767(e,t,s){"use strict";s.d(t,{$P:()=>d,Zp:()=>m,jb:()=>a,x$:()=>g,zy:()=>p});var r=s(1609),o=s(5588);function n(){return n=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},n.apply(this,arguments)}const i=r.createContext(null),a=r.createContext(null),l=r.createContext(null),c=r.createContext({outlet:null,matches:[],isDataRoute:!1});function d(e,t){let{relative:s}=void 0===t?{}:t;u()||(0,o.Oi)(!1);let{basename:n,navigator:i}=r.useContext(a),{hash:l,pathname:c,search:d}=g(e,{relative:s}),p=c;return"/"!==n&&(p="/"===c?n:(0,o.HS)([n,c])),i.createHref({pathname:p,search:d,hash:l})}function u(){return null!=r.useContext(l)}function p(){return u()||(0,o.Oi)(!1),r.useContext(l).location}function h(e){r.useContext(a).static||r.useLayoutEffect(e)}function m(){let{isDataRoute:e}=r.useContext(c);return e?function(){let{router:e}=function(){let e=r.useContext(i);return e||(0,o.Oi)(!1),e}(y.UseNavigateStable),t=function(){let e=function(){let e=r.useContext(c);return e||(0,o.Oi)(!1),e}(),t=e.matches[e.matches.length-1];return t.route.id||(0,o.Oi)(!1),t.route.id}(f.UseNavigateStable),s=r.useRef(!1);return h(()=>{s.current=!0}),r.useCallback(function(r,o){void 0===o&&(o={}),s.current&&("number"==typeof r?e.navigate(r):e.navigate(r,n({fromRouteId:t},o)))},[e,t])}():function(){u()||(0,o.Oi)(!1);let e=r.useContext(i),{basename:t,future:s,navigator:n}=r.useContext(a),{matches:l}=r.useContext(c),{pathname:d}=p(),m=JSON.stringify((0,o.yD)(l,s.v7_relativeSplatPath)),g=r.useRef(!1);return h(()=>{g.current=!0}),r.useCallback(function(s,r){if(void 0===r&&(r={}),!g.current)return;if("number"==typeof s)return void n.go(s);let i=(0,o.Gh)(s,JSON.parse(m),d,"path"===r.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:(0,o.HS)([t,i.pathname])),(r.replace?n.replace:n.push)(i,r.state,r)},[t,n,m,d,e])}()}function g(e,t){let{relative:s}=void 0===t?{}:t,{future:n}=r.useContext(a),{matches:i}=r.useContext(c),{pathname:l}=p(),d=JSON.stringify((0,o.yD)(i,n.v7_relativeSplatPath));return r.useMemo(()=>(0,o.Gh)(e,JSON.parse(d),l,"path"===s),[e,d,l,s])}r.Component;var y=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(y||{}),f=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(f||{});r.startTransition,new Promise(()=>{}),r.Component},7948(e,t,s){"use strict";s.d(t,{r:()=>i,u:()=>n});var r=s(8468);const o={},n=(e,t,{log:s=console.warn}={})=>{o[e]||(o[e]=!0,s(t))},i=(e,t=r.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}},8119(e,t,s){"use strict";s.d(t,{A:()=>o});var r=s(1609);const o=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))})},8213(e){"use strict";e.exports=window.yoast.reduxJsToolkit},8334(e,t,s){"use strict";s.d(t,{$H:()=>o,BG:()=>n,fJ:()=>r});const r={request:"request",success:"success",error:"error"},o={idle:"idle",loading:"loading",success:"success",error:"error"},n={showPlay:"showPlay",askPermission:"askPermission",isPlaying:"isPlaying"}},8468(e){"use strict";e.exports=window.lodash},8495(e){"use strict";e.exports=window.yoast.styleGuide},8519(e,t,s){"use strict";s.d(t,{h:()=>i});var r,o=s(1609);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},n.apply(null,arguments)}const i=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),r||(r=o.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"})))},8629(e,t,s){"use strict";s.d(t,{g:()=>a,l:()=>l});var r=s(7723);const o=[(0,r.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,r.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,r.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,r.__)("Optimize pages for multiple keywords with guidance","wordpress-seo")],n=[(0,r.__)("Add product details to help your listings stand out","wordpress-seo"),(0,r.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,r.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,r.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo")],i=[(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")],a=(e=!1)=>e?o:i,l=(e=!1)=>{if(e)return n;const t=[...i];return t[1]=(0,r.__)("Boost visibility for your products, from 10 or 10,000+","wordpress-seo"),t}},9e3(e,t,s){"use strict";s.d(t,{A:()=>w});var r=s(7723),o=s(2379),n=s(8468),i=s(1802),a=s.n(i),l=s(1609),c=s.n(l),d=s(1679),u=s.n(d),p=s(1969),h=s(7558),m=s(790);const g=(e,t=!0)=>e?`\n\t\t\tmax-width: ${o.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: ${o.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`,y=u().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>g(e.isLarge)}
`,f=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=>g(e.isLarge,!1)}
`,x=u()(f)`
	${e=>e.isLarge&&`height: ${o.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 w extends c().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(0,p.cP)(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:e,imageProperties:t}=this.state;return"loading"===e||""===this.props.src||"errored"===e?(0,m.jsx)(x,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,r.__)("Select image","wordpress-seo")}):(0,m.jsx)(y,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,m.jsx)(h.N,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:o.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}w.propTypes={isLarge:a().bool.isRequired,src:a().string,alt:a().string,onImageClick:a().func,onMouseEnter:a().func,onMouseLeave:a().func},w.defaultProps={src:"",alt:"",onMouseEnter:n.noop,onImageClick:n.noop,onMouseLeave:n.noop}},9052(e,t,s){"use strict";s.d(t,{Ay:()=>Dr});var r=s(4997),o=s(7143);const n=window.wp.domReady;var i=s.n(n),a=s(6087),l=s(2279),c=s(8468),d=s(5831),u=s(7723),p=s(9491);const h=window.wp.wordcount;var m=s(4369),g=s(1137),y=s(2458),f=s(3657),x=s(2485),w=s.n(x),b=s(790);const v=({className:e})=>{const t=(0,d.useSvgAria)();return(0,b.jsxs)("span",{className:w()("yst-text-sm yst-flex yst-items-center yst-gap-1 yst-justify-center yst-text-slate-500 yst-italic",e),children:[(0,b.jsx)(d.GradientSparklesIcon,{className:"yst-h-3 yst-w-3",...t}),(0,u.__)("Using 1 spark","wordpress-seo")]})};var _=s(3301);const k="yoast-seo/ai-generator",j="yoast-seo/editor",S="google",C="social",E="twitter",T="title",R="description",L="post",I="term",A={post:"title",term:"term_title"},P=(0,c.mapValues)(A,e=>`%%${e}%%`),N={idle:"idle",loading:"loading",success:"success",error:"error"},M="success",O="error",F="abort",D=(0,p.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t}=e(_.bw),s=e("core/editor").getEditedPostContent(),{getIsPremium:r,selectLink:o}=e("yoast-seo/editor"),{isUsageCountLimitReached:n,selectPremiumSubscription:i}=e(k),a=i(),l=r();return{isEmptyPost:0===(0,h.count)(s,"words",{}),isOpen:t()===_.Qo.idle,isPremium:l,upsellLink:o("https://yoa.st/content-planner-approve-modal"),learnMoreLink:o("https://yoa.st/content-planner-learn-more"),isUpsell:n()&&!a&&!l}}),(0,o.withDispatch)(e=>{const{closeModal:t,setFeatureModalStatus:s}=e(_.bw);return{onClose:t,setStatus:s}})])(({isEmptyPost:e,isPremium:t,isUpsell:s,onClick:r,upsellLink:o,learnMoreLink:n,isOpen:i,onClose:a})=>{const{title:l,description:c}=((e,t)=>t?{title:(0,u.__)("You're out of free sparks","wordpress-seo"),description:(0,u.__)("Upgrade to keep finding content gaps, generating AI-powered titles and meta descriptions, and giving your content the best chance of being found.","wordpress-seo")}:e?{title:(0,u.__)("Looking for inspiration?","wordpress-seo"),description:(0,u.__)("The Yoast AI Content Planner identifies content gaps in your site structure and recommends topics that strengthen your topical authority.","wordpress-seo")}:{title:(0,u.__)("Get content suggestions","wordpress-seo"),description:(0,y.x)((0,u.sprintf)(
/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
       %2$s and %3$s are opening and closing italic HTML tags respectively. */
/* translators: %1$s and %4$s are opening and closing paragraph HTML tags respectively.
       %2$s and %3$s are opening and closing italic HTML tags respectively. */
(0,u.__)("The Yoast AI Content Planner will analyze your site and recommend topics.%1$s%2$sNote: Applying a content suggestion will replace your current blogpost content & metadata.%3$s%4$s","wordpress-seo"),"<p>","<i>","</i>","</p>"),{i:(0,b.jsx)("i",{}),p:(0,b.jsx)("p",{className:"yst-mt-4"})})})(e,s),p=(0,d.useSvgAria)();return(0,b.jsx)(d.Modal,{isOpen:i,onClose:a,children:(0,b.jsxs)(d.Modal.Panel,{className:"yst-text-center yst-w-96",closeButtonScreenReaderText:(0,u.__)("Close modal","wordpress-seo"),children:[(0,b.jsx)("div",{className:"yst-w-12 yst-h-12 yst-rounded-full yst-bg-ai-100 yst-flex yst-items-center yst-justify-center yst-mx-auto yst-mb-4",children:(0,b.jsx)(d.GradientSparklesIcon,{className:"yst-h-6 yst-w-6",...p})}),(0,b.jsx)(d.Modal.Title,{className:"yst-text-slate-900 yst-font-medium yst-text-lg yst-mb-2",children:l}),(0,b.jsx)(d.Modal.Description,{as:"div",className:"yst-text-slate-600 yst-text-sm yst-mb-6 yst-mx-10",children:c}),!t&&!s&&(0,b.jsx)(v,{className:"yst-mb-2"}),s?(0,b.jsxs)(d.Button,{variant:"upsell",as:"a",href:o,target:"_blank",className:"yst-w-full",rel:"noopener noreferrer",children:[(0,b.jsx)(g.A,{className:"yst-w-4 yst-h-4 yst-me-2 yst-shrink-0",...p}),(0,u.sprintf)(/* translators: %s is the name of the premium product, Yoast SEO Premium. */ /* translators: %s is the name of the premium product, Yoast SEO Premium. */
(0,u.__)("Unlock with %s","wordpress-seo"),"Yoast SEO Premium"),(0,b.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,u.__)("(Opens in a new browser tab)","wordpress-seo")})]}):(0,b.jsxs)(d.Button,{onClick:r,variant:"ai-primary",className:"yst-w-full",children:[" ",(0,u.__)("Get content suggestions","wordpress-seo")," "]}),(0,b.jsx)("div",{className:"yst-mt-2 yst-text-sm",children:(0,b.jsxs)(d.Link,{as:f.rd,href:n,variant:"primary",className:"yst-inline yst-no-underline yst-font-medium",children:[(0,u.__)("Learn more","wordpress-seo"),(0,b.jsx)(m.A,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]})})]})})});var q=s(4631);const $=({onConfirm:e,isOpen:t,onClose:s})=>{const r=(0,d.useSvgAria)();return(0,b.jsx)(d.Modal,{isOpen:t,onClose:s,className:"yst-flex yst-items-center yst-justify-center",children:(0,b.jsxs)(d.Modal.Panel,{closeButtonScreenReaderText:(0,u.__)("Close replace content confirmation","wordpress-seo"),children:[(0,b.jsxs)("div",{className:"yst-flex yst-items-start",children:[(0,b.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,b.jsx)(q.A,{className:"yst-h-6 yst-w-6 yst-text-red-600",...r})}),(0,b.jsxs)("div",{className:"yst-ms-4 yst-text-start",children:[(0,b.jsx)(d.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900 yst-mb-3",children:(0,u.__)("Replace existing content with this outline?","wordpress-seo")}),(0,b.jsx)(d.Modal.Description,{className:"yst-text-sm yst-text-slate-500",children:(0,u.__)("This will replace everything in your post with the generated outline and content notes. You can revert this action by clicking the 'undo' button in the Gutenberg editor.","wordpress-seo")})]})]}),(0,b.jsxs)("div",{className:"yst-flex yst-flex-row yst-justify-end yst-gap-3 yst-mt-6",children:[(0,b.jsx)(d.Button,{type:"button",variant:"secondary",onClick:s,children:(0,u.__)("Cancel","wordpress-seo")}),(0,b.jsx)(d.Button,{type:"button",variant:"error",onClick:e,children:(0,u.__)("Replace content","wordpress-seo")})]})]})})},B=e=>{const t=[];return e.forEach(({heading:e,contentNotes:s})=>{t.push((0,r.createBlock)("core/heading",{content:e,level:2})),t.push((0,r.createBlock)("yoast-seo/content-suggestion",{suggestions:s})),t.push((0,r.createBlock)("core/paragraph"))}),t},U=["_formal","_informal","_ao90"],z=e=>{for(const t of U)if(e.endsWith(t))return e.slice(0,-t.length);return e},W=e=>({bottom:`calc( (${e+"px"} - 100vh) / 2 + 32px )`}),H=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,selectContentOutlineCache:n}=(0,o.useSelect)(e=>({endpoint:e(_.bw).selectContentOutlineEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),selectContentOutlineCache:e(_.bw).selectContentOutlineCache}),[]),{fetchContentOutline:i,restoreContentOutlineFromCache:l,setFeatureModalStatus:c}=(0,o.useDispatch)(_.bw);return(0,a.useCallback)(o=>{const a=n(o.id);if(a)return l({suggestion:o,outline:a}),void c(_.Qo.contentOutline);const d=z(s).replace("_","-");i({endpoint:e,postType:t,language:d,editor:r,suggestion:{...o}})},[e,t,s,r,i,l,n,c])};var K=s(8334);const Y=()=>{const{endpoint:e,postType:t,contentLocale:s,editorApiValue:r,isUsageCountLimitReached:n,usageCountEndpoint:i,hasValidPremiumSubscription:l,isPremium:c}=(0,o.useSelect)(e=>({endpoint:e(_.bw).selectContentSuggestionsEndpoint(),postType:e("yoast-seo/editor").getPostType(),contentLocale:e("yoast-seo/editor").getContentLocale(),editorApiValue:e("yoast-seo/editor").getEditorTypeApiValue(),usageCountEndpoint:e(k).selectUsageCountEndpoint(),isUsageCountLimitReached:e(k).isUsageCountLimitReached(),hasValidPremiumSubscription:e(k).selectPremiumSubscription(),isPremium:e("yoast-seo/editor").getIsPremium()}),[]),{fetchContentPlannerSuggestions:d,setFeatureModalStatus:u,setContentSuggestionsStatus:p,setSuggestionsError:h}=(0,o.useDispatch)(_.bw),{fetchUsageCount:m,addUsageCount:g}=(0,o.useDispatch)(k);return(0,a.useCallback)(async()=>{if(c&&!l)return u(_.Qo.contentSuggestions),void h({errorCode:402,errorIdentifier:"PAYMENT_REQUIRED",missingLicenses:["Yoast SEO Premium"]});if(n&&!l)return void u(_.Qo.idle);u(_.Qo.contentSuggestions),p(K.$H.loading);const{payload:o}=await m({endpoint:i,isWooProductEntity:!1});if((429===(null==o?void 0:o.errorCode)&&"USAGE_LIMIT_REACHED"===(null==o?void 0:o.errorIdentifier)||o.count>=o.limit)&&!l)return u(_.Qo.idle),void p(K.$H.idle);const a=z(s).replace("_","-");d({endpoint:e,postType:t,language:a,editor:r}),g()},[e,t,s,r,n,l,c,i,d,g,m,u,p,h])};var V=s(6692),G=s(1609);function Z(...e){return e.filter(Boolean).join(" ")}function Q(e,t,...s){if(e in t){let r=t[e];return"function"==typeof r?r(...s):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Q),r}var X,J,ee=((J=ee||{})[J.None=0]="None",J[J.RenderStrategy=1]="RenderStrategy",J[J.Static=2]="Static",J),te=((X=te||{})[X.Unmount=0]="Unmount",X[X.Hidden=1]="Hidden",X);function se({ourProps:e,theirProps:t,slot:s,defaultTag:r,features:o,visible:n=!0,name:i}){let a=oe(t,e);if(n)return re(a,s,r,i);let l=null!=o?o:0;if(2&l){let{static:e=!1,...t}=a;if(e)return re(t,s,r,i)}if(1&l){let{unmount:e=!0,...t}=a;return Q(e?0:1,{0:()=>null,1:()=>re({...t,hidden:!0,style:{display:"none"}},s,r,i)})}return re(a,s,r,i)}function re(e,t={},s,r){var o;let{as:n=s,children:i,refName:a="ref",...l}=ae(e,["unmount","static"]),c=void 0!==e.ref?{[a]:e.ref}:{},d="function"==typeof i?i(t):i;l.className&&"function"==typeof l.className&&(l.className=l.className(t));let u={};if(t){let e=!1,s=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&s.push(r);e&&(u["data-headlessui-state"]=s.join(" "))}if(n===G.Fragment&&Object.keys(ie(l)).length>0){if(!(0,G.isValidElement)(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(e=>`  - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>`  - ${e}`).join("\n")].join("\n"));let e=Z(null==(o=d.props)?void 0:o.className,l.className),t=e?{className:e}:{};return(0,G.cloneElement)(d,Object.assign({},oe(d.props,ie(ae(l,["ref"]))),u,c,function(...e){return{ref:e.every(e=>null==e)?void 0:t=>{for(let s of e)null!=s&&("function"==typeof s?s(t):s.current=t)}}}(d.ref,c.ref),t))}return(0,G.createElement)(n,Object.assign({},ae(l,["ref"]),n!==G.Fragment&&c,n!==G.Fragment&&u),d)}function oe(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},s={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=s[e]||(s[e]=[]),s[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(s).map(e=>[e,void 0])));for(let e in s)Object.assign(t,{[e](t,...r){let o=s[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function ne(e){var t;return Object.assign((0,G.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function ie(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function ae(e,t=[]){let s=Object.assign({},e);for(let e of t)e in s&&delete s[e];return s}let le=(0,G.createContext)(null);le.displayName="OpenClosedContext";var ce=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ce||{});function de(){return(0,G.useContext)(le)}function ue({value:e,children:t}){return G.createElement(le.Provider,{value:e},t)}var pe=Object.defineProperty,he=(e,t,s)=>(((e,t,s)=>{t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s})(e,"symbol"!=typeof t?t+"":t,s),s);let me=new class{constructor(){he(this,"current",this.detect()),he(this,"handoffState","pending"),he(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},ge=(e,t)=>{me.isServer?(0,G.useEffect)(e,t):(0,G.useLayoutEffect)(e,t)};function ye(){let e=(0,G.useRef)(!1);return ge(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fe(e){let t=(0,G.useRef)(e);return ge(()=>{t.current=e},[e]),t}function xe(){let[e,t]=(0,G.useState)(me.isHandoffComplete);return e&&!1===me.isHandoffComplete&&t(!1),(0,G.useEffect)(()=>{!0!==e&&t(!0)},[e]),(0,G.useEffect)(()=>me.handoff(),[]),e}let we=function(e){let t=fe(e);return G.useCallback((...e)=>t.current(...e),[t])},be=Symbol();function ve(...e){let t=(0,G.useRef)(e);(0,G.useEffect)(()=>{t.current=e},[e]);let s=we(e=>{for(let s of t.current)null!=s&&("function"==typeof s?s(e):s.current=e)});return e.every(e=>null==e||(null==e?void 0:e[be]))?void 0:s}function _e(){let e=[],t=[],s={enqueue(e){t.push(e)},addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),s.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return s.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>s.requestAnimationFrame(()=>s.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return s.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}(()=>{t.current&&e[0]()}),s.add(()=>{t.current=!1})},add:t=>(e.push(t),()=>{let s=e.indexOf(t);if(s>=0){let[t]=e.splice(s,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return s}function ke(e,...t){e&&t.length>0&&e.classList.add(...t)}function je(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Se(){let[e]=(0,G.useState)(_e);return(0,G.useEffect)(()=>()=>e.dispose(),[e]),e}function Ce({container:e,direction:t,classes:s,onStart:r,onStop:o}){let n=ye(),i=Se(),a=fe(t);ge(()=>{let t=_e();i.add(t.dispose);let l=e.current;if(l&&"idle"!==a.current&&n.current)return t.dispose(),r.current(a.current),t.add(function(e,t,s,r){let o=s?"enter":"leave",n=_e(),i=void 0!==r?function(e){let t={called:!1};return(...s)=>{if(!t.called)return t.called=!0,e(...s)}}(r):()=>{};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");let a=Q(o,{enter:()=>t.enter,leave:()=>t.leave}),l=Q(o,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=Q(o,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return je(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),ke(e,...a,...c),n.nextFrame(()=>{je(e,...c),ke(e,...l),function(e,t){let s=_e();if(!e)return s.dispose;let{transitionDuration:r,transitionDelay:o}=getComputedStyle(e),[n,i]=[r,o].map(e=>{let[t=0]=e.split(",").filter(Boolean).map(e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e)).sort((e,t)=>t-e);return t});if(n+i!==0){let r=s.addEventListener(e,"transitionend",e=>{e.target===e.currentTarget&&(t(),r())})}else t();s.add(()=>t()),s.dispose}(e,()=>(je(e,...a),ke(e,...t.entered),i()))}),n.dispose}(l,s.current,"enter"===a.current,()=>{t.dispose(),o.current(a.current)})),t.dispose},[t])}function Ee(e=""){return e.split(" ").filter(e=>e.trim().length>1)}let Te=(0,G.createContext)(null);Te.displayName="TransitionContext";var Re,Le=((Re=Le||{}).Visible="visible",Re.Hidden="hidden",Re);let Ie=(0,G.createContext)(null);function Ae(e){return"children"in e?Ae(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function Pe(e,t){let s=fe(e),r=(0,G.useRef)([]),o=ye(),n=Se(),i=we((e,t=te.Hidden)=>{let i=r.current.findIndex(({el:t})=>t===e);-1!==i&&(Q(t,{[te.Unmount](){r.current.splice(i,1)},[te.Hidden](){r.current[i].state="hidden"}}),n.microTask(()=>{var e;!Ae(r)&&o.current&&(null==(e=s.current)||e.call(s))}))}),a=we(e=>{let t=r.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>i(e,te.Unmount)}),l=(0,G.useRef)([]),c=(0,G.useRef)(Promise.resolve()),d=(0,G.useRef)({enter:[],leave:[],idle:[]}),u=we((e,s,r)=>{l.current.splice(0),t&&(t.chains.current[s]=t.chains.current[s].filter(([t])=>t!==e)),null==t||t.chains.current[s].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[s].push([e,new Promise(e=>{Promise.all(d.current[s].map(([e,t])=>t)).then(()=>e())})]),"enter"===s?c.current=c.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(s)):r(s)}),p=we((e,t,s)=>{Promise.all(d.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>s(t))});return(0,G.useMemo)(()=>({children:r,register:a,unregister:i,onStart:u,onStop:p,wait:c,chains:d}),[a,i,r,u,p,d,c])}function Ne(){}Ie.displayName="NestingContext";let Me=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Oe(e){var t;let s={};for(let r of Me)s[r]=null!=(t=e[r])?t:Ne;return s}let Fe=ee.RenderStrategy,De=ne(function(e,t){let{beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n,enter:i,enterFrom:a,enterTo:l,entered:c,leave:d,leaveFrom:u,leaveTo:p,...h}=e,m=(0,G.useRef)(null),g=ve(m,t),y=h.unmount?te.Unmount:te.Hidden,{show:f,appear:x,initial:w}=function(){let e=(0,G.useContext)(Te);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[b,v]=(0,G.useState)(f?"visible":"hidden"),_=function(){let e=(0,G.useContext)(Ie);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:k,unregister:j}=_,S=(0,G.useRef)(null);(0,G.useEffect)(()=>k(m),[k,m]),(0,G.useEffect)(()=>{if(y===te.Hidden&&m.current)return f&&"visible"!==b?void v("visible"):Q(b,{hidden:()=>j(m),visible:()=>k(m)})},[b,m,k,j,f,y]);let C=fe({enter:Ee(i),enterFrom:Ee(a),enterTo:Ee(l),entered:Ee(c),leave:Ee(d),leaveFrom:Ee(u),leaveTo:Ee(p)}),E=function(e){let t=(0,G.useRef)(Oe(e));return(0,G.useEffect)(()=>{t.current=Oe(e)},[e]),t}({beforeEnter:s,afterEnter:r,beforeLeave:o,afterLeave:n}),T=xe();(0,G.useEffect)(()=>{if(T&&"visible"===b&&null===m.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,b,T]);let R=w&&!x,L=!T||R||S.current===f?"idle":f?"enter":"leave",I=we(e=>Q(e,{enter:()=>E.current.beforeEnter(),leave:()=>E.current.beforeLeave(),idle:()=>{}})),A=we(e=>Q(e,{enter:()=>E.current.afterEnter(),leave:()=>E.current.afterLeave(),idle:()=>{}})),P=Pe(()=>{v("hidden"),j(m)},_);Ce({container:m,classes:C,direction:L,onStart:fe(e=>{P.onStart(m,e,I)}),onStop:fe(e=>{P.onStop(m,e,A),"leave"===e&&!Ae(P)&&(v("hidden"),j(m))})}),(0,G.useEffect)(()=>{!R||(y===te.Hidden?S.current=null:S.current=f)},[f,R,b]);let N=h,M={ref:g};return x&&f&&me.isServer&&(N={...N,className:Z(h.className,...C.current.enter,...C.current.enterFrom)}),G.createElement(Ie.Provider,{value:P},G.createElement(ue,{value:Q(b,{visible:ce.Open,hidden:ce.Closed})},se({ourProps:M,theirProps:N,defaultTag:"div",features:Fe,visible:"visible"===b,name:"Transition.Child"})))}),qe=ne(function(e,t){let{show:s,appear:r=!1,unmount:o,...n}=e,i=(0,G.useRef)(null),a=ve(i,t);xe();let l=de();if(void 0===s&&null!==l&&(s=Q(l,{[ce.Open]:!0,[ce.Closed]:!1})),![!0,!1].includes(s))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=(0,G.useState)(s?"visible":"hidden"),u=Pe(()=>{d("hidden")}),[p,h]=(0,G.useState)(!0),m=(0,G.useRef)([s]);ge(()=>{!1!==p&&m.current[m.current.length-1]!==s&&(m.current.push(s),h(!1))},[m,s]);let g=(0,G.useMemo)(()=>({show:s,appear:r,initial:p}),[s,r,p]);(0,G.useEffect)(()=>{if(s)d("visible");else if(Ae(u)){let e=i.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")},[s,u]);let y={unmount:o};return G.createElement(Ie.Provider,{value:u},G.createElement(Te.Provider,{value:g},se({ourProps:{...y,as:G.Fragment,children:G.createElement(De,{ref:a,...y,...n})},theirProps:{},defaultTag:G.Fragment,features:Fe,visible:"visible"===c,name:"Transition"})))}),$e=ne(function(e,t){let s=null!==(0,G.useContext)(Te),r=null!==de();return G.createElement(G.Fragment,null,!s&&r?G.createElement(qe,{ref:t,...e}):G.createElement(De,{ref:t,...e}))}),Be=Object.assign(qe,{Child:$e,Root:qe});var Ue=s(1802),ze=s.n(Ue);const We=()=>{const e=(0,o.useSelect)(e=>e(j).selectLink("https://yoa.st/ai-common-errors"),[]),t=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Something went wrong","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:e}),a2:(0,b.jsx)(f.rd,{variant:"error",href:t})})})]})},He=()=>{const e=(0,o.useSelect)(e=>e(j).selectLink("https://yoa.st/ai-common-errors"),[]),t=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Not enough content","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:e}),a2:(0,b.jsx)(f.rd,{variant:"error",href:t})})})]})},Ke=()=>{const e=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_settings#/site-features#card-wpseo-keyword_analysis_active"),[]),t=(0,a.useCallback)(()=>{window.location.reload()},[]),{onClose:s}=(0,d.useModalContext)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("SEO analysis required","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.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.
         */
/**
         * 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,u.__)("%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,b.jsx)(f.rd,{variant:"error",href:e})})})]}),(0,b.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,b.jsx)(d.Button,{variant:"secondary",onClick:s,children:(0,u.__)("Close","wordpress-seo")}),(0,b.jsx)(d.Button,{className:"yst-revoke-button",variant:"primary",onClick:t,children:(0,u.__)("Refresh page","wordpress-seo")})]})]})},Ye=()=>{const e=(0,o.useSelect)(e=>e(j).selectLink("https://yoa.st/ai-generator-rate-limit-help"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("You've reached the Yoast AI rate limit","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */ /* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:e})})})]})};var Ve=s(1455),Ge=s.n(Ve);const Ze=({invalidSubscriptions:e=[]})=>{const{newYoastWooLink:t,activateYoastWooLink:s,newPremiumLink:r,activatePremiumLink:n,bustSubscriptionCacheEndpoint:i}=(0,o.useSelect)(e=>{const t=e(j);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"),bustSubscriptionCacheEndpoint:e(k).selectBustSubscriptionCacheEndpoint()}},[]),{onClose:l}=(0,d.useModalContext)(),c=(0,a.useCallback)(async()=>{try{await Ge()({path:i,method:"POST",parse:!1})}catch(e){console.error(e)}window.location.reload()},[]);let p,h,m;return e.includes("Yoast WooCommerce SEO")?(p="Yoast WooCommerce SEO",h=s,m=t):e.includes("Yoast SEO Premium")&&(p="Yoast SEO Premium",h=n,m=r),(0,b.jsxs)(a.Fragment,{children:[(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Subscription required","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.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.
         **/
/**
         * 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,u.__)("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"),p,"MyYoast","<Activate>","</Activate>","<New>","</New>"),{Activate:(0,b.jsx)(f.rd,{variant:"error",href:h}),New:(0,b.jsx)(f.rd,{variant:"error",href:m})})})]}),(0,b.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,b.jsx)(d.Button,{variant:"secondary",onClick:l,children:(0,u.__)("Close","wordpress-seo")}),(0,b.jsx)(d.Button,{variant:"primary",onClick:c,children:(0,u.__)("Refresh page","wordpress-seo")})]})]})};Ze.propTypes={invalidSubscriptions:ze().arrayOf(ze().string)};const Qe=()=>{const e=(0,o.useSelect)(e=>e(j).selectLink("https://yoa.st/ai-common-errors"),[]),t=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Connection timeout","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:e}),a2:(0,b.jsx)(f.rd,{variant:"error",href:t})})})]})},Xe=()=>{const e=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Usage policy violation","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
       * %5$s expands to OpenAI.
       */
/* translators: %1$s, %2$s, %3$s, %4$s are anchor tags.
       * %5$s expands to OpenAI.
       */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:"https://openai.com/policies/usage-policies"}),a2:(0,b.jsx)(f.rd,{variant:"error",href:e})})})]})},Je=({errorMessage:e=""})=>{const t=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Something went wrong","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,u.sprintf)(/* translators: %s is the error response of the request. */ /* translators: %s is the error response of the request. */
(0,u.__)("The request came back with the following error: '%s'.","wordpress-seo"),e)}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */ /* translators: %1$s expands to an opening tag. %2$s expands to a closing tag. */
(0,u.__)("Please try again later. If the issue persists, please %1$scontact our support team%2$s.","wordpress-seo"),"<a>","</a>"),{a:(0,b.jsx)(f.rd,{variant:"error",href:t})})})]})};Je.propTypes={errorMessage:ze().string};const et=()=>{const e=(0,o.useSelect)(e=>e(j).selectAdminLink("plugins.php"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Something went wrong","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.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. */ /* 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,u.__)("The version of %1$s is outdated. Please upgrade %1$s %2$shere%3$s!","wordpress-seo"),"Yoast SEO Premium","<a>","</a>"),{a:(0,b.jsx)(f.rd,{variant:"error",href:e})})})]})},tt=()=>{const e=(0,o.useSelect)(e=>e(j).selectLink("https://yoa.st/ai-common-errors"),[]),t=(0,o.useSelect)(e=>e(j).selectAdminLink("?page=wpseo_page_support"),[]);return(0,b.jsxs)(d.Alert,{variant:"error",children:[(0,b.jsx)("span",{className:"yst-block yst-font-medium",children:(0,u.__)("Yoast AI cannot reach your site","wordpress-seo")}),(0,b.jsx)("p",{className:"yst-mt-2",children:(0,y.x)((0,u.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */
(0,u.__)("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,b.jsx)(f.rd,{variant:"error",href:e}),a2:(0,b.jsx)(f.rd,{variant:"error",href:t})})})]})},st=({errorCode:e,errorIdentifier:t="",errorMessage:s="",missingLicenses:r=[],onRetry:n=c.noop})=>{const{onClose:i}=(0,d.useModalContext)();if((0,o.useSelect)(e=>e("yoast-seo/editor").getIsPremium(),[])&&(402===e||429===e&&"USAGE_LIMIT_REACHED"===t)){const e=r.length>0?r:["Yoast SEO Premium"];return(0,b.jsx)(Ze,{invalidSubscriptions:e})}let a;switch(e){case 400:switch(t){case"SITE_UNREACHABLE":a=(0,b.jsx)(tt,{});break;case"WP_HTTP_REQUEST_ERROR":a=(0,b.jsx)(Je,{errorMessage:s});break;default:a=(0,b.jsx)(We,{})}break;case 408:a=(0,b.jsx)(Qe,{});break;case 429:a=(0,b.jsx)(Ye,{});break;default:a=(0,b.jsx)(We,{})}return(0,b.jsxs)(b.Fragment,{children:[a,(0,b.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,b.jsx)(d.Button,{variant:"secondary",onClick:i,children:(0,u.__)("Close","wordpress-seo")}),(0,b.jsx)(d.Button,{variant:"primary",onClick:n,children:(0,u.__)("Try again","wordpress-seo")})]})]})};st.propTypes={errorCode:ze().number.isRequired,errorIdentifier:ze().string,errorMessage:ze().string,missingLicenses:ze().arrayOf(ze().string),onRetry:ze().func};const rt=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"}))}),ot=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"}))}),nt=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"}))}),it=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"}))}),at={informational:{classes:"yst-bg-blue-200 yst-text-blue-900",calloutClasses:"yst-bg-blue-50 yst-border-blue-200",calloutTextClasses:"yst-text-blue-900",Icon:rt,label:(0,u.__)("Informational","wordpress-seo"),tooltip:(0,u.__)("The user wants to find an answer to a specific question.","wordpress-seo")},navigational:{classes:"yst-bg-violet-200 yst-text-violet-900",calloutClasses:"yst-bg-violet-50 yst-border-violet-200",calloutTextClasses:"yst-text-violet-900",Icon:ot,label:(0,u.__)("Navigational","wordpress-seo"),tooltip:(0,u.__)("The user wants to find a specific page or site.","wordpress-seo")},commercial:{classes:"yst-bg-amber-200 yst-text-amber-900",calloutClasses:"yst-bg-amber-50 yst-border-amber-200",calloutTextClasses:"yst-text-amber-900",Icon:nt,label:(0,u.__)("Commercial","wordpress-seo"),tooltip:(0,u.__)("The user wants to investigate brands or services.","wordpress-seo")},transactional:{classes:"yst-bg-green-200 yst-text-green-900",calloutClasses:"yst-bg-green-50 yst-border-green-200",calloutTextClasses:"yst-text-green-900",Icon:it,label:(0,u.__)("Transactional","wordpress-seo"),tooltip:(0,u.__)("The user wants to complete an action (conversion).","wordpress-seo")}},lt=({intent:e,className:t,tooltipPosition:s="top-right",cursor:r="default"})=>{const o=at[e],n=(0,d.useSvgAria)(),i=`intent-tooltip-${e}-${(0,a.useId)()}`;if(!o)return(0,b.jsx)(d.Badge,{children:e});const{Icon:l}=o,c="pointer"===r?"yst-cursor-pointer":"yst-cursor-default";return(0,b.jsxs)(d.TooltipContainer,{children:[(0,b.jsx)(d.TooltipTrigger,{as:"span",ariaDescribedby:i,className:"yst-inline-flex yst-w-fit",children:(0,b.jsxs)(d.Badge,{className:w()("yst-relative yst-flex yst-items-center yst-gap-1 yst-w-fit",c,o.classes,t),children:[(0,b.jsx)(l,{className:w()("yst-w-3",o.classes),...n})," ",o.label]})}),(0,b.jsx)(d.TooltipWithContext,{id:i,className:"yst-max-w-48 yst-z-50 yst-text-center",position:s,children:o.tooltip})]})},ct=({suggestion:e,onClick:t})=>{const{intent:s,title:r,explanation:o}=e,n=(0,a.useCallback)(()=>t(e),[t,e]);return(0,b.jsxs)("button",{type:"button",onClick:n,className:"hover:yst-bg-slate-50 yst-group yst-text-start yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",children:[(0,b.jsx)(lt,{intent:s,className:"yst-mb-2",cursor:"pointer"}),(0,b.jsx)("div",{className:"yst-font-medium yst-text-sm yst-mb-2 yst-text-slate-800 group-hover:yst-text-slate-900",children:(0,b.jsx)("span",{className:"group-hover:yst-border-b group-hover:yst-border-slate-900",children:r})}),(0,b.jsx)("p",{className:"yst-text-slate-600",children:o})]})},dt=()=>(0,b.jsxs)("div",{className:"yst-w-full yst-rounded-md yst-border yst-border-slate-200 yst-mb-4 yst-p-4 yst-shadow-sm",children:[(0,b.jsxs)("div",{className:"yst-px-2 yst-py-1 yst-bg-white yst-inline-flex yst-gap-1 yst-items-center yst-justify-start yst-mb-2 yst-rounded-3xl yst-border yst-border-slate-300",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-2 yst-h-2 yst-rounded-full"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-20 yst-h-3 yst-rounded"})]}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-64 yst-h-[18px] yst-rounded yst-mb-3"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-full yst-h-[13px] yst-rounded yst-mb-2"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-2/3 yst-h-[13px] yst-rounded"})]}),ut=({suggestions:e,onSuggestionClick:t})=>(0,b.jsxs)("div",{children:[(0,b.jsx)(d.Modal.Description,{className:"yst-mb-4",children:(0,u.__)("Select a suggestion to generate a structured outline for your post.","wordpress-seo")}),e.map((e,s)=>(0,b.jsx)(ct,{suggestion:e,onClick:t},`suggestion-${s}`))]}),pt=()=>{const e=(0,d.useSvgAria)(),[t,s]=(0,a.useState)(0),[r,o]=(0,a.useState)(!0),[n,i]=(0,a.useState)(!0),l=[(0,u.__)("Analyzing your site content…","wordpress-seo"),(0,u.__)("Composing your content suggestions…","wordpress-seo"),(0,u.__)("Writing compelling headlines…","wordpress-seo")],c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{const e=setInterval(()=>{o(!1),c.current=setTimeout(()=>{s(e=>(e+1)%l.length),o(!0)},300)},3e3);return()=>{clearInterval(e),clearTimeout(c.current)}},[]),(0,a.useEffect)(()=>{const e=setInterval(()=>{i(e=>!e)},1e3);return()=>clearInterval(e)},[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-pb-8",children:[(0,b.jsx)(V.h,{className:"yst-w-24 yst-mb-2 yst-mt-6 yst-transition-colors yst-duration-1000 "+(n?"yst-text-primary-300":"yst-text-primary-500"),...e}),(0,b.jsxs)(d.Modal.Description,{className:"yst-italic yst-text-slate-500 yst-transition-opacity yst-duration-300 "+(r?"yst-opacity-100":"yst-opacity-0"),children:[(0,b.jsx)("span",{className:"yst-sr-only",children:" Yoast "}),l[t]]})]}),(0,b.jsxs)("div",{className:"yst-relative",children:[[...Array(5)].map((e,t)=>(0,b.jsx)(dt,{},t)),(0,b.jsx)("div",{className:"yst-absolute yst-inset-0 yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity","aria-hidden":"true"})]})]})},ht=(0,p.compose)([(0,o.withSelect)(e=>{const{selectSuggestions:t,selectSuggestionsStatus:s,selectSuggestionsError:r}=e(_.bw);return{suggestions:t(),status:s(),error:r()}})])(({status:e,onSuggestionClick:t=c.noop,suggestions:s,error:r,closeButtonRef:o})=>{const n=Y(),i=e===K.$H.loading,l=e===K.$H.success;return(0,a.useEffect)(()=>{null!=o&&o.current&&o.current.focus()},[i]),(0,b.jsx)(d.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,b.jsxs)("div",{className:"yst-relative","aria-live":"polite",children:[(0,b.jsx)(Be,{as:"div",show:i,enter:"yst-transition-opacity yst-duration-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300 yst-absolute yst-top-0 yst-left-0 yst-right-0",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,b.jsx)(pt,{})}),(0,b.jsx)(Be,{as:"div",show:l,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,b.jsx)(ut,{suggestions:s,onSuggestionClick:t})}),e===K.$H.error&&(0,b.jsx)(st,{errorCode:r.errorCode,errorIdentifier:r.errorIdentifier,errorMessage:r.errorMessage,missingLicenses:r.missingLicenses,onRetry:n})]})})}),mt=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});var gt=s(3838);const yt=({intent:e,description:t})=>{const s=at[e],r=s?s.calloutClasses:"yst-bg-slate-50 yst-border-slate-200",o=s?s.calloutTextClasses:"yst-text-slate-900";return(0,b.jsxs)("div",{role:"note",className:w()("yst-border yst-rounded-md yst-p-4 yst-flex yst-flex-col yst-gap-2",r),children:[(0,b.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2",children:[(0,b.jsx)(lt,{intent:e,tooltipPosition:"bottom-right"}),(0,b.jsx)("span",{className:w()("yst-font-medium yst-text-sm",o),children:(0,u.__)("Why this content?","wordpress-seo")})]}),(0,b.jsx)("p",{className:w()("yst-text-sm",o),children:t})]})},ft=({children:e,className:t,dragProps:s,buttonProps:r})=>{const o=(0,d.useSvgAria)();return(0,b.jsx)("li",{...s,children:(0,b.jsxs)("button",{type:"button",className:w()("yst-h-10 yst-w-full yst-border yst-rounded-md yst-shadow yst-flex yst-items-center yst-gap-3 yst-px-3 yst-select-none",t),...r,children:[(0,b.jsxs)("svg",{className:"yst-w-2.5 yst-h-4 yst-shrink-0",viewBox:"0 0 10 16",fill:"currentColor",...o,children:[(0,b.jsx)("circle",{cx:"2",cy:"2",r:"1.5"}),(0,b.jsx)("circle",{cx:"8",cy:"2",r:"1.5"}),(0,b.jsx)("circle",{cx:"2",cy:"8",r:"1.5"}),(0,b.jsx)("circle",{cx:"8",cy:"8",r:"1.5"}),(0,b.jsx)("circle",{cx:"2",cy:"14",r:"1.5"}),(0,b.jsx)("circle",{cx:"8",cy:"14",r:"1.5"})]}),(0,b.jsx)("div",{className:"yst-flex yst-items-center yst-gap-3 yst-flex-1 yst-min-w-0",children:e})]})})},xt=({heading:e,index:t,dragOverIndex:s,onDragStart:r,onDragOver:o,onDrop:n,onDragEnd:i,onMoveUp:l,onMoveDown:c,totalItems:d,onAnnounce:p})=>{const h=(0,a.useCallback)(e=>r(e,t),[r,t]),m=(0,a.useCallback)(e=>o(e,t),[o,t]),g=(0,a.useCallback)(e=>n(e,t),[n,t]),y=(0,a.useCallback)(s=>{s.altKey&&("ArrowUp"===s.key&&t>0&&(s.preventDefault(),l(t),p(e,t)),"ArrowDown"===s.key&&t<d-1&&(s.preventDefault(),c(t),p(e,t+2)))},[t,d,l,c,p,e]),f={draggable:"true",onDragStart:h,onDragOver:m,onDrop:g,onDragEnd:i};return(0,b.jsxs)(ft,{className:w()("yst-bg-slate-50 yst-text-slate-400 yst-border-slate-300 yst-text-sm yst-cursor-grab yst-transition-all focus:yst-outline focus:yst-outline-2 focus:yst-outline-offset-2 focus:yst-outline-primary-500",s===t&&"yst-border-primary-500 yst-border-2"),buttonProps:{onKeyDown:y},dragProps:f,children:[(0,b.jsx)("span",{className:"yst-font-medium yst-text-slate-500",children:"H2"}),(0,b.jsx)("span",{className:"yst-text-slate-600",children:e}),(0,b.jsx)("span",{className:"yst-sr-only",children:(0,u.sprintf)(/* translators: 1: current position, 2: total items. */ /* translators: 1: current position, 2: total items. */
(0,u.__)("Position %1$d out of %2$d. Use Alt+Arrow Up/Down to reorder.","wordpress-seo"),t+1,d)})]})},wt=()=>(0,b.jsxs)(ft,{className:"yst-bg-white yst-text-slate-300 yst-border-slate-200",buttonProps:{disabled:!0},dragProps:{"aria-hidden":!0},children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3.5 yst-w-5 yst-rounded yst-shrink-0"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3.5 yst-w-32 yst-rounded"})]}),bt=({categoryName:e,isEnabled:t=!1,isLoading:s=!1})=>s?(0,b.jsx)("div",{className:"yst-inline-flex yst-items-center yst-w-20 yst-h-5 yst-px-2 yst-py-1 yst-rounded-full yst-border yst-border-slate-300",children:(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-16 yst-h-3 yst-rounded"})}):t&&e?(0,b.jsx)(d.Badge,{variant:"plain",className:"yst-w-fit",children:e}):null,vt=({category:e,isEnabled:t=!1,onToggle:s=c.noop,isLoading:r=!1})=>(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-3 yst-max-w-sm yst-mb-6",children:[(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-1.5",children:[(0,b.jsxs)("div",{className:"yst-flex yst-items-center yst-justify-between",children:[(0,b.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,u.__)("Suggest category","wordpress-seo")}),(0,b.jsx)(d.Toggle,{id:"suggest-category-toggle",checked:t,onChange:s,disabled:r,screenReaderLabel:(0,u.__)("Suggest category","wordpress-seo")})]}),(0,b.jsx)("p",{className:"yst-text-sm yst-text-slate-600",children:(0,u.__)("Adds post to an existing category, when applicable.","wordpress-seo")})]}),(0,b.jsx)(bt,{categoryName:null==e?void 0:e.name,isEnabled:t,isLoading:r})]}),_t=()=>(0,b.jsxs)("div",{className:"yst-flex yst-items-end yst-justify-between yst-mb-2",children:[(0,b.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:(0,u.__)("Blog post structure","wordpress-seo")}),(0,b.jsx)("span",{className:"yst-text-xs yst-text-slate-500",children:(0,u.__)("Drag to reorder","wordpress-seo")})]}),kt=({value:e,date:t="",locale:s="",isCornerstone:r=!1})=>{const{actual:o,score:n,max:i}=(0,gt.getDescriptionProgress)(e,t,r,!1,s),a=Math.min(o/i*100,100);return(0,b.jsx)("div",{className:"yst-w-full yst-h-1.5 yst-bg-slate-200 yst-rounded-full yst-overflow-hidden","aria-hidden":"true",children:(0,b.jsx)("div",{className:"yst-h-full yst-rounded-full yst-transition-all yst-duration-300",style:{width:`${a}%`,backgroundColor:(0,gt.getProgressColor)(n)}})})},jt=({label:e,multiline:t=!1})=>(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-2",children:[(0,b.jsx)("span",{className:"yst-font-medium yst-text-sm yst-text-slate-800",children:e}),(0,b.jsx)("div",{className:w()("yst-bg-white yst-border yst-border-slate-300 yst-rounded-md yst-shadow-sm yst-px-3 yst-py-2",t?"yst-min-h-20 yst-flex yst-flex-col yst-gap-1":"yst-h-10 yst-flex yst-items-center"),children:t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-full yst-h-4 yst-rounded"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-1/2 yst-h-4 yst-rounded"})]}):(0,b.jsx)(d.SkeletonLoader,{className:"yst-w-1/3 yst-h-4 yst-rounded"})})]}),St=()=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(vt,{isLoading:!0}),(0,b.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,b.jsx)(jt,{label:(0,u.__)("Focus Keyphrase","wordpress-seo")}),(0,b.jsx)(jt,{label:(0,u.__)("Title","wordpress-seo")}),(0,b.jsx)(jt,{label:(0,u.__)("Meta description","wordpress-seo"),multiline:!0})]}),(0,b.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,b.jsx)(_t,{}),(0,b.jsx)("ul",{"aria-label":(0,u.__)("Blog post structure","wordpress-seo"),"aria-busy":!0,className:"yst-list-none yst-p-0 yst-m-0 yst-flex yst-flex-col yst-gap-2",children:Array.from({length:_.Tf}).map((e,t)=>(0,b.jsx)(wt,{},`structure-row-skeleton-${t}`))})]})]}),Ct=(0,p.compose)([(0,o.withSelect)(e=>{const{selectSuggestion:t,selectContentOutline:s,selectContentOutlineStatus:r,selectFeatureModalStatus:o,selectContentOutlineError:n}=e(_.bw),{getIsPremium:i}=e("yoast-seo/editor"),{isCornerstoneContent:a,getDateFromSettings:l,getContentLocale:c}=e("yoast-seo/editor");return{suggestion:t(),outline:s(),status:r(),error:n(),isPremium:i(),isActive:o()===_.Qo.contentOutline,locale:c(),date:l(),isCornerstone:a()}}),(0,o.withDispatch)(e=>{const{setFeatureModalStatus:t,saveOutlineEditsToCache:s,setSuggestion:r}=e(_.bw);return{onBackToSuggestions:(e,o)=>{s({id:e.id,structure:o}),r(e),t(_.Qo.contentSuggestions)}}})])(({status:e,onBackToSuggestions:t,onApplyOutline:s,suggestion:r,error:n,isCornerstone:i,date:l,locale:c,closeButtonRef:p})=>{const h=e===K.$H.loading,m=H(),g=(0,a.useCallback)(()=>m(r),[m,r]),[y,f]=(0,a.useState)(!0),[x,v]=(0,a.useState)(r.keyphrase),[k,j]=(0,a.useState)(r.title),[S,C]=(0,a.useState)(r.meta_description),{structure:E,dragOverIndex:T,reorderMessage:R,handleAnnounce:L,handleDragStart:I,handleDragOver:A,handleDrop:P,handleDragEnd:N,handleMoveUp:M,handleMoveDown:O}=(()=>{const e=(0,o.useSelect)(e=>e(_.bw).selectContentOutline(),[]),[t,s]=(0,a.useState)(e),[r,n]=(0,a.useState)(null),[i,l]=(0,a.useState)(""),c=(0,a.useRef)(null),d=(0,a.useCallback)((e,s)=>{l((0,u.sprintf)(/* translators: 1: heading text, 2: new 1-based position, 3: total items. */ /* translators: 1: heading text, 2: new 1-based position, 3: total items. */
(0,u.__)("H2 %1$s moved to position %2$d of %3$d.","wordpress-seo"),e,s,t.length))},[t.length]);(0,a.useEffect)(()=>{s(e),l(""),n(null),c.current=null},[e]);const p=(0,a.useCallback)((e,t)=>{c.current=t,e.dataTransfer.effectAllowed="move"},[]),h=(0,a.useCallback)((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",n(t)},[]),m=(0,a.useCallback)((e,t)=>{e.preventDefault();const r=c.current;null!==r&&r!==t?(s(e=>{const s=[...e],[o]=s.splice(r,1),n=r<t?t-1:t;return s.splice(n,0,o),s}),n(null),c.current=null):n(null)},[]),g=(0,a.useCallback)(()=>{n(null),c.current=null},[]),y=(0,a.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e-1,0,r),s})},[]),f=(0,a.useCallback)(e=>{s(t=>{const s=[...t],[r]=s.splice(e,1);return s.splice(e+1,0,r),s})},[]);return{structure:t,dragOverIndex:r,reorderMessage:i,handleAnnounce:d,handleDragStart:p,handleDragOver:h,handleDrop:m,handleDragEnd:g,handleMoveUp:y,handleMoveDown:f}})(),F=(0,a.useCallback)(e=>A(e,E.length),[A,E.length]),D=(0,a.useCallback)(e=>P(e,E.length),[P,E.length]);(0,a.useEffect)(()=>{v(r.keyphrase),j(r.title),C(r.meta_description)},[r]),(0,a.useEffect)(()=>{null!=p&&p.current&&p.current.focus()},[h]);const q=(0,a.useCallback)(e=>v(e.target.value),[]),$=(0,a.useCallback)(e=>j(e.target.value),[]),B=(0,a.useCallback)(e=>C(e.target.value),[]),U=(0,a.useCallback)(()=>{f(e=>!e)},[]),z=(0,a.useCallback)(()=>{t({...r,title:k,keyphrase:x,meta_description:S},E)},[t,r,k,x,S,E]),W=(0,a.useCallback)(()=>{s({title:k,metaDescription:S,focusKeyphrase:x,category:y?r.category:{name:"",id:-1},structure:E})},[s,k,S,x,y,r.category,E]),Y=Boolean(r.category&&-1!==r.category.id);return e===K.$H.error?(0,b.jsx)(d.Modal.Container.Content,{className:"yst-overflow-y-auto yst-p-6 yst-m-0",children:(0,b.jsx)(st,{errorCode:n.errorCode,errorIdentifier:n.errorIdentifier,errorMessage:n.errorMessage,missingLicenses:n.missingLicenses,onRetry:g})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(d.Modal.Container.Content,{className:"yst-overflow-y-auto yst-pt-6 yst-px-6 yst-pb-0 yst-m-0 yst-relative","aria-busy":h,children:[(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-6",children:[(0,b.jsx)(yt,{intent:r.intent,description:r.explanation}),(0,b.jsx)(d.Modal.Description,{className:"yst-text-sm yst-text-slate-600",children:(0,u.__)("Review and customize your content outline before adding it to your post","wordpress-seo")}),(0,b.jsx)("hr",{className:"yst-border-slate-200"}),(0,b.jsx)(Be,{as:"div",show:h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:(0,b.jsx)(St,{})}),(0,b.jsxs)(Be,{as:"div",show:!h,enter:"yst-transition-opacity yst-duration-300 yst-delay-300",enterFrom:"yst-opacity-0",enterTo:"yst-opacity-100",leave:"yst-transition-opacity yst-duration-300",leaveFrom:"yst-opacity-100",leaveTo:"yst-opacity-0",children:[Y&&(0,b.jsx)(vt,{category:r.category,isEnabled:y,onToggle:U}),(0,b.jsxs)("div",{className:"yst-flex yst-flex-col",children:[(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4",children:[(0,b.jsx)(d.TextField,{id:"content-outline-focus-keyphrase",label:(0,u.__)("Focus Keyphrase","wordpress-seo"),value:x,onChange:q}),(0,b.jsx)(d.TextField,{id:"content-outline-title",label:(0,u.__)("Title","wordpress-seo"),value:k,onChange:$}),(0,b.jsxs)("div",{children:[(0,b.jsx)(d.TextareaField,{id:"content-outline-meta-description",label:(0,u.__)("Meta description","wordpress-seo"),value:S,onChange:B,className:"yst-mb-2"}),(0,b.jsx)(kt,{value:S,date:l,locale:c,isCornerstone:i})]})]}),(0,b.jsx)("hr",{className:"yst-border-slate-200 yst-my-6"}),(0,b.jsx)(_t,{}),(0,b.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:"yst-sr-only",children:R}),(0,b.jsx)("ul",{"aria-label":(0,u.__)("Blog post structure","wordpress-seo"),className:"yst-flex yst-flex-col yst-gap-2 yst-list-none yst-p-0 yst-m-0",children:E.map((e,t)=>(0,b.jsx)(xt,{index:t,heading:e.heading,dragOverIndex:T,onDragStart:I,onDragOver:A,onDrop:P,onDragEnd:N,onMoveUp:M,onMoveDown:O,totalItems:E.length,onAnnounce:L},e.id))}),(0,b.jsx)("div",{className:"yst-h-8",onDragOver:F,onDrop:D})]})]})]}),(0,b.jsx)("div",{className:w()(h?"yst-sticky":"yst-hidden","-yst-left-6 -yst-right-6 yst-bottom-0 yst-h-10 yst-pointer-events-none yst-bg-gradient-to-t yst-from-white yst-to-transparent yst-transition-opacity"),"aria-hidden":"true"})]}),(0,b.jsxs)(d.Modal.Container.Footer,{className:"yst-flex yst-items-center yst-justify-between yst-p-6 yst-border-t yst-border-slate-200",children:[(0,b.jsxs)(d.Button,{variant:"secondary",onClick:z,className:"yst-flex yst-items-center yst-gap-1.5",disabled:h,children:[(0,b.jsx)(mt,{className:"yst-w-4 yst-h-4"}),(0,u.__)("Content suggestions","wordpress-seo")]}),(0,b.jsx)(d.Button,{variant:"ai-primary",onClick:W,className:"[&>.yst-button--sparkles-icon]:yst-hidden yst-ps-3",disabled:h,children:(0,u.__)("Add outline to post","wordpress-seo")})]})]})}),Et="yst-mt-1 yst-mb-3",Tt="yst-flex yst-justify-end yst--me-8 yst-gap-3 yst--ms-2",Rt=({onClose:e})=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:Et,children:(0,u.__)("As long as this is a beta feature, you get unlimited sparks.","wordpress-seo")}),(0,b.jsx)("div",{className:Tt,children:(0,b.jsx)(d.Button,{type:"button",variant:"primary",size:"small",onClick:e,children:(0,u.__)("Got it!","wordpress-seo")})})]}),Lt=({onClose:e,upsellLink:t,isWooProductEntity:s=!1,ctbId:r="f6a84663-465f-4cb5-8ba5-f7a6d72224b2"})=>{const o=(0,d.useSvgAria)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:Et,children:(0,u.sprintf)(/* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,u.__)("Keep the momentum going, unlock unlimited sparks with %s!","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium")}),(0,b.jsxs)("div",{className:Tt,children:[(0,b.jsx)(d.Button,{type:"button",variant:"tertiary",size:"small",onClick:e,children:(0,u.__)("Close","wordpress-seo")}),(0,b.jsxs)(d.Button,{as:"a",size:"small",variant:"upsell",href:t,target:"_blank",rel:"noopener noreferrer","data-action":"load-nfd-ctb","data-ctb-id":r,children:[(0,b.jsx)(g.A,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-me-2 yst-shrink-0",...o}),(0,u.sprintf)(/* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast SEO Premium or Yoast WooCommerce SEO. */
(0,u.__)("Unlock with %1$s","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,b.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,u.__)("(Opens in a new browser tab)","wordpress-seo")})]})]})]})},It=({className:e=""})=>{const{isUsageCountLimitReached:t,usageCount:s,usageCountLimit:r,premiumUpsellLink:n,wooUpsellLink:i,isWooProductEntity:l,hasValidPremiumSubscription:c,hasValidWooSubscription:p}=(0,o.useSelect)(e=>{const t=e(k),s=e(j);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()}},[]),h=(0,a.useMemo)(()=>c&&!l||l&&p&&c,[c,l,p]),[m,,g,,y]=(0,d.useToggleState)(s===r),f=Math.max(0,r-s);(0,a.useEffect)(()=>{g(h&&s===r||!h&&f<=5)},[s,r,h,t]);const x=(0,a.useMemo)(()=>l?i:n,[l,i,n]),w=(0,a.useMemo)(()=>l&&!p,[l,p]);return m&&(0,b.jsx)(d.Notifications.Notification,{id:"ai-sparks-limit",className:e,variant:"info",dismissScreenReaderLabel:(0,u.__)("Close","wordpress-seo"),title:h?(0,u.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
(0,u._n)("You've used %s spark this month.","You've used %s sparks this month.",s,"wordpress-seo"),s):f<=5&&!t?(0,u.sprintf)(/* translators: %s is the number of the sparks. */ /* translators: %s is the number of the sparks. */
(0,u._n)("%s free spark left!","%s free sparks left!",f,"wordpress-seo"),f):(0,u.__)("You're out of free sparks!","wordpress-seo"),size:h?"default":"large",children:h?(0,b.jsx)(Rt,{onClose:y}):(0,b.jsx)(Lt,{onClose:y,upsellLink:x,isWooUpsell:w})})};var At=s(6752),Pt=s(5979);let Nt,Mt=!1;const Ot="\\–\\-\\(\\)_\\[\\]’‘“”〝〞〟‟„\"'.?!:;,¿¡«»‹›—×+&۔؟،؛。｡！‼？⁇⁉⁈‥…・ー、〃〄〆〇〈〉《》「」『』【】〒〓〔〕〖〗〘〙〚〛〜〝〞〟〠〶〼〽｛｝｜～｟｠｢｣､［］･￥＄％＠＆＇（）＊／：；＜＞＼\\<>";Ot.split(""),new RegExp("^["+Ot+"]+"),new RegExp("["+Ot+"]+$");new RegExp("["+Ot+"#$%&*+/=@^`{|}~ -¿–-⁊ -⁯₠-⃀]","g");const Ft=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={editType:T,previewType:S,postType:"post",contentType:L},qt=(0,a.createContext)(Dt),$t=(qt.Provider,()=>(0,a.useContext)(qt));var Bt=s(5986);const Ut=()=>(0,a.useContext)(Bt.LocationContext),zt=e=>{const t=(0,a.useRef)(null);return(0,a.useCallback)(s=>{(0,c.attempt)(()=>t.current&&t.current.disconnect()),null!==s&&(t.current=new ResizeObserver(t=>{(0,c.forEach)(t,t=>e(t))}),t.current.observe(s))},[e])},Wt=G.forwardRef(function(e,t){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),G.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"}))}),Ht=window.yoast.aiFrontend;var Kt=s(8213);const Yt="usageCount",Vt="fetchUsageCount",Gt=`${Vt}/${K.fJ.success}`,Zt=(K.fJ.error,{errorCode:null,errorIdentifier:null,errorMessage:null}),Qt=(0,Kt.createSlice)({name:Yt,initialState:{status:K.$H.idle,count:0,limit:10,endpoint:"",error:Zt},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(`${Vt}/${K.fJ.request}`,e=>{e.status=K.$H.loading,e.error=Zt}),e.addCase(Gt,(e,{payload:t})=>{e.status=K.$H.success,e.count=t.count,e.limit=t.limit,e.error=Zt}),e.addCase(`${Vt}/${K.fJ.error}`,(e,{payload:t})=>{e.status=K.$H.error,e.error={errorCode:502,...t}})}}),Xt=(Qt.getInitialState,{selectUsageCountStatus:e=>(0,c.get)(e,[Yt,"status"],Qt.getInitialState()),selectUsageCount:e=>(0,c.get)(e,[Yt,"count"],Qt.getInitialState().count),selectUsageCountLimit:e=>(0,c.get)(e,[Yt,"limit"],Qt.getInitialState().limit),selectUsageCountEndpoint:e=>(0,c.get)(e,[Yt,"endpoint"],Qt.getInitialState().endpoint),selectUsageCountError:e=>(0,c.get)(e,[Yt,"error"],Qt.getInitialState().error)});Xt.selectUsageCountRemaining=(0,Kt.createSelector)([Xt.selectUsageCount,Xt.selectUsageCountLimit],(e,t)=>Math.max(t-e,0)),Xt.isUsageCountLimitReached=(0,Kt.createSelector)([Xt.selectUsageCount,Xt.selectUsageCountLimit,Xt.selectUsageCountError],(e,t,s)=>429===s.errorCode||e>=t),Qt.actions,Qt.reducer;const Jt=({errorCode:e,errorIdentifier:t="",errorMessage:s=""})=>{switch(e){case 400:switch(t){case"SITE_UNREACHABLE":return(0,b.jsx)(tt,{});case"WP_HTTP_REQUEST_ERROR":return(0,b.jsx)(Je,{errorMessage:s});default:return(0,b.jsx)(We,{})}case 429:return(0,b.jsx)(Ye,{});default:return(0,b.jsx)(We,{})}};Jt.propTypes={errorCode:ze().number.isRequired,errorIdentifier:ze().string,errorMessage:ze().string};const es=({currentSubscriptions:e,isSeoAnalysisActive:t=!0})=>{const{isPremium:s,usageCountStatus:r,usageCountError:n,isWooProductEntity:i,isWooSeoActive:l}=(0,o.useSelect)(e=>{const t=e(j);return{isPremium:t.getIsPremium(),usageCountStatus:e(k).selectUsageCountStatus(),usageCountError:e(k).selectUsageCountError(),isWooProductEntity:t.getIsWooProductEntity(),isWooSeoActive:t.getIsWooSeoActive()}},[]),c=(0,a.useMemo)(()=>!e.wooCommerceSubscription&&i,[e.wooCommerceSubscription]),d=(0,a.useMemo)(()=>{const t=[];return!s&&!i||e.premiumSubscription||t.push("Yoast SEO Premium"),c&&l&&t.push("Yoast WooCommerce SEO"),t},[s,e.premiumSubscription,c,l,i]);return d.length>0?(0,b.jsx)(Ze,{invalidSubscriptions:d}):t?r===N.error?(0,b.jsx)(Jt,{...n}):void 0:(0,b.jsx)(Ke,{})};es.propTypes={currentSubscriptions:ze().object.isRequired,isSeoAnalysisActive:ze().bool};const ts=({onStartGenerating:e})=>(0,b.jsx)(f.ve,{storeName:k,linkStoreName:j,onConsentGranted:e});ts.propTypes={onStartGenerating:ze().func.isRequired};const ss=G.forwardRef(function(e,t){return G.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:t},e),G.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});var rs=s(1480);const os=/(?<start><\/badge>|^(?!<badge>))(?<wrap>[\s\S]+?)(?<end><badge>|$)/g,ns=({total:e,current:t,onNavigate:s,disabled:r=!1,...o})=>(0,b.jsxs)("div",{className:"yst-flex yst-justify-between yst-gap-x-2 yst-items-start",children:[(0,b.jsx)("p",{className:"yst-text-slate-500 yst-text-xxs yst-mt-1",children:(0,u.__)("Text generated by AI may be offensive or inaccurate.","wordpress-seo")}),e>1&&(0,b.jsx)(d.Pagination,{className:"yst-shrink-0",current:t,total:e,onNavigate:s,disabled:r,variant:"text"
/* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,u.__)("Previous","wordpress-seo")
/* translators: Hidden accessibility text. */,screenReaderTextNext:(0,u.__)("Next","wordpress-seo"),...o})]}),is=({height:e})=>{const[t,s]=(0,a.useState)(""),{onClose:r}=(0,d.useModalContext)(),{editType:n,previewType:i,contentType:l}=$t(),p=(()=>{const{editType:e,previewType:t}=$t();let s="SEO";switch(t){case C:s="social";break;case E:s="X"}switch(e){case T:return(0,u.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
(0,u.__)("Generated %s titles","wordpress-seo"),s);case R:return t===S&&(s="meta"),(0,u.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
(0,u.__)("Generated %s descriptions","wordpress-seo"),s)}})(),h=(()=>{const{editType:e,previewType:t}=$t();let s="SEO";switch(t){case C:s="social";break;case E:s="X"}switch(e){case T:return(0,u.sprintf)(/* translators: %s is the type of title. */ /* translators: %s is the type of title. */
(0,u.__)("Apply %s title","wordpress-seo"),s);case R:return t===S&&(s="meta"),(0,u.sprintf)(/* translators: %s is the type of description. */ /* translators: %s is the type of description. */
(0,u.__)("Apply %s description","wordpress-seo"),s)}})(),m=Ut(),{suggestions:g,fetchSuggestions:f,setSelectedSuggestion:x}=As(),w=Ts(),{addAppliedSuggestion:v,addUsageCount:_}=(0,o.useDispatch)(k),{isUsageCountLimitReached:F,isWooProductEntity:D,hasValidPremiumSubscription:q,hasValidWooSubscription:$}=(0,o.useSelect)(e=>{const t=e(k),s=e(j);return{isUsageCountLimitReached:t.isUsageCountLimitReached(),isPremium:s.getIsPremium(),isWooProductEntity:s.getIsWooProductEntity(),isWooSeoActive:s.getIsWooSeoActive(),hasValidPremiumSubscription:t.selectPremiumSubscription(),hasValidWooSubscription:t.selectWooCommerceSubscription()}},[]),B=(0,a.useMemo)(()=>g.status===N.loading||!($||!F||!D)||!(q||!F),[q,F,g.status,D,$]),U=(0,d.usePrevious)(e),z=g.status===N.success?e:U,{bottom:H}=W(z),[K,Y]=(0,a.useState)(!1),V=(0,a.useCallback)(e=>{Y(e.target.offsetHeight!==e.target.scrollHeight)},[Y]),G=zt(V),Z=Ns(),Q=(()=>{const e=(()=>{const{previewType:e}=$t();return(0,a.useMemo)(()=>{switch(e){case S:return()=>(0,o.select)(j).getSnippetEditorData().description;case C:return(0,o.select)(j).getFacebookDescriptionOrFallback;case E:return(0,o.select)(j).getTwitterDescriptionOrFallback;default:return(0,c.constant)("")}},[e])})();return(0,a.useMemo)(e,[e])})(),X=(()=>{const e=(0,o.useSelect)(e=>e(j).getReplaceVars(),[]),t=(0,a.useMemo)(()=>e.map(Ft),[e]);return(0,a.useCallback)((e,{key:s="value",overrides:r={},applyPluggable:o=!0,editType:n=T,contentType:i=L}={})=>{for(const o of t)e=e.replace(new RegExp("%%"+(0,c.escapeRegExp)(o.name)+"%%","g"),(0,c.get)(r,o.name,o[s]));return i===I&&(e=e.replace(" Archives","")),o?((e,t=T)=>{const s=(0,Pt.applyReplaceUsingPlugin)({title:"",description:"",[t]:At.languageProcessing.stripSpaces(e)});return(0,c.get)(s,t,e)})(e,n):e},[t])})(),J=(0,a.useMemo)(()=>n===T?{[A[l]]:g.selected}:{},[n,l,g.selected]),ee=(0,a.useMemo)(()=>X(Z,{overrides:J,contentType:l}),[X,Z,n,l,g.selected]),te=(0,a.useMemo)(()=>X(Z,{overrides:{...J,sep:"",sitename:""},contentType:l}),[X,Z,n,l,g.selected]),se=(0,a.useMemo)(()=>n===R?g.selected:X(Q,{editType:R}),[X,Q,n,g.selected]),re=(0,a.useCallback)(e=>X(Z,{overrides:{[A[l]]:e},key:"badge",applyPluggable:!1,contentType:l}),[X,Z,l]),{currentPage:oe,setCurrentPage:ne,isOnLastPage:ie,totalPages:ae,getItemsOnCurrentPage:le}=(({totalItems:e=0,perPage:t=5})=>{const[s,r]=(0,a.useState)(1),o=(0,a.useMemo)(()=>Math.ceil(e/t),[e,t]),n=(0,a.useMemo)(()=>s*t,[s,t]),i=(0,a.useMemo)(()=>n-t,[n,t]),l=(0,a.useMemo)(()=>1===s,[s]),d=(0,a.useMemo)(()=>s===o,[s,o]),u=(0,a.useCallback)(()=>{s>1&&r(s-1)},[s,r]),p=(0,a.useCallback)(()=>{s<o&&r(s+1)},[s,r,o]),h=(0,a.useCallback)(e=>(0,c.slice)(e,i,n),[i,n]);return{currentPage:s,setCurrentPage:r,totalPages:o,isOnFirstPage:l,isOnLastPage:d,previousPage:u,nextPage:p,firstOnPage:i,lastOnPage:n,getItemsOnCurrentPage:h}})({totalItems:g.status===N.loading||g.status===N.error?g.entities.length+5:g.entities.length,perPage:5}),ce=(0,a.useMemo)(()=>(0,c.map)(le(g.entities),e=>{let t=e;return n===T&&(t=re(e),t=t.replace(os,(e,t,s,r,o,n,{start:i,wrap:a,end:l})=>{const c=a.trim();return 0===c.length?`${i}${a}${l}`:`${i}<span>${c}</span>${l}`}),t=(0,y.x)(t,{badge:(0,b.jsx)(d.Badge,{className:"yst-me-2 last:yst-me-0",variant:"plain",children:" "}),span:(0,b.jsx)("span",{className:"yst-flex yst-items-center yst-me-2 last:yst-me-0"})})),{value:e,label:t}}),[g.entities,le,n,re]),de=(0,a.useMemo)(()=>g.status!==N.error||g.status===N.error&&!ie,[g.status,ie]),ue=(0,a.useMemo)(()=>g.status===N.loading&&ie,[g.status,ie]),pe=(0,a.useMemo)(()=>g.status===N.error&&ie,[g.status,ie]),he=(0,a.useCallback)(()=>{B||(ne(g.status===N.error?ae:ae+1),f().then(e=>{e===M&&_()}))},[f,g.status,ae,ne,x,F]),me=(0,a.useCallback)(()=>s(""),[s]),ge=Rs(),ye=(0,rs.Z)(!0),fe=(0,a.useCallback)(()=>{const e=n===T?Z.replace(new RegExp(P[l]+"( Archives)?"),g.selected):g.selected;ge(e),v({editType:n,previewType:i,suggestion:g.selected}),r(),"pre-publish"===m&&ye()},[ge,n,i,g.selected,Z,r,v,ye,m]);return((e,t=[])=>{const s=(0,a.useRef)(!1);(0,a.useEffect)(()=>{s.current||(s.current=!0,e().finally(()=>{s.current=!1}))},[e,t])})(()=>""===t?f().then(e=>{s(e),e===M&&_()}):Promise.resolve(),[t,_,f]),t===O||g.status===N.error&&402===g.error.code?(0,b.jsx)("div",{className:"yst-flex yst-flex-col yst-space-y-6 yst-mt-6",children:(0,b.jsx)(fs,{errorCode:g.error.code,errorIdentifier:g.error.errorIdentifier,invalidSubscriptions:g.error.missingLicenses,showActions:!0,onRetry:me,errorMessage:g.error.message})}):(0,b.jsxs)(a.Fragment,{children:[(0,b.jsxs)(d.Modal.Container.Content,{ref:G,className:"yst-flex yst-flex-col yst-py-6 yst-space-y-2",children:[(0,b.jsx)(w,{title:ee,description:se,status:g.status,titleForLength:te,showPreviewSkeleton:""===t,showLengthProgress:!ue}),de&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"yst-flex yst-space-y-4",children:[(0,b.jsx)(d.Label,{as:"span",className:"yst-flex-grow yst-cursor-default yst-mt-auto",children:p}),(0,b.jsx)(d.Button,{variant:"ai-secondary",size:"small",onClick:g.status===N.loading?c.noop:he,isLoading:g.status===N.loading,disabled:B,children:(0,u.__)("Generate 5 more","wordpress-seo")})]}),ue?(0,b.jsx)(_s,{idSuffix:m,suggestionClassNames:n===T?[["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,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(bs,{idSuffix:m,suggestions:ce,selected:g.selected,onChange:x}),(0,b.jsx)(ns,{current:oe,total:ae,onNavigate:ne,disabled:g.status===N.loading||pe})]})]}),g.status===N.error&&ie&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"yst-mt-8"}),(0,b.jsx)(fs,{errorCode:g.error.code,errorIdentifier:g.error.errorIdentifier,invalidSubscriptions:g.error.missingLicenses,errorMessage:g.error.message}),(0,b.jsx)(ns,{current:oe,total:ae,onNavigate:ne,disabled:g.status===N.loading})]})]}),(0,b.jsxs)(d.Modal.Container.Footer,{children:[K&&(0,b.jsx)("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,b.jsx)("hr",{className:"yst-mb-6 yst--mx-6"}),(0,b.jsxs)("div",{className:"sm:yst-flex sm:yst-justify-end sm:yst-space-x-2 sm:rtl:yst-space-x-reverse",children:[(0,b.jsx)("div",{className:"yst-hidden sm:yst-inline",children:(0,b.jsx)(d.Button,{variant:"secondary",onClick:r,children:(0,u.__)("Close","wordpress-seo")})}),(0,b.jsx)("div",{className:"yst-block sm:yst-inline",children:(0,b.jsxs)(d.Button,{className:"yst-w-full sm:yst-w-auto",variant:"primary",onClick:fe,disabled:""===g.selected||g.status===N.loading||pe,children:[(0,b.jsx)(ss,{className:"yst--ms-1 yst-me-1 yst-h-4 yst-w-4 yst-text-white"}),h]})}),(0,b.jsx)("div",{className:"yst-mt-3 sm:yst-hidden",children:(0,b.jsx)(d.Button,{variant:"secondary",onClick:r,className:"yst-w-full sm:yst-w-auto",children:(0,u.__)("Close","wordpress-seo")})})]})]}),(0,b.jsxs)(d.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:H},position:"bottom-left",children:[g.status!==N.loading&&(0,b.jsx)(It,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all"}),(g.status===N.success||g.status===N.loading)&&(0,b.jsx)(js,{})]})]})};is.propTypes={height:ze().number.isRequired};ze().func.isRequired;const as=({title:e,description:t,status:s,titleForLength:r,showPreviewSkeleton:n,showLengthProgress:i})=>{const l=(0,o.useSelect)(e=>e(j).getSnippetEditorMode(),[]),[c,p]=(0,a.useState)(l),{editType:h}=$t(),m=Ut(),g=Ps({editType:h,title:r,description:t});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(gt.ModeSwitcher,{onChange:p,active:c,id:`yst-ai-google-preview-mode-switcher-${m}`,disabled:s===N.loading}),n?(0,b.jsx)(ds,{}):(0,b.jsx)(cs,{mode:c,title:e,description:t}),(0,b.jsxs)("div",{className:"yst-pt-4",children:[(0,b.jsx)(d.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:h===T?(0,u.__)("SEO title width","wordpress-seo"):(0,u.__)("Meta description length","wordpress-seo")}),(0,b.jsx)(us,{className:"yst-mt-2",progress:i?g.actual:0,min:0,max:g.max,score:g.score})]})]})};as.propTypes={title:ze().string.isRequired,description:ze().string.isRequired,status:ze().oneOf(Object.keys(N)).isRequired,titleForLength:ze().string.isRequired,showPreviewSkeleton:ze().bool.isRequired,showLengthProgress:ze().bool.isRequired};const ls=/mobi/i,cs=({mode:e,title:t,description:s})=>{var r,n;const i=(0,o.useSelect)(e=>e(j).getBaseUrlFromSettings(),[]),l=(0,o.useSelect)(e=>e(j).getSnippetEditorData().slug||"",[]),d=(0,o.useSelect)(e=>e(j).getDateFromSettings(),[]),u=(0,o.useSelect)(e=>e(j).getFocusKeyphrase(),[]),p=(0,o.useSelect)(e=>e(j).getSnippetEditorPreviewImageUrl(),[]),h=(0,o.useSelect)(e=>e(j).getSiteIconUrlFromSettings(),[]),m=(0,o.useSelect)(e=>e(j).getShoppingData(),[]),g=(0,o.useSelect)(e=>e(j).getSnippetEditorWordsToHighlight(),[]),y=(0,o.useSelect)(e=>e(j).getSiteName(),[]),f=(0,o.useSelect)(e=>e(j).getContentLocale(),[]),x=(0,a.useMemo)(()=>i+l,[i,l]),w=(0,a.useMemo)(()=>{var e,t;return ls.test(null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.userAgent)},[null===(r=window)||void 0===r||null===(n=r.navigator)||void 0===n?void 0:n.userAgent]);return(0,b.jsx)("div",{className:`yst-ai-generator-preview-section ${e}${w?" yst-user-agent__mobile":""}`,children:(0,b.jsx)(gt.SnippetPreview,{title:t,description:s,mode:e,url:x,keyword:u,date:d,faviconSrc:h,mobileImageSrc:p,wordsToHighlight:g,siteName:y,locale:f,shoppingData:m,onMouseUp:c.noop})})};cs.propTypes={mode:ze().oneOf(Object.keys({mobile:"mobile",desktop:"desktop"})).isRequired,title:ze().string.isRequired,description:ze().string.isRequired};const ds=()=>(0,b.jsxs)("div",{className:"yst-max-w-[400px] yst-py-4 yst-px-3 yst-border yst-rounded-lg yst-w-full yst-mx-auto",children:[(0,b.jsxs)("div",{className:"yst-flex yst-gap-x-3",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-flex-shrink-0 yst-h-7 yst-w-7 yst-rounded-full"}),(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-full yst-gap-y-1",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-2.5 yst-w-10/12"})]})]}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-4 yst-w-full yst-mt-6 yst-mb-4"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-full"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-10/12 yst-mt-2.5"})]}),us=({className:e="",progress:t,max:s,score:r})=>{const o=(0,a.useMemo)(()=>(e=>e>=7?"yst-score-good":e>=5?"yst-score-ok":"yst-score-bad")(r),[r]);return(0,b.jsx)(d.ProgressBar,{className:w()("yst-length-progress-bar",o,e),progress:t,min:0,max:s})};us.propTypes={className:ze().string,progress:ze().number.isRequired,max:ze().number.isRequired,score:ze().number.isRequired};const ps=({title:e,description:t,showPreviewSkeleton:s})=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,b.jsx)(d.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,u.__)("Social preview","wordpress-seo")})}),s?(0,b.jsx)(gs,{}):(0,b.jsx)(ms,{title:e,description:t})]});ps.propTypes={title:ze().string.isRequired,description:ze().string.isRequired,showPreviewSkeleton:ze().bool.isRequired};var hs=s(1426);const ms=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(j).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(j).getFacebookImageUrl(),[]),n=(0,o.useSelect)(e=>e(j).getEditorDataImageFallback(),[]),i=(0,o.useSelect)(e=>e(j).getFacebookAltText(),[]);return(0,b.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,b.jsx)(hs.Xi,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n,alt:i,onSelect:c.noop,onImageClick:c.noop,onMouseHover:c.noop})})};ms.propTypes={title:ze().string.isRequired,description:ze().string.isRequired};const gs=()=>(0,b.jsxs)("div",{className:"yst-flex yst-flex-col yst-w-[527px] yst-border yst-mx-auto",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-[273px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,b.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),ys=({children:e,onRetry:t})=>{const{onClose:s}=(0,d.useModalContext)();return(0,b.jsxs)(a.Fragment,{children:[e,(0,b.jsxs)("div",{className:"yst-mt-6 yst-mb-1 yst-flex yst-space-x-3 rtl:yst-space-x-reverse yst-place-content-end",children:[(0,b.jsx)(d.Button,{variant:"secondary",onClick:s,children:(0,u.__)("Close","wordpress-seo")}),(0,b.jsx)(d.Button,{variant:"primary",onClick:t,children:(0,u.__)("Try again","wordpress-seo")})]})]})};ys.propTypes={children:ze().node.isRequired,onRetry:ze().func.isRequired};const fs=({errorCode:e,errorIdentifier:t,invalidSubscriptions:s=[],showActions:r=!1,onRetry:o=c.noop,errorMessage:n=""})=>{switch(e){case 400:switch(t){case"AI_CONTENT_FILTER":return(0,b.jsx)(Xe,{});case"NOT_ENOUGH_CONTENT":return(0,b.jsx)(He,{});case"SITE_UNREACHABLE":return(0,b.jsx)(tt,{});case"WP_HTTP_REQUEST_ERROR":return r?(0,b.jsx)(ys,{onRetry:o,children:(0,b.jsx)(Je,{errorMessage:n})}):(0,b.jsx)(Je,{errorMessage:n});default:return r?(0,b.jsx)(ys,{onRetry:o,children:(0,b.jsx)(We,{})}):(0,b.jsx)(We,{})}case 402:return(0,b.jsx)(Ze,{invalidSubscriptions:s});case 408:return r?(0,b.jsx)(ys,{onRetry:o,children:(0,b.jsx)(Qe,{})}):(0,b.jsx)(Qe,{});case 429:return"USAGE_LIMIT_REACHED"===t?(0,b.jsx)(Ze,{invalidSubscriptions:s}):(0,b.jsx)(Ye,{});case 410:return(0,b.jsx)(et,{});default:return r?(0,b.jsx)(ys,{onRetry:o,children:(0,b.jsx)(We,{})}):(0,b.jsx)(We,{})}};fs.propTypes={errorCode:ze().number.isRequired,errorIdentifier:ze().string.isRequired,invalidSubscriptions:ze().array,showActions:ze().bool,onRetry:ze().func,errorMessage:ze().string};const xs=ze().shape({value:ze().string.isRequired,label:ze().node.isRequired}),ws=({id:e,name:t,suggestion:s,isChecked:r,onChange:o})=>{const n=(0,a.useCallback)(()=>o(s.value),[s,o]);return(0,b.jsxs)("label",{htmlFor:e,className:w()("yst-flex yst-p-4 yst-items-center yst-border first:yst-rounded-t-md last:yst-rounded-b-md",r&&"yst-z-10 yst-border-primary-500"),children:[(0,b.jsx)("input",{type:"radio",id:e,name:t,className:"yst-radio__input",value:s.value,checked:r,onChange:n}),(0,b.jsx)("div",{className:w()("yst-label yst-radio__label yst-flex yst-flex-wrap yst-items-center",!r&&"yst-text-slate-600"),children:s.label})]})};ws.propTypes={id:ze().string.isRequired,name:ze().string.isRequired,suggestion:xs.isRequired,isChecked:ze().bool.isRequired,onChange:ze().func.isRequired};const bs=({idSuffix:e,suggestions:t,selected:s,onChange:r})=>(0,b.jsx)("div",{children:(0,b.jsx)(d.RadioGroup,{className:"yst-suggestions-radio-group yst-flex yst-flex-col",id:`yst-ai-suggestions-radio-group__${e}`,children:t.map((t,o)=>(0,b.jsx)(ws,{id:`yst-ai-suggestions-radio-${e}__${o}`,name:`ai-suggestion__${e}`,isChecked:t.value===s,onChange:r,suggestion:t},`yst-ai-suggestions-radio-${e}__${o}`))})});bs.propTypes={idSuffix:ze().string.isRequired,suggestions:ze().arrayOf(xs).isRequired,selected:ze().string.isRequired,onChange:ze().func.isRequired};const vs=[["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"]],_s=({suggestionClassNames:e=vs})=>(0,b.jsx)("div",{className:"yst-flex yst-flex-col yst--space-y-[1px]",children:e.map((e,t)=>(0,b.jsxs)("div",{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",children:[(0,b.jsx)("input",{type:"radio",disabled:!0,className:"yst-my-0.5"}),(0,b.jsx)("div",{className:"yst-flex yst-flex-col yst-w-full",children:e.map((e,s)=>(0,b.jsx)(d.SkeletonLoader,{className:e},`yst-ai-suggestion-radio-skeleton-${t}__${s}`))})]},`yst-ai-suggestion-radio-skeleton__${t}`))});_s.propTypes={suggestionClassNames:ze().arrayOf(ze().arrayOf(ze().string))};const ks="ai_generator_tip_notification",js=()=>{const e=(0,o.useSelect)(e=>e(j).isAlertDismissed(ks),[]),t=(0,o.useSelect)(e=>e(j).getEditorDataContent(),[]),s=(0,o.useSelect)(e=>e(j).getIsWooProductEntity(),[]),[r,,,n]=(0,d.useToggleState)(!1),{editType:i,contentType:l}=$t(),{dismissAlert:c}=(0,o.useDispatch)(j),p=(0,a.useCallback)(()=>{c(ks)},[c]),h=(0,a.useMemo)(()=>i===R?(0,u.__)("%1$sTip%2$s: Improve the accuracy of your generated AI descriptions by writing more content in your page.","wordpress-seo"):(0,u.__)("%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,a.useMemo)(()=>((e,t)=>e||t===I?150:300)(s,l),[l,s]);return e||r||t.length>m?null:(0,b.jsxs)(d.Notifications.Notification,{id:"ai-generator-content-tip",variant:"info",dismissScreenReaderLabel:(0,u.__)("Dismiss","wordpress-seo"),children:[(0,y.x)((0,u.sprintf)(h,"<span>","</span>"),{span:(0,b.jsx)("span",{className:"yst-font-medium yst-text-slate-800"})}),(0,b.jsxs)("div",{className:"yst-flex yst-mt-3 yst--ms-3 yst-gap-1",children:[(0,b.jsx)(d.Button,{type:"button",variant:"tertiary",onClick:p,children:(0,u.__)("Don’t show again","wordpress-seo")}),(0,b.jsx)(d.Button,{type:"button",variant:"tertiary",className:"yst-text-slate-800",onClick:n,children:(0,u.__)("Dismiss","wordpress-seo")})]})]})},Ss=({title:e,description:t,showPreviewSkeleton:s})=>(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"yst-flex yst-mb-6",children:(0,b.jsx)(d.Label,{as:"span",className:"yst-flex-grow yst-cursor-default",children:(0,u.__)("X preview","wordpress-seo")})}),s?(0,b.jsx)(Es,{}):(0,b.jsx)(Cs,{title:e,description:t})]});Ss.propTypes={title:ze().string.isRequired,description:ze().string.isRequired,showPreviewSkeleton:ze().bool.isRequired};const Cs=({title:e,description:t})=>{const s=(0,o.useSelect)(e=>e(j).getSiteUrl(),[]),r=(0,o.useSelect)(e=>e(j).getTwitterImageUrl(),[]),n=(0,o.useSelect)(e=>e(j).getFacebookImageUrl(),[]),i=(0,o.useSelect)(e=>e(j).getEditorDataImageFallback(),[]),a=(0,o.useSelect)(e=>e(j).getTwitterImageType(),[]),l=(0,o.useSelect)(e=>e(j).getTwitterAltText(),[]);return(0,b.jsx)("div",{className:"yst-ai-generator-preview-section",children:(0,b.jsx)(hs.WG,{title:e,description:t,siteUrl:s,imageUrl:r,imageFallbackUrl:n||i,isLarge:"summary"!==a,alt:l,onSelect:c.noop,onImageClick:c.noop,onMouseHover:c.noop})})};Cs.propTypes={title:ze().string.isRequired,description:ze().string.isRequired};const Es=()=>(0,b.jsxs)("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",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-[265px] yst-w-full yst-rounded-none yst-border yst-border-dashed"}),(0,b.jsxs)("div",{className:"yst-w-full yst-p-4 yst-space-y-1",children:[(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-1/3"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-5 yst-w-10/12"}),(0,b.jsx)(d.SkeletonLoader,{className:"yst-h-3 yst-w-full"})]})]}),Ts=()=>{const{previewType:e}=$t();switch(e){case C:return ps;case E:return Ss;default:return as}},Rs=()=>{const{editType:e}=$t();switch(e){case T:return(()=>{const{previewType:e}=$t(),{updateData:t,setFacebookPreviewTitle:s,setTwitterPreviewTitle:r}=(0,o.useDispatch)(j);return(0,a.useMemo)(()=>{switch(e){case S:return e=>t({title:e});case C:return s;case E:return r;default:return c.noop}},[e,t,s,r])})();case R:return(()=>{const{previewType:e}=$t(),{updateData:t,setFacebookPreviewDescription:s,setTwitterPreviewDescription:r}=(0,o.useDispatch)(j);return(0,a.useMemo)(()=>{switch(e){case S:return e=>t({description:e});case C:return s;case E:return r;default:return c.noop}},[e,t,s,r])})();default:return c.noop}},Ls=(0,Kt.createSlice)({name:"suggestions",initialState:{status:N.loading,error:{code:200,message:""},entities:[],selected:""},reducers:{setLoading:e=>{e.status=N.loading},setSuccess:(e,{payload:t})=>{e.status=N.success,e.selected=t[0],e.entities.push(...t)},setError:(e,{payload:t})=>{e.status=N.error,e.error=t},setSelected:(e,{payload:t})=>{e.selected=t}}}),Is=e=>{switch(e){case C:return"Facebook";case E:return"Twitter";default:return"Google"}},As=()=>{const[e,t]=(0,a.useReducer)(Ls.reducer,Ls.getInitialState()),{editType:s,previewType:r,postType:n,contentType:i}=$t(),l=(0,o.useSelect)(e=>e(k).selectPromptContent(),[]),d=(0,o.useSelect)(e=>e(k).selectGetSuggestionsEndpoint(),[]),{contentLocale:u,focusKeyphrase:p,isWooCommerceActive:h,isGutenberg:m,isElementor:g}=(0,o.useSelect)(e=>({contentLocale:e(j).getContentLocale(),focusKeyphrase:e(j).getFocusKeyphrase(),isWooCommerceActive:e(j).getIsWooCommerceActive(),isGutenberg:e(j).getIsBlockEditor(),isElementor:e(j).getIsElementorEditor()}),[]);let y,f=At.languageProcessing.helpers.processExactMatchRequest(p).keyphrase;f.length>191&&(f=f.slice(0,191)),y=g?"elementor":m?"gutenberg":"classic";const x=((e,t,s,r)=>{const o=e===R?"meta-description":"seo-title";let n=((e,t)=>{if(e)switch(t){case"product":return"product-";case"product_cat":case"product_tag":return"product-taxonomy-"}return""})(t,s);return n&&t||r!==I||(n="taxonomy-"),`${n}${o}`})(s,h,n,i);return{suggestions:e,fetchSuggestions:(0,a.useCallback)(async(e=!0)=>{t(Ls.actions.setLoading());const{status:s,payload:o}=await(async({endpoint:e,data:t})=>{let s;const r=1e3*(0,c.get)(window,"wpseoAiGenerator.requestTimeout",30);try{Nt&&Nt.abort(),Nt=new AbortController,Mt=!1,s=setTimeout(()=>{Mt=!0,Nt.abort()},r);const o=await Ge()({path:e,method:"POST",data:t,parse:!1,signal:Nt.signal}),n=await o.json();return{status:M,payload:n}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return Mt?{status:O,payload:{message:"timeout",code:408}}:{status:F};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:O,payload:{message:t,code:e.status||500,missingLicenses:s,errorIdentifier:r}}}finally{clearTimeout(s)}})({endpoint:d,canAbort:e,data:{type:x,prompt_content:l,focus_keyphrase:f,platform:Is(r),language:z(u).replace("_","-"),editor:y}});switch(s){case F:break;case O:t(Ls.actions.setError(o));break;case M:t(Ls.actions.setSuccess(o))}return s},[t]),setSelectedSuggestion:(0,a.useCallback)(e=>t(Ls.actions.setSelected(e)),[t])}},Ps=({editType:e,title:t,description:s})=>{const r=(0,o.useSelect)(e=>e(j).getDateFromSettings(),[]),n=(0,o.useSelect)(e=>e(j).getContentLocale(),[]),i=(0,o.useSelect)(e=>e(j).isCornerstoneContent(),[]),l=(0,o.useSelect)(e=>e(j).getIsTerm(),[]);return(0,a.useMemo)(()=>e===R?(0,gt.getDescriptionProgress)(s,r,i,l,n):(0,gt.getTitleProgress)(t),[e,t,s,r,i,l,n])},Ns=()=>{const{editType:e,previewType:t,contentType:s}=$t(),r=(()=>{const{previewType:e}=$t();return(0,a.useMemo)(()=>{switch(e){case S:return()=>(0,o.select)(j).getSnippetEditorData().title;case C:return(0,o.select)(j).getFacebookTitleOrFallback;case E:return(0,o.select)(j).getTwitterTitleOrFallback;default:return(0,c.constant)("")}},[e])})(),n=(0,o.useSelect)(s=>s(k).selectAppliedSuggestionFor({editType:e,previewType:t}),[e,t]);return(0,a.useMemo)(()=>{let t=r();return e===R?t:(n&&(t=t.replace(n,P[s])),((e,t)=>e.includes(P[t])?e:P[t])(t,s))},[e,r])};var Ms=s(4080);const Os=(0,p.compose)([(0,o.withSelect)(e=>{const{selectFeatureModalStatus:t,selectSuggestionsStatus:s,selectContentOutlineStatus:r}=e(_.bw),o=e("core/editor").getEditedPostContent(),{getIsPremium:n,selectLink:i}=e("yoast-seo/editor"),{selectUsageCount:a,selectUsageCountLimit:l,selectUsageCountStatus:c}=e(k);return{isEmptyPost:0===(0,h.count)(o,"words",{}),isPremium:n(),status:t(),modalHelpLink:i("https://yoa.st/ai-content-planner-help-button-modal"),usageCount:a(),usageCountLimit:l(),contentSuggestionsStatus:s(),contentOutlineStatus:r(),usageCountStatus:c()}}),(0,o.withDispatch)(e=>{const{closeModal:t}=e(_.bw);return{onClose:t}})])(({onClose:e,isEmptyPost:t,isPremium:s,status:r,modalHelpLink:o,usageCount:n,usageCountLimit:i,contentSuggestionsStatus:l,contentOutlineStatus:c,usageCountStatus:p,openReplaceContentModal:h,setHasVisitedReplace:m,editedOutlineRef:g,handleApplyOutline:y})=>{const f=H(),x=r===_.Qo.consent,w=(0,d.useSvgAria)(),v=(0,a.useRef)(null),k=r===_.Qo.contentSuggestions,j=l===K.$H.error,S=r===_.Qo.contentOutline,C=c===K.$H.error,[E,T]=(0,a.useState)(0),R=(0,a.useCallback)(e=>T(e.borderBoxSize[0].blockSize),[T]),L=zt(R),{bottom:I}=W(E),A=(0,a.useCallback)(e=>{f(e)},[f]),P=(0,a.useCallback)(e=>{g.current=e,t?y():(m(!0),h())},[t,y,h,m]);return(0,b.jsx)(d.Modal,{isOpen:!x&&(k||S),onClose:e,children:(0,b.jsxs)(d.Modal.Panel,{ref:L,className:"yst-p-0 yst-max-w-2xl yst-overflow-visible",hasCloseButton:!1,children:[(0,b.jsx)(d.Modal.CloseButton,{ref:v,screenReaderText:k?(0,u.__)("Close content suggestions modal","wordpress-seo"):(0,u.__)("Close content outline modal","wordpress-seo")}),(0,b.jsxs)(d.Modal.Container,{children:[(0,b.jsxs)(d.Modal.Container.Header,{className:"yst-flex yst-items-center yst-gap-2 yst-pe-14 yst-py-6 yst-ps-6 yst-border-b yst-border-slate-200",children:[(0,b.jsx)(Ms.h,{className:"yst-fill-primary-500 yst-w-4 yst-mb-[1px]",...w}),(0,b.jsx)(d.Modal.Title,{size:"2",children:k?(0,u.__)("Content suggestions","wordpress-seo"):(0,u.__)("Content outline","wordpress-seo")}),(0,b.jsx)(d.Link,{href:o,variant:"primary",className:"yst-no-underline",target:"_blank",rel:"noopener noreferrer","aria-label":(0,u.__)("Learn more about AI (Opens in a new browser tab)","wordpress-seo"),children:(0,b.jsx)(Wt,{...w,className:"yst-w-4 yst-h-4 yst-text-slate-500 yst-shrink-0"})}),(0,b.jsx)("span",{className:"yst-flex-grow"}),(0,b.jsx)(d.Badge,{size:"small",children:(0,u.__)("Beta","wordpress-seo")}),(k&&!j||S&&!C)&&(0,b.jsx)(Ht.UsageCounter,{className:"yst-relative yst-flex yst-items-center",limit:i,requests:n,mentionBetaInTooltip:s,mentionResetInTooltip:s,isSkeleton:l===K.$H.loading||p===K.$H.loading})]}),k&&(0,b.jsx)(ht,{onSuggestionClick:A,closeButtonRef:v}),S&&(0,b.jsx)(Ct,{onApplyOutline:P,closeButtonRef:v})]}),(0,b.jsx)(d.Notifications,{className:"yst-mx-[calc(50%-50vw)] yst-transition-all",style:{bottom:I},position:"bottom-left",children:l===K.$H.success&&!C&&(0,b.jsx)(It,{})})]})})}),Fs=()=>{const{status:e,hasConsent:t}=(0,o.useSelect)(e=>({status:e(_.bw).selectFeatureModalStatus(),hasConsent:e(k).selectHasAiGeneratorConsent()}),[]),{setFeatureModalStatus:s,closeModal:r}=(0,o.useDispatch)(_.bw),[n,i]=(0,a.useState)(!1),[l,c,,p]=(0,d.useToggleState)(!1),h=(0,a.useRef)(null),m=(({editedOutlineRef:e})=>{const{editPost:t}=(0,o.useDispatch)("core/editor"),{closeModal:s,setBannerDismissed:r}=(0,o.useDispatch)(_.bw);return(0,a.useCallback)(()=>{var n;const i=e.current,a=(0,o.select)(_.bw).selectContentOutline(),l=(0,o.select)(_.bw).selectSuggestion(),c=i?{title:i.title,metaDescription:i.metaDescription,focusKeyphrase:i.focusKeyphrase,category:i.category}:{title:l.title,metaDescription:l.meta_description,focusKeyphrase:l.keyphrase,category:l.category},d=i?i.structure:a,u={title:c.title,blocks:B(d)};null!==(n=c.category)&&void 0!==n&&n.id&&-1!==c.category.id&&(u.categories=[c.category.id]),t(u),(({title:e,metaDescription:t,focusKeyphrase:s})=>{var r,n;const i=(0,o.dispatch)("yoast-seo/editor");null==i||null===(r=i.updateData)||void 0===r||r.call(i,{title:e,description:t}),null==i||null===(n=i.setFocusKeyword)||void 0===n||n.call(i,s)})(c),r(),s()},[t,s,r])})({editedOutlineRef:h}),g=Y(),y=e===_.Qo.consent,x=(0,a.useCallback)(()=>{t?g():s(_.Qo.consent)},[t,s,g]),w=(0,a.useCallback)(()=>{m()},[m]);return(0,a.useEffect)(()=>{e||i(!1)},[e]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(D,{onClick:x}),(0,b.jsx)(Os,{editedOutlineRef:h,handleApplyOutline:m,openReplaceContentModal:p,setHasVisitedReplace:i}),(0,b.jsx)($,{onConfirm:w,isOpen:l&&n,onClose:c}),(0,b.jsx)(d.Modal,{isOpen:y,onClose:r,className:"yst-introduction-modal",children:(0,b.jsx)(d.Modal.Panel,{className:"yst-max-w-lg yst-p-0 yst-rounded-3xl",closeButtonScreenReaderText:(0,u.__)("Close modal","wordpress-seo"),children:(0,b.jsx)(f.ve,{storeName:k,linkStoreName:j,onConsentGranted:g})})})]})},Ds=window.wp.blockEditor,qs=G.forwardRef(function(e,t){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),G.createElement("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),G.createElement("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"}))}),$s=G.forwardRef(function(e,t){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),G.createElement("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"}))}),Bs=({contentNotes:e})=>{const t=(0,d.useSvgAria)();return(0,b.jsxs)("div",{className:"yst-bg-slate-50 yst-font-sans yst-rounded-sm yst-shadow-sm yst-border yst-border-solid yst-border-slate-200 yst-p-4",children:[(0,b.jsxs)("div",{className:"yst-text-slate-500 yst-text-xs yst-flex yst-items-center yst-mb-4",children:[(0,b.jsx)(qs,{className:"yst-inline-block yst-w-3 yst-h-3 yst-me-1 yst-shrink-0",...t}),(0,b.jsx)("span",{className:"yst-text-xs yst-leading-3",children:(0,u.__)("Only visible to you","wordpress-seo")})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"yst-flex yst-justify-start yst-items-center yst-gap-2 yst-mb-1 yst-ps-4",children:[(0,b.jsx)("div",{className:"yst-flex yst-items-center yst-justify-center yst-w-4 yst-h-4 yst-bg-ai-500 yst-rounded-[1.5px]",children:(0,b.jsx)($s,{className:"yst-w-3 yst-h-3 yst-shrink-0 yst-text-white yst-flex yst-items-center yst-justify-center",...t})}),(0,b.jsx)("h3",{className:"yst-text-slate-800 yst-text-sm yst-leading-5 yst-font-medium yst-m-0",children:(0,u.__)("Content notes","wordpress-seo")})]}),e.length>0&&(0,b.jsx)("ul",{className:"yst-text-sm yst-text-slate-600 yst-font-normal yst-my-0 yst-ps-5 yst-leading-5 yst-list-none",children:e.map((e,t)=>(0,b.jsxs)("li",{className:"yst-flex yst-justify-start yst-gap-2",children:[(0,b.jsx)("span",{"aria-hidden":"true",children:"•"}),e]},`${t}-${e}`))})]})]})};(0,r.registerBlockType)("yoast-seo/content-suggestion",{apiVersion:3,title:(0,u.__)("Content Suggestion","wordpress-seo"),category:"text",supports:{inserter:!1},transforms:{to:[{type:"block",blocks:["core/list"],transform:({suggestions:e})=>(0,r.createBlock)("core/list",{},e.map(e=>(0,r.createBlock)("core/list-item",{content:e})))}]},attributes:{title:{type:"string",default:""},suggestions:{type:"array",items:{type:"string"},default:[]}},edit:({attributes:e})=>{const t=(0,a.useRef)(null),s=(0,Ds.useBlockProps)({ref:t});return(0,a.useEffect)(()=>{var e,s;const r=null!==(e=null===(s=t.current)||void 0===s?void 0:s.ownerDocument)&&void 0!==e?e:document;if(r===window.document||r.getElementById("yoast-seo-tailwind-css"))return;const o=window.document.getElementById("yoast-seo-tailwind-css");if(!o)return;const n=r.createElement("link");n.id="yoast-seo-tailwind-css",n.rel="stylesheet",n.href=o.href,r.head.appendChild(n)},[]),(0,b.jsx)("div",{...s,children:(0,b.jsx)(Bs,{contentNotes:e.suggestions})})},save:()=>null});var Us=s(3313),zs=s(3832);const Ws={aborted:!0};async function Hs({path:e,method:t="GET",data:s,abortController:r}){const o=r||new AbortController;let n=!1;const i=1e3*(0,c.get)(window,"wpseoContentPlanner.requestTimeout",30),a=setTimeout(()=>{n=!0,o.abort()},i);try{const r=await Ge()(function(e,t,s,r){const o={path:e,method:t,parse:!1,signal:r.signal};return s&&(o.data=s),o}(e,t,s,o));return await r.json()}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)throw function(e){if(e)throw{errorCode:408,errorIdentifier:"",errorMessage:"timeout"}}(n),Ws;throw await async function(e){const t=await async function(e){try{return await e.json()}catch(e){return{}}}(e);return{errorCode:e.status||502,errorIdentifier:t.errorIdentifier||t.code||"",errorMessage:t.message||"",missingLicenses:t.missingLicenses||[]}}(e)}finally{clearTimeout(a)}}const Ks=e=>{const t={...e||{},errorMessage:(null==e?void 0:e.errorMessage)||(null==e?void 0:e.message)};return(0,c.mapValues)({errorCode:502,errorIdentifier:"",errorMessage:"",missingLicenses:[]},(e,s)=>t[s]||e)},Ys="contentSuggestions",Vs="fetchContentPlannerSuggestions",Gs=(0,Kt.createSlice)({name:Ys,initialState:{endpoint:"",status:K.$H.idle,suggestions:[],error:_.pb},reducers:{setContentSuggestionsStatus:(e,{payload:t})=>{e.status=t},setSuggestion:(e,{payload:t})=>{const s=e.suggestions.findIndex(e=>e.id===t.id);-1!==s&&(e.suggestions[s]=t)},setSuggestionsError:(e,{payload:t})=>{e.status=K.$H.error,e.suggestions=[],e.error=Ks(t)}},extraReducers:e=>{e.addCase(`${Vs}/${K.fJ.request}`,e=>{e.status=K.$H.loading,e.suggestions=[],e.error=_.pb}),e.addCase(`${Vs}/${K.fJ.success}`,(e,{payload:t})=>{e.status=K.$H.success,e.suggestions=t,e.error=_.pb}),e.addCase(`${Vs}/${K.fJ.error}`,(e,{payload:t})=>{e.status=K.$H.error,e.error=Ks(t)})}}),Zs=Gs.getInitialState,Qs={selectContentSuggestionsEndpoint:e=>(0,c.get)(e,[Ys,"endpoint"],Gs.getInitialState().endpoint),selectSuggestionsStatus:e=>(0,c.get)(e,[Ys,"status"],Gs.getInitialState().status),selectSuggestions:e=>(0,c.get)(e,[Ys,"suggestions"],Gs.getInitialState().suggestions),selectSuggestionsError:e=>(0,c.get)(e,[Ys,"error"],Gs.getInitialState().error)},Xs={...Gs.actions,fetchContentPlannerSuggestions:function*({endpoint:e,postType:t,language:s,editor:r}){yield{type:`${Vs}/${K.fJ.request}`};try{const o=(e=>{const t=(0,c.get)(e,"suggestions",null);if(!(0,c.isArray)(t))throw new Error("Invalid suggestions response: expected an array of suggestions.");return t.map(e=>({title:e.title,intent:e.intent,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category,explanation:e.explanation,id:`suggestion-${e.keyphrase}-${e.title}`}))})(yield{type:Vs,payload:{endpoint:e,postType:t,language:s,editor:r}});return{type:`${Vs}/${K.fJ.success}`,payload:o}}catch(e){if(null!=e&&e.aborted)return;return{type:`${Vs}/${K.fJ.error}`,payload:e}}}},Js={[Vs]:async({payload:e})=>Hs({path:(0,zs.addQueryArgs)(e.endpoint,{post_type:e.postType,language:e.language,editor:e.editor})})},er=Gs.reducer,tr="contentOutline",sr="fetchContentOutline",rr={suggestion:null,outline:[],cache:{},endpoint:"",status:K.$H.idle,error:_.pb},or=(0,Kt.createSlice)({name:tr,initialState:rr,reducers:{setSuggestionForOutline:(e,{payload:t})=>{e.suggestion=t},restoreContentOutlineFromCache:(e,{payload:t})=>{const{suggestion:s,outline:r}=t;e.suggestion=s,e.outline=r,e.status=K.$H.success,e.error=_.pb},saveOutlineEditsToCache:(e,{payload:t})=>{const{id:s,structure:r}=t;s&&(e.cache[s]=r),e.suggestion=null,e.outline=[],e.status=K.$H.idle,e.error=_.pb}},extraReducers:e=>{e.addCase(`${sr}/${K.fJ.request}`,(e,{payload:t})=>{e.status=K.$H.loading,e.suggestion=t.suggestion,e.error=_.pb}),e.addCase(`${sr}/${K.fJ.success}`,(e,{payload:t})=>{e.status=K.$H.success;const s=t.outline.map((e,t)=>{var s,r;const o=null!==(s=e.subheading_text)&&void 0!==s?s:"";return{id:`${t}-${o}`,heading:o,contentNotes:null!==(r=e.content_notes)&&void 0!==r?r:[]}});e.outline=s}),e.addCase(`${sr}/${K.fJ.error}`,(e,{payload:t})=>{e.status=K.$H.error,e.error=Ks(t)}),e.addCase(`${Vs}/${K.fJ.request}`,e=>({...rr,endpoint:e.endpoint}))}}),nr=or.getInitialState,ir={selectContentOutlineEndpoint:e=>(0,c.get)(e,[tr,"endpoint"],or.getInitialState().endpoint),selectContentOutlineStatus:e=>(0,c.get)(e,[tr,"status"],or.getInitialState().status),selectContentOutline:e=>(0,c.get)(e,[tr,"outline"],or.getInitialState().outline),selectContentOutlineError:e=>(0,c.get)(e,[tr,"error"],or.getInitialState().error),selectSuggestion:e=>(0,c.get)(e,[tr,"suggestion"],or.getInitialState().suggestion),selectContentOutlineCache:(e,t)=>(0,c.get)(e,[tr,"cache",t],null)},ar={...or.actions,fetchContentOutline:function*({endpoint:e,postType:t,language:s,editor:r,suggestion:o}){yield{type:`${sr}/${K.fJ.request}`,payload:{suggestion:o}};try{const n=yield{type:sr,payload:{endpoint:e,postType:t,language:s,editor:r,...o}};yield{type:`${sr}/${K.fJ.success}`,payload:n}}catch(e){if(null!=e&&e.aborted)return;yield{type:`${sr}/${K.fJ.error}`,payload:e}}}},lr={[sr]:async({payload:e})=>Hs({method:"POST",path:e.endpoint,data:{post_type:e.postType,language:e.language,editor:e.editor,title:e.title,intent:e.intent,explanation:e.explanation,keyphrase:e.keyphrase,meta_description:e.meta_description,category:e.category}})},cr=or.reducer,dr="modal",ur=(0,Kt.createSlice)({name:dr,initialState:{isOpen:!1,featureModalStatus:null},reducers:{closeModal:()=>ur.getInitialState(),setFeatureModalStatus:(e,{payload:t})=>{e.featureModalStatus=t}},extraReducers:e=>{e.addCase(`${sr}/${K.fJ.request}`,e=>{e.featureModalStatus=_.Qo.contentOutline}),e.addCase(`${Vs}/${K.fJ.request}`,e=>{e.featureModalStatus=_.Qo.contentSuggestions})}}),pr=ur.getInitialState,hr=ur.reducer,mr={...ur.actions},gr={selectFeatureModalStatus:e=>(0,c.get)(e,[dr,"featureModalStatus"],ur.getInitialState().featureModalStatus)},yr="availability",fr=(0,Kt.createSlice)({name:yr,initialState:{minPostsMet:!1},reducers:{}}),xr=fr.getInitialState,wr=fr.reducer,br={...fr.actions},vr={selectIsMinPostsMet:e=>(0,c.get)(e,[yr,"minPostsMet"],fr.getInitialState().minPostsMet)},_r="banner",kr="dismissBannerPermanently",jr=(0,Kt.createSlice)({name:_r,initialState:{isBannerDismissed:!1,isBannerRendered:!1,isBannerPermanentlyDismissed:!1,bannerPermanentDismissalEndpoint:""},reducers:{setBannerRendered:e=>{e.isBannerRendered=!0},setBannerDismissed:e=>{e.isBannerDismissed=!0},setBannerPermanentlyDismissed:e=>{e.isBannerPermanentlyDismissed=!0}}}),Sr=jr.getInitialState,Cr=jr.reducer,Er={[kr]:({endpoint:e})=>Ge()({path:e,method:"POST",data:{is_dismissed:!0}}).catch(c.noop)},Tr={setBannerRendered:()=>((0,Us.mY)(),jr.actions.setBannerRendered()),setBannerDismissed:()=>((0,Us.al)(),jr.actions.setBannerDismissed()),setBannerPermanentlyDismissed:()=>jr.actions.setBannerPermanentlyDismissed(),dismissBannerPermanently:function*(e){e&&(yield jr.actions.setBannerPermanentlyDismissed(),yield{type:kr,endpoint:e})}},Rr={selectIsBannerDismissed:e=>(0,c.get)(e,[_r,"isBannerDismissed"],jr.getInitialState().isBannerDismissed),selectIsBannerRendered:e=>(0,c.get)(e,[_r,"isBannerRendered"],jr.getInitialState().isBannerRendered),selectIsBannerPermanentlyDismissed:e=>(0,c.get)(e,[_r,"isBannerPermanentlyDismissed"],jr.getInitialState().isBannerPermanentlyDismissed),selectBannerPermanentDismissalEndpoint:e=>(0,c.get)(e,[_r,"bannerPermanentDismissalEndpoint"],jr.getInitialState().bannerPermanentDismissalEndpoint)};var Lr=s(8119);const Ir=G.forwardRef(function(e,t){return G.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),G.createElement("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"}))}),Ar=({isPremium:e,onDismiss:t,onDismissPermanently:s,onClick:r,learnMoreLink:o})=>{const n=(0,d.useSvgAria)();return(0,b.jsx)(d.Root,{children:(0,b.jsxs)("div",{role:"group","aria-label":(0,u.__)("Content suggestions banner","wordpress-seo"),className:"yst-z-50 yst-relative yst-p-4 yst-ai-gradient-border yst-rounded-lg",children:[(0,b.jsxs)(d.DropdownMenu,{as:"span",className:"yst-absolute yst-top-4 yst-end-4",children:[(0,b.jsx)(d.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:(0,u.__)("Open banner options","wordpress-seo"),className:"yst-float-end"}),(0,b.jsxs)(d.DropdownMenu.List,{className:"yst-mt-8 yst-w-56",children:[(0,b.jsxs)(d.DropdownMenu.ButtonItem,{className:"yst-text-slate-600 yst-border-b yst-border-slate-200 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:t,children:[(0,b.jsx)(Lr.A,{className:"yst-w-4 yst-text-slate-400 yst-shrink-0",...n}),(0,u.__)("Remove for this post","wordpress-seo")]}),(0,b.jsxs)(d.DropdownMenu.ButtonItem,{className:"yst-text-red-500 yst-flex yst-py-2 yst-justify-start yst-gap-2 yst-px-4 yst-font-normal",onClick:s,children:[(0,b.jsx)(Ir,{className:"yst-w-4 yst-shrink-0",...n}),(0,u.__)("Remove for all posts","wordpress-seo")]})]})]}),(0,b.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-2 yst-mb-1 yst-pe-8",children:[(0,b.jsx)(d.GradientSparklesIcon,{className:"yst-h-4 yst-w-4",...n}),(0,b.jsxs)("p",{className:"yst-grow yst-text-slate-800 yst-font-medium",children:[" ",(0,u.__)("Stuck on what to write next?","wordpress-seo")]})]}),(0,b.jsx)("p",{className:"yst-text-sm yst-text-slate-600 yst-mb-1 yst-max-w-xl",children:(0,u.__)("Let Yoast AI Content Planner analyze your content and suggest high-impact topics that fill content gaps and strengthen your SEO strategy.","wordpress-seo")}),(0,b.jsxs)(d.Link,{as:f.rd,href:o,variant:"primary",className:"yst-font-medium yst-no-underline",children:[(0,u.__)("Learn more","wordpress-seo"),(0,b.jsx)(m.A,{className:"yst-w-4 yst-h-4 rtl:yst-rotate-180 yst-inline yst-ms-1.5"})]}),(0,b.jsxs)("div",{className:"yst-mt-1 yst-flex yst-justify-end yst-gap-2 yst-items-center",children:[!e&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(v,{}),(0,b.jsx)("span",{"aria-hidden":"true",children:"·"})]}),(0,b.jsx)(d.Button,{variant:"ai-primary",onClick:r,children:(0,u.__)("Get content suggestions","wordpress-seo")})]})]})})},Pr=window.wp.dom;const Nr=({BlockListBlock:e,props:t})=>{const{isNewPost:s,isBannerDismissed:r,isBannerRendered:n,isBannerPermanentlyDismissed:i,bannerPermanentDismissalEndpoint:l,hasConsent:c,isPremium:d,minPostsMet:u,learnMoreLink:p}=(0,o.useSelect)(e=>{const t=e(_.bw);return{isNewPost:e("core/editor").isEditedPostNew(),isBannerDismissed:t.selectIsBannerDismissed(),isBannerRendered:t.selectIsBannerRendered(),isBannerPermanentlyDismissed:t.selectIsBannerPermanentlyDismissed(),bannerPermanentDismissalEndpoint:t.selectBannerPermanentDismissalEndpoint(),isPremium:e(j).getIsPremium(),hasConsent:e(k).selectHasAiGeneratorConsent(),minPostsMet:e(_.bw).selectIsMinPostsMet(),learnMoreLink:e(j).selectLink("https://yoa.st/content-planner-learn-more")}},[]),{setFeatureModalStatus:h,setBannerDismissed:m,setBannerRendered:g,dismissBannerPermanently:y}=(0,o.useDispatch)(_.bw),f=Y(),x=(0,a.useRef)(null),w=!i&&!r&&(s||n)&&u,v=(0,a.useCallback)(()=>{m()},[m]),S=(0,a.useCallback)(()=>{y(l)},[y,l]),C=(0,a.useCallback)(()=>{c?f():h(_.Qo.consent)},[c,f,h]);return(0,a.useEffect)(()=>{w&&!n&&g()},[w,n,g]),(0,a.useEffect)(()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t||t===window.document||t.getElementById(_.x_))return;const s=window.document.getElementById(_.x_);if(!s)return;const r=t.createElement("link");r.id=_.x_,r.rel="stylesheet",r.href=s.href,t.head.appendChild(r)},[w]),(0,a.useEffect)(()=>{var e;if(!w)return;const t=null===(e=x.current)||void 0===e?void 0:e.ownerDocument;if(!t)return;function s(e){!function(e,t){!t.defaultPrevented&&e&&(["ArrowDown","ArrowUp"].includes(t.key)?function(e,t){const s=e.querySelector("[role='menu']");s&&(s===t.target||s.contains(t.target))&&t.preventDefault()}(e,t):"Tab"===t.key&&function(e,t){const s=(e=>e.shiftKey?Pr.focus.tabbable.findPrevious:Pr.focus.tabbable.findNext)(t),r=s(t.target);r&&((e,t,s)=>e.contains(t)||e.contains(s))(e,t.target,r)&&(t.preventDefault(),r.focus())}(e,t))}(x.current,e)}const r=e=>{(function(e,t){const s=null==e?void 0:e.querySelector(".yst-dropdown-menu__icon-trigger[aria-expanded='true']"),r=s&&e.querySelector("[role='menu']");return Boolean(r)&&!s.contains(t.target)&&!r.contains(t.target)})(x.current,e)&&x.current.querySelector(".yst-dropdown-menu__icon-trigger").click()};return t.addEventListener("keydown",s,{capture:!0}),t.addEventListener("mousedown",r,{capture:!0}),()=>{t.removeEventListener("keydown",s,{capture:!0}),t.removeEventListener("mousedown",r,{capture:!0})}},[w]),(0,b.jsxs)(b.Fragment,{children:[w&&(0,b.jsx)("div",{ref:x,className:"wp-block","data-block":"yoast-content-planner-banner",children:(0,b.jsx)(Ar,{isPremium:d,onDismiss:v,onDismissPermanently:S,onClick:C,learnMoreLink:p})}),(0,b.jsx)(e,{...t})]})},Mr=(0,p.createHigherOrderComponent)(e=>function(t){return(0,o.useSelect)(e=>e("core/block-editor").getBlockOrder()[0]===t.clientId,[t.clientId])?(0,b.jsx)(Nr,{BlockListBlock:e,props:t}):(0,b.jsx)(e,{...t})},"withYoastContentPlannerBanner");var Or=s(2619);const Fr=()=>{const e=(0,a.useRef)(!1),{isNewPost:t,postType:s,blocks:n,minPostsMet:i,isBannerRendered:l}=(0,o.useSelect)(e=>({isNewPost:e("core/editor").isEditedPostNew(),postType:e("core/editor").getCurrentPostType(),blocks:e("core/block-editor").getBlocks(),minPostsMet:e(_.bw).selectIsMinPostsMet(),isBannerRendered:e(_.bw).selectIsBannerRendered()}),[]),{insertBlock:c}=(0,o.useDispatch)("core/block-editor");return(0,a.useEffect)(()=>{!e.current&&t&&"post"===s&&i&&(e.current=function(e,t,s){return!!s||(0===e.length?(t((0,r.createBlock)("core/paragraph"),0,void 0,!1),!1):-1!==e.findIndex(e=>"core/paragraph"===e.name))}(n,c,l))},[n,t,s,c,i]),(0,b.jsx)(Fs,{})};function Dr(){i()(()=>{((e={})=>{(0,o.register)((e=>(0,o.createReduxStore)(_.bw,{actions:{...Xs,...ar,...mr,...br,...Tr},selectors:{...Qs,...ir,...gr,...vr,...Rr},controls:{...Js,...lr,...Er},initialState:(0,c.merge)({},{[Ys]:Zs(),[tr]:nr(),[dr]:pr(),[yr]:xr(),[_r]:Sr()},e),reducer:(0,o.combineReducers)({[Ys]:er,[tr]:cr,[dr]:hr,[yr]:wr,[_r]:Cr})}))(e))})({[Ys]:{endpoint:(0,c.get)(window,"wpseoContentPlanner.endpoints.getSuggestions","")},[tr]:{endpoint:(0,c.get)(window,"wpseoContentPlanner.endpoints.getOutline","")},[yr]:{minPostsMet:(0,c.get)(window,"wpseoContentPlanner.minPostsMet",!1)},[_r]:{isBannerDismissed:(0,Us.qj)(),isBannerRendered:(0,Us.au)(),isBannerPermanentlyDismissed:(0,c.get)(window,"wpseoContentPlanner.isBannerPermanentlyDismissed",!1),bannerPermanentDismissalEndpoint:(0,c.get)(window,"wpseoContentPlanner.endpoints.bannerPermanentDismissal","")}}),(0,Or.addFilter)("editor.BlockListBlock","yoast/content-planner-banner",Mr)}),(0,l.registerPlugin)("yoast-content-planner",{render:Fr})}},9183(e,t,s){"use strict";s.d(t,{t$:()=>n,us:()=>o});var r=s(3335);function o(e,t,s="",o=!1){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",name:e,value:"string"==typeof t?(0,r.decodeHTML)(t):t,label:s,hidden:o}}function n(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}},9491(e){"use strict";e.exports=window.wp.compose},9498(e,t,s){"use strict";var r=s(6554),o=s(1609),n=s.n(o),i=s(1802),a=s.n(i),l=s(2379),c=s(7415),d=s(1709),u=s(2547),p=s(790);class h extends o.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?c.A:d.A,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:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:o,socialMediumName:i,imageWarnings:a,siteUrl:c,description:d,descriptionInputPlaceholder:u,descriptionPreviewFallback:h,imageUrl:m,imageFallbackUrl:g,alt:y,title:f,titleInputPlaceholder:x,titlePreviewFallback:w,replacementVariables:b,recommendedReplacementVariables:v,applyReplacementVariables:_,onReplacementVariableSearchChange:k,isPremium:j,isLarge:S,socialPreviewLabel:C,idSuffix:E,activeMetaTabId:T}=this.props,R=_({title:f||w,description:d||h});return(0,p.jsxs)(n().Fragment,{children:[C&&(0,p.jsx)(r.SimulatedLabel,{children:C}),(0,p.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:c,title:R.title,description:R.description,imageUrl:m,imageFallbackUrl:g,alt:y,isLarge:S,activeMetaTabId:T}),(0,p.jsx)(l.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:i,title:f,titleInputPlaceholder:x,onRemoveImageClick:o,imageSelected:!!m,imageUrl:m,imageFallbackUrl:g,onTitleChange:t,onSelectImageClick:s,description:d,descriptionInputPlaceholder:u,imageWarnings:a,replacementVariables:b,recommendedReplacementVariables:v,onReplacementVariableSearchChange:k,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:j,setEditorRef:this.setEditorRef,idSuffix:E})]})}}h.propTypes={title:a().string.isRequired,onTitleChange:a().func.isRequired,description:a().string.isRequired,onDescriptionChange:a().func.isRequired,imageUrl:a().string.isRequired,imageFallbackUrl:a().string.isRequired,onSelectImageClick:a().func.isRequired,onRemoveImageClick:a().func.isRequired,socialMediumName:a().string.isRequired,alt:a().string,isPremium:a().bool,imageWarnings:a().array,isLarge:a().bool,siteUrl:a().string,descriptionInputPlaceholder:a().string,titleInputPlaceholder:a().string,descriptionPreviewFallback:a().string,titlePreviewFallback:a().string,replacementVariables:u.replacementVariablesShape,recommendedReplacementVariables:u.recommendedReplacementVariablesShape,applyReplacementVariables:a().func,onReplacementVariableSearchChange:a().func,socialPreviewLabel:a().string,idSuffix:a().string,activeMetaTabId:a().string},h.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""}}},t={};function s(r){var o=t[r];if(void 0!==o)return o.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,s),n.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";var e=s(4997),t=s(7143),r=s(3832);const o=window.wp.editor;var n=s(6087),i=s(7723),a=s(2279);const l=window.wp.richText;var c=s(5986);const d=window.yoast.externals.redux;var u=s(8468);function p(){return(0,u.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}var h=s(1802),m=s.n(h),g=s(1679),y=s.n(g),f=s(790);const x=y().svg`
	width: ${e=>e.size}px;
	height: ${e=>e.size}px;

	&&& path {
		fill: ${e=>e.color};
	}

	&&& circle.yoast-icon-readability-score {
		fill: ${e=>e.readabilityScoreColor};
		display: ${e=>e.isContentAnalysisActive?"inline":"none"};
	}

	&&& circle.yoast-icon-seo-score {
		fill: ${e=>e.seoScoreColor};
		display: ${e=>e.isKeywordAnalysisActive?"inline":"none"};
	}
`,w=({readabilityScoreColor:e="#000000",isContentAnalysisActive:t=!1,seoScoreColor:s="#000000",isKeywordAnalysisActive:r=!1,size:o=20,color:n="#000001",...i})=>(0,f.jsxs)(x,{readabilityScoreColor:e,isContentAnalysisActive:t,seoScoreColor:s,isKeywordAnalysisActive:r,size:o,color:n,...i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 646.66 456.27",children:[(0,f.jsx)("path",{d:"M73,405.26a68.53,68.53,0,0,1-12.82-4c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92q-2.64-2-5.08-4.19a68.26,68.26,0,0,1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24q-1.84-2.73-3.44-5.64a68.26,68.26,0,0,1-8.29-32.55V142.13a68.29,68.29,0,0,1,8.29-32.55,58.6,58.6,0,0,1,3.44-5.64,57.53,57.53,0,0,1,4-5.27A69.64,69.64,0,0,1,48.56,85.42,56.06,56.06,0,0,1,54.2,82,67.78,67.78,0,0,1,73,75.09,69.79,69.79,0,0,1,86.75,73.7H256.41L263,55.39H86.75A86.84,86.84,0,0,0,0,142.13V338.22A86.83,86.83,0,0,0,86.75,425H98.07V406.65H86.75A68.31,68.31,0,0,1,73,405.26ZM368.55,60.85l-1.41-.53L360.73,77.5l1.41.53a68.58,68.58,0,0,1,8.66,4,58.65,58.65,0,0,1,5.65,3.43A69.49,69.49,0,0,1,391,98.67c1.4,1.68,2.72,3.46,3.95,5.27s2.39,3.72,3.44,5.64a68.32,68.32,0,0,1,8.29,32.55V406.65H233.55l-.44.76c-3.07,5.37-6.26,10.48-9.49,15.19L222,425H425V142.13A87.19,87.19,0,0,0,368.55,60.85Z",fill:"#000001"}),(0,f.jsx)("path",{d:"M303.66,0l-96.8,268.87-47.58-149H101.1l72.72,186.78a73.61,73.61,0,0,1,0,53.73c-7.07,18.07-19.63,39.63-54.36,46l-1.56.29v49.57l2-.08c29-1.14,51.57-10.72,70.89-30.14,19.69-19.79,36.55-50.52,53-96.68L366.68,0Z",fill:"#000001"}),(0,f.jsx)("circle",{className:"yoast-icon-readability-score",cx:"561.26",cy:"142.43",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"}),(0,f.jsx)("circle",{className:"yoast-icon-seo-score",cx:"561.26",cy:"341.96",r:"85.04",fill:"#000001",stroke:"#181716",strokeMiterlimit:"10",strokeWidth:"0.72"})]});w.propTypes={readabilityScoreColor:m().string,isContentAnalysisActive:m().bool,seoScoreColor:m().string,isKeywordAnalysisActive:m().bool,size:m().number,color:m().string};const b=w,v=window.wp.components;var _=s(5831);function k(e){return void 0===e.length?e:(0,u.flatten)(e).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority)}var j=s(3657),S=s(6554),C=s(8495),E=s(6752);function T(e){switch(e){case"loading":return{icon:"loading-spinner",color:C.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:C.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:C.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:C.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:C.colors.$color_ok};default:return{icon:"seo-score-bad",color:C.colors.$color_red}}}function R({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,n.createPortal)(t,s):null}R.propTypes={target:m().oneOfType([m().string,m().object]).isRequired,children:m().node.isRequired};const L=({target:e,scoreIndicator:t})=>(0,f.jsx)(R,{target:e,children:(0,f.jsx)(S.SvgIcon,{...T(t)})});L.propTypes={target:m().string.isRequired,scoreIndicator:m().string.isRequired};const I=L,A=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/metabox-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,n.useEffect)(()=>{document.querySelectorAll('[id^="wpseo-meta-tab-"]').forEach(e=>{!function(e){const t=document.querySelector(`#${e}`);null!==t&&(t.style.opacity="0.5",t.style.pointerEvents="none",t.setAttribute("aria-disabled","true"),t.classList.contains("yoast-active-tab")&&t.classList.remove("yoast-active-tab"))}(e.id)})},[]),(0,f.jsx)(_.Root,{context:{isRtl:o},children:(0,f.jsxs)(j.xP,{error:e,children:[(0,f.jsx)(j.xP.HorizontalButtons,{supportLink:r,handleRefreshClick:s}),(0,f.jsx)(I,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(I,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};A.propTypes={error:m().object.isRequired};const P=({theme:e,location:t,children:s})=>(0,f.jsx)(c.LocationProvider,{value:t,children:(0,f.jsx)(g.ThemeProvider,{theme:e,children:s})});P.propTypes={theme:m().object.isRequired,location:m().oneOf(["sidebar","metabox","modal"]).isRequired,children:m().node.isRequired};const N=P;function M({theme:e}){return(0,f.jsx)(N,{theme:e,location:"metabox",children:(0,f.jsx)(_.ErrorBoundary,{FallbackComponent:A,children:(0,f.jsx)(v.Slot,{name:"YoastMetabox",children:e=>k(e)})})})}var O=s(9491),F=s(1609);const D=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))}),q=(e=null)=>(0,F.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]);var $=s(2485),B=s.n($);const U=({className:e="",...t})=>(0,f.jsx)("span",{className:B()("yst-grow yst-overflow-hidden yst-overflow-ellipsis yst-whitespace-nowrap yst-font-wp","yst-text-[#555] yst-text-base yst-leading-[normal] yst-subpixel-antialiased yst-text-start",e),...t});U.displayName="MetaboxButton.Text",U.propTypes={className:m().string};const z=({className:e="",...t})=>(0,f.jsx)("button",{type:"button",className:B()("yst-flex yst-items-center yst-w-full yst-pt-4 yst-pb-4 yst-pe-4 yst-ps-6 yst-space-x-2 rtl:yst-space-x-reverse","yst-border-t yst-border-t-[rgb(0,0,0,0.2)] yst-rounded-none yst-transition-all hover:yst-bg-[#f0f0f0]","focus:yst-outline focus:yst-outline-[1px] focus:yst-outline-[color:#0066cd] focus:-yst-outline-offset-1 focus:yst-shadow-[0_0_3px_rgba(8,74,103,0.8)]",e),...t});z.propTypes={className:m().string},z.Text=U;var W=s(3335);const H=y().div`
	min-width: 600px;

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

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

		@media screen and ( max-width: 680px ) {
			width: 80px;
			height: 80px;
		}
	}
`,({title:e="Yoast SEO",className:t="yoast yoast-gutenberg-modal",showYoastIcon:s=!0,children:r=null,additionalClassName:o="",...n})=>{const i=s?(0,f.jsx)("span",{className:"yoast-icon"}):null;return(0,f.jsx)(v.Modal,{title:e,className:`${t} ${o}`,icon:i,...n,children:r})});K.propTypes={title:m().string,className:m().string,showYoastIcon:m().bool,children:m().oneOfType([m().node,m().arrayOf(m().node)]),additionalClassName:m().string};const Y=K;var V=s(4080);const G=({onClick:e,title:t,id:s="",subTitle:r="",suffixIcon:o=null,SuffixHeroIcon:n=null,prefixIcon:i=null,children:a=null})=>(0,f.jsx)("div",{className:"yoast components-panel__body",children:(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{id:s,onClick:e,className:"components-button components-panel__body-toggle",type:"button",children:[i&&(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${i&&i.color||""}`},children:(0,f.jsx)(S.SvgIcon,{size:i.size,icon:i.icon})}),(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:t}),(0,f.jsx)("div",{className:"yoast-subtitle",children:r})]}),a,o&&(0,f.jsx)(S.SvgIcon,{size:o.size,icon:o.icon}),n]})})}),Z=G;G.propTypes={onClick:m().func.isRequired,title:m().string.isRequired,id:m().string,subTitle:m().string,suffixIcon:m().object,SuffixHeroIcon:m().element,prefixIcon:m().object,children:m().node};const Q=window.moment;var X=s.n(Q),J=s(1455),ee=s.n(J);async function te(e,t,s,r=200){try{const o=await e();return!!o&&(o.status===r?t(o):s(o))}catch(e){console.error(e.message)}}async function se(e){try{return await ee()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function re(e){return(0,u.isArray)(e)||(e=[e]),await se({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const oe=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:r,isDataTableVisuallyHidden:o=!0})=>e.length!==r.length?(0,f.jsx)("p",{children:(0,i.__)("The number of headers and header labels don't match.","wordpress-seo")}):(0,f.jsx)("div",{className:o?"screen-reader-text":null,children:(0,f.jsxs)("table",{children:[(0,f.jsx)("caption",{children:s}),(0,f.jsx)("thead",{children:(0,f.jsx)("tr",{children:r.map((e,t)=>(0,f.jsx)("th",{children:e},t))})}),(0,f.jsx)("tbody",{children:(0,f.jsx)("tr",{children:e.map((e,s)=>(0,f.jsx)("td",{children:t(e.y)},s))})})]})});oe.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const ne=oe,ie=({data:e,width:t,height:s,fillColor:r=null,strokeColor:o="#000000",strokeWidth:i=1,className:a="",mapChartDataToTableData:l=null,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u=!0})=>{const p=Math.max(1,Math.max(...e.map(e=>e.x))),h=Math.max(1,Math.max(...e.map(e=>e.y))),m=s-i,g=e.map(e=>`${e.x/p*t},${m-e.y/h*m+i}`).join(" "),y=`0,${m+i} `+g+` ${t},${m+i}`;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("svg",{width:t,height:s,viewBox:`0 0 ${t} ${s}`,className:a,role:"img","aria-hidden":"true",focusable:"false",children:[(0,f.jsx)("polygon",{fill:r,points:y}),(0,f.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:i,strokeLinejoin:"round",strokeLinecap:"round",points:g})]}),l&&(0,f.jsx)(ne,{data:e,mapChartDataToTableData:l,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:u})]})};ie.propTypes={data:m().arrayOf(m().shape({x:m().number,y:m().number})).isRequired,width:m().number.isRequired,height:m().number.isRequired,fillColor:m().string,strokeColor:m().string,strokeWidth:m().number,className:m().string,mapChartDataToTableData:m().func,dataTableCaption:m().string.isRequired,dataTableHeaderLabels:m().array.isRequired,isDataTableVisuallyHidden:m().bool};const ae=ie,le=()=>(0,f.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,i.__)("Tracking the ranking position…","wordpress-seo")," ",(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"})]}),ce=y()(S.SvgIcon)`
	margin-left: 2px;
	flex-shrink: 0;
	rotate: ${e=>e.isImproving?"-90deg":"90deg"};
`,de=y().span`
	color: ${e=>e.isImproving?"#69AB56":"#DC3332"};
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	margin-right: 2px;
	margin-left: 12px;
`,ue=y().td`
	padding-right: 0 !important;

	& > div {
		margin: 0px;
	}
`,pe=y().td`
	padding-left: 2px !important;
`,he=y().td.attrs({className:"yoast-table--nopadding"})`
	& > div {
		justify-content: center;
	}
`,me=y().div`
	display: flex;
	align-items: center;
	& > a {
		box-sizing: border-box;
	}
`,ge=y().button`
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
    display: flex;
    align-items: center;
`,ye=y().tr`
	background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important;
`;function fe(e){return Math.round(100*e)}function xe({chartData:e={}}){if((0,u.isEmpty)(e)||(0,u.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,i.sprintf)((0,i._n)("%d day","%d days",e,"wordpress-seo"),e))}(e),s=e.position.history.map((e,t)=>({x:t,y:31-e.value}));return(0,f.jsx)(ae,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:fe,dataTableCaption:(0,i.__)("Keyphrase position in the last 90 days on a scale from 0 to 30.","wordpress-seo"),dataTableHeaderLabels:t})}function we({keyphrase:e,isEnabled:t,toggleAction:s,isLoading:r}){return r?(0,f.jsx)(S.SvgIcon,{icon:"loading-spinner"}):(0,f.jsx)(S.Toggle,{id:`toggle-keyphrase-tracking-${e}`,className:"wincher-toggle",isEnabled:t,onSetToggleState:s,showToggleStateLabel:!1})}function be(e){return!e||!e.position||e.position.value>30?"> 30":e.position.value}xe.propTypes={chartData:m().object};const ve=({rowData:e={}})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,f.jsx)(xe,{chartData:e});const s=e.position.change<0;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(xe,{chartData:e}),(0,f.jsx)(de,{isImproving:s,children:Math.abs(e.position.change)}),(0,f.jsx)(ce,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s})]})};function _e({rowData:e,websiteId:t,keyphrase:s,onSelectKeyphrases:r}){const o=(0,n.useCallback)(()=>{r([s])},[r,s]),a=!(0,u.isEmpty)(e),l=e&&e.updated_at&&X()(e.updated_at)>=X()().subtract(7,"days"),c=e?`https://app.wincher.com/websites/${t}/keywords?serp=${e.id}&utm_medium=plugin&utm_source=yoast&referer=yoast&partner=yoast`:null;return a?l?(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("td",{children:(0,f.jsxs)(me,{children:[be(e),(0,f.jsx)(S.ButtonStyledLink,{variant:"secondary",href:c,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,i.__)("View","wordpress-seo")})]})}),(0,f.jsx)("td",{className:"yoast-table--nopadding",children:(0,f.jsx)(ge,{type:"button",onClick:o,children:(0,f.jsx)(ve,{rowData:e})})}),(0,f.jsx)("td",{children:(d=e.updated_at,X()(d).fromNow())})]}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)(le,{})}):(0,f.jsx)("td",{className:"yoast-table--nopadding",colSpan:"3",children:(0,f.jsx)("i",{children:(0,i.__)("Activate tracking to show the ranking position","wordpress-seo")})});var d}function ke({keyphrase:e,rowData:t={},onTrackKeyphrase:s=u.noop,onUntrackKeyphrase:r=u.noop,isFocusKeyphrase:o=!1,isDisabled:i=!1,isLoading:a=!1,websiteId:l="",isSelected:c,onSelectKeyphrases:d}){var p;const h=!(0,u.isEmpty)(t),m=!(0,u.isEmpty)(null==t||null===(p=t.position)||void 0===p?void 0:p.history),g=(0,n.useCallback)(()=>{i||(h?r(e,t.id):s(e))},[e,s,r,h,t,i]),y=(0,n.useCallback)(()=>{d(t=>c?t.filter(t=>t!==e):t.concat(e))},[d,c,e]);return(0,f.jsxs)(ye,{isEnabled:h,children:[(0,f.jsx)(ue,{children:m&&(0,f.jsx)(S.Checkbox,{id:"select-"+e,onChange:y,checked:c,label:""})}),(0,f.jsxs)(pe,{children:[e,o&&(0,f.jsx)("span",{children:"*"})]}),_e({rowData:t,websiteId:l,keyphrase:e,onSelectKeyphrases:d}),(0,f.jsx)(he,{children:we({keyphrase:e,isEnabled:h,toggleAction:g,isLoading:a})})]})}ve.propTypes={rowData:m().object},ke.propTypes={rowData:m().object,keyphrase:m().string.isRequired,onTrackKeyphrase:m().func,onUntrackKeyphrase:m().func,isFocusKeyphrase:m().bool,isDisabled:m().bool,isLoading:m().bool,websiteId:m().string,isSelected:m().bool.isRequired,onSelectKeyphrases:m().func.isRequired};const je=(0,W.makeOutboundLink)(),Se=y().span`
	display: block;
	font-style: italic;

	@media (min-width: 782px) {
		display: inline;
		position: absolute;
		${(0,W.getDirectionalStyle)("right","left")}: 8px;
	}
`,Ce=y().div`
	width: 100%;
	overflow-y: auto;
`,Ee=y().th`
	pointer-events: ${e=>e.isDisabled?"none":"initial"};
	padding-right: 0 !important;

	& > div {
		margin: 0px;
	}
`,Te=y().th`
	padding-left: 2px !important;
`,Re=e=>{const t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e}),t.current},Le=(0,u.debounce)(async function(e=null,t=null,s=null,r){return await se({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:r})},500,{leading:!0}),Ie=({addTrackedKeyphrase:e,isLoggedIn:t=!1,isNewlyAuthenticated:s=!1,keyphrases:r=[],newRequest:o,removeTrackedKeyphrase:a,setRequestFailed:l,setKeyphraseLimitReached:c,setRequestSucceeded:d,setTrackedKeyphrases:p,setHasTrackedAll:h,trackAll:m=!1,trackedKeyphrases:g=null,websiteId:y="",permalink:x,focusKeyphrase:w="",startAt:b=null,selectedKeyphrases:v,onSelectKeyphrases:_})=>{const k=(0,n.useRef)(),j=(0,n.useRef)(),C=(0,n.useRef)(!1),[E,T]=(0,n.useState)([]),R=(0,n.useCallback)(e=>{const t=e.toLowerCase();return g&&!(0,u.isEmpty)(g)&&g.hasOwnProperty(t)?g[t]:null},[g]),L=(0,n.useMemo)(()=>async()=>{await te(()=>(j.current&&j.current.abort(),j.current="undefined"==typeof AbortController?null:new AbortController,Le(r,b,x,j.current.signal)),e=>{d(e),p(e.results)},e=>{l(e)})},[d,l,p,r,x,b]),I=(0,n.useCallback)(async t=>{const s=(Array.isArray(t)?t:[t]).map(e=>e.toLowerCase());T(e=>[...e,...s]),await te(()=>re(s),t=>{d(t),e(t.results),L()},e=>{400===e.status&&e.limit&&c(e.limit),l(e)},201),T(e=>(0,u.without)(e,...s))},[d,l,c,e,L]),A=(0,n.useCallback)(async(e,t)=>{e=e.toLowerCase(),T(t=>[...t,e]),await te(()=>async function(e){return await se({path:"yoast/v1/wincher/keyphrases/untrack",method:"DELETE",data:{keyphraseID:e}})}(t),t=>{d(t),a(e)},e=>{l(e)}),T(t=>(0,u.without)(t,e))},[d,a,l]),P=(0,n.useCallback)(async e=>{o(),await I(e)},[o,I]),N=Re(x),M=Re(r),O=Re(b),F=x&&b;(0,n.useEffect)(()=>{t&&F&&(x!==N||(0,u.difference)(r,M).length||b!==O)&&L()},[t,x,N,r,M,L,F,b,O]),(0,n.useEffect)(()=>{if(t&&m&&null!==g){const e=r.filter(e=>!R(e));e.length&&I(e),h()}},[t,m,g,I,h,R,r]),(0,n.useEffect)(()=>{s&&!C.current&&(L(),C.current=!0)},[s,L]),(0,n.useEffect)(()=>{if(t&&!(0,u.isEmpty)(g))return(0,u.filter)(g,e=>(0,u.isEmpty)(e.updated_at)).length>0&&(k.current=setInterval(()=>{L()},1e4)),()=>{clearInterval(k.current)}},[t,g,L]);const D=t&&null===g,q=(0,n.useMemo)(()=>(0,u.isEmpty)(g)?[]:Object.values(g).filter(e=>{var t;return!(0,u.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[g]),$=(0,n.useMemo)(()=>v.length>0&&q.length>0&&q.every(e=>v.includes(e)),[v,q]),B=(0,n.useCallback)(()=>{_($?[]:q)},[_,$,q]),U=(0,n.useMemo)(()=>(0,u.orderBy)(r,[e=>Object.values(g||{}).map(e=>e.keyword).includes(e)],["desc"]),[r,g]);return r&&!(0,u.isEmpty)(r)&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Ce,{children:(0,f.jsxs)("table",{className:"yoast yoast-table",children:[(0,f.jsx)("thead",{children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(Ee,{isDisabled:0===q.length,children:(0,f.jsx)(S.Checkbox,{id:"select-all",onChange:B,checked:$,label:""})}),(0,f.jsx)(Te,{scope:"col",abbr:(0,i.__)("Keyphrase","wordpress-seo"),children:(0,i.__)("Keyphrase","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position","wordpress-seo"),children:(0,i.__)("Position","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Position over time","wordpress-seo"),children:(0,i.__)("Position over time","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Last updated","wordpress-seo"),children:(0,i.__)("Last updated","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,i.__)("Tracking","wordpress-seo"),children:(0,i.__)("Tracking","wordpress-seo")})]})}),(0,f.jsx)("tbody",{children:U.map((e,s)=>(0,f.jsx)(ke,{keyphrase:e,onTrackKeyphrase:P,onUntrackKeyphrase:A,rowData:R(e),isFocusKeyphrase:e===w.trim().toLowerCase(),websiteId:y,isDisabled:!t,isLoading:D||E.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:_},`trackable-keyphrase-${s}`))})]})}),(0,f.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,f.jsx)(je,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
(0,i.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,f.jsx)(Se,{children:(0,i.__)("* focus keyphrase","wordpress-seo")})]})]})};Ie.propTypes={addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,newRequest:m().func.isRequired,removeTrackedKeyphrase:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,setRequestSucceeded:m().func.isRequired,setTrackedKeyphrases:m().func.isRequired,setHasTrackedAll:m().func.isRequired,trackAll:m().bool,trackedKeyphrases:m().object,websiteId:m().string,permalink:m().string.isRequired,focusKeyphrase:m().string,startAt:m().string,selectedKeyphrases:m().arrayOf(m().string).isRequired,onSelectKeyphrases:m().func.isRequired};const Ae=Ie,Pe=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:r,getWincherPermalink:o,getFocusKeyphrase:n,isWincherNewlyAuthenticated:i,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:n(),keyphrases:s(),isLoggedIn:r(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:i(),permalink:o()}}),(0,t.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:n,setWincherTrackingForKeyphrase:i,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{i(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{n(e)},setHasTrackedAll:()=>{a(!1)}}})])(Ae);class Ne{constructor(e,t={},s={}){this.url=e,this.origin=new URL(e).origin,this.eventHandlers=Object.assign({success:{type:"",callback:()=>{}},error:{type:"",callback:()=>{}}},t),this.options=Object.assign({height:570,width:340,title:""},s),this.popup=null,this.createPopup=this.createPopup.bind(this),this.messageHandler=this.messageHandler.bind(this),this.getPopup=this.getPopup.bind(this)}createPopup(){const{height:e,width:t,title:s}=this.options,r=["top="+(window.top.outerHeight/2+window.top.screenY-e/2),"left="+(window.top.outerWidth/2+window.top.screenX-t/2),"width="+t,"height="+e,"resizable=1","scrollbars=1","status=0"];this.popup&&!this.popup.closed||(this.popup=window.open(this.url,s,r.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:r}=e;r===this.origin&&this.popup===s&&(t.type===this.eventHandlers.success.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.success.callback(t)),t.type===this.eventHandlers.error.type&&(this.popup.close(),window.removeEventListener("message",this.messageHandler,!1),await this.eventHandlers.error.callback(t)))}getPopup(){return this.popup}isClosed(){return!this.popup||this.popup.closed}focus(){this.isClosed()||this.popup.focus()}}const Me=()=>(0,f.jsx)(S.Alert,{type:"info",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,i.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")}),Oe=()=>(0,f.jsx)(S.Alert,{type:"success",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,i.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),Fe=()=>(0,f.jsx)(S.Alert,{type:"info",children:(0,i.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,i.__)("%s is currently tracking the ranking position(s) of your page. This may take a few minutes. Please wait or check back later.","wordpress-seo"),"Wincher")});var De=s(2458);const qe=(0,W.makeOutboundLink)(),$e=(0,W.makeOutboundLink)(),Be=()=>{const e=(0,i.sprintf)(/* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */ /* translators: %1$s expands to a link to Wincher, %2$s expands to a link to the keyphrase tracking article on Yoast.com */
(0,i.__)("With %1$s you can track the ranking position of your page in the search results based on your keyphrase(s). %2$s","wordpress-seo"),"<wincherLink/>","<wincherReadMoreLink/>");return(0,f.jsx)("p",{children:(0,De.x)(e,{wincherLink:(0,f.jsx)(qe,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,f.jsx)($e,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,i.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})})})},Ue=(0,W.makeOutboundLink)(),ze=({limit:e=10})=>{const t=(0,i.sprintf)(/* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */ /* translators: %1$d expands to the amount of allowed keyphrases on a free account, %2$s expands to a link to Wincher plans. */
(0,i.__)("You've reached the maximum amount of %1$d keyphrases you can add to your Wincher account. If you wish to add more keyphrases, please %2$s.","wordpress-seo"),e,"<UpdateWincherPlanLink/>");return(0,f.jsx)(S.Alert,{type:"error",children:(0,De.x)(t,{UpdateWincherPlanLink:(0,f.jsx)(Ue,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,i.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */
(0,i.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})})})};ze.propTypes={limit:m().number};const We=ze,He=()=>(0,f.jsx)(S.Alert,{type:"error",children:(0,i.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),Ke=()=>(0,f.jsx)(S.Alert,{type:"error",children:(0,i.__)("Before you can track your SEO performance make sure to set either the post’s title and save it as a draft or manually set the post’s slug.","wordpress-seo")}),Ye=({onReconnect:e,className:t=""})=>{const s=(0,i.sprintf)(/* translators: %s expands to a link to open the Wincher login popup. */ /* translators: %s expands to a link to open the Wincher login popup. */
(0,i.__)("It seems like something went wrong when retrieving your website's data. Please %s and try again.","wordpress-seo"),"<reconnectToWincher/>","Wincher");return(0,f.jsx)(S.Alert,{type:"error",className:t,children:(0,De.x)(s,{reconnectToWincher:(0,f.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e()},children:(0,i.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */
(0,i.__)("reconnect to %s","wordpress-seo"),"Wincher")})})})};Ye.propTypes={onReconnect:m().func.isRequired,className:m().string};const Ve=Ye,Ge=()=>(0,f.jsx)(S.Alert,{type:"error",children:(0,i.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),Ze=y().p`
	color: ${C.colors.$color_pink_dark};
	font-size: 14px;
	font-weight: 700;
	margin: 13px 0 10px;
`,Qe=y()(S.SvgIcon)`
	margin-right: 5px;
	vertical-align: middle;
`,Xe=y().button`
	position: absolute;
	top: 9px;
	right: 9px;
	border: none;
	background: none;
	cursor: pointer;
`,Je=y().p`
	font-size: 13px;
	font-weight: 500;
	margin: 10px 0 13px;
`,et=y().div`
	position: relative;
	background: ${e=>e.isTitleShortened?"#f5f7f7":"transparent"};
	border: 1px solid #c7c7c7;
	border-left: 4px solid${C.colors.$color_pink_dark};
	padding: 0 16px;
	margin-bottom: 1.5em;
`,tt=({limit:e,usage:t,isTitleShortened:s=!1,isFreeAccount:r=!1})=>{const o=(0,i.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,i.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),n=(0,i.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,i.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),a=r?o:n,l=(0,i.sprintf)(
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
/* Translators: %1$s expands to the number of used keywords.
   * %2$s expands to the account keywords limit.
   */
(0,i.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),c=s?l:a;return(0,f.jsxs)(Ze,{children:[s&&(0,f.jsx)(Qe,{icon:"exclamation-triangle",color:C.colors.$color_pink_dark,size:"14px"}),c]})};tt.propTypes={limit:m().number.isRequired,usage:m().number.isRequired,isTitleShortened:m().bool,isFreeAccount:m().bool};const st=(0,W.makeOutboundLink)(),rt=({discount:e,months:t})=>{const s=(0,f.jsx)(st,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(0,i.sprintf)(/* Translators: %s : Expands to "Wincher". */ /* Translators: %s : Expands to "Wincher". */
(0,i.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher")});if(!e||!t)return(0,f.jsx)(Je,{children:s});const r=100*e,o=(0,i.sprintf)(
/* Translators: %1$s expands to upgrade account link.
   * %2$s expands to the upgrade discount value.
   * %3$s expands to the upgrade discount duration e.g. 2 months.
   */
/* Translators: %1$s expands to upgrade account link.
   * %2$s expands to the upgrade discount value.
   * %3$s expands to the upgrade discount duration e.g. 2 months.
   */
(0,i.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",r+"%",t);return(0,f.jsx)(Je,{children:(0,De.x)(o,{wincherAccountUpgradeLink:s})})};rt.propTypes={discount:m().number,months:m().number};const ot=({onClose:e=null,isTitleShortened:t=!1,trackingInfo:s=null})=>{const r=(()=>{const[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e||async function(){return await se({path:"yoast/v1/wincher/account/upgrade-campaign",method:"GET"})}().then(e=>t(e))},[e]),e})();if(null===s)return null;const{limit:o,usage:a}=s;if(!(o&&a/o>=.8))return null;const l=Boolean(null==r?void 0:r.discount);return(0,f.jsxs)(et,{isTitleShortened:t,children:[e&&(0,f.jsx)(Xe,{type:"button","aria-label":(0,i.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,f.jsx)(S.SvgIcon,{icon:"times-circle",color:C.colors.$color_pink_dark,size:"14px"})}),(0,f.jsx)(tt,{...s,isTitleShortened:t,isFreeAccount:l}),(0,f.jsx)(rt,{discount:null==r?void 0:r.discount,months:null==r?void 0:r.months})]})};ot.propTypes={onClose:m().func,isTitleShortened:m().bool,trackingInfo:m().object};const nt=ot,it=window.yoast["chart.js"],at="label";function lt(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ct(e,t){e.labels=t}function dt(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:at;const r=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!r.includes(o)?(r.push(o),Object.assign(o,t),o):{...t}})}function ut(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at;const s={labels:[],datasets:[]};return ct(s,e.labels),dt(s,e.datasets,t),s}function pt(e,t){const{height:s=150,width:r=300,redraw:o=!1,datasetIdKey:n,type:i,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:u,...p}=e,h=(0,F.useRef)(null),m=(0,F.useRef)(),g=()=>{h.current&&(m.current=new it.Chart(h.current,{type:i,data:ut(a,n),options:l&&{...l},plugins:c}),lt(t,m.current))},y=()=>{lt(t,null),m.current&&(m.current.destroy(),m.current=null)};return(0,F.useEffect)(()=>{!o&&m.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(m.current,l)},[o,l]),(0,F.useEffect)(()=>{!o&&m.current&&ct(m.current.config.data,a.labels)},[o,a.labels]),(0,F.useEffect)(()=>{!o&&m.current&&a.datasets&&dt(m.current.config.data,a.datasets,n)},[o,a.datasets]),(0,F.useEffect)(()=>{m.current&&(o?(y(),setTimeout(g)):m.current.update(u))},[o,l,a.labels,a.datasets,u]),(0,F.useEffect)(()=>{m.current&&(y(),setTimeout(g))},[i]),(0,F.useEffect)(()=>(g(),()=>y()),[]),F.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:r},p),d)}const ht=(0,F.forwardRef)(pt);function mt(e,t){return it.Chart.register(t),(0,F.forwardRef)((t,s)=>F.createElement(ht,Object.assign({},t,{ref:s,type:e})))}const gt=mt("line",it.LineController),yt={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};it._adapters._date.override("function"==typeof X()?{_id:"moment",formats:function(){return yt},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=X()(e,t):e instanceof X()||(e=X()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return X()(e).format(t)},add:function(e,t,s){return X()(e).add(t,s).valueOf()},diff:function(e,t,s){return X()(e).diff(X()(t),s)},startOf:function(e,t,s){return e=X()(e),"isoWeek"===t?(s=Math.trunc(Math.min(Math.max(0,s),6)),e.isoWeekday(s).startOf("day").valueOf()):e.startOf(t).valueOf()},endOf:function(e,t){return X()(e).endOf(t).valueOf()}}:{}),Math.PI,Number.POSITIVE_INFINITY,Math.log10,Math.sign,"undefined"==typeof window||window.requestAnimationFrame,new Map,Object.create(null),Object.create(null),Number.EPSILON;const ft=["top","right","bottom","left"];function xt(e,t,s){const r={};s=s?"-"+s:"";for(let o=0;o<4;o++){const n=ft[o];r[n]=parseFloat(e[t+"-"+n+s])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}!function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}(),it.Chart.register(it.CategoryScale,it.LineController,it.LineElement,it.PointElement,it.LinearScale,it.TimeScale,it.Legend,it.Tooltip);const wt=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function bt({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const r=(0,n.useMemo)(()=>Object.fromEntries([...s].sort().map((e,t)=>[e,wt[t%wt.length]])),[s]),o=e.map(e=>{const t=r[e.label];return{...e,data:e.data.map(({datetime:e,value:t})=>({x:e,y:t})),lineTension:0,pointRadius:1,pointHoverRadius:4,borderWidth:2,pointHitRadius:6,backgroundColor:t,borderColor:t}}).filter(e=>!1!==e.selected);return(0,f.jsx)(gt,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:u.noop},tooltip:{enabled:!0,callbacks:{title:e=>X()(e[0].raw.x).utc().format("YYYY-MM-DD")},titleAlign:"center",mode:"xPoint",position:"nearest",usePointStyle:!0,boxHeight:7,boxWidth:7,boxPadding:2}},scales:{x:{bounds:"ticks",type:"time",time:{unit:"day",minUnit:"day"},grid:{display:!1},ticks:{autoSkipPadding:50,maxRotation:0,color:"black"}},y:{bounds:"ticks",offset:!0,reverse:!0,ticks:{precision:0,color:"black"},max:31}}}})}it.Interaction.modes.xPoint=(e,t,s,r)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:r}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),n="border-box"===o.boxSizing,i=xt(o,"padding"),a=xt(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,r=s&&s.length?s[0]:e,{offsetX:o,offsetY:n}=r;let i,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,n,e.target))i=o,a=n;else{const e=t.getBoundingClientRect();i=r.clientX-e.left,a=r.clientY-e.top,l=!0}return{x:i,y:a,box:l}}(e,s),u=i.left+(d&&a.left),p=i.top+(d&&a.top);var h;let{width:m,height:g}=t;return n&&(m-=i.width+a.width,g-=i.height+a.height),{x:Math.round((l-u)/m*s.width/r),y:Math.round((c-p)/g*s.height/r)}}(t,e);let n=[];if(it.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,r)&&n.push({element:e,datasetIndex:t,index:s})}),0===n.length)return n;const i=n.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return n=n.filter(e=>e.element.x===i),n.some(e=>Math.abs(e.element.y-o.y)<10)?n:[]},bt.propTypes={datasets:m().arrayOf(m().shape({label:m().string.isRequired,data:m().arrayOf(m().shape({datetime:m().string.isRequired,value:m().number.isRequired})).isRequired,selected:m().bool})).isRequired,isChartShown:m().bool.isRequired,keyphrases:m().array.isRequired};const vt=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,f.jsx)(Ve,{onReconnect:t}):(0,f.jsx)(Ge,{});vt.propTypes={response:m().object.isRequired,onLogin:m().func.isRequired};const _t=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:r,keyphraseLimitReached:o,limit:n})=>o?(0,f.jsx)(We,{limit:n}):(0,u.isEmpty)(t)||e?s?(0,f.jsx)(Fe,{}):null:(0,f.jsx)(vt,{response:t,onLogin:r});_t.propTypes={isSuccess:m().bool.isRequired,allKeyphrasesMissRanking:m().bool.isRequired,response:m().object,onLogin:m().func.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired};let kt=null;const jt=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n})=>{if(kt&&!kt.isClosed())return void kt.focus();const{url:i}=await async function(){return await se({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();kt=new Ne(i,{success:{type:"wincher:oauth:success",callback:i=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)=>{await te(()=>async function(e){const{code:t,websiteId:s}=e;return await se({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(i),async a=>{e(!0,!0,i.websiteId.toString()),t(a);const l=(Array.isArray(r)?r:[r]).map(e=>e.toLowerCase());await te(()=>re(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&n(e.limit),s(e)},201);const c=kt.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:r,addTrackedKeyphrase:o,setKeyphraseLimitReached:n},i)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),kt.createPopup()},St=e=>e.isLoggedIn?null:(0,f.jsx)("p",{children:(0,f.jsx)(S.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,i.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
(0,i.__)("Connect with %s","wordpress-seo"),"Wincher")})});St.propTypes={isLoggedIn:m().bool.isRequired,onLogin:m().func.isRequired};const Ct=y().div`
	p {
		margin: 1em 0;
	}
`,Et=y().div`
	${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
`,Tt=y().div`
	font-weight: var(--yoast-font-weight-bold);
	color: var(--yoast-color-label);
	font-size: var(--yoast-font-size-default);
`,Rt=y().div.attrs({className:"yoast-field-group"})`
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
`,Lt=y().div`
	margin: 8px 0;
`,It=X().utc().startOf("day"),At=[{name:(0,i.__)("Last day","wordpress-seo"),value:X()(It).subtract(1,"days").format(),defaultIndex:1},{name:(0,i.__)("Last week","wordpress-seo"),value:X()(It).subtract(1,"week").format(),defaultIndex:2},{name:(0,i.__)("Last month","wordpress-seo"),value:X()(It).subtract(1,"month").format(),defaultIndex:3},{name:(0,i.__)("Last year","wordpress-seo"),value:X()(It).subtract(1,"year").format(),defaultIndex:0}],Pt=({onSelect:e,selected:t=null,options:s,isLoggedIn:r})=>r?s.length<1?null:(0,f.jsx)("select",{className:"components-select-control__input",id:"wincher-period-picker",value:(null==t?void 0:t.value)||s[0].value,onChange:e,children:s.map(e=>(0,f.jsx)("option",{value:e.value,children:e.name},e.name))}):null;Pt.propTypes={onSelect:m().func.isRequired,selected:m().object,options:m().array.isRequired,isLoggedIn:m().bool.isRequired};const Nt=({trackedKeyphrases:e=null,isLoggedIn:t,keyphrases:s,shouldTrackAll:r,permalink:o,historyDaysLimit:a=0})=>{if(!o&&t)return(0,f.jsx)(Ke,{});if(0===s.length)return(0,f.jsx)(He,{});const l=X()(It).subtract(a,"days"),c=At.filter(e=>X()(e.value).isSameOrAfter(l)),d=(0,u.orderBy)(c,e=>e.defaultIndex,"desc")[0],[p,h]=(0,n.useState)(d),[m,g]=(0,n.useState)([]),y=m.length>0,x=(0,O.usePrevious)(e);(0,n.useEffect)(()=>{if(!(0,u.isEmpty)(e)&&(0,u.difference)(Object.keys(e),Object.keys(x||[])).length){const t=Object.values(e).map(e=>e.keyword);g(t)}},[e,x]),(0,n.useEffect)(()=>{h(d)},[null==d?void 0:d.name]);const w=(0,n.useCallback)(e=>{const t=At.find(t=>t.value===e.target.value);t&&h(t)},[h]),b=(0,n.useMemo)(()=>(0,u.isEmpty)(m)||(0,u.isEmpty)(e)?[]:Object.values(e).filter(e=>{var t;return!(null==e||null===(t=e.position)||void 0===t||!t.history)}).map(e=>{var t;return{label:e.keyword,data:e.position.history,selected:m.includes(e.keyword)&&!(0,u.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[m,e]);return(0,f.jsxs)(Et,{isDisabled:!t,children:[(0,f.jsx)("p",{children:(0,i.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),t&&r&&(0,f.jsx)(Me,{}),(0,f.jsx)(Rt,{children:(0,f.jsx)(Pt,{selected:p,onSelect:w,options:c,isLoggedIn:t})}),(0,f.jsx)(Lt,{children:(0,f.jsx)(bt,{isChartShown:y,datasets:b,keyphrases:s})}),(0,f.jsx)(Pe,{startAt:null==p?void 0:p.value,selectedKeyphrases:m,onSelectKeyphrases:g,trackedKeyphrases:e})]})};function Mt({trackedKeyphrases:e=null,addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:r=!1,keyphrases:o=[],response:a={},shouldTrackAll:l=!1,permalink:c="",allKeyphrasesMissRanking:d,isSuccess:u,keyphraseLimitReached:p,limit:h,setRequestSucceeded:m,setRequestFailed:g,setKeyphraseLimitReached:y,onAuthentication:x}){const w=(0,n.useCallback)(()=>{jt({onAuthentication:x,setRequestSucceeded:m,setRequestFailed:g,keyphrases:o,addTrackedKeyphrase:t,setKeyphraseLimitReached:y})},[jt,x,m,g,o,t,y]),b=(e=>{const[t,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{e&&!t&&async function(){return await se({path:"yoast/v1/wincher/account/limit",method:"GET"})}().then(e=>s(e))},[t]),t})(s);return(0,f.jsxs)(Ct,{children:[r&&(0,f.jsx)(Oe,{}),s&&(0,f.jsx)(nt,{trackingInfo:b}),(0,f.jsxs)(Tt,{children:[(0,i.__)("SEO performance","wordpress-seo"),(0,f.jsx)(S.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,f.jsx)(Be,{}),(0,f.jsx)(St,{isLoggedIn:s,onLogin:w}),(0,f.jsx)(_t,{isSuccess:u,response:a,allKeyphrasesMissRanking:d,keyphraseLimitReached:p,limit:h,onLogin:w}),(0,f.jsx)(Nt,{trackedKeyphrases:e,isLoggedIn:s,keyphrases:o,shouldTrackAll:l,permalink:c,historyDaysLimit:(null==b?void 0:b.historyDays)||31})]})}Nt.propTypes={trackedKeyphrases:m().object,keyphrases:m().array.isRequired,isLoggedIn:m().bool.isRequired,shouldTrackAll:m().bool.isRequired,permalink:m().string.isRequired,historyDaysLimit:m().number},Mt.propTypes={trackedKeyphrases:m().object,addTrackedKeyphrase:m().func.isRequired,isLoggedIn:m().bool,isNewlyAuthenticated:m().bool,keyphrases:m().array,response:m().object,shouldTrackAll:m().bool,permalink:m().string,allKeyphrasesMissRanking:m().bool.isRequired,isSuccess:m().bool.isRequired,keyphraseLimitReached:m().bool.isRequired,limit:m().number.isRequired,setRequestSucceeded:m().func.isRequired,setRequestFailed:m().func.isRequired,setKeyphraseLimitReached:m().func.isRequired,onAuthentication:m().func.isRequired};const Ot=(0,O.compose)([(0,t.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:r,getWincherLoginStatus:o,getWincherRequestIsSuccess:n,getWincherRequestResponse:i,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:u}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:n(),keyphraseLimitReached:s(),limit:r(),response:i(),shouldTrackAll:u(),permalink:d()}}),(0,t.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:r,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:n,setWincherLoginStatus:i}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{r(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{n(e)},onAuthentication:(e,s,r)=>{t(r),i(e,s)}}})])(Mt),Ft=y()(D)`
	width: 18px;
	height: 18px;
	margin: 3px;
`;function Dt({keyphrases:e,onNoKeyphraseSet:t,onOpen:s,location:r}){if(!e.length){let e=document.querySelector("#focus-keyword-input-metabox");return e||(e=document.querySelector("#focus-keyword-input-sidebar")),e.focus(),void t()}s(r)}function qt({location:e="",whichModalOpen:t="none",shouldCloseOnClickOutside:s=!0,keyphrases:r,onNoKeyphraseSet:o,onOpen:a,onClose:l}){const c=(0,n.useCallback)(()=>{Dt({keyphrases:r,onNoKeyphraseSet:o,onOpen:a,location:e})},[Dt,r,o,a,e]),d=(0,i.__)("Track SEO performance","wordpress-seo"),u=q();return(0,f.jsxs)(n.Fragment,{children:[t===e&&(0,f.jsx)(Y,{title:d,onRequestClose:l,icon:(0,f.jsx)(V.h,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:s,children:(0,f.jsx)(H,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,f.jsx)(Ot,{})})}),"sidebar"===e&&(0,f.jsx)(Z,{id:`wincher-open-button-${e}`,title:d,SuffixHeroIcon:(0,f.jsx)(Ft,{className:"yst-text-slate-500",...u}),onClick:c}),"metabox"===e&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(z,{id:`wincher-open-button-${e}`,onClick:c,children:[(0,f.jsx)(z.Text,{children:d}),(0,f.jsx)(D,{className:"yst-h-5 yst-w-5 yst-text-slate-500",...u})]})})]})}qt.propTypes={location:m().string,whichModalOpen:m().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:m().bool,keyphrases:m().array.isRequired,onNoKeyphraseSet:m().func.isRequired,onOpen:m().func.isRequired,onClose:m().func.isRequired};const $t=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherModalOpen:t,getWincherTrackableKeyphrases:s}=e("yoast-seo/editor");return{keyphrases:s(),whichModalOpen:t()}}),(0,t.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherDismissModal:s,setWincherNoKeyphrase:r}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{r()}}})])(qt),Bt=window.yoast.externals.components;function Ut(){return(0,O.createHigherOrderComponent)(function(e){return(0,O.pure)(function(t){const s=(0,n.useContext)(c.LocationContext);return(0,n.createElement)(e,{...t,location:s})})},"withLocation")}const zt=(0,O.compose)([(0,t.withSelect)(e=>{const{isCornerstoneContent:t}=e("yoast-seo/editor");return{isCornerstone:t(),learnMoreUrl:wpseoAdminL10n["shortlinks.cornerstone_content_info"]}}),(0,t.withDispatch)(e=>{const{toggleCornerstoneContent:t}=e("yoast-seo/editor");return{onChange:t}}),Ut()])(Bt.CollapsibleCornerstone);var Wt=s(3838);const Ht=y()(S.StyledSection)`
	&${S.StyledSectionBase} {
		padding: 0;

		& ${S.StyledHeading} {
			${(0,W.getDirectionalStyle)("padding-left","padding-right")}: 20px;
			margin-left: ${(0,W.getDirectionalStyle)("0","20px")};
		}
	}
`,Kt=({children:e=null,title:t="",icon:s="",hasPaperStyle:r=!0,shoppingData:o=null})=>(0,f.jsx)(Ht,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:r,shoppingData:o,children:e});Kt.propTypes={children:m().element,title:m().string,icon:m().string,hasPaperStyle:m().bool,shoppingData:m().object};const Yt=Kt;var Vt=s(5979);const Gt=(0,u.memoize)((e,t)=>0===e?u.noop:(0,u.debounce)(s=>t(s,e),500));var Zt=s(1137);const Qt=({link:e,text:t})=>(0,f.jsxs)(_.Root,{children:[(0,f.jsx)("p",{children:t}),(0,f.jsxs)(_.Button,{href:e,as:"a",className:"yst-gap-2 yst-mb-5 yst-mt-2",variant:"upsell",target:"_blank",rel:"noopener",children:[(0,f.jsx)(Zt.A,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,i.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});Qt.propTypes={link:m().string.isRequired,text:m().string.isRequired};const Xt=Qt,Jt=function(e,t){let s=0;return t.shortenedBaseUrl&&"string"==typeof t.shortenedBaseUrl&&(s=t.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[s]&&(e.url=e.url.slice(0,s)+e.url.slice(s+1)),(0,Vt.applyReplaceUsingPlugin)(e)},es=(0,O.compose)([(0,t.withSelect)(function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:r,getRecommendedReplaceVars:o,getReplaceVars:n,getShoppingData:i,getSiteIconUrlFromSettings:a,getSnippetEditorData:l,getSnippetEditorMode:c,getSnippetEditorPreviewImageUrl:d,getSnippetEditorWordsToHighlight:u,isCornerstoneContent:p,getIsTerm:h,getContentLocale:m,getSiteName:g}=e("yoast-seo/editor"),y=n();return y.forEach(e=>{""!==e.value||["title","excerpt","excerpt_only"].includes(e.name)||(e.value="%%"+e.name+"%%")}),{baseUrl:t(),data:l(),date:s(),faviconSrc:a(),keyword:r(),mobileImageSrc:d(),mode:c(),recommendedReplacementVariables:o(),replacementVariables:y,shoppingData:i(),wordsToHighlight:u(),isCornerstone:p(),isTaxonomy:h(),locale:m(),siteName:g()}}),(0,t.withDispatch)(function(e,t,{select:s}){const{updateData:r,switchMode:o,updateAnalysisData:n,findCustomFields:i}=e("yoast-seo/editor"),a=e("core/editor"),l=s("yoast-seo/editor").getPostId();return{onChange:(e,t)=>{switch(e){case"mode":o(t);break;case"slug":r({slug:t}),a&&a.editPost({slug:t});break;default:r({[e]:t})}},onChangeAnalysisData:n,onReplacementVariableSearchChange:Gt(l,i)}})])(e=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox"),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsWooSeoUpsell(),[]),o=(0,i.__)("Want an enhanced Google preview of how your WooCommerce products look in the search results?","wordpress-seo");return(0,f.jsx)(c.LocationConsumer,{children:t=>(0,f.jsx)(Yt,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,f.jsxs)(f.Fragment,{children:[r&&(0,f.jsx)(Xt,{link:s,text:o}),(0,f.jsx)(Wt.SnippetEditor,{...e,descriptionPlaceholder:(0,i.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:Jt,showCloseButton:!1,idSuffix:t})]})})})}),ts=(0,t.withSelect)(e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t()}})(S.Warning),ss=window.yoast.featureFlag,rs=y()(S.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);
	}

`,os=({initialIsOpen:e,id:t,...s})=>(0,f.jsx)(rs,{hasPadding:!0,hasSeparator:!0,initialIsOpen:e,id:t,...s}),ns=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i._n)("minute","minutes",e,"wordpress-seo"),title:(0,i.__)("Reading time","wordpress-seo"),linkTo:s
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about reading time","wordpress-seo")})},is=(0,W.makeOutboundLink)();function as(e,t){return-1===e?(0,i.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,i.sprintf)(
/* Translators: %1$s expands to the numeric Flesch reading ease score,
  %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */
/* Translators: %1$s expands to the numeric Flesch reading ease score,
  %2$s expands to the easiness of reading (e.g. 'easy' or 'very difficult') */
(0,i.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case E.DIFFICULTY.NO_DATA:return(0,i.__)("no data","wordpress-seo");case E.DIFFICULTY.VERY_EASY:return(0,i.__)("very easy","wordpress-seo");case E.DIFFICULTY.EASY:return(0,i.__)("easy","wordpress-seo");case E.DIFFICULTY.FAIRLY_EASY:return(0,i.__)("fairly easy","wordpress-seo");case E.DIFFICULTY.OKAY:return(0,i.__)("okay","wordpress-seo");case E.DIFFICULTY.FAIRLY_DIFFICULT:return(0,i.__)("fairly difficult","wordpress-seo");case E.DIFFICULTY.DIFFICULT:return(0,i.__)("difficult","wordpress-seo");case E.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("very difficult","wordpress-seo")}}(t))}const ls=()=>{let e=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[e]),o=(0,n.useMemo)(()=>{const t=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const r=function(e){switch(e){case E.DIFFICULTY.FAIRLY_DIFFICULT:case E.DIFFICULTY.DIFFICULT:case E.DIFFICULTY.VERY_DIFFICULT:return(0,i.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case E.DIFFICULTY.NO_DATA:return(0,i.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,i.__)("Good job!","wordpress-seo")}}(t);return(0,f.jsxs)("span",{children:[as(e,t)," ",t>=E.DIFFICULTY.FAIRLY_DIFFICULT?(0,f.jsx)(is,{href:s,children:r+"."}):r]})}(e,r,t)},[e,r]);return-1===e&&(e="?"),(0,f.jsx)(S.InsightsCard,{amount:e,unit:(0,i.__)("out of 100","wordpress-seo"),title:(0,i.__)("Flesch reading ease","wordpress-seo"),linkTo:s
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about Flesch reading ease","wordpress-seo"),description:o})},cs=({data:e=[],itemScreenReaderText:t="",className:s="",...r})=>{const o=(0,n.useMemo)(()=>{var t,s;return null!==(t=null===(s=(0,u.maxBy)(e,"number"))||void 0===s?void 0:s.number)&&void 0!==t?t:0},[e]);return(0,f.jsx)("ul",{className:B()("yoast-data-model",s),...r,children:e.map(({name:e,number:s})=>(0,f.jsxs)("li",{style:{"--yoast-width":s/o*100+"%"},children:[e,(0,f.jsx)("span",{children:s}),t&&(0,f.jsx)("span",{className:"screen-reader-text",children:(0,i.sprintf)(t,s)})]},`${e}_dataItem`))})};cs.propTypes={data:m().arrayOf(m().shape({name:m().string.isRequired,number:m().number.isRequired})),itemScreenReaderText:m().string,className:m().string};const ds=cs,us=(0,W.makeOutboundLink)(),ps=({location:e})=>{const s=(0,t.useSelect)(e=>{var t,s;return null===(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getPreference("isProminentWordsAvailable",!1))||void 0===t||t},[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("shouldUpsell",!1),[]),a=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-prominent_words`,""),[e]),l=(0,n.useMemo)(()=>{const e=(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return(0,De.x)((0,i.sprintf)(
// translators: %1$s and %2$s are replaced by opening and closing <a> tags.
// translators: %1$s and %2$s are replaced by opening and closing <a> tags.
(0,i.__)("Read our %1$sultimate guide to keyword research%2$s to learn more about keyword research and keyword strategy.","wordpress-seo"),"<a>","</a>"),{a:(0,f.jsx)(us,{href:e})})},[]),d=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
// translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
// translators: %1$s expands to a starting `b` tag, %1$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
(0,i.__)("With %1$s%3$s%2$s, this section will show you which words occur most often in your text. By checking these prominent words against your intended keyword(s), you'll know how to edit your text to be more focused.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,f.jsx)("b",{})}),[]),p=(0,t.useSelect)(e=>{var t,s;return null!==(t=null===(s=e("yoast-seo-premium/editor"))||void 0===s?void 0:s.getProminentWords())&&void 0!==t?t:[]},[]),h=(0,n.useMemo)(()=>{const e=(0,i.sprintf)(
// translators: %1$s expands to Yoast SEO Premium.
// translators: %1$s expands to Yoast SEO Premium.
(0,i.__)("Get %s to enjoy the benefits of prominent words","wordpress-seo"),"Yoast SEO Premium").split(/\s+/);return e.map((t,s)=>({name:t,number:e.length-s}))},[]),m=(0,n.useMemo)(()=>o?h:p.map(({word:e,occurrence:t})=>({name:e,number:t})),[p,h]);if(!s)return null;const{locationContext:g}=(0,c.useRootContext)();return(0,f.jsxs)("div",{className:"yoast-prominent-words",children:[(0,f.jsx)("div",{className:"yoast-field-group__title",children:(0,f.jsx)("b",{children:(0,i.__)("Prominent words","wordpress-seo")})}),!o&&(0,f.jsx)("p",{children:0===m.length?(0,i.__)("Once you add a bit more copy, we'll give you a list of words that occur the most in the content. These give an indication of what your content focuses on.","wordpress-seo"):(0,i.__)("The following words occur the most in the content. These give an indication of what your content focuses on. If the words differ a lot from your topic, you might want to rewrite your content accordingly.","wordpress-seo")}),o&&(0,f.jsx)("p",{children:d}),o&&(0,f.jsxs)(us,{href:(0,r.addQueryArgs)(a,{context:g}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
// translators: %s expands to `Premium` (part of add-on name).
// translators: %s expands to `Premium` (part of add-on name).
(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]}),(0,f.jsx)("p",{children:l}),(0,f.jsx)(ds,{data:m,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */
(0,i.__)("%d occurrences","wordpress-seo"),"aria-label":(0,i.__)("Prominent words","wordpress-seo"),className:o?"yoast-data-model--upsell":null})]})};ps.propTypes={location:m().string.isRequired};const hs=ps,ms=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),s=(0,n.useMemo)(()=>(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let r=(0,i._n)("word","words",e.count,"wordpress-seo"),o=(0,i.__)("Word count","wordpress-seo"),a=(0,i.__)("Learn more about word count","wordpress-seo");return"character"===e.unit&&(r=(0,i._n)("character","characters",e.count,"wordpress-seo"),o=(0,i.__)("Character count","wordpress-seo"),
/* translators: Hidden accessibility text. */
a=(0,i.__)("Learn more about character count","wordpress-seo")),(0,f.jsx)(S.InsightsCard,{amount:e.count,unit:r,title:o,linkTo:s,linkText:a})},gs=(0,W.makeOutboundLink)(),ys=({location:e})=>{const t=(0,n.useMemo)(()=>(0,u.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-text_formality`,""),[e]),s=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
// Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
// Translators: %1$s expands to a starting `b` tag, %2$s expands to a closing `b` tag and %3$s expands to `Yoast SEO Premium`.
(0,i.__)("%1$s%3$s%2$s will help you assess the formality level of your text.","wordpress-seo"),"<b>","</b>","Yoast SEO Premium"),{b:(0,f.jsx)("b",{})}),[]);return(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{children:s}),(0,f.jsxs)(gs,{href:t,className:"yoast-button yoast-button-upsell",children:[(0,i.sprintf)(
// Translators: %s expands to `Premium` (part of add-on name).
// Translators: %s expands to `Premium` (part of add-on name).
(0,i.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};ys.propTypes={location:m().string.isRequired};const fs=ys,xs=({location:e,name:s})=>{const r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),o=p().isPremium,n=o?(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,u.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),a=(0,i.__)("Read more about text formality.","wordpress-seo");return r?(0,f.jsxs)("div",{className:"yoast-text-formality",children:[(0,f.jsxs)("div",{className:"yoast-field-group__title",children:[(0,f.jsx)("b",{children:(0,i.__)("Text formality","wordpress-seo")}),(0,f.jsx)(S.HelpIcon,{linkTo:n,linkText:a})]}),o?(0,f.jsx)(v.Slot,{name:s}):(0,f.jsx)(fs,{location:e})]}):null};xs.propTypes={location:m().string.isRequired,name:m().string.isRequired};const ws=xs,bs=({location:e="metabox"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]);return(0,f.jsxs)(os,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,f.jsx)(hs,{location:e}),(0,f.jsxs)("div",{children:[s&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(ls,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(ns,{}),(0,f.jsx)(ms,{})]}),(0,ss.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(ws,{location:e,name:"YoastTextFormalityMetabox"})]})]})};bs.propTypes={location:m().string};const vs=bs,_s=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.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"}))}),ks=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))});var js=s(7695);const Ss=({isOpen:e,onClose:s,id:r,upsellLink:o,title:a="",description:l="",benefits:c=[],note:d="",ctbId:u="",modalTitle:p})=>{const{isBlackFriday:h,isWooCommerceActive:m,isProductEntity:g,isWooSEOActive:y}=(0,t.useSelect)(e=>{const t=e("yoast-seo/editor");return{isProductEntity:t.getIsProductEntity(),isWooCommerceActive:t.getIsWooCommerceActive(),isBlackFriday:t.isPromotionActive("black-friday-promotion"),isWooSEOActive:t.getIsWooSeoActive()}},[]),x=(0,n.useMemo)(()=>m&&g,[m,g]),w=(0,n.useRef)(null);return(0,f.jsx)(_.Modal,{isOpen:e,onClose:s,id:r,initialFocus:w,children:(0,f.jsx)(_.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,f.jsxs)(_.Modal.Container,{children:[(0,f.jsxs)(_.Modal.Container.Header,{className:"yst-p-6 yst-border-b-slate-200 yst-border-b yst-flex yst-justify-start yst-gap-3 yst-items-center",children:[x?(0,f.jsx)(ks,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,f.jsx)(V.h,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,f.jsx)(_.Modal.Title,{as:"h3",className:B()(x?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:p}),(0,f.jsx)(_.Modal.CloseButton,{className:"yst-top-2",onClick:s,screenReaderText:(0,i.__)("Close modal","wordpress-seo")})]}),(0,f.jsxs)(_.Modal.Container.Content,{className:"yst-p-0",children:[h&&(0,f.jsx)("div",{className:"yst-flex yst-font-semibold 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",children:(0,f.jsx)("div",{className:"yst-mx-auto",children:(0,i.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,f.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,f.jsx)(_.Title,{as:"h3",className:"yst-mb-1 yst-leading-5 yst-text-sm yst-font-medium yst-text-slate-800",children:a}),(0,f.jsx)("p",{className:"yst-mb-2",children:l}),Array.isArray(c)&&c.length>0&&(0,f.jsx)("ul",{className:"yst-my-2",children:c.map((e,t)=>(0,f.jsxs)("li",{className:"yst-flex yst-gap-1 yst-mb-2",children:[(0,f.jsx)(js.A,{className:"yst-mr-1 yst-text-green-500 yst-w-[19.5px] yst-h-[19.5px] yst-flex-shrink-0"}),(0,f.jsx)("p",{className:"yst-text-slate-600",children:e})]},`${r}-upsell-benefit-${t}`))}),"function"==typeof c&&c(),(0,f.jsxs)("div",{className:"yst-text-center",children:[(0,f.jsxs)(_.Button,{as:"a",variant:"upsell",className:"yst-my-2 yst-gap-1.5 yst-w-full",href:o,target:"_blank","data-action":"load-nfd-ctb","data-ctb-id":u,ref:w,children:[(0,f.jsx)(Zt.A,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,i.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
(0,i.__)("Explore %s","wordpress-seo"),x&&!y?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,f.jsx)("span",{className:"yst-sr-only",children:(0,i.__)("Opens in a new tab","wordpress-seo")})]}),(0,f.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:d})]})]})]})]})})})},Cs=()=>{const[e,,,t,s]=(0,_.useToggleState)(!1),{locationContext:o}=(0,c.useRootContext)(),n=(0,_.useSvgAria)(),a=o.includes("sidebar"),l=o.includes("metabox"),d=a?"sidebar":"metabox",u=wpseoAdminL10n[a?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ss,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${d}`,upsellLink:(0,r.addQueryArgs)(u,{context:o}),modalTitle:(0,i.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,i.__)("Connect related content without the guesswork","wordpress-seo"),description:(0,De.x)((0,i.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */
(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles. %sScans your content to:","wordpress-seo"),"<br />"),{br:(0,f.jsx)("br",{})}),benefits:[(0,i.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,i.__)("Build relevant internal links faster","wordpress-seo"),(0,i.__)("Strengthen your site’s structure","wordpress-seo"),(0,i.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,i.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),a&&(0,f.jsx)(Z,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,i.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(_.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(_s,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...n})})})}),l&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(z,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(z.Text,{children:(0,i.__)("Internal linking suggestions","wordpress-seo")}),(0,f.jsxs)(_.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(_s,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...n}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})},Es=({children:e})=>(0,f.jsx)("div",{children:e});Es.propTypes={renderPriority:m().number.isRequired,children:m().node.isRequired};const Ts=Es,Rs=({noIndex:e,onNoIndexChange:t,editorContext:s,isPrivateBlog:r=!1})=>{const o=(e=>{const t=(0,i.__)("No","wordpress-seo"),s=(0,i.__)("Yes","wordpress-seo"),r=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,i.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */
(0,i.__)("%1$s (current default for %2$s)","wordpress-seo"),r,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,i.sprintf)(/* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */ /* translators: %1$s translates to "yes" or "no", %2$s translates to the content type label in plural form */
(0,i.__)("%1$s (current default for %2$s)","wordpress-seo"),r,e.postTypeNamePlural),value:"default"},{name:s,value:"index"},{name:t,value:"noindex"}]})(s);return(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsxs)(n.Fragment,{children:[r&&(0,f.jsx)(S.Alert,{type:"warning",children:(0,i.__)("Even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won't have an effect.","wordpress-seo")}),(0,f.jsx)(S.Select,{label:(0,i.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:t,id:(0,W.join)(["yoast-meta-robots-noindex",s]),options:o,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};Rs.propTypes={noIndex:m().string.isRequired,onNoIndexChange:m().func.isRequired,editorContext:m().object.isRequired,isPrivateBlog:m().bool};const Ls=({noFollow:e,onNoFollowChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,W.join)(["yoast-meta-robots-nofollow",s]);return(0,f.jsx)(S.RadioButtonGroup,{id:r,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,i.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:r,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});Ls.propTypes={noFollow:m().string.isRequired,onNoFollowChange:m().func.isRequired};const Is=({advanced:e,onAdvancedChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const r=(0,W.join)(["yoast-meta-robots-advanced",s]),o=`${r}-input`;return(0,f.jsx)(S.MultiSelect,{label:(0,i.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:r,inputId:o,options:[{name:(0,i.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,i.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,i.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});Is.propTypes={advanced:m().array.isRequired,onAdvancedChange:m().func.isRequired};const As=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Breadcrumbs Title","wordpress-seo"),id:(0,W.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});As.propTypes={breadcrumbsTitle:m().string.isRequired,onBreadcrumbsTitleChange:m().func.isRequired};const Ps=({canonical:e,onCanonicalChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(S.TextInput,{label:(0,i.__)("Canonical URL","wordpress-seo"),id:(0,W.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url"
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});Ps.propTypes={canonical:m().string.isRequired,onCanonicalChange:m().func.isRequired};const Ns=({noIndex:e,canonical:t,onNoIndexChange:s,onCanonicalChange:r,onLoad:o,isLoading:i,editorContext:a,isBreadcrumbsDisabled:l,advanced:c=[],onAdvancedChange:d=u.noop,noFollow:p="",onNoFollowChange:h=u.noop,breadcrumbsTitle:m="",onBreadcrumbsTitleChange:g=u.noop,isPrivateBlog:y=!1})=>{(0,n.useEffect)(()=>{setTimeout(()=>{i&&o()})});const x={noIndex:e,onNoIndexChange:s,editorContext:a,isPrivateBlog:y},w={noFollow:p,onNoFollowChange:h},b={advanced:c,onAdvancedChange:d},v={breadcrumbsTitle:m,onBreadcrumbsTitleChange:g},_={canonical:t,onCanonicalChange:r};return i?null:(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Rs,{...x}),a.isPost&&(0,f.jsx)(Ls,{...w}),a.isPost&&(0,f.jsx)(Is,{...b}),!l&&(0,f.jsx)(As,{...v}),(0,f.jsx)(Ps,{..._})]})};Ns.propTypes={noIndex:m().string.isRequired,canonical:m().string.isRequired,onNoIndexChange:m().func.isRequired,onCanonicalChange:m().func.isRequired,onLoad:m().func.isRequired,isLoading:m().bool.isRequired,editorContext:m().object.isRequired,isBreadcrumbsDisabled:m().bool.isRequired,isPrivateBlog:m().bool,advanced:m().array,onAdvancedChange:m().func,noFollow:m().string,onNoFollowChange:m().func,breadcrumbsTitle:m().string,onBreadcrumbsTitleChange:m().func};const Ms=Ns,Os=(0,O.compose)([(0,t.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:r,getBreadcrumbsTitle:o,getCanonical:n,getIsLoading:i,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:r(),breadcrumbsTitle:o(),canonical:n(),isLoading:i(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,t.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:r,setBreadcrumbsTitle:o,setCanonical:n,loadAdvancedSettingsData:i}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:r,onBreadcrumbsTitleChange:o,onCanonicalChange:n,onLoad:i}})])(Ms);var Fs=s(1426);const Ds=y().div`
	max-width: calc(527px + 1.5rem);
`,qs=e=>{const t="X"===e.socialMediumName?(0,i.__)("X share preview","wordpress-seo"):(0,i.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,_.useRootContext)();return(0,f.jsx)(_.Root,{children:(0,f.jsx)(Ds,{children:(0,f.jsx)(_.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,r.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,i.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
(0,i.__)("Unlock with %1$s","wordpress-seo"),"Yoast SEO Premium"),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",children:(0,f.jsxs)("div",{className:"yst-grayscale yst-opacity-50",children:[(0,f.jsx)(_.Label,{children:t}),(0,f.jsx)(Fs.Xi,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:u.noop,onImageClick:u.noop,onMouseHover:u.noop})]})})})})};qs.propTypes={socialMediumName:m().oneOf(["Social","Twitter","X"]).isRequired};const $s=qs;var Bs=s(2379),Us=s(2547);class zs extends n.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},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:e,onTitleChange:t,onSelectImageClick:s,onRemoveImageClick:r,socialMediumName:o,imageWarnings:i,description:a,descriptionInputPlaceholder:l,imageUrl:c,imageFallbackUrl:d,alt:u,title:p,titleInputPlaceholder:h,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,isPremium:x,location:w}=this.props;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)($s,{socialMediumName:o}),(0,f.jsx)(Bs.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:p,titleInputPlaceholder:h,onRemoveImageClick:r,imageSelected:!!c,imageUrl:c,imageFallbackUrl:d,imageAltText:u,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:i,replacementVariables:m,recommendedReplacementVariables:g,onReplacementVariableSearchChange:y,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:x,setEditorRef:this.setEditorRef,idSuffix:w})]})}}zs.propTypes={title:m().string.isRequired,onTitleChange:m().func.isRequired,description:m().string.isRequired,onDescriptionChange:m().func.isRequired,imageUrl:m().string.isRequired,imageFallbackUrl:m().string,onSelectImageClick:m().func.isRequired,onRemoveImageClick:m().func.isRequired,socialMediumName:m().string.isRequired,isPremium:m().bool,imageWarnings:m().array,descriptionInputPlaceholder:m().string,titleInputPlaceholder:m().string,replacementVariables:Us.replacementVariablesShape,recommendedReplacementVariables:Us.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:m().func,location:m().string,alt:m().string},zs.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const Ws=zs,Hs=(e,t,s)=>{const[r,o]=(0,n.useState)(!1),a=(0,i.sprintf)(
/* Translators: %1$s expands to the jpg format, %2$s expands to the png format,
  %3$s expands to the webp format, %4$s expands to the gif format. */
/* Translators: %1$s expands to the jpg format, %2$s expands to the png format,
  %3$s expands to the webp format, %4$s expands to the gif format. */
(0,i.__)("No image was found that we can automatically set as your social image. Please use %1$s, %2$s, %3$s or %4$s formats to ensure it displays correctly on social media.","wordpress-seo"),"JPG","PNG","WEBP","GIF");return(0,n.useEffect)(()=>{o(""===t&&e.toLowerCase().endsWith(".avif"))},[e,t]),r?[a]:s},Ks=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const[l,c]=(0,n.useState)(""),d=Hs(r,o,i),u=(0,n.useCallback)(e=>{c(e.detail.metaTabId)},[c]);(0,n.useEffect)(()=>(setTimeout(t),window.addEventListener("YoastSEO:metaTabChange",u),()=>{window.removeEventListener("YoastSEO:metaTabChange",u)}),[]);const p={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:d,activeMetaTabId:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastFacebookPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:p}):(0,f.jsx)(Ws,{...p})};Ks.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const Ys=Ks;function Vs(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const s=t.state().get("selection").first();var r;e({type:(r=s.attributes).subtype,width:r.width,height:r.height,url:r.url,id:r.id,sizes:r.sizes,alt:r.alt||r.title||r.name})}),t})(e).open()}const Gs=()=>{Vs(e=>(0,t.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,r=(0,Bs.determineFacebookImageMode)({width:t,height:s}),o=Bs.FACEBOOK_IMAGE_SIZES[r+"Width"],n=Bs.FACEBOOK_IMAGE_SIZES[r+"Height"],i=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=n);return{url:i?i.url:e.url,id:e.id,warnings:(0,W.validateFacebookImage)(e),alt:e.alt||""}})(e)))},Zs=(0,O.compose)([(0,t.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:r,getSeoTitle:o,getFacebookImageUrl:n,getImageFallback:i,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:u,getSeoTitleTemplateNoFallback:h,getSocialTitleTemplate:m,getSeoDescriptionTemplate:g,getSocialDescriptionTemplate:y,getReplacedExcerpt:f,getFacebookAltText:x}=e("yoast-seo/editor");return{imageUrl:n(),imageFallbackUrl:i(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:y()||s()||g()||f()||"",title:r(),titlePreviewFallback:m()||o()||h()||u()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!p().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:x()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:r,setFacebookPreviewDescription:o,clearFacebookPreviewImage:n,loadFacebookPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Gs,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(Ys),Qs=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:r="",imageUrl:o="",imageWarnings:i=[],...a})=>{const l=Hs(r,o,i);(0,n.useEffect)(()=>{setTimeout(t)},[]);const c={isPremium:e,onLoad:t,location:s,imageFallbackUrl:r,imageUrl:o,imageWarnings:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastTwitterPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:c}):(0,f.jsx)(Ws,{...c})};Qs.propTypes={isPremium:m().bool.isRequired,onLoad:m().func.isRequired,location:m().string.isRequired,imageFallbackUrl:m().string,imageUrl:m().string,imageWarnings:m().array};const Xs=Qs,Js=()=>{Vs(e=>(0,t.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,u.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=Bs.TWITTER_IMAGE_SIZES[t+"Width"],r=Bs.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=r);return{url:o?o.url:e.url,id:e.id,warnings:(0,W.validateTwitterImage)(e),alt:e.alt||""}})(e)))},er=(0,O.compose)([(0,t.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:r,getFacebookImageUrl:o,getFacebookTitle:n,getFacebookDescription:i,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:u,getRecommendedReplaceVars:h,getReplaceVars:m,getSiteUrl:g,getSeoTitleTemplate:y,getSeoTitleTemplateNoFallback:f,getSocialTitleTemplate:x,getSeoDescriptionTemplate:w,getSocialDescriptionTemplate:b,getReplacedExcerpt:v,getTwitterAltText:_}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:o()||u(),recommendedReplacementVariables:h(),replacementVariables:m(),description:t(),descriptionPreviewFallback:b()||i()||a()||w()||v()||"",title:s(),titlePreviewFallback:x()||n()||l()||f()||y()||"",imageWarnings:c(),siteUrl:g(),isPremium:!!p().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:_()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:r,setTwitterPreviewDescription:o,clearTwitterPreviewImage:n,loadTwitterPreviewData:i,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:Js,onRemoveImageClick:n,onDescriptionChange:o,onTitleChange:r,onLoad:i,onReplacementVariableSearchChange:Gt(l,a)}}),Ut()])(Xs),tr=y().legend`
	margin: 16px 0;
	padding: 0;
	color: ${C.colors.$color_headings};
	font-size: 12px;
	font-weight: 300;
`,sr=y().legend`
	margin: 0 0 16px;
	padding: 0;
	color: ${C.colors.$color_headings};
	font-size: 12px;
	font-weight: 300;
`,rr=y().div`
	padding: 16px;
`,or=({useOpenGraphData:e,useTwitterData:t})=>(0,f.jsxs)(n.Fragment,{children:[t&&e&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)(os,{hasSeparator:!1
/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,i.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,children:[(0,f.jsx)(sr,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(Zs,{}),(0,f.jsx)(tr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),(0,f.jsx)(os,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(er,{})})]}),e&&!t&&(0,f.jsxs)(rr,{children:[(0,f.jsx)(sr,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(Zs,{})]}),!e&&t&&(0,f.jsxs)(rr,{children:[(0,f.jsx)(sr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(er,{})]})]});or.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const nr=or,ir=(0,t.withSelect)(e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:r}=t();return{useOpenGraphData:s,useTwitterData:r}})(nr);function ar({target:e}){return(0,f.jsx)(R,{target:e,children:(0,f.jsx)(ir,{})})}ar.propTypes={target:m().string.isRequired};const lr=(0,W.makeOutboundLink)(),cr=y().div`
	padding: 16px;
`,dr="yoast-seo/editor";function ur({location:e,show:t}){return t?(0,f.jsxs)(S.Alert,{type:"info",children:[(0,i.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */
(0,i.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,f.jsx)(lr,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,i.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */
(0,i.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}ur.propTypes={show:m().bool.isRequired,location:m().string.isRequired};const pr=(e,s,r)=>{const o=(0,t.useSelect)(e=>e(dr).getIsProduct(),[]),n=(0,t.useSelect)(e=>e(dr).getIsWooSeoActive(),[]),a=o&&n?{name:(0,i.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===s);return[{name:(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */ /* translators: %1$s expands to the plural name of the current post type, %2$s expands to the current site wide default. */
(0,i.__)("Default for %1$s (%2$s)","wordpress-seo"),r,a?a.name:""),value:""},...e]},hr=(e,t)=>(0,De.x)((e=>(0,i.sprintf)(/* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */ /* translators: %1$s expands to the plural name of the current post type, %2$s and %3$s expand to a link to the Settings page */
(0,i.__)("You can change the default type for %1$s under Content types in the %2$sSettings%3$s.","wordpress-seo"),e,"<link>","</link>"))(e),{link:(0,f.jsx)("a",{href:t,target:"_blank",rel:"noreferrer"})}),mr=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,f.jsx)(S.FieldGroup,{label:e,linkTo:t
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});mr.propTypes={helpTextTitle:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextDescription:m().string.isRequired};const gr=({schemaPageTypeChange:e=u.noop,schemaPageTypeSelected:s=null,pageTypeOptions:r,schemaArticleTypeChange:o=u.noop,schemaArticleTypeSelected:a=null,articleTypeOptions:l,showArticleTypeInput:c,additionalHelpTextLink:d,helpTextLink:p,helpTextTitle:h,helpTextDescription:m,postTypeName:g,displayFooter:y=!1,defaultPageType:x,defaultArticleType:w,location:b,isNewsEnabled:v=!1})=>{const _=pr(r,x,g),k=pr(l,w,g),j=(0,t.useSelect)(e=>e(dr).selectLink("https://yoa.st/product-schema-metabox"),[]),C=(0,t.useSelect)(e=>e(dr).getIsWooSeoUpsell(),[]),[E,T]=(0,n.useState)(a),R=(0,i.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),L=(0,t.useSelect)(e=>e(dr).getIsProduct(),[]),I=(0,t.useSelect)(e=>e(dr).getIsWooSeoActive(),[]),A=(0,t.useSelect)(e=>e(dr).selectAdminLink("?page=wpseo_page_settings"),[]),P=L&&I,N=(0,n.useCallback)((e,t)=>{T(t)},[]);return(0,n.useEffect)(()=>{N(null,a)},[a]),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(mr,{helpTextLink:p,helpTextTitle:h,helpTextDescription:m}),(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("What type of page or content is this?","wordpress-seo"),linkTo:d
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about page or content types","wordpress-seo")}),C&&(0,f.jsx)(Xt,{link:j,text:R}),(0,f.jsx)(S.Select,{id:(0,W.join)(["yoast-schema-page-type",b]),options:_,label:(0,i.__)("Page type","wordpress-seo"),onChange:e,selected:P?"ItemPage":s,disabled:P}),c&&(0,f.jsx)(S.Select,{id:(0,W.join)(["yoast-schema-article-type",b]),options:k,label:(0,i.__)("Article type","wordpress-seo"),onChange:o,selected:a,onOptionFocus:N}),(0,f.jsx)(ur,{location:b,show:!v&&(M=E,O=w,"NewsArticle"===M||""===M&&"NewsArticle"===O)}),y&&!P&&(0,f.jsx)("p",{children:hr(g,A)}),P&&(0,f.jsx)("p",{children:(0,i.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,i.__)("You have %1$s activated on your site, automatically setting the Page type for your products to 'Item Page'. As a result, the Page type selection is disabled.","wordpress-seo"),"Yoast WooCommerce SEO")})]});var M,O},yr=m().arrayOf(m().shape({name:m().string,value:m().string}));gr.propTypes={schemaPageTypeChange:m().func,schemaPageTypeSelected:m().string,pageTypeOptions:yr.isRequired,schemaArticleTypeChange:m().func,schemaArticleTypeSelected:m().string,articleTypeOptions:yr.isRequired,showArticleTypeInput:m().bool.isRequired,additionalHelpTextLink:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,defaultPageType:m().string.isRequired,defaultArticleType:m().string.isRequired,location:m().string.isRequired,isNewsEnabled:m().bool};const fr=({isMetabox:e,showArticleTypeInput:t=!1,articleTypeLabel:s="",additionalHelpTextLink:r="",pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d=!1,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m})=>{const g=(0,f.jsx)(gr,{showArticleTypeInput:t,articleTypeLabel:s,additionalHelpTextLink:r,pageTypeLabel:o,helpTextLink:i,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d,loadSchemaArticleData:u,loadSchemaPageData:p,location:h,...m});return e?(0,n.createPortal)((0,f.jsx)(cr,{children:g}),document.getElementById("wpseo-meta-section-schema")):g};fr.propTypes={isMetabox:m().bool.isRequired,showArticleTypeInput:m().bool,articleTypeLabel:m().string,additionalHelpTextLink:m().string,pageTypeLabel:m().string.isRequired,helpTextLink:m().string.isRequired,helpTextTitle:m().string.isRequired,helpTextDescription:m().string.isRequired,postTypeName:m().string.isRequired,displayFooter:m().bool,loadSchemaArticleData:m().func.isRequired,loadSchemaPageData:m().func.isRequired,location:m().string.isRequired};const xr=fr;class wr{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return wr.articleTypeInput.getAttribute("data-default")}static get articleType(){return wr.articleTypeInput.value}static set articleType(e){wr.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return wr.pageTypeInput.getAttribute("data-default")}static get pageType(){return wr.pageTypeInput.value}static set pageType(e){wr.pageTypeInput.value=e}}const br=e=>{const t=null!==wr.articleTypeInput;(0,n.useEffect)(()=>{e.loadSchemaPageData(),t&&e.loadSchemaArticleData()},[]);const{pageTypeOptions:s,articleTypeOptions:r}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,i.__)("Article type","wordpress-seo"),pageTypeLabel:(0,i.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,i.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,i.__)("This helps search engines understand your website and your content. You can change some of your settings for this page below.","wordpress-seo"),showArticleTypeInput:t,pageTypeOptions:s,articleTypeOptions:r},a={...e,...o,...(l=e.location,"metabox"===l?{helpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.metabox.schema.page_type"],isMetabox:!0}:{helpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.explanation"],additionalHelpTextLink:wpseoAdminL10n["shortlinks.sidebar.schema.page_type"],isMetabox:!1})};var l;return(0,f.jsx)(xr,{...a})};br.propTypes={displayFooter:m().bool.isRequired,schemaPageTypeSelected:m().string.isRequired,schemaArticleTypeSelected:m().string.isRequired,defaultArticleType:m().string.isRequired,defaultPageType:m().string.isRequired,loadSchemaPageData:m().func.isRequired,loadSchemaArticleData:m().func.isRequired,schemaPageTypeChange:m().func.isRequired,schemaArticleTypeChange:m().func.isRequired,location:m().string.isRequired};const vr=(0,O.compose)([(0,t.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:r,getArticleType:o,getDefaultArticleType:n}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:i,isNewsEnabled:a}=t();return{displayFooter:i,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:n(),defaultPageType:r()}}),(0,t.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:r,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:r,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),Ut()])(br),_r=window.yoast.relatedKeyphraseSuggestions;function kr({requestLimitReached:e,isSuccess:t,response:s,requestHasData:r,relatedKeyphrases:o}){return e?"requestLimitReached":!t&&function(e){return"invalid_json"===(null==e?void 0:e.code)||"fetch_error"===(null==e?void 0:e.code)||!(0,u.isEmpty)(e)&&"error"in e}(s)?"requestFailed":r?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function jr({keyphrase:e="",relatedKeyphrases:t=[],renderAction:s=null,requestLimitReached:r=!1,countryCode:o,setCountry:i,newRequest:a,response:l={},isRtl:c=!1,userLocale:d="en_US",isPending:u=!1,isSuccess:p=!1,requestHasData:h=!0,isPremium:m=!1,semrushUpsellLink:g="",premiumUpsellLink:y=""}){var x,w;const[b,v]=(0,n.useState)(o),k=(0,n.useCallback)(async()=>{a(o,e),v(o)},[o,e,a]);return(0,f.jsxs)(_.Root,{context:{isRtl:c},children:[!r&&!m&&(0,f.jsx)(_r.PremiumUpsell,{url:y,className:"yst-mb-4"}),!r&&(0,f.jsx)(_r.CountrySelector,{countryCode:o,activeCountryCode:b,onChange:i,onClick:k,className:"yst-mb-4",userLocale:d.split("_")[0]}),!u&&(0,f.jsx)(_r.UserMessage,{variant:kr({requestLimitReached:r,isSuccess:p,response:l,requestHasData:h,relatedKeyphrases:t}),upsellLink:g}),(0,f.jsx)(_r.KeyphrasesTable,{relatedKeyphrases:t,columnNames:null==l||null===(x=l.results)||void 0===x?void 0:x.columnNames,data:null==l||null===(w=l.results)||void 0===w?void 0:w.rows,isPending:u,renderButton:s,className:"yst-mt-4"})]})}jr.propTypes={keyphrase:m().string,relatedKeyphrases:m().array,renderAction:m().func,requestLimitReached:m().bool,countryCode:m().string.isRequired,setCountry:m().func.isRequired,newRequest:m().func.isRequired,response:m().object,isRtl:m().bool,userLocale:m().string,isPending:m().bool,isSuccess:m().bool,requestHasData:m().bool,isPremium:m().bool,semrushUpsellLink:m().string,premiumUpsellLink:m().string};const Sr=(0,O.compose)([(0,t.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:o,getSEMrushRequestResponse:n,getSEMrushRequestIsSuccess:i,getSEMrushIsRequestPending:a,getSEMrushRequestHasData:l,getPreference:c,getIsPremium:d,selectLinkParams:u}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:o(),response:n(),isSuccess:i(),isPending:a(),requestHasData:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,r.addQueryArgs)("https://yoa.st/semrush-prices",u()),premiumUpsellLink:(0,r.addQueryArgs)("https://yoa.st/413",u())}}),(0,t.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(jr),Cr=({isOpen:e,closeModal:t,id:s,upsellLink:r})=>(0,f.jsx)(Ss,{isOpen:e,onClose:t,id:s,upsellLink:r,title:(0,i.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,i.__)("Optimize for up to 5 keyphrases to shape your content around different themes, audiences, and angles - helping it get discovered by a wider audience.","wordpress-seo"),note:(0,i.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,i.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Er=()=>{const[e,,,t,s]=(0,_.useToggleState)(!1),o=(0,n.useContext)(c.LocationContext),{locationContext:a}=(0,c.useRootContext)(),l=(0,_.useSvgAria)(),d=wpseoAdminL10n["sidebar"===o.toLowerCase()?"shortlinks.upsell.sidebar.additional_button":"shortlinks.upsell.metabox.additional_button"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Cr,{isOpen:e,closeModal:s,upsellLink:(0,r.addQueryArgs)(d,{context:a}),id:`yoast-additional-keyphrases-modal-${o}`}),"sidebar"===o&&(0,f.jsx)(Z,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,i.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:C.colors.$color_grey_medium_dark},onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(_.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(_s,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...l})})})}),"metabox"===o&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(z,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(S.SvgIcon,{icon:"plus",color:C.colors.$color_grey_medium_dark}),(0,f.jsx)(z.Text,{children:(0,i.__)("Add related keyphrase","wordpress-seo")}),(0,f.jsxs)(_.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(_s,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...l}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})};var Tr=s(8119),Rr=s(4369),Lr=s(4289);const Ir=({store:e="yoast-seo/editor",location:s="sidebar",inEditorIntro:o=!1})=>{const a="black-friday-promotion",l=(0,t.useSelect)(t=>t(e).getIsPremium(),[e]),c=(0,t.useSelect)(t=>t(e).selectLinkParams(),[e]),d=(0,t.useSelect)(t=>t(e).isPromotionActive(a),[e]),u=(0,t.useSelect)(t=>t(e).getIsWooCommerceActive(),[e]),p=(0,t.useSelect)(t=>t(e).isAlertDismissed(a),[e]),h=(0,t.useSelect)(t=>t(e).getIsElementorEditor(),[e]),m=(0,n.useCallback)(()=>{(0,t.dispatch)(e).dismissAlert(a)},[e,a]),g=(0,r.addQueryArgs)("https://yoa.st/black-friday-sale",c),y=(0,_.useSvgAria)();return l||!d||p?null:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)("div",{className:B()(o?"yst-mx-0 yst-mt-3":["sidebar"!==s||h?"yst-mx-4":"yst-mx-0","yst-mt-6"],"yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-relative yst-shadow-sm",u?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,f.jsxs)(_.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,i.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,f.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:m,children:[(0,f.jsx)(Tr.A,{className:"yst-w-4 yst-text-slate-400 yst-shrink-0 yst--mt-0.5"}),(0,f.jsx)("div",{className:"yst-sr-only",children:(0,i.__)("Dismiss","wordpress-seo")})]}),(0,f.jsxs)("div",{className:B()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,f.jsxs)("div",{className:u?"yst-text-woo-light":"yst-text-primary-500",children:[(0,f.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,i.__)("30% OFF","wordpress-seo")}),(0,f.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:u?(0,f.jsxs)(f.Fragment,{children:["Yoast WooCommerce SEO ",(0,f.jsx)(ks,{className:"yst-w-4 yst-scale-x-[-1]",...y})]}):(0,f.jsxs)(f.Fragment,{children:[" Yoast SEO Premium ",(0,f.jsx)(Lr.h,{className:"yst-w-4",...y})]})})]}),(0,f.jsx)("div",{className:"yst-flex yst-items-end",children:(0,f.jsxs)(_.Button,{as:"a",className:B()("sidebar"===s?"yst-w-full":"yst-w-[140px]","yst-flex yst-gap-1 yst-w-[140px] yst-h-7 yst-mt-4"),variant:"upsell",href:g,target:"_blank",rel:"noreferrer",children:[(0,i.__)("Buy now!","wordpress-seo"),(0,f.jsx)(Rr.A,{className:"yst-w-4 rtl:yst-rotate-180",...y})]})})]})]})})};function Ar(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}Ir.propTypes={store:m().string,location:m().oneOf(["sidebar","metabox"]),inEditorIntro:m().bool};const Pr=()=>{const{editorMode:e,activeAIButtonId:s}=(0,t.useSelect)(e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()}),[]),{setMarkerStatus:r}=(0,t.useDispatch)("yoast-seo/editor");(0,n.useEffect)(()=>(r("visual"===e&&s||"text"===e?"disabled":"enabled"),()=>{r("disabled")}),[e,s])};var Nr=s(3301);const Mr=(0,O.compose)([(0,t.withDispatch)(e=>{const{setFeatureModalStatus:t}=e(Nr.bw);return{setFeatureModalStatus:t}})])(({location:e,setFeatureModalStatus:s})=>{const r=(0,n.useCallback)(()=>{s(Nr.Qo.idle)},[s]),o=(0,t.useSelect)(e=>e(Nr.bw).selectIsMinPostsMet(),[]),a="yoast-content-planner-min-posts-notice-"+e;return(0,f.jsx)(_.Root,{children:(0,f.jsxs)("div",{className:B()("yst-p-4","metabox"===e&&"yst-flex yst-items-center yst-gap-3"),children:[(0,f.jsx)(_.Button,{variant:"ai-secondary",onClick:r,disabled:!o,"aria-describedby":o?null:a,className:"sidebar"===e?"yst-w-full":"",children:(0,i.__)("Get content suggestions","wordpress-seo")}),!o&&(0,f.jsx)("span",{id:a,className:B()("yst-text-sm yst-text-slate-500 yst-italic","sidebar"===e&&"yst-flex yst-mt-1 yst-justify-center"),children:(0,i.__)("Available after 5 published posts","wordpress-seo")})]})})});var Or=s(6692);const Fr=({withPromptForContentSuggestions:e,children:t})=>(0,f.jsxs)("div",{className:"yst-px-4 yst-pt-4",children:[(0,f.jsx)(Or.h,{className:"yst-w-14 yst-text-primary-500"}),t,(0,f.jsx)("p",{className:"yst-text-slate-600 yst-mb-0 yst-mt-3",children:e?(0,i.__)("Optimize your content for discovery or get new content suggestions.","wordpress-seo"):(0,i.__)("Optimize your content for discovery.","wordpress-seo")})]}),Dr=(qr=Ir,e=>!(()=>{var e,s;const r=(0,t.select)("yoast-seo/editor").getIsPremium(),o=(0,t.select)("yoast-seo/editor").getWarningMessage();return(r&&null!==(e=null===(s=(0,t.select)("yoast-seo-premium/editor"))||void 0===s?void 0:s.getMetaboxWarning())&&void 0!==e?e:[]).length>0||o.length>0})()&&(0,f.jsx)(qr,{...e}));var qr;function $r({settings:e}){const{isTerm:s,isPost:r,isAiFeatureActive:o}=(0,t.useSelect)(e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isPost:"post"===e("yoast-seo/editor").getPostType(),isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive")}),[]),a=Ar();return a&&Pr(),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastMetabox",children:[(0,f.jsx)(Ts,{renderPriority:0,children:(0,f.jsx)(ts,{})},"warning"),a?(0,f.jsx)(Ts,{renderPriority:1,children:(0,f.jsx)(Fr,{withPromptForContentSuggestions:o&&r,children:(0,f.jsx)(Dr,{location:"metabox",inEditorIntro:!0})})},"editor-intro"):(0,f.jsx)(Ts,{renderPriority:1,children:(0,f.jsx)(Dr,{location:"metabox"})},"time-constrained-notification"),r&&a&&o&&(0,f.jsx)(Ts,{renderPriority:2,children:(0,f.jsx)(Mr,{location:"metabox"})},"content-planner"),e.isKeywordAnalysisActive&&(0,f.jsxs)(Ts,{renderPriority:8,children:[(0,f.jsx)(Bt.KeywordInput,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,f.jsx)(v.Fill,{name:"YoastRelatedKeyphrases",children:(0,f.jsx)(Sr,{})})]},"keyword-input"),(0,f.jsx)(Ts,{renderPriority:9,children:(0,f.jsx)(os,{id:"yoast-snippet-editor-metabox",title:(0,i.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,f.jsx)(es,{hasPaperStyle:!1})})},"search-appearance"),e.isContentAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:10,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:20,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo-analysis"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Er,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ts,{renderPriority:23,children:(0,f.jsx)($t,{location:"metabox"})},"wincher-seo-performance"),e.shouldUpsell&&!s&&(0,f.jsx)(Ts,{renderPriority:25,children:(0,f.jsx)(Cs,{})},"internal-linking-suggestions-upsell"),e.isCornerstoneActive&&(0,f.jsx)(Ts,{renderPriority:30,children:(0,f.jsx)(zt,{})},"cornerstone"),e.displayAdvancedTab&&(0,f.jsx)(Ts,{renderPriority:40,children:(0,f.jsx)(os,{id:"collapsible-advanced-settings",title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(Os,{})})},"advanced"),e.displaySchemaSettings&&(0,f.jsx)(Ts,{renderPriority:50,children:(0,f.jsx)(vr,{})},"schema"),a&&(0,f.jsx)(Ts,{renderPriority:24,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),(0,f.jsx)(Ts,{renderPriority:-1,children:(0,f.jsx)(ar,{target:"wpseo-section-social"})},"social"),e.isInsightsEnabled&&(0,f.jsx)(Ts,{renderPriority:52,children:(0,f.jsx)(vs,{location:"metabox"})},"insights")]})})}$r.propTypes={settings:m().object.isRequired};const Br=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})])($r);function Ur({target:e,store:t,theme:s}){return(0,f.jsxs)(R,{target:e,children:[(0,f.jsx)(M,{store:t,theme:s}),(0,f.jsx)(Br,{store:t,theme:s})]})}Ur.propTypes={target:m().string.isRequired,store:m().object.isRequired,theme:m().object.isRequired};const zr=({error:e})=>{const s=(0,n.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/sidebar-error-support"),[]),o=(0,t.useSelect)(e=>e("yoast-seo/editor").getPreference("isRtl",!1),[]);return(0,f.jsx)(_.Root,{context:{isRtl:o},children:(0,f.jsx)(j.xP,{error:e,children:(0,f.jsx)(j.xP.VerticalButtons,{supportLink:r,handleRefreshClick:s})})})};function Wr({theme:e}){return(0,f.jsx)(N,{theme:e,location:"sidebar",children:(0,f.jsx)(_.ErrorBoundary,{FallbackComponent:zr,children:(0,f.jsx)(v.Slot,{name:"YoastSidebar",children:e=>k(e)})})})}function Hr({score:e,label:t,scoreValue:s=""}){return(0,f.jsxs)("div",{className:"yoast-analysis-check",children:[(0,f.jsx)(S.SvgIcon,{...T(e)}),(0,f.jsxs)("span",{children:[" ",t," ",s&&(0,f.jsx)("strong",{children:s})]})]})}function Kr({checklist:e,onClick:t}){const s=e.every(e=>"good"===e.score);return(0,f.jsxs)(n.Fragment,{children:[e.map(e=>(0,f.jsx)(Hr,{...e},e.label)),(0,f.jsx)("br",{}),!s&&(0,f.jsx)(_.Root,{children:(0,f.jsx)(_.Button,{variant:"secondary",size:"small",onClick:t,children:(0,i.__)("Improve your post with Yoast SEO","wordpress-seo")})})]})}function Yr(e){return(0,u.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,i.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,i.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,i.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,i.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,i.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(E.interpreters.scoreToRating(e))}function Vr(e,t){const{isKeywordAnalysisActive:s}=t.getPreferences();if(s){const s=Yr(t.getReadabilityResults().overallScore);e.push({label:(0,i.__)("Readability analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function Gr(e,t){const{isContentAnalysisActive:s}=t.getPreferences();if(s){const s=Yr(t.getResultsForFocusKeyword().overallScore),r=p().isPremium;e.push({label:r?(0,i.__)("Premium SEO analysis:","wordpress-seo"):(0,i.__)("SEO analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function Zr(e,t){const{isInclusiveLanguageAnalysisActive:s}=t.getPreferences();if(s){const s=Yr(t.getInclusiveLanguageResults().overallScore);e.push({label:(0,i.__)("Inclusive language:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderInclusiveLanguageText})}}zr.propTypes={error:m().object.isRequired},Hr.propTypes={score:h.string.isRequired,label:h.string.isRequired,scoreValue:h.string},Kr.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired};const Qr=(0,O.compose)([(0,t.withSelect)(function(e){const t=e("yoast-seo/editor"),s=[];return Gr(s,t),Vr(s,t),Zr(s,t),s.push(...Object.values(t.getChecklistItems())),{checklist:s}}),(0,t.withDispatch)(function(e){const{openGeneralSidebar:t}=e("core/edit-post");return{onClick:()=>{t("yoast-seo/seo-sidebar")}}})])(Kr),Xr=(0,O.compose)([(0,t.withSelect)(e=>{const t=e("yoast-seo/editor"),s=Yr(t.getResultsForFocusKeyword().overallScore),r=Yr(t.getReadabilityResults().overallScore),{isKeywordAnalysisActive:o,isContentAnalysisActive:n}=t.getPreferences();let i,a;switch(r.className){case"good":i=C.colors.$color_good;break;case"ok":i=C.colors.$color_ok;break;default:i=C.colors.$color_bad}switch(s.className){case"good":a=C.colors.$color_good;break;case"ok":a=C.colors.$color_ok;break;default:a=C.colors.$color_bad}return{readabilityScoreColor:i,seoScoreColor:a,isKeywordAnalysisActive:o,isContentAnalysisActive:n}})])(b);var Jr;function eo(){return eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},eo.apply(null,arguments)}const to=e=>F.createElement("svg",eo({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1600 1600"},e),Jr||(Jr=F.createElement("g",{fill:"none",fillRule:"evenodd"},F.createElement("path",{fill:"#1877f2",d:"M1600 800a800 800 0 1 0-925 790v-559H472V800h203V624c0-201 119-311 302-311 88 0 179 15 179 15v197h-101c-99 0-130 62-130 125v150h222l-36 231H925v559a800 800 0 0 0 675-790"}),F.createElement("path",{fill:"#fff",d:"M1147 800H925V650c0-63 31-125 130-125h101V328s-91-15-179-15c-183 0-302 110-302 311v176H472v231h203v559a806 806 0 0 0 250 0v-559h186z"}))));var so;function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},ro.apply(null,arguments)}const oo=e=>F.createElement("svg",ro({xmlns:"http://www.w3.org/2000/svg",fill:"current",viewBox:"0 0 1200 1227"},e),so||(so=F.createElement("path",{d:"M714.163 519.284 1160.89 0h-105.86L667.137 450.887 357.328 0H0l468.492 681.821L0 1226.37h105.866l409.625-476.152 327.181 476.152H1200L714.137 519.284h.026ZM569.165 687.828l-47.468-67.894-377.686-540.24h162.604l304.797 435.991 47.468 67.894 396.2 566.721H892.476L569.165 687.854v-.026Z"})));function no({permalink:e}){const t=encodeURI(e);return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)("div",{children:(0,i.__)("Share your post!","wordpress-seo")}),(0,f.jsxs)("ul",{className:"yoast-seo-social-share-buttons",children:[(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+t,target:"_blank",rel:"noopener noreferrer",children:[(0,f.jsx)(to,{}),(0,i.__)("Facebook","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})}),(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"https://twitter.com/share?url="+t,target:"_blank",rel:"noopener noreferrer",className:"x-share",children:[(0,f.jsx)(oo,{}),(0,i.__)("X","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,i.__)("(Opens in a new browser tab)","wordpress-seo")})]})})]})]})}no.propTypes={permalink:m().string.isRequired};const io=(0,O.compose)([(0,t.withSelect)(e=>({permalink:e("core/editor").getPermalink()}))])(no),ao=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))});var lo=s(2619),co=s(1480);function uo({isSeoDataDefault:e}){const s=(0,t.select)("yoast-seo/editor").getPostType(),r=(0,n.useMemo)(()=>(null==e?void 0:e.isAllTitlesDefault)||!1,[e]),o=(0,n.useMemo)(()=>(null==e?void 0:e.isAllDescriptionsDefault)||!1,[e]),a=(0,n.useMemo)(()=>"post"===s&&(r||o),[s,r,o]),l=(0,n.useMemo)(()=>r&&o?(0,i.__)("custom SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("custom SEO titles","wordpress-seo"):o?(0,i.__)("custom meta descriptions","wordpress-seo"):void 0,[r,o]),c=(0,n.useMemo)(()=>r&&o?(0,i.__)("quick optimized SEO titles and meta descriptions","wordpress-seo"):r?(0,i.__)("quick optimized SEO titles","wordpress-seo"):o?(0,i.__)("quick optimized meta descriptions","wordpress-seo"):void 0,[r,o]),d=(0,n.useMemo)(()=>(0,i.sprintf)(/* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */ /* translators: %1$s expands to "custom SEO titles" or "custom meta descriptions" or both. */
(0,i.__)("Stand out in the search results and attract more visitors by adding %1$s.","wordpress-seo"),l),[l]),u=(0,n.useMemo)(()=>(0,De.x)((0,i.sprintf)(
/* translators: %1$s, %2$s expands to strong tags. %3$s, %4$s expands to emphasis tags.
  	%5$s expands to "quick optimized SEO titles" or "quick optimized meta descriptions" or both */
/* translators: %1$s, %2$s expands to strong tags. %3$s, %4$s expands to emphasis tags.
  	%5$s expands to "quick optimized SEO titles" or "quick optimized meta descriptions" or both */
(0,i.__)("%1$sPro tip%2$s: Use %3$sAI Generate%4$s for %5$s.","wordpress-seo"),"<strong>","</strong>","<em>","</em>",c),{strong:(0,f.jsx)("strong",{}),em:(0,f.jsx)("em",{})}),[c]),p=(0,n.useMemo)(()=>r?o?[]:(0,lo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"title"}):[],[r,o]),h=(0,n.useMemo)(()=>o?(0,lo.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"description"}):[],[r,o]),m=(0,co.Z)(!0),g=(0,n.useCallback)(()=>{m()},[m]);return a&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-1 yst-mb-[-25px]",children:[(0,f.jsx)(ao,{className:"yst-w-4 yst-h-4 yst-text-amber-500"}),(0,f.jsx)("h4",{children:(0,i.__)("Default SEO data detected","wordpress-seo")})]}),(0,f.jsx)("p",{children:d}),p.length+h.length>0&&(0,f.jsx)("p",{children:u}),(0,f.jsx)(v.Slot,{name:"yoast.replacementVariableEditor.additionalButtons.yoast-google-preview-pre-publish"}),p.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-title-${t}`)),h.map((e,t)=>(0,f.jsx)(n.Fragment,{children:e},`additional-button-pre-publish-sidebar-description-${t}`)),(0,f.jsx)(_.Root,{children:(0,f.jsx)(_.Button,{variant:"secondary",size:"small",className:"yst-mt-2",onClick:g,children:(0,i.__)("Write custom SEO data","wordpress-seo")})})]})}function po({checklist:e,onClick:t,isSeoDataDefault:s}){let r;return r=e.every(e=>"good"===e.score)?(0,i.__)("We've analyzed your post. Everything looks good. Well done!","wordpress-seo"):(0,i.__)("We've analyzed your post. There is still room for improvement!","wordpress-seo"),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(c.LocationProvider,{value:"pre-publish",children:[(0,f.jsx)("p",{children:r}),(0,f.jsx)(Kr,{checklist:e,onClick:t}),(0,f.jsx)(uo,{isSeoDataDefault:s})]})})}function ho(e){const{isRecentTitlesDefault:t,isRecentDescriptionsDefault:s}=e.getPreferences(),r=e.getSnippetEditorData(),o=e.getSeoTitleTemplate(),n=e.getSeoDescriptionTemplate(),i=r.title.trim()===o.trim(),a=r.description.trim()===n.trim();return{isAllTitlesDefault:t&&i,isAllDescriptionsDefault:s&&a}}uo.propTypes={isSeoDataDefault:m().object.isRequired},po.propTypes={checklist:m().array.isRequired,onClick:m().func.isRequired,isSeoDataDefault:m().object.isRequired};const mo=(0,O.compose)([(0,t.withSelect)(function(e){const t=e("yoast-seo/editor"),s=[];return function(e,t){t.getFocusKeyphrase()||e.push({label:(0,i.__)("No focus keyword was entered","wordpress-seo"),score:"bad"})}(s,t),Gr(s,t),Vr(s,t),Zr(s,t),s.push(...Object.values(t.getChecklistItems())),{checklist:s,isSeoDataDefault:ho(t)}}),(0,t.withDispatch)(function(e){const{closePublishSidebar:t,openGeneralSidebar:s}=e("core/edit-post");return{onClick:()=>{t(),s("yoast-seo/seo-sidebar")}}})])(po),go=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{isAlertDismissed:s}=e(t.store||"yoast-seo/editor");return{isAlertDismissed:s(t.alertKey)}}),(0,t.withDispatch)((e,t)=>{const{dismissAlert:s}=e(t.store||"yoast-seo/editor");return{onDismissed:()=>s(t.alertKey)}})]),yo=({children:e,id:t,hasIcon:s=!0,title:r,image:o=null,isAlertDismissed:n,onDismissed:a,inEditorIntro:l=!1})=>n?null:(0,f.jsxs)("div",{id:t,className:B()("notice-yoast yoast is-dismissible yoast-webinar-dashboard yoast-general-page-notices",l&&"yst-mt-3"),children:[(0,f.jsxs)("div",{className:"notice-yoast__container",children:[(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"notice-yoast__header",children:[s&&(0,f.jsx)("span",{className:"yoast-icon"}),(0,f.jsx)("h2",{className:"notice-yoast__header-heading yoast-notice-migrated-header",children:r})]}),(0,f.jsx)("div",{className:"notice-yoast-content",children:(0,f.jsx)("p",{children:e})})]}),o&&(0,f.jsx)(o,{height:"60"})]}),(0,f.jsx)("button",{type:"button",className:"notice-dismiss",onClick:a,children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,i.__)("Dismiss this notice.","wordpress-seo")})})]});yo.propTypes={children:m().node.isRequired,id:m().string.isRequired,hasIcon:m().bool,title:m().any.isRequired,image:m().elementType,isAlertDismissed:m().bool.isRequired,onDismissed:m().func.isRequired,inEditorIntro:m().bool};const fo=go(yo),xo="trustpilot-review-notification",wo="yoast-seo/editor",bo=()=>{const e=(0,t.useSelect)(e=>e(wo).getIsPremium(),[]),s=(0,t.useSelect)(e=>e(wo).isAlertDismissed(xo),[]),{overallScore:r}=(0,t.useSelect)(e=>e(wo).getResultsForFocusKeyword(),[]),{dismissAlert:o}=(0,t.useDispatch)(wo),i=(0,n.useCallback)(()=>o(xo),[o]),[a,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{var e;"good"===(null===(e=Yr(r))||void 0===e?void 0:e.className)&&l(!0)},[r]),{shouldShow:!e&&!s&&a,dismiss:i}},vo=(0,W.makeOutboundLink)(),_o=e=>{const{shouldShow:s,dismiss:r}=bo(),{locationContext:o}=(0,c.useRootContext)(),n=(0,t.useSelect)(e=>e(wo).selectLink("https://yoa.st/trustpilot-review",{context:o}),[o]);return(0,f.jsxs)(yo,{alertKey:xo,store:wo,id:xo,title:(0,i.__)("Show Yoast SEO some love!","wordpress-seo"),hasIcon:!1,isAlertDismissed:!s,onDismissed:r,...e,children:[(0,i.__)("Happy with the plugin?","wordpress-seo")," ",(0,f.jsx)(vo,{href:n,rel:"noopener noreferrer",children:(0,i.__)("Leave a quick review","wordpress-seo")}),"."]})};var ko,jo,So,Co,Eo,To,Ro,Lo,Io,Ao,Po,No,Mo,Oo,Fo,Do,qo,$o,Bo,Uo,zo,Wo,Ho,Ko,Yo,Vo,Go,Zo,Qo,Xo,Jo,en,tn,sn,rn,on,nn,an,ln,cn,dn,un,pn,hn,mn,gn,yn;function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},fn.apply(null,arguments)}const xn=e=>F.createElement("svg",fn({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 448 360"},e),ko||(ko=F.createElement("circle",{cx:226,cy:211,r:149,fill:"#f0ecf0"})),jo||(jo=F.createElement("path",{fill:"#fbd2a6",d:"M173.53 189.38s-35.47-5.3-41.78-11c-9.39-24.93-29.61-48-35.47-66.21-.71-2.24 3.72-11.39 3.53-15.41s-5.34-11.64-5.23-14-.09-15.27-.09-15.27l-4.75-.72s-5.13 6.07-3.56 9.87c-1.73-4.19 4.3 7.93.5 9.35 0 0-6-5.94-11.76-8.27s-19.57-3.65-19.57-3.65L43.19 73l-4.42.6L31 69.7l-2.85 5.12 7.53 5.29L40.86 92l17.19 10.2 10.2 10.56 9.86 3.56s26.49 79.67 45 92c17 11.33 37.23 15.92 37.23 15.92z"})),So||(So=F.createElement("path",{fill:"#a4286a",d:"M270.52 345.13c2.76-14.59 15.94-35.73 30.24-54.58 16.22-21.39 14-79.66-33.19-91.46-17.3-4.32-52.25-1-59.85-3.41C186.54 189 170 187 168 190.17c-5 10.51-7.73 27.81-5.51 36.26 1.18 4.73 3.54 5.91 20.49 13.4-5.12 15-16.35 26.3-22.86 37s7.88 27.2 7.1 33.51c-.48 3.8-4.26 21.13-7.18 34.25a149.47 149.47 0 0 0 110.3 8.66 25.66 25.66 0 0 1 .18-8.12z"})),Co||(Co=F.createElement("path",{fill:"#9a5815",d:"M206.76 66.43c-5 14.4-1.42 25.67-3.93 40.74-10 60.34-24.08 43.92-31.44 93.6 7.24-14.19 14.32-15.82 20.63-23.11-.83 3.09-10.25 13.75-8.05 34.81 9.85-8.51 6.35-8.75 11.86-8.54.36 3.25 3.53 3.22-3.59 10.53 2.52.69 17.42-14.32 20.16-12.66s0 5.72-6 7.76c2.15 2.2 30.47-3.87 43.81-14.71 4.93-4 10-13.16 13.38-18.2 7.17-10.62 12.38-24.77 17.71-36.6 8.94-19.87 15.09-39.34 16.11-61.31.53-10.44-3.41-18.44-4.41-28.86-2.57-27.8-67.63-37.26-86.24 16.55z"})),Eo||(Eo=F.createElement("path",{fill:"#efb17c",d:"M277.74 179.06c.62-.79 1.24-1.59 1.84-2.39-.85 2.59-1.52 3.73-1.84 2.39z"})),To||(To=F.createElement("path",{fill:"#fbd2a6",d:"M216.1 206.72c3.69-5.42 8.28-3.35 15.57-8.28 3.76-3.06 1.57-9.46 1.77-11.82 18.25 4.56 37.38-1.18 49.07-16 .62 5.16-2.77 22.27-.2 27 4.73 8.67 13.4 18.92 13.4 18.92-35.47-2.76-63.45 39-89.86 44.54 5.52-28.74-2.36-35.84 10.25-54.36z"})),Ro||(Ro=F.createElement("path",{fill:"#f6b488",d:"m235.21 167.9 53.21-25.23s-3.65 24-6.5 32.72c-64.05 62.66-46.47-7.33-46.71-7.49z"})),Lo||(Lo=F.createElement("path",{fill:"#fbd2a6",d:"M226.86 50.64C215 59.31 206.37 93.21 204 95.57c-19.46 19.47-3.59 41.39-3.94 51.24-.2 5.52-4.14 25.42 5.72 29.36 22.22 8.89 60-3.48 67.19-12.61 13.28-16.75 40.89-94.78 17.74-108.19-7.92-4.58-42.78-20.18-63.85-4.73z"})),Io||(Io=F.createElement("path",{fill:"#e5766c",d:"M243.69 143.66c-10.7-6.16-8.56-6.73-19.76-12.71-3.86-2.07-3.94.64-6.32 0-2.91-.79-1.39-2.74-5.37-3.48-6.52-1.21-3.67 3.63-3.15 6 1.32 6.15-8.17 17.3 3.26 21.42 12.65 4.55 21.38-9.41 31.34-11.23z"})),Ao||(Ao=F.createElement("path",{fill:"#fff",d:"M240.68 143.9c-11.49-5.53-11.65-8.17-24.64-11.69-8.6-2.32-5.53 1-5.69 4.42-.2 4.16-1.26 9.87 4.9 12.66 9 4.09 18.16-6.02 25.43-5.39zm.7-40.9c-.16 1.26-.06 4.9 5.46 8.25 11.43-4.73 16.36-2.56 17-3.33 1.48-1.76-2-8.87-7.88-9.85-5.58-.94-14.14 1.24-14.58 4.93z"})),Po||(Po=F.createElement("path",{fill:"#000001",d:"M263.53 108.19c-4.32-4.33-6.85-6.24-12.26-8.21-2.77-1-6.18.18-8.65 1.67a3.65 3.65 0 0 0-1.24 1.23h-.12a3.73 3.73 0 0 1 1-1.52 12.53 12.53 0 0 1 11.93-3c4.73 1 9.43 4.63 9.42 9.82z"})),No||(No=F.createElement("circle",{cx:254.13,cy:104.05,r:4.19,fill:"#000001"})),Mo||(Mo=F.createElement("path",{fill:"#fff",d:"M225.26 99.22c-.29 1-6.6 3.45-10.92 1.48-1.15-3.24-5-6.43-5.25-6.71-.5-2.86 5.55-8 10.06-6.3a10.21 10.21 0 0 1 6.11 11.53z"})),Oo||(Oo=F.createElement("path",{fill:"#000001",d:"M209.29 94.21c-.19-2.34 1.84-4.1 3.65-5.2 7-3.87 13.18 3 12.43 10h-.12c-.14-4-2.38-8.44-6.47-9.11a3.19 3.19 0 0 0-2.42.31c-1.37.85-2.38 2-3.89 2.56-1 .45-1.92.42-3 1.4h-.22z"})),Fo||(Fo=F.createElement("circle",{cx:219.55,cy:95.28,r:4,fill:"#000001"})),Do||(Do=F.createElement("path",{fill:"#efb17c",d:"M218.66 120.27a27.32 27.32 0 0 0 4.54 3.45c-2.29-.72-4.28-.69-6.32-2.27-2.53-2-3.39-5.16-.73-7.72 10.24-9.82 12.56-13.82 14.77-24.42-1 12.37-6 17.77-10.63 23.18-2.53 2.97-4.68 5.06-1.63 7.78z"})),qo||(qo=F.createElement("path",{fill:"#a57c52",d:"M231.22 69.91c-.67-3.41-8.78-2.83-11.06-1.93-3.48 1.39-6.08 5.22-7.13 8.53 2.9-4.3 6.74-8.12 12.46-6 1.16.42 3.18 2.35 4.48 1.85s1.03-2.2 1.25-2.45zm32.16 8.56c-2.75-1.66-12.24-5.08-12.18.82 2.56.24 5-.19 7.64.95 11.22 4.76 12.77 17.61 12.85 17.86.2-.53.1 1.26.23.7-.02.2.95-12.12-8.54-20.33z"})),$o||($o=F.createElement("path",{fill:"#fbd2a6",d:"M53.43 250.73c6.29 0-.6-.17 7.34 0 1.89.05-2.38-.7 0-.69 4.54-4.2 12.48-.74 20.6-2.45 4.55.35 3.93 1.35 5.59 4.19 4.89 8.38 4.78 14.21 14 19.56 16.42 8.38 66 12.92 88.49 18.86 5.52.83 42.64-20.15 61-23.75 6.51 10.74 11.46 28.68 8.39 34.93-6.54 13.3-57.07 25.4-75.91 25.15C156.47 326.18 94 294 92.2 293c-.94-.57.7-.7-7.68 0s-10.15.72-17.47-1.4c-3-.87-4.61-1.33-6.33-3.54-2 .22-3.39.2-4.78-1-3.15-2.74-4.84-6.61-2.73-10.06h-.12c-3.35-2.48-6.54-7.69-3.08-11.72 1-1.18 6.06-1.94 7.77-2.28-1.58-.29-6.37.19-7.49-.72-3.06-2.5-4.96-11.55 3.14-11.55z"})),Bo||(Bo=F.createElement("path",{fill:"#a4286a",d:"M303.22 237.52c-9.87-11.88-41.59 8.19-47.8 12.34s-14.89 17.95-14.89 17.95c6 9.43 8.36 31 5.65 46.34l30.51-3s18-15.62 22.59-28.7 6.3-42.54 6.3-42.54"})),Uo||(Uo=F.createElement("path",{fill:"#cb9833",d:"M278.63 31.67c-6.08 0-22.91 4.07-22.93 12.91 0 11 47.9 38.38 16.14 85.85 10.21-.79 10.79-8.12 14.92-14.93-3.66 77-49.38 93.58-40.51 142.25 7.68-25.81 20.3-11.62 38.13-33.84 3.45 4.88 9 18.28-9.46 33.78 50-31.26 57.31-56.6 51.92-95C319.93 113.53 348.7 42 278.63 31.67z"})),zo||(zo=F.createElement("path",{fill:"#fbd2a6",d:"M283.64 126.83c-2.42 9.67-8 15.76-1.48 16.46A21.26 21.26 0 0 0 302 132.6c5.17-8.52 3.93-16.44-2.46-18s-13.48 2.56-15.9 12.23z"})),Wo||(Wo=F.createElement("path",{fill:"#efb17c",d:"M38 73.45c1.92 2 4.25 9.21 6.32 10.91 2.25 1.85 5.71 2.12 8.1 4.45 3.66-2 6-8.72 10-9.31-2.59 1.31-4.42 3.5-6.93 4.88-1.42.8-3 1.31-4.38 2.25-2.16-1.46-4.27-1.77-6.26-3.38-2.52-2.02-5.31-8-6.85-9.8z"})),Ho||(Ho=F.createElement("path",{fill:"#efb17c",d:"M39 74.4c4.83 1.1 12.52 6.44 15.89 10-3.22-1.34-14.73-6.15-15.89-10zm.62-1.5c6.71-.79 18 1.54 23.29 5.9-3.85-.2-5.42-1.48-9-2.94-4.08-1.69-8.83-2.03-14.29-2.96zm46.43 14.58c-3.72-1.32-10.52-1.13-13.22 3.52 2-1.16 1.84-2.11 4.18-1.72-3.81-4.15 8.16-.74 11.6-.24m-2.78 13.15c.56-3.29-8-7.81-10.58-9.17-6.25-3.29-12.16 1.36-19.33-4.53 5.94 6.1 14.23 2.5 19.55 5.76 3.06 1.88 8.65 6.09 9.35 9.38-.23-.4 1.29-1.44 1.01-1.44z"})),Ko||(Ko=F.createElement("circle",{cx:38.13,cy:30.03,r:3.14,fill:"#b89ac8"})),Yo||(Yo=F.createElement("circle",{cx:60.26,cy:39.96,r:3.14,fill:"#e31e0c"})),Vo||(Vo=F.createElement("circle",{cx:50.29,cy:25.63,r:3.14,fill:"#3baa45"})),Go||(Go=F.createElement("circle",{cx:22.19,cy:19.21,r:3.14,fill:"#2ca9e1"})),Zo||(Zo=F.createElement("circle",{cx:22.19,cy:30.03,r:3.14,fill:"#e31e0c"})),Qo||(Qo=F.createElement("circle",{cx:26.86,cy:8.28,r:3.14,fill:"#3baa45"})),Xo||(Xo=F.createElement("circle",{cx:49.32,cy:39.99,r:3.14,fill:"#e31e0c"})),Jo||(Jo=F.createElement("circle",{cx:63.86,cy:59.52,r:3.14,fill:"#f8ad39"})),en||(en=F.createElement("circle",{cx:50.88,cy:50.72,r:3.14,fill:"#3baa45"})),tn||(tn=F.createElement("circle",{cx:63.47,cy:76.17,r:3.14,fill:"#e31e0c"})),sn||(sn=F.createElement("circle",{cx:38.34,cy:14.83,r:3.14,fill:"#2ca9e1"})),rn||(rn=F.createElement("circle",{cx:44.44,cy:5.92,r:3.14,fill:"#f8ad39"})),on||(on=F.createElement("circle",{cx:57.42,cy:10.24,r:3.14,fill:"#e31e0c"})),nn||(nn=F.createElement("circle",{cx:66.81,cy:12.4,r:3.14,fill:"#2ca9e1"})),an||(an=F.createElement("circle",{cx:77.95,cy:5.14,r:3.14,fill:"#b89ac8"})),ln||(ln=F.createElement("circle",{cx:77.95,cy:30.34,r:3.14,fill:"#e31e0c"})),cn||(cn=F.createElement("circle",{cx:80.97,cy:16.55,r:3.14,fill:"#f8ad39"})),dn||(dn=F.createElement("circle",{cx:62.96,cy:27.27,r:3.14,fill:"#3baa45"})),un||(un=F.createElement("circle",{cx:75.36,cy:48.67,r:3.14,fill:"#2ca9e1"})),pn||(pn=F.createElement("circle",{cx:76.11,cy:65.31,r:3.14,fill:"#3baa45"})),hn||(hn=F.createElement("path",{fill:"#71b026",d:"M78.58 178.43C54.36 167.26 32 198.93 5 198.93c19.56 20.49 63.53 1.52 69 15.5 1.48-14.01 4.11-30.9 4.58-36z"})),mn||(mn=F.createElement("path",{fill:"#074a67",d:"M67.75 251.08c0-4.65 10.13-72.65 10.13-72.65h2.8l-9.09 72.3z"})),gn||(gn=F.createElement("ellipse",{cx:255.38,cy:103.18,fill:"#fff",rx:1.84,ry:1.77})),yn||(yn=F.createElement("ellipse",{cx:221.24,cy:94.75,fill:"#fff",rx:1.84,ry:1.77}))),wn=({store:e="yoast-seo/editor",image:s=xn,url:r,...o})=>(0,t.useSelect)(t=>t(e).getIsPremium())?null:(0,f.jsxs)(fo,{alertKey:"webinar-promo-notification",store:e,id:"webinar-promo-notification",title:(0,i.__)("Ready to boost your online visibility?","wordpress-seo"),image:s,url:r,...o,children:[(0,De.x)((0,i.sprintf)(/* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */ /* translators: 1: bold open tag; 2: "FREE"; 3: bold close tag; 4: "Yoast SEO". */
(0,i.__)("Access our %1$s%2$s%3$s webinars and podcasts to get started with %4$s and build the foundational skills and confidence needed for sustainable success.","wordpress-seo"),"<strong>","FREE","</strong>","Yoast SEO"),{strong:(0,f.jsx)("strong",{})})," ",(0,f.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",children:(0,i.__)("Sign up today!","wordpress-seo")})]});wn.propTypes={store:m().string,image:m().elementType,url:m().string.isRequired};const bn=wn,vn=(e="yoast-seo/editor")=>{const s=(0,t.select)(e).isPromotionActive("black-friday-promotion"),r=(0,t.select)(e).isAlertDismissed("black-friday-promotion");return!s||r},kn=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))}),jn=({id:e,postTypeName:t,children:s,title:r,isOpen:o,open:a,close:l,shouldCloseOnClickOutside:d=!0,showChangesWarning:u=!0,SuffixHeroIcon:p=null})=>(0,f.jsxs)(n.Fragment,{children:[o&&(0,f.jsx)(c.LocationProvider,{value:"modal",children:(0,f.jsxs)(Y,{title:r,onRequestClose:l,additionalClassName:"yoast-collapsible-modal yoast-post-settings-modal",id:"id",shouldCloseOnClickOutside:d,children:[(0,f.jsx)("div",{className:"yoast-content-container",children:(0,f.jsx)("div",{className:"yoast-modal-content",children:s})}),(0,f.jsxs)("div",{className:"yoast-notice-container",children:[(0,f.jsx)("hr",{}),(0,f.jsxs)("div",{className:"yoast-button-container",children:[u&&(0,f.jsx)("p",{children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */
(0,i.sprintf)((0,i.__)("Make sure to save your %s for changes to take effect","wordpress-seo"),t)}),(0,f.jsx)("button",{className:"yoast-button yoast-button--primary yoast-button--post-settings-modal",type:"button",onClick:l,children:/* Translators: %s translates to the Post Label in singular form */ /* Translators: %s translates to the Post Label in singular form */
(0,i.sprintf)((0,i.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,f.jsx)(Z,{id:e+"-open-button",title:r,SuffixHeroIcon:p,suffixIcon:p?null:{size:"20px",icon:"pencil-square"},onClick:a})]});jn.propTypes={id:m().string.isRequired,postTypeName:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,title:m().string.isRequired,isOpen:m().bool.isRequired,open:m().func.isRequired,close:m().func.isRequired,shouldCloseOnClickOutside:m().bool,showChangesWarning:m().bool,SuffixHeroIcon:m().element};const Sn=jn,Cn=(0,O.compose)([(0,t.withSelect)((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:r}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:r(t.id)}}),(0,t.withDispatch)((e,t)=>{const{openEditorModal:s,closeEditorModal:r}=e("yoast-seo/editor");return{open:()=>s(t.id),close:r}})])(Sn),En=y()(kn)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,Tn=({location:e="sidebar"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]),r=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]),o=q();return(0,f.jsx)(Cn,{title:(0,i.__)("Insights","wordpress-seo"),id:`yoast-insights-modal-${e}`,shouldCloseOnClickOutside:!s,showChangesWarning:!1,SuffixHeroIcon:(0,f.jsx)(En,{className:"yst-text-slate-500",...o}),children:(0,f.jsxs)("div",{className:"yoast-insights yoast-modal-content--columns",children:[(0,f.jsx)(hs,{location:e}),(0,f.jsxs)("div",{children:[r&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(ls,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(ns,{}),(0,f.jsx)(ms,{})]}),(0,ss.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(ws,{location:e,name:"YoastTextFormalityMetabox"})]})]})})};Tn.propTypes={location:m().string};const Rn=Tn,Ln=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))});class In{constructor(e){this.refresh=e,this.loaded=!1,this.preloadThreshold=3e3,this.plugins={},this.modifications={},this._registerPlugin=this._registerPlugin.bind(this),this._ready=this._ready.bind(this),this._reloaded=this._reloaded.bind(this),this._registerModification=this._registerModification.bind(this),this._registerAssessment=this._registerAssessment.bind(this),this._applyModifications=this._applyModifications.bind(this),setTimeout(this._pollLoadingPlugins.bind(this),1500)}_registerPlugin(e,t){return(0,u.isString)(e)?(0,u.isUndefined)(t)||(0,u.isObject)(t)?!1===this._validateUniqueness(e)?(console.error("Failed to register plugin. Plugin with name "+e+" already exists"),!1):(this.plugins[e]=t,!0):(console.error("Failed to register plugin "+e+". Expected parameters `options` to be a object."),!1):(console.error("Failed to register plugin. Expected parameter `pluginName` to be a string."),!1)}_ready(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to modify status for plugin "+e+". The plugin was not properly registered."),!1):(this.plugins[e].status="ready",!0):(console.error("Failed to modify status for plugin "+e+". Expected parameter `pluginName` to be a string."),!1)}_reloaded(e){return(0,u.isString)(e)?(0,u.isUndefined)(this.plugins[e])?(console.error("Failed to reload Content Analysis for plugin "+e+". The plugin was not properly registered."),!1):(this.refresh(),!0):(console.error("Failed to reload Content Analysis for "+e+". Expected parameter `pluginName` to be a string."),!1)}_registerModification(e,t,s,r){if(!(0,u.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,u.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,u.isString)(s))return console.error("Failed to register modification for plugin "+s+". Expected parameter `pluginName` to be a string."),!1;if(!1===this._validateOrigin(s))return console.error("Failed to register modification for plugin "+s+". The integration has not finished loading yet."),!1;const o={callable:t,origin:s,priority:(0,u.isNumber)(r)?r:10};return(0,u.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(o),!0}_registerAssessment(e,t,s,r){return(0,u.isString)(t)?(0,u.isObject)(s)?(0,u.isString)(r)?(t=r+"-"+t,e.addAssessment(t,s),!0):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `pluginName` to be a string."),!1):(console.error("Failed to register assessment for plugin "+r+". Expected parameter `assessment` to be a function."),!1):(console.error("Failed to register test for plugin "+r+". Expected parameter `name` to be a string."),!1)}_applyModifications(e,t,s){let r=this.modifications[e];return!(0,u.isArray)(r)||r.length<1||(r=this._stripIllegalModifications(r),r.sort((e,t)=>e.priority-t.priority),(0,u.forEach)(r,function(r){const o=r.callable(t,s);typeof o==typeof t?t=o:console.error("Modification with name "+e+" performed by plugin with name "+r.origin+" was ignored because the data that was returned by it was of a different type than the data we had passed it.")})),t}_pollLoadingPlugins(e){e=(0,u.isUndefined)(e)?0:e,!0===this._allReady()?(this.loaded=!0,this.refresh()):e>=this.preloadThreshold?(this._pollTimeExceeded(),this.loaded=!0,this.refresh()):(e+=50,setTimeout(this._pollLoadingPlugins.bind(this,e),50))}_allReady(){return(0,u.reduce)(this.plugins,function(e,t){return e&&"ready"===t.status},!0)}_pollTimeExceeded(){(0,u.forEach)(this.plugins,function(e,t){(0,u.isUndefined)(e.options)||"ready"===e.options.status||(console.error("Error: Plugin "+t+". did not finish loading in time."),delete this.plugins[t])})}_stripIllegalModifications(e){return(0,u.forEach)(e,(t,s)=>{!1===this._validateOrigin(t.origin)&&delete e[s]}),e}_validateOrigin(e){return"ready"===this.plugins[e].status}_validateUniqueness(e){return(0,u.isUndefined)(this.plugins[e])}}let An=null;const Pn=()=>{if(null===An){const e=(0,t.dispatch)("yoast-seo/editor").runAnalysis;An=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new In(e)}return An},Nn=(e,t,s)=>Pn().loaded?Pn()._applyModifications(e,t,s):t,{stripHTMLTags:Mn}=W.strings,On=(e,s)=>{const r=(0,t.select)("yoast-seo/editor").getSnippetEditorTemplates();""===e.title&&(e.title=r.title),""===e.description&&(e.description=r.description);let o=0;return s.shortenedBaseUrl&&"string"==typeof s.shortenedBaseUrl&&(o=s.shortenedBaseUrl.length),e.url=e.url.replace(/\s+/g,"-"),"-"===e.url[e.url.length-1]&&(e.url=e.url.slice(0,-1)),"-"===e.url[o]&&(e.url=e.url.slice(0,o)+e.url.slice(o+1)),{url:e.url,title:Mn(Nn("data_page_title",e.title)),description:Mn(Nn("data_meta_desc",e.description)),filteredSEOTitle:Mn(Nn("data_page_title",e.filteredSEOTitle))}},Fn=({isLoading:e,onLoad:t,location:s,...r})=>((0,n.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,f.jsx)(Yt,{icon:"eye",hasPaperStyle:r.hasPaperStyle,children:(0,f.jsx)(Wt.SnippetEditor,{...r,descriptionPlaceholder:(0,i.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:On,showCloseButton:!1,idSuffix:s})}));Fn.propTypes={isLoading:m().bool.isRequired,onLoad:m().func.isRequired,hasPaperStyle:m().bool.isRequired,location:m().string.isRequired};const Dn=(0,O.compose)([(0,t.withSelect)(e=>{const{getBaseUrlFromSettings:t,getDateFromSettings:s,getEditorDataImageUrl:r,getFocusKeyphrase:o,getRecommendedReplaceVars:n,getSiteIconUrlFromSettings:i,getSnippetEditorData:a,getSnippetEditorIsLoading:l,getSnippetEditorMode:c,getSnippetEditorWordsToHighlight:d,isCornerstoneContent:u,getContentLocale:p,getSiteName:h,getReplaceVars:m}=e("yoast-seo/editor");return{baseUrl:t(),data:a(),date:s(),faviconSrc:i(),isLoading:l(),keyword:o(),mobileImageSrc:r(),mode:c(),recommendedReplacementVariables:n(),replacementVariables:m(),wordsToHighlight:d(),isCornerstone:u(),locale:p(),siteName:h()}}),(0,t.withDispatch)(e=>{const{updateData:t,switchMode:s,updateAnalysisData:r,loadSnippetEditorData:o}=e("yoast-seo/editor");return{onChange:(e,r)=>{switch(e){case"mode":s(r);break;case"slug":t({slug:r});break;default:t({[e]:r})}},onChangeAnalysisData:r,onLoad:o}}),Ut()])(Fn),qn=y()(Ln)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,$n=()=>{const e=q(),s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]);return(0,f.jsxs)(Cn,{title:(0,i.__)("Search appearance","wordpress-seo"),id:"yoast-search-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(qn,{className:"yst-text-slate-500",...e}),children:[!0===s&&(0,f.jsx)(Dn,{showCloseButton:!1,hasPaperStyle:!1}),!1===s&&(0,f.jsx)(es,{showCloseButton:!1,hasPaperStyle:!1})]})},Bn=F.forwardRef(function(e,t){return F.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),F.createElement("path",{d:"M15 8a3 3 0 10-2.977-2.63l-4.94 2.47a3 3 0 100 4.319l4.94 2.47a3 3 0 10.895-1.789l-4.94-2.47a3.027 3.027 0 000-.74l4.94-2.47C13.456 7.68 14.19 8 15 8z"}))}),Un=y()(S.Collapsible)`
	h2 > button {
		padding-left: 0;
		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);
	}

`,zn=e=>(0,f.jsx)(Un,{hasPadding:!1,hasSeparator:!0,...e}),Wn=y()(Bn)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,Hn=e=>{const{useOpenGraphData:t,useTwitterData:s}=e;if(!t&&!s)return;const r=q();return(0
/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,f.jsxs)(Cn,{title:(0,i.__)("Social media appearance","wordpress-seo"),id:"yoast-social-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(Wn,{className:"yst-text-slate-500",...r}),children:[t&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(sr,{children:(0,i.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(Zs,{}),s&&(0,f.jsx)(tr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below. If you leave these settings untouched, the 'Social media appearance' settings mentioned above will also be applied for sharing on X.","wordpress-seo")})]}),t&&s&&(0,f.jsx)(zn,{title:(0,i.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(er,{})}),!t&&s&&(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(sr,{children:(0,i.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(er,{})]})]})};Hn.propTypes={useOpenGraphData:m().bool.isRequired,useTwitterData:m().bool.isRequired};const Kn=Hn,Yn=({title:e,children:t,prefixIcon:s=null,subTitle:r="",hasBetaBadgeLabel:o=!1,hasNewBadgeLabel:i=!1,buttonId:a=null,renderNewBadgeLabel:l=()=>{},initialIsOpen:c=!1})=>{const[d,u]=(0,n.useState)(c),p=(0,n.useRef)(null);(0,n.useEffect)(()=>{c&&p.current&&p.current.focus()},[]);const h=(0,n.useCallback)(()=>{u(e=>!e)},[u]);return(0,f.jsxs)("div",{className:"yoast components-panel__body "+(d?"is-opened":""),children:[(0,f.jsx)("h2",{className:"components-panel__body-title",children:(0,f.jsxs)("button",{ref:p,onClick:h,className:"components-button components-panel__body-toggle",type:"button",id:a,children:[(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${s&&s.color||""}`},children:s&&(0,f.jsx)(S.SvgIcon,{icon:s.icon,color:s.color,size:s.size})}),!i&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),r&&(0,f.jsx)("div",{className:"yoast-subtitle",children:r})]}),o&&(0,f.jsx)(S.BetaBadge,{})]}),i&&(0,f.jsxs)("div",{className:"yst-flex-grow yst-flex yst-items-center yst-gap-2",children:[(0,f.jsxs)("span",{className:"yst-overflow-x-hidden yst-leading-normal",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),r&&(0,f.jsx)("div",{className:"yoast-subtitle",children:r})]}),l()]}),(0,f.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),d&&t]})},Vn=Yn;function Gn({settings:e}){const s=(({webinarIntroUrl:e})=>{const{shouldShow:t}=bo(),s=(e=>{for(const t of e)if(null!=t&&t.getIsEligible())return t;return null})([{getIsEligible:()=>t,component:_o},{getIsEligible:vn,component:t=>(0,f.jsx)(bn,{hasIcon:!1,image:null,url:e,...t})},{getIsEligible:()=>!0,component:e=>(0,f.jsx)(Ir,{...e})}]);return(null==s?void 0:s.component)||null})({webinarIntroUrl:(0,u.get)(window,"wpseoScriptData.webinarIntroBlockEditorUrl","https://yoa.st/webinar-intro-block-editor")}),{isAiFeatureActive:r,isPost:o}=(0,t.useSelect)(e=>({isAiFeatureActive:e("yoast-seo/editor").getPreference("isAiFeatureActive"),isPost:"post"===e("yoast-seo/editor").getPostType()}),[]),a=Ar();return a&&Pr(),(0,f.jsx)(n.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastSidebar",children:[(0,f.jsx)(Ts,{renderPriority:0,children:(0,f.jsx)(ts,{})},"warning"),(0,f.jsx)(Ts,{renderPriority:1,children:(0,f.jsx)(Fr,{withPromptForContentSuggestions:r&&a&&o,children:s&&(0,f.jsx)(s,{inEditorIntro:!0})})},"editor-intro"),o&&a&&r&&(0,f.jsx)(Ts,{renderPriority:2,children:(0,f.jsx)(Mr,{location:"sidebar"})},"content-planner"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:8,children:(0,f.jsx)(Bt.KeywordInput,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive})},"keyword-input"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:10,children:(0,f.jsx)(n.Fragment,{children:(0,f.jsx)(Bt.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo"),e.isContentAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:20,children:(0,f.jsx)(Bt.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:21,children:(0,f.jsx)(Bt.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(Ts,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Er,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(Ts,{renderPriority:23,children:(0,f.jsx)($t,{location:"sidebar"})}),e.shouldUpsell&&(0,f.jsx)(Ts,{renderPriority:25,children:(0,f.jsx)(Cs,{})},"internal-linking-suggestions-upsell"),(0,f.jsx)(Ts,{renderPriority:26,children:(0,f.jsx)($n,{})},"search-appearance"),(e.useOpenGraphData||e.useTwitterData)&&(0,f.jsx)(Ts,{renderPriority:27,children:(0,f.jsx)(Kn,{useOpenGraphData:e.useOpenGraphData,useTwitterData:e.useTwitterData})},"social-appearance"),e.displaySchemaSettings&&(0,f.jsx)(Ts,{renderPriority:28,children:(0,f.jsx)(Vn,{title:(0,i.__)("Schema","wordpress-seo"),children:(0,f.jsx)(vr,{})})},"schema"),a&&(0,f.jsx)(Ts,{renderPriority:29,children:(0,f.jsx)(Bt.ContentBlocks,{})},"content-blocks"),e.displayAdvancedTab&&(0,f.jsx)(Ts,{renderPriority:30,children:(0,f.jsx)(Vn,{title:(0,i.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(Os,{})})},"advanced"),e.isCornerstoneActive&&(0,f.jsx)(Ts,{renderPriority:31,children:(0,f.jsx)(zt,{})},"cornerstone"),e.isInsightsEnabled&&(0,f.jsx)(Ts,{renderPriority:32,children:(0,f.jsx)(Rn,{location:"sidebar"})})]})})}Yn.propTypes={title:m().string.isRequired,children:m().oneOfType([m().node,m().arrayOf(m().node)]).isRequired,prefixIcon:m().object,subTitle:m().string,hasBetaBadgeLabel:m().bool,hasNewBadgeLabel:m().bool,buttonId:m().string,renderNewBadgeLabel:m().func,initialIsOpen:m().bool},Gn.propTypes={settings:m().object.isRequired};const Zn=(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})(Gn);function Qn({trackAll:e=u.noop,hasTrackedKeyphrases:t=!1}){return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(S.FieldGroup,{label:(0,i.__)("SEO performance","wordpress-seo"),linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,i.__)("Learn more about the SEO performance feature.","wordpress-seo"),wrapperClassName:"yoast-field-group yoast-wincher-post-publish"}),(0,f.jsx)(Be,{}),t&&(0,f.jsx)("p",{children:(0,i.__)("Tracking has already been enabled for one or more keyphrases of this page. Clicking the button below will enable tracking for all of its keyphrases.","wordpress-seo")}),(0,f.jsx)("div",{className:"yoast",children:(0,f.jsx)(S.NewButton,{variant:"secondary",small:!0,onClick:e,children:(0,i.__)("Track all keyphrases on this page","wordpress-seo")})}),(0,f.jsx)($t,{location:"postpublish"})]})}Qn.propTypes={trackAll:m().func,hasTrackedKeyphrases:m().bool};const Xn=(0,O.compose)([(0,t.withSelect)(e=>{const{getWincherTrackedKeyphrases:t,hasWincherTrackedKeyphrases:s}=e("yoast-seo/editor");return{trackedKeyphrases:t(),hasTrackedKeyphrases:s()}}),(0,t.withDispatch)(e=>{const{setWincherOpenModal:t,setWincherTrackAllKeyphrases:s}=e("yoast-seo/editor");return{trackAll:()=>{s(!0),t("postpublish")}}})])(Qn);window.wp.annotations;const Jn=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:ei}=E.helpers.htmlEntities,ti=e=>{let t=0;return(0,u.forEachRight)(e,e=>{const[s]=e;let r=s.length;/^<\/?br/.test(s)&&(r-=1),t+=r}),t},si="<yoastmark class='yoast-text-mark'>",ri="</yoastmark>",oi='<yoastmark class="yoast-text-mark">';function ni(e,t,s,r,o){const n=r.clientId,i=(0,l.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,u.flatMap)(o,s=>{let o;return o=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,r,o){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),n=e.getBlockPositionEnd();if(e.isMarkForFirstBlockSection()){const e=((e,t,s)=>{const r="yoast/faq-block"===s?'<strong class="schema-faq-question">':'<strong class="schema-how-to-step-name">';return{blockStartOffset:e-=r.length,blockEndOffset:t-=r.length}})(t,n,s);t=e.blockStartOffset,n=e.blockEndOffset}if(r.slice(t,n)===o.slice(t,n))return[{startOffset:t,endOffset:n}];const i=((e,t,s)=>{const r=s.slice(0,e),o=s.slice(0,t),n=((e,t,s,r)=>{const o=[...e.matchAll(Jn)];s-=ti(o);const n=[...t.matchAll(Jn)];return{blockStartOffset:s,blockEndOffset:r-=ti(n)}})(r,o,e,t),i=((e,t,s,r)=>{let o=[...e.matchAll(ei)];return(0,u.forEachRight)(o,e=>{const[,t]=e;s-=t.length}),o=[...t.matchAll(ei)],(0,u.forEachRight)(o,e=>{const[,t]=e;r-=t.length}),{blockStartOffset:s,blockEndOffset:r}})(r,o,e=n.blockStartOffset,t=n.blockEndOffset);return{blockStartOffset:e=i.blockStartOffset,blockEndOffset:t=i.blockEndOffset}})(t,n,r);return[{startOffset:i.blockStartOffset,endOffset:i.blockEndOffset}]}return[]}(s,n,r.name,e,i):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),r=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),o=function(e,t,s=!0){const r=[];if(0===e.length)return r;let o,n=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(o=e.indexOf(t,n))>-1;)r.push(o),n=o+t.length;return r}(e,s);if(0===o.length)return[];const n=function(e){let t=e.indexOf(si);const s=t>=0;s||(t=e.indexOf(oi));let r=null;const o=[];for(;t>=0;){if(r=(e=s?e.replace(si,""):e.replace(oi,"")).indexOf(ri),r<t)return[];e=e.replace(ri,""),o.push({startOffset:t,endOffset:r}),t=s?e.indexOf(si):e.indexOf(oi),r=null}return o}(r),i=[];return n.forEach(e=>{o.forEach(r=>{const o=r+e.startOffset;let n=r+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(n=r+s.length),i.push({startOffset:o,endOffset:n})})}),i}(i,s),o?o.map(e=>({...e,block:n,richTextIdentifier:t})):[]})}const ii=e=>e[0].toUpperCase()+e.slice(1),ai=(e,t,s,r,o)=>(e=e.map(e=>{const n=`${e.id}-${o[0]}`,i=`${e.id}-${o[1]}`,a=ii(o[0]),l=ii(o[1]),c=e[`json${a}`],d=e[`json${l}`],{marksForFirstSection:u,marksForSecondSection:p}=((e,t)=>({marksForFirstSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&e.isMarkForFirstBlockSection():e),marksForSecondSection:e.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?e.getBlockAttributeId()===t.id&&!e.isMarkForFirstBlockSection():e)}))(t,e),h=ni(c,n,s,r,u),m=ni(d,i,s,r,p);return h.concat(m)}),(0,u.flattenDeep)(e)),li="yoast";let ci=[];const di={"core/paragraph":[{key:"content"}],"core/list":[{key:"values",multilineTag:"li",multilineWrapperTag:["ul","ol"]}],"core/list-item":[{key:"content"}],"core/heading":[{key:"content"}],"core/audio":[{key:"caption"}],"core/embed":[{key:"caption"}],"core/gallery":[{key:"caption"}],"core/image":[{key:"caption"}],"core/table":[{key:"caption"}],"core/video":[{key:"caption"}],"yoast/faq-block":[{key:"questions"}],"yoast/how-to-block":[{key:"steps"},{key:"jsonDescription"}]};function ui(){const e=ci.shift();e&&((0,t.dispatch)("core/annotations").__experimentalAddAnnotation(e),pi())}function pi(){(0,u.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(ui,{timeout:1e3}):setTimeout(ui,150)}function hi(){const e=(0,t.select)("core/block-editor").getSelectedBlock(),s=(0,t.select)("yoast-seo/editor").getActiveMarker();if(!e||!s)return;var r;r=e.clientId,(0,t.select)("core/annotations").__experimentalGetAnnotations().filter(e=>e.blockClientId===r&&e.source===li).forEach(e=>{(0,t.dispatch)("core/annotations").__experimentalRemoveAnnotation(e.id)});const o=(0,t.select)("yoast-seo/editor").getResultById(s);if(void 0===o)return;const n=o.marks;var i;i=((e,t)=>{return(0,u.flatMap)((s=e.name,di.hasOwnProperty(s)?di[s]:[]),s=>"yoast/faq-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];return 0===r.length?[]:ai(r,s,e,t,["question","answer"])})(s,e,t):"yoast/how-to-block"===e.name?((e,t,s)=>{const r=t.attributes[e.key];if(r&&0===r.length)return[];const o=[];return"steps"===e.key&&o.push(ai(r,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e),o.push(ni(r,"description",e,t,s))),(0,u.flattenDeep)(o)})(s,e,t):function(e,t,s){const r=e.key,o=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:(s||"").toString()})(t,r);return ni(o,r,e,t,s)}(s,e,t));var s})(e,n),ci=i.map(e=>({blockClientId:e.block,source:li,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}})),pi()}const mi=window.wp.htmlEntities,gi=(0,W.makeOutboundLink)(y().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: ${C.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${C.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${C.colors.$color_help_text};	
	}

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`);function yi({value:e,onChange:t}){var s;const[r,o]=(0,n.useState)(Boolean(null==e?void 0:e.cssClasses)),a=`${(0,O.useInstanceId)(yi,"css-classes-setting")}-input`;return(0,n.useEffect)(()=>{o(Boolean(null==e?void 0:e.cssClasses))},[null==e?void 0:e.cssClasses]),(0,f.jsxs)(v.__experimentalVStack,{spacing:"2",children:[(0,f.jsx)(v.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),checked:r,onChange:s=>{o(s),s||t({...e,cssClasses:""})}}),r&&(0,f.jsx)(v.__experimentalInputControl,{__next40pxDefaultSize:!0,id:a,label:(0,i.__)("Additional CSS class(es)","wordpress-seo"),hideLabelFromVision:!0,value:null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"",onChange:s=>{const r=(null!=s?s:"").replace(/,/g," ").replace(/\s+/g," ");t({...e,cssClasses:r})},onBlur:()=>{var s;const r=(null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"").trim();r!==(null==e?void 0:e.cssClasses)&&t({...e,cssClasses:r})},placeholder:(0,i.__)("Separate multiple classes with spaces","wordpress-seo"),help:(0,i.__)("Separate multiple classes with spaces.","wordpress-seo")})]})}function fi({isActive:e=!1,activeAttributes:t={},addingLink:s=!1,value:o={},onChange:a=u.noop,speak:c,stopAddingLink:d,contentRef:p={}}){const h=(0,n.useMemo)(u.uniqueId,[s]),[m,g]=(0,n.useState)(),y=(0,l.useAnchor)({editableContentElement:p.current,settings:{...vi,isActive:e}}),x=(0,l.getActiveFormat)(o,"core/link"),w=e=>{var t;const{formats:s,start:r,text:o}=e,n=null==x||null===(t=x.attributes)||void 0===t?void 0:t.url;let i=r,a=r;const l=e=>{var t;return null===(t=s[e])||void 0===t?void 0:t.some(e=>{var t;return"core/link"===(null==e?void 0:e.type)&&(null==e||null===(t=e.attributes)||void 0===t?void 0:t.url)===n})};for(!l(i)&&i>0&&l(i-1)&&(i--,a=i);i>0&&l(i-1);)i--;for(;a<((null==o?void 0:o.length)||0)&&l(a);)a++;return{start:i,end:a}};let b="";if(e&&x){const{start:e,end:t}=w(o);e<t&&(b=o.text.substring(e,t))}else o.start!==o.end&&(b=(0,l.getTextContent)((0,l.slice)(o)));const _={url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,noFollow:t.rel&&t.rel.split(" ").includes("nofollow"),sponsored:t.rel&&t.rel.split(" ").includes("sponsored"),title:b,className:t.class,cssClasses:t.class,...m},k=e=>_.url===e.url&&(_.opensInNewTab!==e.opensInNewTab||_.noFollow!==e.noFollow||_.sponsored!==e.sponsored||_.cssClasses!==e.cssClasses),j=e=>{if("number"==typeof e||"string"==typeof e)return String(e)},S=(0,f.jsx)(gi,{href:window.wpseoAdminL10n["shortlinks.nofollow_sponsored"],className:"dashicons",children:(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,i.__)("Learn more about marking a link as nofollow or sponsored.","wordpress-seo")})}),C=(0,De.x)((0,i.sprintf)(
// translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
// translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
(0,i.__)("Search engines should ignore this link (mark as %1$snofollow%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),E=(0,De.x)((0,i.sprintf)(
// translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
// translators: %1$s and %2$s are opening and closing code tags, %3$s is a help link.
(0,i.__)("This is a sponsored link or advert (mark as %1$ssponsored%2$s)%3$s","wordpress-seo"),"<code>","</code>","<helplink />"),{code:(0,f.jsx)("code",{}),helplink:S}),T=[{id:"opensInNewTab",title:(0,i.__)("Open in new tab","wordpress-seo")},{id:"noFollow",title:C},{id:"sponsored",title:E},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)","wordpress-seo"),render:(e,t,s)=>(0,f.jsx)(yi,{value:t,onChange:s},e.id)}],{__experimentalLinkControl:R}=window.wp.blockEditor;return(0,f.jsx)(v.Popover,{anchor:y,focusOnMount:!!s&&"firstElement",onClose:d,position:"bottom center",placement:"bottom",shift:!0,children:(0,f.jsx)(R,{value:_,onChange:t=>{var s;t={...m,...t};const n=k(t);if((e=>k(e)&&!e.url)(t=(e=>{var t;return k(t=e)&&!0===t.sponsored&&!0!==_.sponsored&&(e.noFollow=!0),(e=>k(e)&&!1===e.noFollow&&!1!==_.noFollow)(e)&&(e.sponsored=!1),e})(t)))return void g(t);const p=(0,r.prependHTTP)(t.url),h=function({url:e,type:t,id:s,opensInNewWindow:r,noFollow:o,sponsored:n,className:i}){const a={type:"core/link",attributes:{url:e}};t&&(a.attributes.type=t),s&&(a.attributes.id=s);let l=[];return r&&(a.attributes.target="_blank",l.push("noreferrer noopener")),n&&(l.push("sponsored"),l.push("nofollow")),o&&l.push("nofollow"),l.length>0&&(l=(0,u.uniq)(l),a.attributes.rel=l.join(" ")),i&&(a.attributes.class=i),a}({url:p,type:t.type,id:j(t.id),opensInNewWindow:t.opensInNewTab,noFollow:t.noFollow,sponsored:t.sponsored,className:null!==(s=t.cssClasses)&&void 0!==s?s:t.className});(0,l.isCollapsed)(o)&&!e?((e,t,s)=>{const r=((e,t)=>e.title?e.title:t)(t,s),n=(0,l.applyFormat)((0,l.create)({text:r}),e,0,r.length);a((0,l.insert)(o,n))})(h,t,p):((e,t)=>{const{start:s,end:r}=w(o),n=s<r?o.text.substring(s,r):"";let i;if(void 0!==t&&""!==t&&t!==n&&s<r){const n=(0,l.remove)(o,s,r);n.start=s,n.end=s;const a=(0,l.applyFormat)((0,l.create)({text:t}),e,0,t.length);i=(0,l.insert)(n,a)}else i=(0,l.applyFormat)(o,e),i.start=i.end;i.activeFormats=[],a(i)})(h,t.title),n||d(),(t=>{!function(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,r.getProtocol)(t);if(!(0,r.isValidProtocol)(e))return!1;if((0,u.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const s=(0,r.getAuthority)(t);if(!(0,r.isValidAuthority)(s))return!1;const o=(0,r.getPath)(t);if(o&&!(0,r.isValidPath)(o))return!1;const n=(0,r.getQueryString)(t);if(n&&!(0,r.isValidQueryString)(n))return!1;const i=(0,r.getFragment)(t);if(i&&!(0,r.isValidFragment)(i))return!1}return!((0,u.startsWith)(t,"#")&&!(0,r.isValidFragment)(t))}(t)?c((0,i.__)("Warning: the link has been inserted but may have errors. Please test it.","wordpress-seo"),"assertive"):c(e?(0,i.__)("Link edited.","wordpress-seo"):(0,i.__)("Link inserted.","wordpress-seo"),"assertive")})(p)},forceIsEditingLink:s,hasTextControl:!0,settings:T})},h)}fi.propTypes={isActive:m().bool,activeAttributes:m().object,addingLink:m().bool,value:m().object,onChange:m().func,speak:m().func.isRequired,stopAddingLink:m().func.isRequired,contentRef:m().object};const xi=(0,v.withSpokenMessages)(fi),wi="core/link",bi=(0,i.__)("Link","wordpress-seo"),vi={name:wi,title:bi,tagName:"a",className:null,attributes:{url:"href",type:"type",id:"id",target:"target",rel:"rel",class:"class"},replaces:"core/link",__unstablePasteRule(e,{html:t,plainText:s}){if((0,l.isCollapsed)(e))return e;const o=(t||s).replace(/<[^>]+>/g,"").trim();return(0,r.isURL)(o)?(window.console.log("Created link:\n\n",o),(0,l.applyFormat)(e,{type:wi,attributes:{url:(0,mi.decodeEntities)(o)}})):e},edit:(0,v.withSpokenMessages)(class extends n.Component{constructor(){super(...arguments),this.addLink=this.addLink.bind(this),this.stopAddingLink=this.stopAddingLink.bind(this),this.onRemoveFormat=this.onRemoveFormat.bind(this),this.state={addingLink:!1}}addLink(){const{value:e,onChange:t}=this.props,s=(0,l.getTextContent)((0,l.slice)(e));s&&(0,r.isURL)(s)?t((0,l.applyFormat)(e,{type:wi,attributes:{url:s}})):s&&(0,r.isEmail)(s)?t((0,l.applyFormat)(e,{type:wi,attributes:{url:`mailto:${s}`}})):this.setState({addingLink:!0})}stopAddingLink(){this.setState({addingLink:!1}),this.props.onFocus()}onRemoveFormat(){const{value:e,onChange:t,speak:s}=this.props;t((0,l.removeFormat)(e,wi)),s((0,i.__)("Link removed.","wordpress-seo"),"assertive")}render(){const{isActive:e,activeAttributes:t,value:s,onChange:r}=this.props,{RichTextToolbarButton:o,RichTextShortcut:a}=window.wp.blockEditor;return(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(a,{type:"primary",character:"k",onUse:this.addLink}),(0,f.jsx)(a,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&(0,f.jsx)(o,{name:"link",icon:"editor-unlink",title:(0,i.__)("Unlink","wordpress-seo"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,f.jsx)(o,{name:"link",icon:"admin-links",title:bi,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&(0,f.jsx)(xi,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:t,value:s,onChange:r,contentRef:this.props.contentRef})]})}})};var _i=s(9052),ki=s(8213);function ji(e){return(0,u.get)(e,"editorContext.postType")}const Si=(0,ki.createSelector)([ji],e=>"product"===e),Ci=(0,ki.createSelector)([ji],e=>["product_cat","product_tag"].includes(e)),Ei=(0,ki.createSelector)([Si,Ci],(e,t)=>e||t),Ti=(e,t,s=null)=>(0,u.get)(e,`preferences.${t}`,s),Ri=e=>Ti(e,"isWooCommerceActive",!1),Li=e=>Ti(e,"isWooCommerceSeoActive",!1);function Ii(){const e=p();return(0,u.get)(e,"contentLocale","en_US")}(0,ki.createSelector)([Li,Ri,Ei],(e,t,s)=>!e&&t&&s),(0,ki.createSelector)([Li,Ri,Ci],(e,t,s)=>!e&&t&&s),(0,ki.createSelector)([Ei,Ri],(e,t)=>t&&e);const{updateReplacementVariable:Ai,updateData:Pi,hideReplacementVariables:Ni,setContentImage:Mi,updateSettings:Oi,setEditorDataContent:Fi,setEditorDataTitle:Di,setEditorDataExcerpt:qi,setEditorDataImageUrl:$i,setEditorDataSlug:Bi}=d.actions,Ui=globalThis.jQuery;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){(function(s){const r=p(),l=r.isPremium?"Yoast SEO Premium":"Yoast SEO",d=(0,f.jsx)(b,{});(0,e.updateCategory)("yoast-structured-data-blocks",{icon:d}),(0,e.updateCategory)("yoast-internal-linking-blocks",{icon:d}),(0,e.updateCategory)("yoast-ai-blocks",{icon:d});const u={isRtl:r.isRtl},h=s.getState().preferences,m=h.isKeywordAnalysisActive||h.isContentAnalysisActive,g=h.isKeywordAnalysisActive&&h.isWincherIntegrationActive;!function(){var e;const s="yoast-seo/document-panel",r=null===(e=(0,t.select)("core/preferences"))||void 0===e?void 0:e.get("core","openPanels");var o;r&&!r.includes(s)&&(null===(o=(0,t.dispatch)("core/editor"))||void 0===o||o.toggleEditorPanelOpened(s))}();const y={locationContext:"block-sidebar"},x={locationContext:"block-metabox"};(0,a.registerPlugin)("yoast-seo",{render:()=>(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(o.PluginSidebarMoreMenuItem,{target:"seo-sidebar",icon:(0,f.jsx)(Xr,{}),children:l}),(0,f.jsx)(o.PluginSidebar,{name:"seo-sidebar",title:l,children:(0,f.jsx)(c.Root,{context:y,children:(0,f.jsx)(Wr,{store:s,theme:u})})}),(0,f.jsxs)(n.Fragment,{children:[(0,f.jsx)(Zn,{store:s,theme:u}),(0,f.jsx)(c.Root,{context:x,children:(0,f.jsx)(Ur,{target:"wpseo-metabox-root",store:s,theme:u})})]}),m&&(0,f.jsx)(o.PluginPrePublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(mo,{})}),(0,f.jsxs)(o.PluginPostPublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(n.Fragment,{}),children:[(0,f.jsx)(io,{}),g&&(0,f.jsx)(Xn,{})]}),m&&(0,f.jsx)(o.PluginDocumentSettingPanel,{name:"document-panel",className:"yoast-seo-sidebar-panel",title:(0,i.__)("Yoast SEO","wordpress-seo"),icon:(0,f.jsx)(n.Fragment,{}),children:(0,f.jsx)(Qr,{})})]}),icon:(0,f.jsx)(Xr,{})})})(s),function(){if("function"==typeof(0,u.get)(window,"wp.blockEditor.__experimentalLinkControl")){const e=(0,t.select)("core/rich-text").getFormatType("core/link"),s=(0,t.select)("core/rich-text").getFormatType("core/unknown");void 0!==s&&(0,t.dispatch)("core/rich-text").removeFormatTypes("core/unknown"),[vi].forEach(({name:s,replaces:r,...o})=>{if(r&&(0,t.dispatch)("core/rich-text").removeFormatTypes(r),s){const t=e&&"core/link"===s?{...e,...o}:o;(0,l.registerFormatType)(s,t)}}),void 0!==s&&(0,l.registerFormatType)("core/unknown",s)}else console.warn((0,i.__)("Marking links with nofollow/sponsored has been disabled for WordPress installs < 5.4.","wordpress-seo")+" "+(0,i.sprintf)(
// translators: %1$s expands to Yoast SEO.
// translators: %1$s expands to Yoast SEO.
(0,i.__)("Please upgrade your WordPress version or install the Gutenberg plugin to get this %1$s feature.","wordpress-seo"),"Yoast SEO"))}(),function(e){(0,t.select)("core/editor")&&(0,t.select)("core/block-editor")&&(0,u.isFunction)((0,t.select)("core/block-editor").getBlocks)&&(0,t.select)("core/annotations")&&(0,u.isFunction)((0,t.dispatch)("core/annotations").__experimentalAddAnnotation)&&e.dispatch(d.actions.setMarkerStatus("enabled"))}(s),(()=>{var e;const s=null===(e=(0,t.select)("yoast-seo-premium/editor"))||void 0===e?void 0:e.getIsAiFeatureEnabled;return s?s():Boolean(window.wpseoAdminL10n.isAiFeatureActive)})()&&(0,_i.Ay)();const h=(0,r.getQueryArg)(window.location.href,"yoast-tab");"readability"!==h&&"seo"!==h||(0,t.dispatch)("core/edit-post").openGeneralSidebar("yoast-seo/seo-sidebar")},window.yoast.EditorData=class{constructor(e,t){this._refresh=e,this._store=t,this._data={},this.getPostAttribute=this.getPostAttribute.bind(this),this.refreshYoastSEO=this.refreshYoastSEO.bind(this)}initialize(e,t=[]){this._data=this.getInitialData(e),(0,Vt.fillReplacementVariables)(this._data,this._store),this._store.dispatch(Ni(t)),this.subscribeToGutenberg(),this.subscribeToYoastSEO()}getInitialData(e){const t=this.collectGutenbergData();return e=(0,Vt.mapCustomFields)(e,this._store),e=(0,Vt.mapCustomTaxonomies)(e,this._store),{...e,...t}}setRefresh(e){this._refresh=e}isShallowEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e.hasOwnProperty(s)&&(!(s in t)||e[s]!==t[s]))return!1;return!0}getMediaById(e){return this._coreDataSelect||(this._coreDataSelect=(0,t.select)("core")),this._coreDataSelect.getMedia(e)}getPostAttribute(e){return this._coreEditorSelect||(this._coreEditorSelect=(0,t.select)("core/editor")),this._coreEditorSelect.getEditedPostAttribute(e)}getSlug(){if("auto-draft"===this.getPostAttribute("status"))return"";let e=this.getPostAttribute("generated_slug")||"";"auto-draft"===e&&(e="");const t=this.getPostAttribute("slug")||e;try{return decodeURI(t)}catch(e){return t}}getPostBaseUrl(){const e=(0,t.select)("core/editor").getPermalinkParts();if(null===e||null==e||!e.prefix)return window.wpseoScriptData.metabox.base_url;let s=e.prefix;if((0,t.select)("core/editor").isEditedPostNew())try{const e=new URL(s);s=e.origin+e.pathname}catch(e){}return s.endsWith("/")||(s+="/"),s}collectGutenbergData(){let s=(0,t.select)("core/editor").getEditedPostContent();const r=(0,t.select)("core/editor").getEditorBlocks();1===r.length&&"core/freeform"===r[0].name&&(s=(0,e.getBlockContent)(r[0]));const o=this.calculateContentImage(s),n=this.getPostAttribute("excerpt")||"";return{content:s,title:this.getPostAttribute("title")||"",slug:this.getSlug(),excerpt:n||(0,Vt.excerptFromContent)(s,"ja"===Ii()?80:156),excerpt_only:n,snippetPreviewImageURL:this.getFeaturedImage()||o,contentImage:o,baseUrl:this.getPostBaseUrl()}}getFeaturedImage(){const e=this.getPostAttribute("featured_media");if(e){const t=this.getMediaById(e);if(t)return t.source_url}return null}calculateContentImage(e){const t=E.languageProcessing.imageInText(e);if(0===t.length)return"";const s=Ui.parseHTML(t.join(""));for(const e of s)if(e.src)return e.src;return""}handleEditorChange(e){this._data.content!==e.content&&this._store.dispatch(Fi(e.content)),this._data.title!==e.title&&(this._store.dispatch(Di(e.title)),this._store.dispatch(Ai("title",e.title))),this._data.excerpt!==e.excerpt&&(this._store.dispatch(qi(e.excerpt)),this._store.dispatch(Ai("excerpt",e.excerpt)),this._store.dispatch(Ai("excerpt_only",e.excerpt_only))),this._data.slug!==e.slug&&(this._store.dispatch(Bi(e.slug)),this._store.dispatch(Pi({slug:e.slug}))),this._data.snippetPreviewImageURL!==e.snippetPreviewImageURL&&(this._store.dispatch($i(e.snippetPreviewImageURL)),this._store.dispatch(Pi({snippetPreviewImageURL:e.snippetPreviewImageURL}))),this._data.contentImage!==e.contentImage&&this._store.dispatch(Mi(e.contentImage)),this._data.baseUrl!==e.baseUrl&&this._store.dispatch(Oi({baseUrl:e.baseUrl}))}reapplyMarkers(){const{getActiveMarker:e,getMarkerPauseStatus:s}=(0,t.select)("yoast-seo/editor"),r=e(),o=s();r&&!o&&hi()}refreshYoastSEO(){const e=this.collectGutenbergData();!this.isShallowEqual(this._data,e)&&(this.handleEditorChange(e),this._data=e,this._refresh())}areNewAnalysisResultsAvailable(){const e=(0,t.select)("yoast-seo/editor"),s=e.getReadabilityResults(),r=e.getResultsForFocusKeyword();return(this._previousReadabilityResults!==s||this._previousSeoResults!==r)&&(this._previousReadabilityResults=s,this._previousSeoResults=r,!0)}onNewAnalysisResultsAvailable(){this.reapplyMarkers()}subscribeToGutenberg(){this._previousRenderingMode=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode(),this.subscriber=(0,u.debounce)(()=>{const e=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode();if(e!==this._previousRenderingMode)return this._previousRenderingMode=e,void this._refresh();this.refreshYoastSEO()},500),(0,t.subscribe)(this.subscriber)}subscribeToYoastSEO(){this.yoastSubscriber=()=>{this.areNewAnalysisResultsAvailable()&&this.onNewAnalysisResultsAvailable()},(0,t.subscribe)(this.yoastSubscriber)}getData(){return this._data}}})()})();