(()=>{var e={2485(e,t){var s;!function(){"use strict";var i={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var r=typeof s;if("string"===r||"number"===r)e.push(s);else if(Array.isArray(s)){if(s.length){var n=o.apply(null,s);n&&e.push(n)}}else if("object"===r){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var a in s)i.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)}()}},t={};function s(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.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 i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.data,i=window.wp.url,o=window.wp.editor,r=window.wp.element,n=window.wp.i18n,a=window.wp.plugins,l=window.wp.richText,c=window.yoast.externals.contexts,d=window.yoast.externals.redux,p=window.lodash;function u(){return(0,p.get)(window,"wpseoScriptData.metabox",{intl:{},isRtl:!1})}const h=window.yoast.propTypes;var g=s.n(h);const m=window.yoast.styledComponents;var y=s.n(m);const f=window.ReactJSXRuntime,w=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"};
	}
`,b=({readabilityScoreColor:e="#000000",isContentAnalysisActive:t=!1,seoScoreColor:s="#000000",isKeywordAnalysisActive:i=!1,size:o=20,color:r="#000001",...n})=>(0,f.jsxs)(w,{readabilityScoreColor:e,isContentAnalysisActive:t,seoScoreColor:s,isKeywordAnalysisActive:i,size:o,color:r,...n,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"})]});b.propTypes={readabilityScoreColor:g().string,isContentAnalysisActive:g().bool,seoScoreColor:g().string,isKeywordAnalysisActive:g().bool,size:g().number,color:g().string};const x=b,v=window.wp.components,k=window.yoast.uiLibrary;function _(e){return void 0===e.length?e:(0,p.flatten)(e).sort((e,t)=>void 0===e.props.renderPriority?1:e.props.renderPriority-t.props.renderPriority)}const j=window.React;var S=s.n(j);j.forwardRef(function(e,t){return j.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),j.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"}))});const T=(e,t)=>{try{return(0,r.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}};g().string.isRequired;const R=j.forwardRef(function(e,t){return j.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),j.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"}))}),C=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))});g().string.isRequired,g().string.isRequired,g().shape({src:g().string.isRequired,width:g().string,height:g().string}).isRequired,g().shape({value:g().bool.isRequired,status:g().string.isRequired,set:g().func.isRequired}).isRequired,g().string,g().string,g().string;const E=({handleRefreshClick:e,supportLink:t})=>(0,f.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,f.jsx)(k.Button,{onClick:e,children:(0,n.__)("Refresh this page","wordpress-seo")}),(0,f.jsx)(k.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,n.__)("Contact support","wordpress-seo")})]});E.propTypes={handleRefreshClick:g().func.isRequired,supportLink:g().string.isRequired};const I=({handleRefreshClick:e,supportLink:t})=>(0,f.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,f.jsx)(k.Button,{className:"yst-order-last",onClick:e,children:(0,n.__)("Refresh this page","wordpress-seo")}),(0,f.jsx)(k.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,n.__)("Contact support","wordpress-seo")})]});I.propTypes={handleRefreshClick:g().func.isRequired,supportLink:g().string.isRequired};const L=({error:e,children:t=null})=>(0,f.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,f.jsx)(k.Title,{children:(0,n.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,f.jsx)("p",{children:(0,n.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,f.jsx)(k.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,n.__)("Undefined error message.","wordpress-seo")}),(0,f.jsx)("p",{children:(0,n.__)("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]});L.propTypes={error:g().object.isRequired,children:g().node},L.VerticalButtons=I,L.HorizontalButtons=E;g().string,g().node.isRequired,g().node.isRequired,g().node,g().oneOf(Object.keys({lg:{grid:"yst-grid lg:yst-grid-cols-3 lg:yst-gap-12",col1:"yst-col-span-1",col2:"lg:yst-mt-0 lg:yst-col-span-2"},xl:{grid:"yst-grid xl:yst-grid-cols-3 xl:yst-gap-12",col1:"yst-col-span-1",col2:"xl:yst-mt-0 xl:yst-col-span-2"},"2xl":{grid:"yst-grid 2xl:yst-grid-cols-3 2xl:yst-gap-12",col1:"yst-col-span-1",col2:"2xl:yst-mt-0 2xl:yst-col-span-2"}}));const A=window.ReactDOM;var F,P,M;(P=F||(F={})).Pop="POP",P.Push="PUSH",P.Replace="REPLACE",function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(M||(M={})),new Set(["lazy","caseSensitive","path","id","index","children"]),Error;const q=["post","put","patch","delete"],O=(new Set(q),["get",...q]);new Set(O),new Set([301,302,303,307,308]),new Set([307,308]),Symbol("deferred"),j.Component,j.startTransition,new Promise(()=>{}),j.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}var N,D,U,$;new Map,j.startTransition,A.flushSync,j.useId,"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,($=N||(N={})).UseScrollRestoration="useScrollRestoration",$.UseSubmit="useSubmit",$.UseSubmitFetcher="useSubmitFetcher",$.UseFetcher="useFetcher",$.useViewTransitionState="useViewTransitionState",(U=D||(D={})).UseFetcher="useFetcher",U.UseFetchers="useFetchers",U.UseScrollRestoration="useScrollRestoration",g().string.isRequired,g().string;g().string.isRequired,g().node;const W=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))});(0,n.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,n.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,n.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,n.__)("Optimize pages for multiple keywords with guidance","wordpress-seo"),(0,n.__)("Add product details to help your listings stand out","wordpress-seo"),(0,n.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,n.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,n.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo"),(0,n.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,n.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,n.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,n.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,n.__)("Internal links and redirect management, easy","wordpress-seo"),(0,n.__)("Access to friendly help when you need it, day or night","wordpress-seo");var B=s(2485),K=s.n(B);var H;function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},z.apply(null,arguments)}g().string.isRequired,g().object.isRequired,g().func.isRequired,j.forwardRef(function(e,t){return j.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),j.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))});const Y=e=>j.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},e),H||(H=j.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"})));g().string.isRequired,g().object,g().func.isRequired,g().bool.isRequired,g().string.isRequired,g().object.isRequired,g().string.isRequired,g().func.isRequired,g().bool.isRequired,j.forwardRef(function(e,t){return j.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),j.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"}))}),g().bool.isRequired,g().func,g().func,g().string.isRequired,g().string.isRequired,g().string.isRequired,g().string.isRequired;window.yoast.reactHelmet;g().string.isRequired,g().shape({src:g().string.isRequired,width:g().string,height:g().string}).isRequired,g().shape({value:g().bool.isRequired,status:g().string.isRequired,set:g().func.isRequired}).isRequired,g().bool,j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),g().bool.isRequired,g().func.isRequired,g().func,g().string,g().func.isRequired,g().string.isRequired,g().string.isRequired,g().string.isRequired,g().string.isRequired;const V=window.yoast.componentsNew,G=window.yoast.styleGuide,Z=window.yoast.analysis;function X(e){switch(e){case"loading":return{icon:"loading-spinner",color:G.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:G.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:G.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:G.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:G.colors.$color_ok};default:return{icon:"seo-score-bad",color:G.colors.$color_red}}}function Q({target:e,children:t}){let s=e;return"string"==typeof e&&(s=document.getElementById(e)),s?(0,r.createPortal)(t,s):null}Q.propTypes={target:g().oneOfType([g().string,g().object]).isRequired,children:g().node.isRequired};const J=({target:e,scoreIndicator:t})=>(0,f.jsx)(Q,{target:e,children:(0,f.jsx)(V.SvgIcon,{...X(t)})});J.propTypes={target:g().string.isRequired,scoreIndicator:g().string.isRequired};const ee=J,te=({error:e})=>{const s=(0,r.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),i=(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,r.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)(k.Root,{context:{isRtl:o},children:(0,f.jsxs)(L,{error:e,children:[(0,f.jsx)(L.HorizontalButtons,{supportLink:i,handleRefreshClick:s}),(0,f.jsx)(ee,{target:"wpseo-seo-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(ee,{target:"wpseo-readability-score-icon",scoreIndicator:"not-set"}),(0,f.jsx)(ee,{target:"wpseo-inclusive-language-score-icon",scoreIndicator:"not-set"})]})})};te.propTypes={error:g().object.isRequired};const se=({theme:e,location:t,children:s})=>(0,f.jsx)(c.LocationProvider,{value:t,children:(0,f.jsx)(m.ThemeProvider,{theme:e,children:s})});se.propTypes={theme:g().object.isRequired,location:g().oneOf(["sidebar","metabox","modal"]).isRequired,children:g().node.isRequired};const ie=se;function oe({theme:e}){return(0,f.jsx)(ie,{theme:e,location:"metabox",children:(0,f.jsx)(k.ErrorBoundary,{FallbackComponent:te,children:(0,f.jsx)(v.Slot,{name:"YoastMetabox",children:e=>_(e)})})})}const re=window.wp.compose,ne=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),ae=(e=null)=>(0,j.useMemo)(()=>{const t={role:"img","aria-hidden":"true"};return null!==e&&(t.focusable=e?"true":"false"),t},[e]),le=({className:e="",...t})=>(0,f.jsx)("span",{className:K()("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});le.displayName="MetaboxButton.Text",le.propTypes={className:g().string};const ce=({className:e="",...t})=>(0,f.jsx)("button",{type:"button",className:K()("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});ce.propTypes={className:g().string},ce.Text=le;const de=window.yoast.helpers,pe=y().div`
	min-width: 600px;

	@media screen and ( max-width: 680px ) {
		min-width: 0;
		width: 86vw;
	}
`,ue=(y().div`
	@media screen and ( min-width: 600px ) {
		max-width: 420px;
	}
`,y()(V.Icon)`
	float: ${(0,de.getDirectionalStyle)("right","left")};
	margin: ${(0,de.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:i=null,additionalClassName:o="",...r})=>{const n=s?(0,f.jsx)("span",{className:"yoast-icon"}):null;return(0,f.jsx)(v.Modal,{title:e,className:`${t} ${o}`,icon:n,...r,children:i})});ue.propTypes={title:g().string,className:g().string,showYoastIcon:g().bool,children:g().oneOfType([g().node,g().arrayOf(g().node)]),additionalClassName:g().string};const he=ue;var ge,me;function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ye.apply(null,arguments)}const fe=e=>j.createElement("svg",ye({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),ge||(ge=j.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"})),me||(me=j.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"}))),we=({onClick:e,title:t,id:s="",subTitle:i="",suffixIcon:o=null,SuffixHeroIcon:r=null,prefixIcon:n=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:[n&&(0,f.jsx)("span",{className:"yoast-icon-span",style:{fill:`${n&&n.color||""}`},children:(0,f.jsx)(V.SvgIcon,{size:n.size,icon:n.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:i})]}),a,o&&(0,f.jsx)(V.SvgIcon,{size:o.size,icon:o.icon}),r]})})}),be=we;we.propTypes={onClick:g().func.isRequired,title:g().string.isRequired,id:g().string,subTitle:g().string,suffixIcon:g().object,SuffixHeroIcon:g().element,prefixIcon:g().object,children:g().node};const xe=window.moment;var ve=s.n(xe);const ke=window.wp.apiFetch;var _e=s.n(ke);async function je(e,t,s,i=200){try{const o=await e();return!!o&&(o.status===i?t(o):s(o))}catch(e){console.error(e.message)}}async function Se(e){try{return await _e()(e)}catch(e){return e.error&&e.status?e:e instanceof Response&&await e.json()}}async function Te(e){return(0,p.isArray)(e)||(e=[e]),await Se({path:"yoast/v1/wincher/keyphrases/track",method:"POST",data:{keyphrases:e}})}const Re=({data:e,mapChartDataToTableData:t=null,dataTableCaption:s,dataTableHeaderLabels:i,isDataTableVisuallyHidden:o=!0})=>e.length!==i.length?(0,f.jsx)("p",{children:(0,n.__)("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:i.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))})})]})});Re.propTypes={data:g().arrayOf(g().shape({x:g().number,y:g().number})).isRequired,mapChartDataToTableData:g().func,dataTableCaption:g().string.isRequired,dataTableHeaderLabels:g().array.isRequired,isDataTableVisuallyHidden:g().bool};const Ce=Re,Ee=({data:e,width:t,height:s,fillColor:i=null,strokeColor:o="#000000",strokeWidth:n=1,className:a="",mapChartDataToTableData:l=null,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:p=!0})=>{const u=Math.max(1,Math.max(...e.map(e=>e.x))),h=Math.max(1,Math.max(...e.map(e=>e.y))),g=s-n,m=e.map(e=>`${e.x/u*t},${g-e.y/h*g+n}`).join(" "),y=`0,${g+n} `+m+` ${t},${g+n}`;return(0,f.jsxs)(r.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:i,points:y}),(0,f.jsx)("polyline",{fill:"none",stroke:o,strokeWidth:n,strokeLinejoin:"round",strokeLinecap:"round",points:m})]}),l&&(0,f.jsx)(Ce,{data:e,mapChartDataToTableData:l,dataTableCaption:c,dataTableHeaderLabels:d,isDataTableVisuallyHidden:p})]})};Ee.propTypes={data:g().arrayOf(g().shape({x:g().number,y:g().number})).isRequired,width:g().number.isRequired,height:g().number.isRequired,fillColor:g().string,strokeColor:g().string,strokeWidth:g().number,className:g().string,mapChartDataToTableData:g().func,dataTableCaption:g().string.isRequired,dataTableHeaderLabels:g().array.isRequired,isDataTableVisuallyHidden:g().bool};const Ie=Ee,Le=()=>(0,f.jsxs)("p",{className:"yoast-wincher-seo-performance-modal__loading-message",children:[(0,n.__)("Tracking the ranking position…","wordpress-seo")," ",(0,f.jsx)(V.SvgIcon,{icon:"loading-spinner"})]}),Ae=y()(V.SvgIcon)`
	margin-left: 2px;
	flex-shrink: 0;
	rotate: ${e=>e.isImproving?"-90deg":"90deg"};
`,Fe=y().span`
	color: ${e=>e.isImproving?"#69AB56":"#DC3332"};
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	margin-right: 2px;
	margin-left: 12px;
`,Pe=y().td`
	padding-right: 0 !important;

	& > div {
		margin: 0px;
	}
`,Me=y().td`
	padding-left: 2px !important;
`,qe=y().td.attrs({className:"yoast-table--nopadding"})`
	& > div {
		justify-content: center;
	}
`,Oe=y().div`
	display: flex;
	align-items: center;
	& > a {
		box-sizing: border-box;
	}
`,Ne=y().button`
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
    display: flex;
    align-items: center;
`,De=y().tr`
	background-color: ${e=>e.isEnabled?"#FFFFFF":"#F9F9F9"} !important;
`;function Ue(e){return Math.round(100*e)}function $e({chartData:e={}}){if((0,p.isEmpty)(e)||(0,p.isEmpty)(e.position))return"?";const t=function(e){return Array.from({length:e.position.history.length},(e,t)=>t+1).map(e=>(0,n.sprintf)((0,n._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)(Ie,{width:66,height:24,data:s,strokeWidth:1.8,strokeColor:"#498afc",fillColor:"#ade3fc",mapChartDataToTableData:Ue,dataTableCaption:(0,n.__)("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:i}){return i?(0,f.jsx)(V.SvgIcon,{icon:"loading-spinner"}):(0,f.jsx)(V.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}$e.propTypes={chartData:g().object};const Ke=({rowData:e={}})=>{var t;if(null==e||null===(t=e.position)||void 0===t||!t.change)return(0,f.jsx)($e,{chartData:e});const s=e.position.change<0;return(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)($e,{chartData:e}),(0,f.jsx)(Fe,{isImproving:s,children:Math.abs(e.position.change)}),(0,f.jsx)(Ae,{icon:"caret-right",color:s?"#69AB56":"#DC3332",size:"14px",isImproving:s})]})};function He({rowData:e,websiteId:t,keyphrase:s,onSelectKeyphrases:i}){const o=(0,r.useCallback)(()=>{i([s])},[i,s]),a=!(0,p.isEmpty)(e),l=e&&e.updated_at&&ve()(e.updated_at)>=ve()().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)(r.Fragment,{children:[(0,f.jsx)("td",{children:(0,f.jsxs)(Oe,{children:[Be(e),(0,f.jsx)(V.ButtonStyledLink,{variant:"secondary",href:c,style:{height:28,marginLeft:12},rel:"noopener",target:"_blank",children:(0,n.__)("View","wordpress-seo")})]})}),(0,f.jsx)("td",{className:"yoast-table--nopadding",children:(0,f.jsx)(Ne,{type:"button",onClick:o,children:(0,f.jsx)(Ke,{rowData:e})})}),(0,f.jsx)("td",{children:(d=e.updated_at,ve()(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,n.__)("Activate tracking to show the ranking position","wordpress-seo")})});var d}function ze({keyphrase:e,rowData:t={},onTrackKeyphrase:s=p.noop,onUntrackKeyphrase:i=p.noop,isFocusKeyphrase:o=!1,isDisabled:n=!1,isLoading:a=!1,websiteId:l="",isSelected:c,onSelectKeyphrases:d}){var u;const h=!(0,p.isEmpty)(t),g=!(0,p.isEmpty)(null==t||null===(u=t.position)||void 0===u?void 0:u.history),m=(0,r.useCallback)(()=>{n||(h?i(e,t.id):s(e))},[e,s,i,h,t,n]),y=(0,r.useCallback)(()=>{d(t=>c?t.filter(t=>t!==e):t.concat(e))},[d,c,e]);return(0,f.jsxs)(De,{isEnabled:h,children:[(0,f.jsx)(Pe,{children:g&&(0,f.jsx)(V.Checkbox,{id:"select-"+e,onChange:y,checked:c,label:""})}),(0,f.jsxs)(Me,{children:[e,o&&(0,f.jsx)("span",{children:"*"})]}),He({rowData:t,websiteId:l,keyphrase:e,onSelectKeyphrases:d}),(0,f.jsx)(qe,{children:We({keyphrase:e,isEnabled:h,toggleAction:m,isLoading:a})})]})}Ke.propTypes={rowData:g().object},ze.propTypes={rowData:g().object,keyphrase:g().string.isRequired,onTrackKeyphrase:g().func,onUntrackKeyphrase:g().func,isFocusKeyphrase:g().bool,isDisabled:g().bool,isLoading:g().bool,websiteId:g().string,isSelected:g().bool.isRequired,onSelectKeyphrases:g().func.isRequired};const Ye=(0,de.makeOutboundLink)(),Ve=y().span`
	display: block;
	font-style: italic;

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

	& > div {
		margin: 0px;
	}
`,Xe=y().th`
	padding-left: 2px !important;
`,Qe=e=>{const t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e}),t.current},Je=(0,p.debounce)(async function(e=null,t=null,s=null,i){return await Se({path:"yoast/v1/wincher/keyphrases",method:"POST",data:{keyphrases:e,permalink:s,startAt:t},signal:i})},500,{leading:!0}),et=({addTrackedKeyphrase:e,isLoggedIn:t=!1,isNewlyAuthenticated:s=!1,keyphrases:i=[],newRequest:o,removeTrackedKeyphrase:a,setRequestFailed:l,setKeyphraseLimitReached:c,setRequestSucceeded:d,setTrackedKeyphrases:u,setHasTrackedAll:h,trackAll:g=!1,trackedKeyphrases:m=null,websiteId:y="",permalink:w,focusKeyphrase:b="",startAt:x=null,selectedKeyphrases:v,onSelectKeyphrases:k})=>{const _=(0,r.useRef)(),j=(0,r.useRef)(),S=(0,r.useRef)(!1),[T,R]=(0,r.useState)([]),C=(0,r.useCallback)(e=>{const t=e.toLowerCase();return m&&!(0,p.isEmpty)(m)&&m.hasOwnProperty(t)?m[t]:null},[m]),E=(0,r.useMemo)(()=>async()=>{await je(()=>(j.current&&j.current.abort(),j.current="undefined"==typeof AbortController?null:new AbortController,Je(i,x,w,j.current.signal)),e=>{d(e),u(e.results)},e=>{l(e)})},[d,l,u,i,w,x]),I=(0,r.useCallback)(async t=>{const s=(Array.isArray(t)?t:[t]).map(e=>e.toLowerCase());R(e=>[...e,...s]),await je(()=>Te(s),t=>{d(t),e(t.results),E()},e=>{400===e.status&&e.limit&&c(e.limit),l(e)},201),R(e=>(0,p.without)(e,...s))},[d,l,c,e,E]),L=(0,r.useCallback)(async(e,t)=>{e=e.toLowerCase(),R(t=>[...t,e]),await je(()=>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)}),R(t=>(0,p.without)(t,e))},[d,a,l]),A=(0,r.useCallback)(async e=>{o(),await I(e)},[o,I]),F=Qe(w),P=Qe(i),M=Qe(x),q=w&&x;(0,r.useEffect)(()=>{t&&q&&(w!==F||(0,p.difference)(i,P).length||x!==M)&&E()},[t,w,F,i,P,E,q,x,M]),(0,r.useEffect)(()=>{if(t&&g&&null!==m){const e=i.filter(e=>!C(e));e.length&&I(e),h()}},[t,g,m,I,h,C,i]),(0,r.useEffect)(()=>{s&&!S.current&&(E(),S.current=!0)},[s,E]),(0,r.useEffect)(()=>{if(t&&!(0,p.isEmpty)(m))return(0,p.filter)(m,e=>(0,p.isEmpty)(e.updated_at)).length>0&&(_.current=setInterval(()=>{E()},1e4)),()=>{clearInterval(_.current)}},[t,m,E]);const O=t&&null===m,N=(0,r.useMemo)(()=>(0,p.isEmpty)(m)?[]:Object.values(m).filter(e=>{var t;return!(0,p.isEmpty)(null==e||null===(t=e.position)||void 0===t?void 0:t.history)}).map(e=>e.keyword),[m]),D=(0,r.useMemo)(()=>v.length>0&&N.length>0&&N.every(e=>v.includes(e)),[v,N]),U=(0,r.useCallback)(()=>{k(D?[]:N)},[k,D,N]),$=(0,r.useMemo)(()=>(0,p.orderBy)(i,[e=>Object.values(m||{}).map(e=>e.keyword).includes(e)],["desc"]),[i,m]);return i&&!(0,p.isEmpty)(i)&&(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(Ge,{children:(0,f.jsxs)("table",{className:"yoast yoast-table",children:[(0,f.jsx)("thead",{children:(0,f.jsxs)("tr",{children:[(0,f.jsx)(Ze,{isDisabled:0===N.length,children:(0,f.jsx)(V.Checkbox,{id:"select-all",onChange:U,checked:D,label:""})}),(0,f.jsx)(Xe,{scope:"col",abbr:(0,n.__)("Keyphrase","wordpress-seo"),children:(0,n.__)("Keyphrase","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,n.__)("Position","wordpress-seo"),children:(0,n.__)("Position","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,n.__)("Position over time","wordpress-seo"),children:(0,n.__)("Position over time","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,n.__)("Last updated","wordpress-seo"),children:(0,n.__)("Last updated","wordpress-seo")}),(0,f.jsx)("th",{scope:"col",abbr:(0,n.__)("Tracking","wordpress-seo"),children:(0,n.__)("Tracking","wordpress-seo")})]})}),(0,f.jsx)("tbody",{children:$.map((e,s)=>(0,f.jsx)(ze,{keyphrase:e,onTrackKeyphrase:A,onUntrackKeyphrase:L,rowData:C(e),isFocusKeyphrase:e===b.trim().toLowerCase(),websiteId:y,isDisabled:!t,isLoading:O||T.indexOf(e.toLowerCase())>=0,isSelected:v.includes(e),onSelectKeyphrases:k},`trackable-keyphrase-${s}`))})]})}),(0,f.jsxs)("p",{style:{marginBottom:0,position:"relative"},children:[(0,f.jsx)(Ye,{href:wpseoAdminGlobalL10n["links.wincher.login"],children:(0,n.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
(0,n.__)("Get more insights over at %s","wordpress-seo"),"Wincher")}),(0,f.jsx)(Ve,{children:(0,n.__)("* focus keyphrase","wordpress-seo")})]})]})};et.propTypes={addTrackedKeyphrase:g().func.isRequired,isLoggedIn:g().bool,isNewlyAuthenticated:g().bool,keyphrases:g().array,newRequest:g().func.isRequired,removeTrackedKeyphrase:g().func.isRequired,setRequestFailed:g().func.isRequired,setKeyphraseLimitReached:g().func.isRequired,setRequestSucceeded:g().func.isRequired,setTrackedKeyphrases:g().func.isRequired,setHasTrackedAll:g().func.isRequired,trackAll:g().bool,trackedKeyphrases:g().object,websiteId:g().string,permalink:g().string.isRequired,focusKeyphrase:g().string,startAt:g().string,selectedKeyphrases:g().arrayOf(g().string).isRequired,onSelectKeyphrases:g().func.isRequired};const tt=et,st=(0,re.compose)([(0,t.withSelect)(e=>{const{getWincherWebsiteId:t,getWincherTrackableKeyphrases:s,getWincherLoginStatus:i,getWincherPermalink:o,getFocusKeyphrase:r,isWincherNewlyAuthenticated:n,shouldWincherTrackAll:a}=e("yoast-seo/editor");return{focusKeyphrase:r(),keyphrases:s(),isLoggedIn:i(),trackAll:a(),websiteId:t(),isNewlyAuthenticated:n(),permalink:o()}}),(0,t.withDispatch)(e=>{const{setWincherNewRequest:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherSetKeyphraseLimitReached:o,setWincherTrackedKeyphrases:r,setWincherTrackingForKeyphrase:n,setWincherTrackAllKeyphrases:a,unsetWincherTrackingForKeyphrase:l}=e("yoast-seo/editor");return{newRequest:()=>{t()},setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},setKeyphraseLimitReached:e=>{o(e)},addTrackedKeyphrase:e=>{n(e)},removeTrackedKeyphrase:e=>{l(e)},setTrackedKeyphrases:e=>{r(e)},setHasTrackedAll:()=>{a(!1)}}})])(tt);class it{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,i=["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,i.join(","))),this.popup&&this.popup.focus(),window.addEventListener("message",this.messageHandler,!1)}async messageHandler(e){const{data:t,source:s,origin:i}=e;i===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 ot=()=>(0,f.jsx)(V.Alert,{type:"info",children:(0,n.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,n.__)("Automatic tracking of keyphrases is enabled. Your keyphrase(s) will automatically be tracked by %s when you publish your post.","wordpress-seo"),"Wincher")}),rt=()=>(0,f.jsx)(V.Alert,{type:"success",children:(0,n.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,n.__)("You have successfully connected to %s! You can now track the SEO performance for the keyphrase(s) of this page.","wordpress-seo"),"Wincher")}),nt=()=>(0,f.jsx)(V.Alert,{type:"info",children:(0,n.sprintf)(/* translators: %s: Expands to "Wincher". */ /* translators: %s: Expands to "Wincher". */
(0,n.__)("%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")}),at=(0,de.makeOutboundLink)(),lt=(0,de.makeOutboundLink)(),ct=()=>{const e=(0,n.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,n.__)("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:T(e,{wincherLink:(0,f.jsx)(at,{href:wpseoAdminGlobalL10n["links.wincher.website"],children:"Wincher"}),wincherReadMoreLink:(0,f.jsx)(lt,{href:wpseoAdminL10n["shortlinks.wincher.seo_performance"],children:(0,n.__)("Read more about keyphrase tracking with Wincher","wordpress-seo")})})})},dt=(0,de.makeOutboundLink)(),pt=({limit:e=10})=>{const t=(0,n.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,n.__)("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)(V.Alert,{type:"error",children:T(t,{UpdateWincherPlanLink:(0,f.jsx)(dt,{href:wpseoAdminGlobalL10n["links.wincher.pricing"],children:(0,n.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */
(0,n.__)("upgrade your %s plan","wordpress-seo"),"Wincher")})})})};pt.propTypes={limit:g().number};const ut=pt,ht=()=>(0,f.jsx)(V.Alert,{type:"error",children:(0,n.__)("No keyphrase has been set. Please set a keyphrase first.","wordpress-seo")}),gt=()=>(0,f.jsx)(V.Alert,{type:"error",children:(0,n.__)("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")}),mt=({onReconnect:e,className:t=""})=>{const s=(0,n.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,n.__)("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)(V.Alert,{type:"error",className:t,children:T(s,{reconnectToWincher:(0,f.jsx)("a",{href:"#",onClick:t=>{t.preventDefault(),e()},children:(0,n.sprintf)(/* translators: %s : Expands to "Wincher". */ /* translators: %s : Expands to "Wincher". */
(0,n.__)("reconnect to %s","wordpress-seo"),"Wincher")})})})};mt.propTypes={onReconnect:g().func.isRequired,className:g().string};const yt=mt,ft=()=>(0,f.jsx)(V.Alert,{type:"error",children:(0,n.__)("Something went wrong while tracking the ranking position(s) of your page. Please try again later.","wordpress-seo")}),wt=y().p`
	color: ${G.colors.$color_pink_dark};
	font-size: 14px;
	font-weight: 700;
	margin: 13px 0 10px;
`,bt=y()(V.SvgIcon)`
	margin-right: 5px;
	vertical-align: middle;
`,xt=y().button`
	position: absolute;
	top: 9px;
	right: 9px;
	border: none;
	background: none;
	cursor: pointer;
`,vt=y().p`
	font-size: 13px;
	font-weight: 500;
	margin: 10px 0 13px;
`,kt=y().div`
	position: relative;
	background: ${e=>e.isTitleShortened?"#f5f7f7":"transparent"};
	border: 1px solid #c7c7c7;
	border-left: 4px solid${G.colors.$color_pink_dark};
	padding: 0 16px;
	margin-bottom: 1.5em;
`,_t=({limit:e,usage:t,isTitleShortened:s=!1,isFreeAccount:i=!1})=>{const o=(0,n.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,n.__)("Your are tracking %1$s out of %2$s keyphrases included in your free account.","wordpress-seo"),t,e),r=(0,n.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,n.__)("Your are tracking %1$s out of %2$s keyphrases included in your account.","wordpress-seo"),t,e),a=i?o:r,l=(0,n.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,n.__)("Keyphrases tracked: %1$s/%2$s","wordpress-seo"),t,e),c=s?l:a;return(0,f.jsxs)(wt,{children:[s&&(0,f.jsx)(bt,{icon:"exclamation-triangle",color:G.colors.$color_pink_dark,size:"14px"}),c]})};_t.propTypes={limit:g().number.isRequired,usage:g().number.isRequired,isTitleShortened:g().bool,isFreeAccount:g().bool};const jt=(0,de.makeOutboundLink)(),St=({discount:e,months:t})=>{const s=(0,f.jsx)(jt,{href:wpseoAdminGlobalL10n["links.wincher.upgrade"],style:{fontWeight:600},children:(0,n.sprintf)(/* Translators: %s : Expands to "Wincher". */ /* Translators: %s : Expands to "Wincher". */
(0,n.__)("Click here to upgrade your %s plan","wordpress-seo"),"Wincher")});if(!e||!t)return(0,f.jsx)(vt,{children:s});const i=100*e,o=(0,n.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,n.__)("%1$s and get an exclusive %2$s discount for %3$s month(s).","wordpress-seo"),"<wincherAccountUpgradeLink/>",i+"%",t);return(0,f.jsx)(vt,{children:T(o,{wincherAccountUpgradeLink:s})})};St.propTypes={discount:g().number,months:g().number};const Tt=({onClose:e=null,isTitleShortened:t=!1,trackingInfo:s=null})=>{const i=(()=>{const[e,t]=(0,r.useState)(null);return(0,r.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==i?void 0:i.discount);return(0,f.jsxs)(kt,{isTitleShortened:t,children:[e&&(0,f.jsx)(xt,{type:"button","aria-label":(0,n.__)("Close the upgrade callout","wordpress-seo"),onClick:e,children:(0,f.jsx)(V.SvgIcon,{icon:"times-circle",color:G.colors.$color_pink_dark,size:"14px"})}),(0,f.jsx)(_t,{...s,isTitleShortened:t,isFreeAccount:l}),(0,f.jsx)(St,{discount:null==i?void 0:i.discount,months:null==i?void 0:i.months})]})};Tt.propTypes={onClose:g().func,isTitleShortened:g().bool,trackingInfo:g().object};const Rt=Tt,Ct=window.yoast["chart.js"],Et="label";function It(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Lt(e,t){e.labels=t}function At(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Et;const i=[];e.datasets=t.map(t=>{const o=e.datasets.find(e=>e[s]===t[s]);return o&&t.data&&!i.includes(o)?(i.push(o),Object.assign(o,t),o):{...t}})}function Ft(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Et;const s={labels:[],datasets:[]};return Lt(s,e.labels),At(s,e.datasets,t),s}function Pt(e,t){const{height:s=150,width:i=300,redraw:o=!1,datasetIdKey:r,type:n,data:a,options:l,plugins:c=[],fallbackContent:d,updateMode:p,...u}=e,h=(0,j.useRef)(null),g=(0,j.useRef)(),m=()=>{h.current&&(g.current=new Ct.Chart(h.current,{type:n,data:Ft(a,r),options:l&&{...l},plugins:c}),It(t,g.current))},y=()=>{It(t,null),g.current&&(g.current.destroy(),g.current=null)};return(0,j.useEffect)(()=>{!o&&g.current&&l&&function(e,t){const s=e.options;s&&t&&Object.assign(s,t)}(g.current,l)},[o,l]),(0,j.useEffect)(()=>{!o&&g.current&&Lt(g.current.config.data,a.labels)},[o,a.labels]),(0,j.useEffect)(()=>{!o&&g.current&&a.datasets&&At(g.current.config.data,a.datasets,r)},[o,a.datasets]),(0,j.useEffect)(()=>{g.current&&(o?(y(),setTimeout(m)):g.current.update(p))},[o,l,a.labels,a.datasets,p]),(0,j.useEffect)(()=>{g.current&&(y(),setTimeout(m))},[n]),(0,j.useEffect)(()=>(m(),()=>y()),[]),j.createElement("canvas",Object.assign({ref:h,role:"img",height:s,width:i},u),d)}const Mt=(0,j.forwardRef)(Pt);function qt(e,t){return Ct.Chart.register(t),(0,j.forwardRef)((t,s)=>j.createElement(Mt,Object.assign({},t,{ref:s,type:e})))}const Ot=qt("line",Ct.LineController),Nt={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"};Ct._adapters._date.override("function"==typeof ve()?{_id:"moment",formats:function(){return Nt},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=ve()(e,t):e instanceof ve()||(e=ve()(e)),e.isValid()?e.valueOf():null},format:function(e,t){return ve()(e).format(t)},add:function(e,t,s){return ve()(e).add(t,s).valueOf()},diff:function(e,t,s){return ve()(e).diff(ve()(t),s)},startOf:function(e,t,s){return e=ve()(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 ve()(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 Dt=["top","right","bottom","left"];function Ut(e,t,s){const i={};s=s?"-"+s:"";for(let o=0;o<4;o++){const r=Dt[o];i[r]=parseFloat(e[t+"-"+r+s])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}!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){}}(),Ct.Chart.register(Ct.CategoryScale,Ct.LineController,Ct.LineElement,Ct.PointElement,Ct.LinearScale,Ct.TimeScale,Ct.Legend,Ct.Tooltip);const $t=["#ff983b","#ffa3f7","#3798ff","#ff3b3b","#acce81","#b51751","#3949ab","#26c6da","#ccb800","#de66ff","#4db6ac","#ffab91","#45f5f1","#77f210","#90a4ae","#ffd54f","#006b5e","#8ec7d2","#b1887c","#cc9300"];function Wt({datasets:e,isChartShown:t,keyphrases:s}){if(!t)return null;const i=(0,r.useMemo)(()=>Object.fromEntries([...s].sort().map((e,t)=>[e,$t[t%$t.length]])),[s]),o=e.map(e=>{const t=i[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)(Ot,{height:100,data:{datasets:o},options:{plugins:{legend:{display:!0,position:"bottom",labels:{color:"black",usePointStyle:!0,boxHeight:7,boxWidth:7},onClick:p.noop},tooltip:{enabled:!0,callbacks:{title:e=>ve()(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}}}})}Ct.Interaction.modes.xPoint=(e,t,s,i)=>{const o=function(e,t){if("native"in e)return e;const{canvas:s,currentDevicePixelRatio:i}=t,o=(h=s).ownerDocument.defaultView.getComputedStyle(h,null),r="border-box"===o.boxSizing,n=Ut(o,"padding"),a=Ut(o,"border","width"),{x:l,y:c,box:d}=function(e,t){const s=e.touches,i=s&&s.length?s[0]:e,{offsetX:o,offsetY:r}=i;let n,a,l=!1;if(((e,t,s)=>(e>0||t>0)&&(!s||!s.shadowRoot))(o,r,e.target))n=o,a=r;else{const e=t.getBoundingClientRect();n=i.clientX-e.left,a=i.clientY-e.top,l=!0}return{x:n,y:a,box:l}}(e,s),p=n.left+(d&&a.left),u=n.top+(d&&a.top);var h;let{width:g,height:m}=t;return r&&(g-=n.width+a.width,m-=n.height+a.height),{x:Math.round((l-p)/g*s.width/i),y:Math.round((c-u)/m*s.height/i)}}(t,e);let r=[];if(Ct.Interaction.evaluateInteractionItems(e,"x",o,(e,t,s)=>{e.inXRange(o.x,i)&&r.push({element:e,datasetIndex:t,index:s})}),0===r.length)return r;const n=r.reduce((e,t)=>Math.abs(o.x-e.element.x)<Math.abs(o.x-t.element.x)?e:t).element.x;return r=r.filter(e=>e.element.x===n),r.some(e=>Math.abs(e.element.y-o.y)<10)?r:[]},Wt.propTypes={datasets:g().arrayOf(g().shape({label:g().string.isRequired,data:g().arrayOf(g().shape({datetime:g().string.isRequired,value:g().number.isRequired})).isRequired,selected:g().bool})).isRequired,isChartShown:g().bool.isRequired,keyphrases:g().array.isRequired};const Bt=({response:e,onLogin:t})=>[401,403,404].includes(e.status)?(0,f.jsx)(yt,{onReconnect:t}):(0,f.jsx)(ft,{});Bt.propTypes={response:g().object.isRequired,onLogin:g().func.isRequired};const Kt=({isSuccess:e,response:t={},allKeyphrasesMissRanking:s,onLogin:i,keyphraseLimitReached:o,limit:r})=>o?(0,f.jsx)(ut,{limit:r}):(0,p.isEmpty)(t)||e?s?(0,f.jsx)(nt,{}):null:(0,f.jsx)(Bt,{response:t,onLogin:i});Kt.propTypes={isSuccess:g().bool.isRequired,allKeyphrasesMissRanking:g().bool.isRequired,response:g().object,onLogin:g().func.isRequired,keyphraseLimitReached:g().bool.isRequired,limit:g().number.isRequired};let Ht=null;const zt=async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r})=>{if(Ht&&!Ht.isClosed())return void Ht.focus();const{url:n}=await async function(){return await Se({path:"yoast/v1/wincher/authorization-url",method:"GET"})}();Ht=new it(n,{success:{type:"wincher:oauth:success",callback:n=>(async({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)=>{await je(()=>async function(e){const{code:t,websiteId:s}=e;return await Se({path:"yoast/v1/wincher/authenticate",method:"POST",data:{code:t,websiteId:s}})}(n),async a=>{e(!0,!0,n.websiteId.toString()),t(a);const l=(Array.isArray(i)?i:[i]).map(e=>e.toLowerCase());await je(()=>Te(l),e=>{t(e),o(e.results)},e=>{400===e.status&&e.limit&&r(e.limit),s(e)},201);const c=Ht.getPopup();c&&c.close()},async e=>s(e))})({onAuthentication:e,setRequestSucceeded:t,setRequestFailed:s,keyphrases:i,addTrackedKeyphrase:o,setKeyphraseLimitReached:r},n)},error:{type:"wincher:oauth:error",callback:()=>e(!1,!1)}},{title:"Wincher_login",width:500,height:700}),Ht.createPopup()},Yt=e=>e.isLoggedIn?null:(0,f.jsx)("p",{children:(0,f.jsx)(V.NewButton,{onClick:e.onLogin,variant:"primary",children:(0,n.sprintf)(/* translators: %s expands to Wincher */ /* translators: %s expands to Wincher */
(0,n.__)("Connect with %s","wordpress-seo"),"Wincher")})});Yt.propTypes={isLoggedIn:g().bool.isRequired,onLogin:g().func.isRequired};const Vt=y().div`
	p {
		margin: 1em 0;
	}
`,Gt=y().div`
	${e=>e.isDisabled&&"\n\t\topacity: .5;\n\t\tpointer-events: none;\n\t"};
`,Zt=y().div`
	font-weight: var(--yoast-font-weight-bold);
	color: var(--yoast-color-label);
	font-size: var(--yoast-font-size-default);
`,Xt=y().div.attrs({className:"yoast-field-group"})`
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
`,Qt=y().div`
	margin: 8px 0;
`,Jt=ve().utc().startOf("day"),es=[{name:(0,n.__)("Last day","wordpress-seo"),value:ve()(Jt).subtract(1,"days").format(),defaultIndex:1},{name:(0,n.__)("Last week","wordpress-seo"),value:ve()(Jt).subtract(1,"week").format(),defaultIndex:2},{name:(0,n.__)("Last month","wordpress-seo"),value:ve()(Jt).subtract(1,"month").format(),defaultIndex:3},{name:(0,n.__)("Last year","wordpress-seo"),value:ve()(Jt).subtract(1,"year").format(),defaultIndex:0}],ts=({onSelect:e,selected:t=null,options:s,isLoggedIn:i})=>i?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;ts.propTypes={onSelect:g().func.isRequired,selected:g().object,options:g().array.isRequired,isLoggedIn:g().bool.isRequired};const ss=({trackedKeyphrases:e=null,isLoggedIn:t,keyphrases:s,shouldTrackAll:i,permalink:o,historyDaysLimit:a=0})=>{if(!o&&t)return(0,f.jsx)(gt,{});if(0===s.length)return(0,f.jsx)(ht,{});const l=ve()(Jt).subtract(a,"days"),c=es.filter(e=>ve()(e.value).isSameOrAfter(l)),d=(0,p.orderBy)(c,e=>e.defaultIndex,"desc")[0],[u,h]=(0,r.useState)(d),[g,m]=(0,r.useState)([]),y=g.length>0,w=(0,re.usePrevious)(e);(0,r.useEffect)(()=>{if(!(0,p.isEmpty)(e)&&(0,p.difference)(Object.keys(e),Object.keys(w||[])).length){const t=Object.values(e).map(e=>e.keyword);m(t)}},[e,w]),(0,r.useEffect)(()=>{h(d)},[null==d?void 0:d.name]);const b=(0,r.useCallback)(e=>{const t=es.find(t=>t.value===e.target.value);t&&h(t)},[h]),x=(0,r.useMemo)(()=>(0,p.isEmpty)(g)||(0,p.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:g.includes(e.keyword)&&!(0,p.isEmpty)(null===(t=e.position)||void 0===t?void 0:t.history)}}),[g,e]);return(0,f.jsxs)(Gt,{isDisabled:!t,children:[(0,f.jsx)("p",{children:(0,n.__)("You can enable / disable tracking the SEO performance for each keyphrase below.","wordpress-seo")}),t&&i&&(0,f.jsx)(ot,{}),(0,f.jsx)(Xt,{children:(0,f.jsx)(ts,{selected:u,onSelect:b,options:c,isLoggedIn:t})}),(0,f.jsx)(Qt,{children:(0,f.jsx)(Wt,{isChartShown:y,datasets:x,keyphrases:s})}),(0,f.jsx)(st,{startAt:null==u?void 0:u.value,selectedKeyphrases:g,onSelectKeyphrases:m,trackedKeyphrases:e})]})};function is({trackedKeyphrases:e=null,addTrackedKeyphrase:t,isLoggedIn:s=!1,isNewlyAuthenticated:i=!1,keyphrases:o=[],response:a={},shouldTrackAll:l=!1,permalink:c="",allKeyphrasesMissRanking:d,isSuccess:p,keyphraseLimitReached:u,limit:h,setRequestSucceeded:g,setRequestFailed:m,setKeyphraseLimitReached:y,onAuthentication:w}){const b=(0,r.useCallback)(()=>{zt({onAuthentication:w,setRequestSucceeded:g,setRequestFailed:m,keyphrases:o,addTrackedKeyphrase:t,setKeyphraseLimitReached:y})},[zt,w,g,m,o,t,y]),x=(e=>{const[t,s]=(0,r.useState)(null);return(0,r.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)(Vt,{children:[i&&(0,f.jsx)(rt,{}),s&&(0,f.jsx)(Rt,{trackingInfo:x}),(0,f.jsxs)(Zt,{children:[(0,n.__)("SEO performance","wordpress-seo"),(0,f.jsx)(V.HelpIcon,{linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about the SEO performance feature.","wordpress-seo")})]}),(0,f.jsx)(ct,{}),(0,f.jsx)(Yt,{isLoggedIn:s,onLogin:b}),(0,f.jsx)(Kt,{isSuccess:p,response:a,allKeyphrasesMissRanking:d,keyphraseLimitReached:u,limit:h,onLogin:b}),(0,f.jsx)(ss,{trackedKeyphrases:e,isLoggedIn:s,keyphrases:o,shouldTrackAll:l,permalink:c,historyDaysLimit:(null==x?void 0:x.historyDays)||31})]})}ss.propTypes={trackedKeyphrases:g().object,keyphrases:g().array.isRequired,isLoggedIn:g().bool.isRequired,shouldTrackAll:g().bool.isRequired,permalink:g().string.isRequired,historyDaysLimit:g().number},is.propTypes={trackedKeyphrases:g().object,addTrackedKeyphrase:g().func.isRequired,isLoggedIn:g().bool,isNewlyAuthenticated:g().bool,keyphrases:g().array,response:g().object,shouldTrackAll:g().bool,permalink:g().string,allKeyphrasesMissRanking:g().bool.isRequired,isSuccess:g().bool.isRequired,keyphraseLimitReached:g().bool.isRequired,limit:g().number.isRequired,setRequestSucceeded:g().func.isRequired,setRequestFailed:g().func.isRequired,setKeyphraseLimitReached:g().func.isRequired,onAuthentication:g().func.isRequired};const os=(0,re.compose)([(0,t.withSelect)(e=>{const{isWincherNewlyAuthenticated:t,getWincherKeyphraseLimitReached:s,getWincherLimit:i,getWincherLoginStatus:o,getWincherRequestIsSuccess:r,getWincherRequestResponse:n,getWincherTrackableKeyphrases:a,getWincherTrackedKeyphrases:l,getWincherAllKeyphrasesMissRanking:c,getWincherPermalink:d,shouldWincherAutomaticallyTrackAll:p}=e("yoast-seo/editor");return{keyphrases:a(),trackedKeyphrases:l(),allKeyphrasesMissRanking:c(),isLoggedIn:o(),isNewlyAuthenticated:t(),isSuccess:r(),keyphraseLimitReached:s(),limit:i(),response:n(),shouldTrackAll:p(),permalink:d()}}),(0,t.withDispatch)(e=>{const{setWincherWebsiteId:t,setWincherRequestSucceeded:s,setWincherRequestFailed:i,setWincherTrackingForKeyphrase:o,setWincherSetKeyphraseLimitReached:r,setWincherLoginStatus:n}=e("yoast-seo/editor");return{setRequestSucceeded:e=>{s(e)},setRequestFailed:e=>{i(e)},addTrackedKeyphrase:e=>{o(e)},setKeyphraseLimitReached:e=>{r(e)},onAuthentication:(e,s,i)=>{t(i),n(e,s)}}})])(is),rs=y()(ne)`
	width: 18px;
	height: 18px;
	margin: 3px;
`;function ns({keyphrases:e,onNoKeyphraseSet:t,onOpen:s,location:i}){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(i)}function as({location:e="",whichModalOpen:t="none",shouldCloseOnClickOutside:s=!0,keyphrases:i,onNoKeyphraseSet:o,onOpen:a,onClose:l}){const c=(0,r.useCallback)(()=>{ns({keyphrases:i,onNoKeyphraseSet:o,onOpen:a,location:e})},[ns,i,o,a,e]),d=(0,n.__)("Track SEO performance","wordpress-seo"),p=ae();return(0,f.jsxs)(r.Fragment,{children:[t===e&&(0,f.jsx)(he,{title:d,onRequestClose:l,icon:(0,f.jsx)(fe,{}),additionalClassName:"yoast-wincher-seo-performance-modal yoast-gutenberg-modal__no-padding",shouldCloseOnClickOutside:s,children:(0,f.jsx)(pe,{className:"yoast-gutenberg-modal__content yoast-wincher-seo-performance-modal__content",children:(0,f.jsx)(os,{})})}),"sidebar"===e&&(0,f.jsx)(be,{id:`wincher-open-button-${e}`,title:d,SuffixHeroIcon:(0,f.jsx)(rs,{className:"yst-text-slate-500",...p}),onClick:c}),"metabox"===e&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(ce,{id:`wincher-open-button-${e}`,onClick:c,children:[(0,f.jsx)(ce.Text,{children:d}),(0,f.jsx)(ne,{className:"yst-h-5 yst-w-5 yst-text-slate-500",...p})]})})]})}as.propTypes={location:g().string,whichModalOpen:g().oneOf(["none","metabox","sidebar","postpublish"]),shouldCloseOnClickOutside:g().bool,keyphrases:g().array.isRequired,onNoKeyphraseSet:g().func.isRequired,onOpen:g().func.isRequired,onClose:g().func.isRequired};const ls=(0,re.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:i}=e("yoast-seo/editor");return{onOpen:e=>{t(e)},onClose:()=>{s()},onNoKeyphraseSet:()=>{i()}}})])(as),cs=window.yoast.externals.components;function ds(){return(0,re.createHigherOrderComponent)(function(e){return(0,re.pure)(function(t){const s=(0,r.useContext)(c.LocationContext);return(0,r.createElement)(e,{...t,location:s})})},"withLocation")}const ps=(0,re.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}}),ds()])(cs.CollapsibleCornerstone),us=window.yoast.searchMetadataPreviews,hs=y()(V.StyledSection)`
	&${V.StyledSectionBase} {
		padding: 0;

		& ${V.StyledHeading} {
			${(0,de.getDirectionalStyle)("padding-left","padding-right")}: 20px;
			margin-left: ${(0,de.getDirectionalStyle)("0","20px")};
		}
	}
`,gs=({children:e=null,title:t="",icon:s="",hasPaperStyle:i=!0,shoppingData:o=null})=>(0,f.jsx)(hs,{headingLevel:3,headingText:t,headingIcon:s,headingIconColor:"#555",hasPaperStyle:i,shoppingData:o,children:e});gs.propTypes={children:g().element,title:g().string,icon:g().string,hasPaperStyle:g().bool,shoppingData:g().object};const ms=gs,ys=window.wp.sanitize;function fs(e,t,s="",i=!1){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLE",name:e,value:"string"==typeof t?(0,de.decodeHTML)(t):t,label:s,hidden:i}}function ws(e){return e.charAt(0).toUpperCase()+e.slice(1)}const{stripHTMLTags:bs}=de.strings,xs=["slug","content","contentImage","snippetPreviewImageURL"];function vs(e,t="_"){return e.replace(/\s/g,t)}function ks(e,t=156){return(e=(e=(0,ys.stripTags)(e)).trim()).length<=t||(e=e.substring(0,t),/\s/.test(e)&&(e=e.substring(0,e.lastIndexOf(" ")))),e}const _s=(0,p.memoize)((e,t)=>0===e?p.noop:(0,p.debounce)(s=>t(s,e),500)),js=({link:e,text:t})=>(0,f.jsxs)(k.Root,{children:[(0,f.jsx)("p",{children:t}),(0,f.jsxs)(k.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)(R,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,n.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,n.__)("Unlock with %1$s","wordpress-seo"),"Yoast WooCommerce SEO")]})]});js.propTypes={link:g().string.isRequired,text:g().string.isRequired};const Ss=js,Ts=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)),function(e){const t=(0,p.get)(window,["YoastSEO","app","pluggable"],!1);if(!t||!(0,p.get)(window,["YoastSEO","app","pluggable","loaded"],!1))return function(e){const t=(0,p.get)(window,["YoastSEO","wp","replaceVarsPlugin","replaceVariables"],p.identity);return{url:e.url,title:bs(t(e.title)),description:bs(t(e.description)),filteredSEOTitle:e.filteredSEOTitle?bs(t(e.filteredSEOTitle)):""}}(e);const s=t._applyModifications.bind(t);return{url:e.url,title:bs(s("data_page_title",e.title)),description:bs(s("data_meta_desc",e.description)),filteredSEOTitle:e.filteredSEOTitle?bs(s("data_page_title",e.filteredSEOTitle)):""}}(e)},Rs=(0,re.compose)([(0,t.withSelect)(function(e){const{getBaseUrlFromSettings:t,getDateFromSettings:s,getFocusKeyphrase:i,getRecommendedReplaceVars:o,getReplaceVars:r,getShoppingData:n,getSiteIconUrlFromSettings:a,getSnippetEditorData:l,getSnippetEditorMode:c,getSnippetEditorPreviewImageUrl:d,getSnippetEditorWordsToHighlight:p,isCornerstoneContent:u,getIsTerm:h,getContentLocale:g,getSiteName:m}=e("yoast-seo/editor"),y=r();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:i(),mobileImageSrc:d(),mode:c(),recommendedReplacementVariables:o(),replacementVariables:y,shoppingData:n(),wordsToHighlight:p(),isCornerstone:u(),isTaxonomy:h(),locale:g(),siteName:m()}}),(0,t.withDispatch)(function(e,t,{select:s}){const{updateData:i,switchMode:o,updateAnalysisData:r,findCustomFields:n}=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":i({slug:t}),a&&a.editPost({slug:t});break;default:i({[e]:t})}},onChangeAnalysisData:r,onReplacementVariableSearchChange:_s(l,n)}})])(e=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").selectLink("https://yoa.st/product-google-preview-metabox"),[]),i=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsWooSeoUpsell(),[]),o=(0,n.__)("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)(ms,{icon:"eye",hasPaperStyle:e.hasPaperStyle,children:(0,f.jsxs)(f.Fragment,{children:[i&&(0,f.jsx)(Ss,{link:s,text:o}),(0,f.jsx)(us.SnippetEditor,{...e,descriptionPlaceholder:(0,n.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:Ts,showCloseButton:!1,idSuffix:t})]})})})}),Cs=(0,t.withSelect)(e=>{const{getWarningMessage:t}=e("yoast-seo/editor");return{message:t()}})(V.Warning),Es=window.yoast.featureFlag,Is=y()(V.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);
	}

`,Ls=({initialIsOpen:e,id:t,...s})=>(0,f.jsx)(Is,{hasPadding:!0,hasSeparator:!0,initialIsOpen:e,id:t,...s}),As=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getEstimatedReadingTime(),[]),s=(0,r.useMemo)(()=>(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-estimated_reading_time",""),[]);return(0,f.jsx)(V.InsightsCard,{amount:e,unit:(0,n._n)("minute","minutes",e,"wordpress-seo"),title:(0,n.__)("Reading time","wordpress-seo"),linkTo:s
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about reading time","wordpress-seo")})},Fs=(0,de.makeOutboundLink)();function Ps(e,t){return-1===e?(0,n.__)("Your text should be slightly longer to calculate your Flesch reading ease score.","wordpress-seo"):(0,n.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,n.__)("The copy scores %1$s in the test, which is considered %2$s to read.","wordpress-seo"),e,function(e){switch(e){case Z.DIFFICULTY.NO_DATA:return(0,n.__)("no data","wordpress-seo");case Z.DIFFICULTY.VERY_EASY:return(0,n.__)("very easy","wordpress-seo");case Z.DIFFICULTY.EASY:return(0,n.__)("easy","wordpress-seo");case Z.DIFFICULTY.FAIRLY_EASY:return(0,n.__)("fairly easy","wordpress-seo");case Z.DIFFICULTY.OKAY:return(0,n.__)("okay","wordpress-seo");case Z.DIFFICULTY.FAIRLY_DIFFICULT:return(0,n.__)("fairly difficult","wordpress-seo");case Z.DIFFICULTY.DIFFICULT:return(0,n.__)("difficult","wordpress-seo");case Z.DIFFICULTY.VERY_DIFFICULT:return(0,n.__)("very difficult","wordpress-seo")}}(t))}const Ms=()=>{let e=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseScore(),[]);const s=(0,r.useMemo)(()=>(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease",""),[]),i=(0,t.useSelect)(e=>e("yoast-seo/editor").getFleschReadingEaseDifficulty(),[e]),o=(0,r.useMemo)(()=>{const t=(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-flesch_reading_ease_article","");return function(e,t,s){const i=function(e){switch(e){case Z.DIFFICULTY.FAIRLY_DIFFICULT:case Z.DIFFICULTY.DIFFICULT:case Z.DIFFICULTY.VERY_DIFFICULT:return(0,n.__)("Try to make shorter sentences, using less difficult words to improve readability","wordpress-seo");case Z.DIFFICULTY.NO_DATA:return(0,n.__)("Continue writing to get insight into the readability of your text!","wordpress-seo");default:return(0,n.__)("Good job!","wordpress-seo")}}(t);return(0,f.jsxs)("span",{children:[Ps(e,t)," ",t>=Z.DIFFICULTY.FAIRLY_DIFFICULT?(0,f.jsx)(Fs,{href:s,children:i+"."}):i]})}(e,i,t)},[e,i]);return-1===e&&(e="?"),(0,f.jsx)(V.InsightsCard,{amount:e,unit:(0,n.__)("out of 100","wordpress-seo"),title:(0,n.__)("Flesch reading ease","wordpress-seo"),linkTo:s
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about Flesch reading ease","wordpress-seo"),description:o})},qs=({data:e=[],itemScreenReaderText:t="",className:s="",...i})=>{const o=(0,r.useMemo)(()=>{var t,s;return null!==(t=null===(s=(0,p.maxBy)(e,"number"))||void 0===s?void 0:s.number)&&void 0!==t?t:0},[e]);return(0,f.jsx)("ul",{className:K()("yoast-data-model",s),...i,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,n.sprintf)(t,s)})]},`${e}_dataItem`))})};qs.propTypes={data:g().arrayOf(g().shape({name:g().string.isRequired,number:g().number.isRequired})),itemScreenReaderText:g().string,className:g().string};const Os=qs,Ns=(0,de.makeOutboundLink)(),Ds=({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,r.useMemo)(()=>(0,p.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-prominent_words`,""),[e]),l=(0,r.useMemo)(()=>{const e=(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-keyword_research_link","");return T((0,n.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,n.__)("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)(Ns,{href:e})})},[]),d=(0,r.useMemo)(()=>T((0,n.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,n.__)("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",{})}),[]),u=(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,r.useMemo)(()=>{const e=(0,n.sprintf)(
// translators: %1$s expands to Yoast SEO Premium.
// translators: %1$s expands to Yoast SEO Premium.
(0,n.__)("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}))},[]),g=(0,r.useMemo)(()=>o?h:u.map(({word:e,occurrence:t})=>({name:e,number:t})),[u,h]);if(!s)return null;const{locationContext:m}=(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,n.__)("Prominent words","wordpress-seo")})}),!o&&(0,f.jsx)("p",{children:0===g.length?(0,n.__)("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,n.__)("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)(Ns,{href:(0,i.addQueryArgs)(a,{context:m}),"data-action":"load-nfd-ctb","data-ctb-id":"f6a84663-465f-4cb5-8ba5-f7a6d72224b2",className:"yoast-button yoast-button-upsell",children:[(0,n.sprintf)(
// translators: %s expands to `Premium` (part of add-on name).
// translators: %s expands to `Premium` (part of add-on name).
(0,n.__)("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)(Os,{data:g,itemScreenReaderText:/* translators: Hidden accessibility text; %d expands to the number of occurrences. */ /* translators: Hidden accessibility text; %d expands to the number of occurrences. */
(0,n.__)("%d occurrences","wordpress-seo"),"aria-label":(0,n.__)("Prominent words","wordpress-seo"),className:o?"yoast-data-model--upsell":null})]})};Ds.propTypes={location:g().string.isRequired};const Us=Ds,$s=()=>{const e=(0,t.useSelect)(e=>e("yoast-seo/editor").getTextLength(),[]),s=(0,r.useMemo)(()=>(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-word_count",""),[]);let i=(0,n._n)("word","words",e.count,"wordpress-seo"),o=(0,n.__)("Word count","wordpress-seo"),a=(0,n.__)("Learn more about word count","wordpress-seo");return"character"===e.unit&&(i=(0,n._n)("character","characters",e.count,"wordpress-seo"),o=(0,n.__)("Character count","wordpress-seo"),
/* translators: Hidden accessibility text. */
a=(0,n.__)("Learn more about character count","wordpress-seo")),(0,f.jsx)(V.InsightsCard,{amount:e.count,unit:i,title:o,linkTo:s,linkText:a})},Ws=(0,de.makeOutboundLink)(),Bs=({location:e})=>{const t=(0,r.useMemo)(()=>(0,p.get)(window,`wpseoAdminL10n.shortlinks-insights-upsell-${e}-text_formality`,""),[e]),s=(0,r.useMemo)(()=>T((0,n.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,n.__)("%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)(r.Fragment,{children:(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{children:s}),(0,f.jsxs)(Ws,{href:t,className:"yoast-button yoast-button-upsell",children:[(0,n.sprintf)(
// Translators: %s expands to `Premium` (part of add-on name).
// Translators: %s expands to `Premium` (part of add-on name).
(0,n.__)("Unlock with %s","wordpress-seo"),"Premium"),(0,f.jsx)("span",{"aria-hidden":"true",className:"yoast-button-upsell__caret"})]})]})})};Bs.propTypes={location:g().string.isRequired};const Ks=Bs,Hs=({location:e,name:s})=>{const i=(0,t.useSelect)(e=>e("yoast-seo/editor").isFormalitySupported(),[]),o=u().isPremium,r=o?(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_premium",""):(0,p.get)(window,"wpseoAdminL10n.shortlinks-insights-text_formality_info_free",""),a=(0,n.__)("Read more about text formality.","wordpress-seo");return i?(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,n.__)("Text formality","wordpress-seo")}),(0,f.jsx)(V.HelpIcon,{linkTo:r,linkText:a})]}),o?(0,f.jsx)(v.Slot,{name:s}):(0,f.jsx)(Ks,{location:e})]}):null};Hs.propTypes={location:g().string.isRequired,name:g().string.isRequired};const zs=Hs,Ys=({location:e="metabox"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]);return(0,f.jsxs)(Ls,{title:(0,n.__)("Insights","wordpress-seo"),id:`yoast-insights-collapsible-${e}`,className:"yoast-insights",children:[(0,f.jsx)(Us,{location:e}),(0,f.jsxs)("div",{children:[s&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(Ms,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(As,{}),(0,f.jsx)($s,{})]}),(0,Es.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(zs,{location:e,name:"YoastTextFormalityMetabox"})]})]})};Ys.propTypes={location:g().string};const Vs=Ys,Gs=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),Zs=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),Xs=({isOpen:e,onClose:s,id:i,upsellLink:o,title:a="",description:l="",benefits:c=[],note:d="",ctbId:p="",modalTitle:u})=>{const{isBlackFriday:h,isWooCommerceActive:g,isProductEntity:m,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()}},[]),w=(0,r.useMemo)(()=>g&&m,[g,m]),b=(0,r.useRef)(null);return(0,f.jsx)(k.Modal,{isOpen:e,onClose:s,id:i,initialFocus:b,children:(0,f.jsx)(k.Modal.Panel,{className:"yst-max-w-md yst-p-0",hasCloseButton:!1,children:(0,f.jsxs)(k.Modal.Container,{children:[(0,f.jsxs)(k.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:[w?(0,f.jsx)(Zs,{className:"yst-text-woo-light yst-w-6 yst-h-6 yst-scale-x-[-1]"}):(0,f.jsx)(fe,{className:"yst-fill-primary-500 yst-w-5 yst-h-5"}),(0,f.jsx)(k.Modal.Title,{as:"h3",className:K()(w?"yst-text-woo-light":"yst-text-primary-500","yst-text-base yst-font-normal"),children:u}),(0,f.jsx)(k.Modal.CloseButton,{className:"yst-top-2",onClick:s,screenReaderText:(0,n.__)("Close modal","wordpress-seo")})]}),(0,f.jsxs)(k.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,n.__)("BLACK FRIDAY | 30% OFF","wordpress-seo")})}),(0,f.jsxs)("div",{className:"yst-py-6 yst-px-12",children:[(0,f.jsx)(k.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)(W,{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})]},`${i}-upsell-benefit-${t}`))}),"function"==typeof c&&c(),(0,f.jsxs)("div",{className:"yst-text-center",children:[(0,f.jsxs)(k.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":p,ref:b,children:[(0,f.jsx)(R,{className:"yst-w-4 yst-h-4 yst--ms-1 yst-shrink-0"}),(0,n.sprintf)(/* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */ /* translators: %s expands to 'Yoast SEO Premium' or 'Yoast Woocommerce SEO'. */
(0,n.__)("Explore %s","wordpress-seo"),w&&!y?"Yoast WooCommerce SEO":"Yoast SEO Premium"),(0,f.jsx)("span",{className:"yst-sr-only",children:(0,n.__)("Opens in a new tab","wordpress-seo")})]}),(0,f.jsx)("div",{className:"yst-italic yst-text-slate-500 yst-mt-1",children:d})]})]})]})]})})})},Qs=()=>{const[e,,,t,s]=(0,k.useToggleState)(!1),{locationContext:o}=(0,c.useRootContext)(),r=(0,k.useSvgAria)(),a=o.includes("sidebar"),l=o.includes("metabox"),d=a?"sidebar":"metabox",p=wpseoAdminL10n[a?"shortlinks.upsell.sidebar.internal_linking_suggestions":"shortlinks.upsell.metabox.internal_linking_suggestions"];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Xs,{isOpen:e,onClose:s,id:`yoast-internal-linking-suggestions-upsell-${d}`,upsellLink:(0,i.addQueryArgs)(p,{context:o}),modalTitle:(0,n.__)("Add smarter internal links with Premium","wordpress-seo"),title:(0,n.__)("Connect related content without the guesswork","wordpress-seo"),description:T((0,n.sprintf)(/* translators: %s expands to be tag. */ /* translators: %s expands to be tag. */
(0,n.__)("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,n.__)("Suggest internal links based on your content’s main topics","wordpress-seo"),(0,n.__)("Build relevant internal links faster","wordpress-seo"),(0,n.__)("Strengthen your site’s structure","wordpress-seo"),(0,n.__)("Keep visitors exploring longer","wordpress-seo")],note:(0,n.__)("Upgrade to link your content with ease","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),a&&(0,f.jsx)(be,{id:"yoast-internal-linking-suggestions-sidebar-modal-open-button",title:(0,n.__)("Internal linking suggestions","wordpress-seo"),onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(k.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(Gs,{className:"yst-w-2.5 yst-h-2.5 yst-shrink-0",...r})})})}),l&&(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)(ce,{id:"yoast-internal-linking-suggestions-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(ce.Text,{children:(0,n.__)("Internal linking suggestions","wordpress-seo")}),(0,f.jsxs)(k.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(Gs,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...r}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})},Js=({children:e})=>(0,f.jsx)("div",{children:e});Js.propTypes={renderPriority:g().number.isRequired,children:g().node.isRequired};const ei=Js,ti=({noIndex:e,onNoIndexChange:t,editorContext:s,isPrivateBlog:i=!1})=>{const o=(e=>{const t=(0,n.__)("No","wordpress-seo"),s=(0,n.__)("Yes","wordpress-seo"),i=e.noIndex?t:s;return window.wpseoScriptData.isPost?[{name:(0,n.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,n.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"0"},{name:t,value:"1"},{name:s,value:"2"}]:[{name:(0,n.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,n.__)("%1$s (current default for %2$s)","wordpress-seo"),i,e.postTypeNamePlural),value:"default"},{name:s,value:"index"},{name:t,value:"noindex"}]})(s);return(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsxs)(r.Fragment,{children:[i&&(0,f.jsx)(V.Alert,{type:"warning",children:(0,n.__)("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)(V.Select,{label:(0,n.__)("Allow search engines to show this content in search results?","wordpress-seo"),onChange:t,id:(0,de.join)(["yoast-meta-robots-noindex",s]),options:o,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.allow_search_engines"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about the no-index setting on our help page.","wordpress-seo")})]})})};ti.propTypes={noIndex:g().string.isRequired,onNoIndexChange:g().func.isRequired,editorContext:g().object.isRequired,isPrivateBlog:g().bool};const si=({noFollow:e,onNoFollowChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const i=(0,de.join)(["yoast-meta-robots-nofollow",s]);return(0,f.jsx)(V.RadioButtonGroup,{id:i,options:[{value:"0",label:"Yes"},{value:"1",label:"No"}],label:(0,n.__)("Should search engines follow links on this content?","wordpress-seo"),groupName:i,onChange:t,selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.follow_links"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about the no-follow setting on our help page.","wordpress-seo")})}});si.propTypes={noFollow:g().string.isRequired,onNoFollowChange:g().func.isRequired};const ii=({advanced:e,onAdvancedChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>{const i=(0,de.join)(["yoast-meta-robots-advanced",s]),o=`${i}-input`;return(0,f.jsx)(V.MultiSelect,{label:(0,n.__)("Meta robots advanced","wordpress-seo"),onChange:t,id:i,inputId:o,options:[{name:(0,n.__)("No Image Index","wordpress-seo"),value:"noimageindex"},{name:(0,n.__)("No Archive","wordpress-seo"),value:"noarchive"},{name:(0,n.__)("No Snippet","wordpress-seo"),value:"nosnippet"}],selected:e,linkTo:wpseoAdminL10n["shortlinks.advanced.meta_robots"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about advanced meta robots settings on our help page.","wordpress-seo")})}});ii.propTypes={advanced:g().array.isRequired,onAdvancedChange:g().func.isRequired};const oi=({breadcrumbsTitle:e,onBreadcrumbsTitleChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(V.TextInput,{label:(0,n.__)("Breadcrumbs Title","wordpress-seo"),id:(0,de.join)(["yoast-breadcrumbs-title",s]),onChange:t,value:e,linkTo:wpseoAdminL10n["shortlinks.advanced.breadcrumbs_title"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about the breadcrumbs title setting on our help page.","wordpress-seo")})});oi.propTypes={breadcrumbsTitle:g().string.isRequired,onBreadcrumbsTitleChange:g().func.isRequired};const ri=({canonical:e,onCanonicalChange:t})=>(0,f.jsx)(c.LocationConsumer,{children:s=>(0,f.jsx)(V.TextInput,{label:(0,n.__)("Canonical URL","wordpress-seo"),id:(0,de.join)(["yoast-canonical",s]),onChange:t,value:e,linkTo:"https://yoa.st/canonical-url"
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about canonical URLs on our help page.","wordpress-seo")})});ri.propTypes={canonical:g().string.isRequired,onCanonicalChange:g().func.isRequired};const ni=({noIndex:e,canonical:t,onNoIndexChange:s,onCanonicalChange:i,onLoad:o,isLoading:n,editorContext:a,isBreadcrumbsDisabled:l,advanced:c=[],onAdvancedChange:d=p.noop,noFollow:u="",onNoFollowChange:h=p.noop,breadcrumbsTitle:g="",onBreadcrumbsTitleChange:m=p.noop,isPrivateBlog:y=!1})=>{(0,r.useEffect)(()=>{setTimeout(()=>{n&&o()})});const w={noIndex:e,onNoIndexChange:s,editorContext:a,isPrivateBlog:y},b={noFollow:u,onNoFollowChange:h},x={advanced:c,onAdvancedChange:d},v={breadcrumbsTitle:g,onBreadcrumbsTitleChange:m},k={canonical:t,onCanonicalChange:i};return n?null:(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(ti,{...w}),a.isPost&&(0,f.jsx)(si,{...b}),a.isPost&&(0,f.jsx)(ii,{...x}),!l&&(0,f.jsx)(oi,{...v}),(0,f.jsx)(ri,{...k})]})};ni.propTypes={noIndex:g().string.isRequired,canonical:g().string.isRequired,onNoIndexChange:g().func.isRequired,onCanonicalChange:g().func.isRequired,onLoad:g().func.isRequired,isLoading:g().bool.isRequired,editorContext:g().object.isRequired,isBreadcrumbsDisabled:g().bool.isRequired,isPrivateBlog:g().bool,advanced:g().array,onAdvancedChange:g().func,noFollow:g().string,onNoFollowChange:g().func,breadcrumbsTitle:g().string,onBreadcrumbsTitleChange:g().func};const ai=ni,li=(0,re.compose)([(0,t.withSelect)(e=>{const{getNoIndex:t,getNoFollow:s,getAdvanced:i,getBreadcrumbsTitle:o,getCanonical:r,getIsLoading:n,getEditorContext:a,getPreferences:l}=e("yoast-seo/editor"),{isBreadcrumbsDisabled:c,isPrivateBlog:d}=l();return{noIndex:t(),noFollow:s(),advanced:i(),breadcrumbsTitle:o(),canonical:r(),isLoading:n(),editorContext:a(),isBreadcrumbsDisabled:c,isPrivateBlog:d}}),(0,t.withDispatch)(e=>{const{setNoIndex:t,setNoFollow:s,setAdvanced:i,setBreadcrumbsTitle:o,setCanonical:r,loadAdvancedSettingsData:n}=e("yoast-seo/editor");return{onNoIndexChange:t,onNoFollowChange:s,onAdvancedChange:i,onBreadcrumbsTitleChange:o,onCanonicalChange:r,onLoad:n}})])(ai),ci=y().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"};
`,di=e=>{const{siteUrl:t}=e;return(0,f.jsxs)(j.Fragment,{children:[(0,f.jsx)("span",{className:"screen-reader-text",children:t}),(0,f.jsx)(ci,{"aria-hidden":"true",children:(0,f.jsx)("span",{children:t})})]})};di.propTypes={siteUrl:g().string.isRequired};const pi=di,ui=window.yoast.socialMetadataForms,hi=y().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;
	}
`,gi=y().img`
	&& {
		height: 100%;
		position: absolute;
		width: 100%;
		object-fit: cover;
	}
`,mi=y().div`
	padding-bottom: ${e=>e.aspectRatio}%;
`,yi=({imageProps:e,width:t,height:s,imageMode:i="landscape"})=>"landscape"===i?(0,f.jsx)(mi,{aspectRatio:e.aspectRatio,children:(0,f.jsx)(gi,{src:e.src,alt:e.alt})}):(0,f.jsx)(hi,{src:e.src,alt:e.alt,width:t,height:s,imageProperties:e});function fi(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 wi(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 bi(e,t,s=!1){const i=await function(e){return new Promise((t,s)=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height})},i.onerror=s,i.src=e})}(e);let o=s?"landscape":"square";"Facebook"===t&&(o=(0,ui.determineFacebookImageMode)(i));const r=function(e){return"Twitter"===e?ui.TWITTER_IMAGE_SIZES:ui.FACEBOOK_IMAGE_SIZES}(t),n=function(e,t,s){return"square"===s&&t.width===t.height?{width:e.squareWidth,height:e.squareHeight}:wi(t,fi(e,t,s))}(r,i,o);return{mode:o,height:n.height,width:n.width}}async function xi(e,t,s=!1){try{return{imageProperties:await bi(e,t,s),status:"loaded"}}catch(e){return{imageProperties:null,status:"errored"}}}yi.propTypes={imageProps:g().shape({src:g().string.isRequired,alt:g().string.isRequired,aspectRatio:g().number.isRequired}).isRequired,width:g().number.isRequired,height:g().number.isRequired,imageMode:g().string};const vi=y().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: ${G.colors.$color_white};
`,ki=y().div`
	box-sizing: border-box;
	max-width: ${ui.FACEBOOK_IMAGE_SIZES.landscapeWidth}px;
	height: ${ui.FACEBOOK_IMAGE_SIZES.landscapeHeight}px;
	background-color: ${G.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 _i extends j.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 xi(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:ui.FACEBOOK_IMAGE_SIZES.squareHeight+"px",width:ui.FACEBOOK_IMAGE_SIZES.squareWidth+"px"};case"portrait":return{height:ui.FACEBOOK_IMAGE_SIZES.portraitHeight+"px",width:ui.FACEBOOK_IMAGE_SIZES.portraitWidth+"px"};case"landscape":return{height:ui.FACEBOOK_IMAGE_SIZES.landscapeHeight+"px",width:ui.FACEBOOK_IMAGE_SIZES.landscapeWidth+"px"}}}render(){const{imageProperties:e,status:t}=this.state;if("loading"===t||""===this.props.src||"errored"===t)return(0,f.jsx)(ki,{onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,n.__)("Select image","wordpress-seo")});const s=this.retrieveContainerDimensions(e.mode);return(0,f.jsx)(vi,{mode:e.mode,dimensions:s,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,onClick:this.props.onImageClick,children:(0,f.jsx)(yi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:ui.FACEBOOK_IMAGE_SIZES.aspectRatio},width:e.width,height:e.height,imageMode:e.mode})})}}_i.propTypes={src:g().string,alt:g().string,onImageLoaded:g().func,onImageClick:g().func,onMouseEnter:g().func,onMouseLeave:g().func},_i.defaultProps={src:"",alt:"",onImageLoaded:p.noop,onImageClick:p.noop,onMouseEnter:p.noop,onMouseLeave:p.noop};const ji=_i,Si=y().span`
	line-height: ${20}px;
	min-height : ${20}px;
	color: #1d2129;
	font-weight: 600;
	overflow: hidden;
	font-size: 16px;
	margin: 3px 0 0;
	letter-spacing: normal;
	white-space: normal;
	flex-shrink: 0;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: ${e=>e.lineCount};
	-webkit-box-orient: vertical;
	overflow: hidden;
`,Ti=y().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;
	}
`,Ri=e=>{switch(e){case"landscape":return"527px";case"square":case"portrait":return"369px";default:return"476px"}},Ci=y().div`
	box-sizing: border-box;
	display: flex;
	flex-direction: ${e=>"landscape"===e.mode?"column":"row"};
	background-color: #f2f3f5;
	max-width: 527px;
`,Ei=y().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 Ii extends j.Component{constructor(e){super(e),this.state={imageMode:null,maxLineCount:0,descriptionLineCount:0},this.facebookTitleRef=S().createRef(),this.onImageLoaded=this.onImageLoaded.bind(this),this.onImageEnter=this.props.onMouseHover.bind(this,"image"),this.onTitleEnter=this.props.onMouseHover.bind(this,"title"),this.onDescriptionEnter=this.props.onMouseHover.bind(this,"description"),this.onLeave=this.props.onMouseHover.bind(this,""),this.onSelectTitle=this.props.onSelect.bind(this,"title"),this.onSelectDescription=this.props.onSelect.bind(this,"description")}onImageLoaded(e){this.setState({imageMode:e})}getTitleLineCount(){return this.facebookTitleRef.current.offsetHeight/20}maybeSetMaxLineCount(){const{imageMode:e,maxLineCount:t}=this.state,s="landscape"===e?2:5;s!==t&&this.setState({maxLineCount:s})}maybeSetDescriptionLineCount(){const{descriptionLineCount:e,maxLineCount:t,imageMode:s}=this.state,i=this.getTitleLineCount();let o=t-i;"portrait"===s&&(o=5===i?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,f.jsxs)(Ci,{id:"facebookPreview",mode:e,children:[(0,f.jsx)(ji,{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,f.jsxs)(Ei,{mode:e,children:[(0,f.jsx)(pi,{siteUrl:this.props.siteUrl,mode:e}),(0,f.jsx)(Si,{ref:this.facebookTitleRef,onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,lineCount:t,children:this.props.title}),s>0&&(0,f.jsx)(Ti,{maxWidth:Ri(e),onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,lineCount:s,children:this.props.description})]})]})}}Ii.propTypes={siteUrl:g().string.isRequired,title:g().string.isRequired,description:g().string,imageUrl:g().string,imageFallbackUrl:g().string,alt:g().string,onSelect:g().func,onImageClick:g().func,onMouseHover:g().func},Ii.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{}};const Li=Ii,Ai=y().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;
`,Fi=e=>(0,f.jsx)(Ai,{children:(0,f.jsx)("span",{children:e.siteUrl})});Fi.propTypes={siteUrl:g().string.isRequired};const Pi=Fi,Mi=(e,t=!0)=>e?`\n\t\t\tmax-width: ${ui.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: ${ui.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`,qi=y().div`
	position: relative;
	box-sizing: content-box;
	overflow: hidden;
	background-color: #e1e8ed;
	flex-shrink: 0;
	${e=>Mi(e.isLarge)}
`,Oi=y().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=>Mi(e.isLarge,!1)}
`,Ni=y()(Oi)`
	${e=>e.isLarge&&`height: ${ui.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 Di extends S().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 xi(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,f.jsx)(Ni,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,n.__)("Select image","wordpress-seo")}):(0,f.jsx)(qi,{isLarge:this.props.isLarge,onClick:this.props.onImageClick,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,children:(0,f.jsx)(yi,{imageProps:{src:this.props.src,alt:this.props.alt,aspectRatio:ui.TWITTER_IMAGE_SIZES.aspectRatio},width:t.width,height:t.height,imageMode:t.mode})})}}Di.propTypes={isLarge:g().bool.isRequired,src:g().string,alt:g().string,onImageClick:g().func,onMouseEnter:g().func,onMouseLeave:g().func},Di.defaultProps={src:"",alt:"",onMouseEnter:p.noop,onImageClick:p.noop,onMouseLeave:p.noop};const Ui=y().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;
    }
`,$i=e=>(0,f.jsx)(Ui,{children:e.children});$i.propTypes={children:g().array.isRequired};const Wi=$i,Bi=y().p`
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0;
	color: rgb(15, 20, 25);
	cursor: pointer;
`,Ki=y().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: ${ui.TWITTER_IMAGE_SIZES.landscapeWidth}px ) {
		display: none;
	}
`,Hi=y().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);
	}
`,zi=y()(Hi)`
	flex-direction: column;
	max-height: 370px;
`,Yi=y()(Hi)`
	flex-direction: row;
	height: 125px;
`;class Vi extends j.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:i,title:o,description:r,siteUrl:n}=this.props,a=e?zi:Yi;return(0,f.jsxs)(a,{id:"twitterPreview",children:[(0,f.jsx)(Di,{src:t||s,alt:i,isLarge:e,onImageClick:this.props.onImageClick,onMouseEnter:this.onImageEnter,onMouseLeave:this.onLeave}),(0,f.jsxs)(Wi,{children:[(0,f.jsx)(Pi,{siteUrl:n}),(0,f.jsx)(Bi,{onMouseEnter:this.onTitleEnter,onMouseLeave:this.onLeave,onClick:this.onSelectTitle,children:o}),(0,f.jsx)(Ki,{onMouseEnter:this.onDescriptionEnter,onMouseLeave:this.onLeave,onClick:this.onSelectDescription,children:r})]})]})}}Vi.propTypes={siteUrl:g().string.isRequired,title:g().string.isRequired,description:g().string,isLarge:g().bool,imageUrl:g().string,imageFallbackUrl:g().string,alt:g().string,onSelect:g().func,onImageClick:g().func,onMouseHover:g().func},Vi.defaultProps={description:"",alt:"",imageUrl:"",imageFallbackUrl:"",onSelect:()=>{},onImageClick:()=>{},onMouseHover:()=>{},isLarge:!0};const Gi=Vi,Zi=window.yoast.replacementVariableEditor;class Xi extends j.Component{constructor(e){super(e),this.state={activeField:"",hoveredField:""},this.SocialPreview="Social"===e.socialMediumName?Li:Gi,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:i,socialMediumName:o,imageWarnings:r,siteUrl:n,description:a,descriptionInputPlaceholder:l,descriptionPreviewFallback:c,imageUrl:d,imageFallbackUrl:p,alt:u,title:h,titleInputPlaceholder:g,titlePreviewFallback:m,replacementVariables:y,recommendedReplacementVariables:w,applyReplacementVariables:b,onReplacementVariableSearchChange:x,isPremium:v,isLarge:k,socialPreviewLabel:_,idSuffix:j,activeMetaTabId:T}=this.props,R=b({title:h||m,description:a||c});return(0,f.jsxs)(S().Fragment,{children:[_&&(0,f.jsx)(V.SimulatedLabel,{children:_}),(0,f.jsx)(this.SocialPreview,{onMouseHover:this.setHoveredField,onSelect:this.setActiveField,onImageClick:s,siteUrl:n,title:R.title,description:R.description,imageUrl:d,imageFallbackUrl:p,alt:u,isLarge:k,activeMetaTabId:T}),(0,f.jsx)(ui.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:h,titleInputPlaceholder:g,onRemoveImageClick:i,imageSelected:!!d,imageUrl:d,imageFallbackUrl:p,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:r,replacementVariables:y,recommendedReplacementVariables:w,onReplacementVariableSearchChange:x,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:v,setEditorRef:this.setEditorRef,idSuffix:j})]})}}Xi.propTypes={title:g().string.isRequired,onTitleChange:g().func.isRequired,description:g().string.isRequired,onDescriptionChange:g().func.isRequired,imageUrl:g().string.isRequired,imageFallbackUrl:g().string.isRequired,onSelectImageClick:g().func.isRequired,onRemoveImageClick:g().func.isRequired,socialMediumName:g().string.isRequired,alt:g().string,isPremium:g().bool,imageWarnings:g().array,isLarge:g().bool,siteUrl:g().string,descriptionInputPlaceholder:g().string,titleInputPlaceholder:g().string,descriptionPreviewFallback:g().string,titlePreviewFallback:g().string,replacementVariables:Zi.replacementVariablesShape,recommendedReplacementVariables:Zi.recommendedReplacementVariablesShape,applyReplacementVariables:g().func,onReplacementVariableSearchChange:g().func,socialPreviewLabel:g().string,idSuffix:g().string,activeMetaTabId:g().string},Xi.defaultProps={imageWarnings:[],recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,isLarge:!0,siteUrl:"",descriptionInputPlaceholder:"",titleInputPlaceholder:"",descriptionPreviewFallback:"",titlePreviewFallback:"",alt:"",applyReplacementVariables:e=>e,onReplacementVariableSearchChange:null,socialPreviewLabel:"",idSuffix:"",activeMetaTabId:""};const Qi={},Ji=(e,t,{log:s=console.warn}={})=>{Qi[e]||(Qi[e]=!0,s(t))},eo=(e,t=p.noop)=>{const s={};for(const i in e)Object.hasOwn(e,i)&&Object.defineProperty(s,i,{set:s=>{e[i]=s,t("set",i,s)},get:()=>(t("get",i),e[i])});return s};eo({squareWidth:125,squareHeight:125,landscapeWidth:506,landscapeHeight:265,aspectRatio:50.2},(e,t)=>Ji(`@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.`)),eo({squareWidth:158,squareHeight:158,landscapeWidth:527,landscapeHeight:273,portraitWidth:158,portraitHeight:237,aspectRatio:52.2,largeThreshold:{width:446,height:233}},(e,t)=>Ji(`@yoast/social-metadata-previews/FACEBOOK_IMAGE_SIZES/${e}/${t}`,`[@yoast/social-metadata-previews] "FACEBOOK_IMAGE_SIZES.${t}" is deprecated and will be removed in the future, please use this from @yoast/social-metadata-forms instead.`));const to=y().div`
	max-width: calc(527px + 1.5rem);
`,so=e=>{const t="X"===e.socialMediumName?(0,n.__)("X share preview","wordpress-seo"):(0,n.__)("Social share preview","wordpress-seo"),{locationContext:s}=(0,k.useRootContext)();return(0,f.jsx)(k.Root,{children:(0,f.jsx)(to,{children:(0,f.jsx)(k.FeatureUpsell,{shouldUpsell:!0,variant:"card",cardLink:(0,i.addQueryArgs)(wpseoAdminL10n["shortlinks.upsell.social_preview."+e.socialMediumName.toLowerCase()],{context:s}),cardText:(0,n.sprintf)(/* translators: %1$s expands to Yoast SEO Premium. */ /* translators: %1$s expands to Yoast SEO Premium. */
(0,n.__)("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)(k.Label,{children:t}),(0,f.jsx)(Li,{title:"",description:"",siteUrl:"",imageUrl:"",imageFallbackUrl:"",alt:"",onSelect:p.noop,onImageClick:p.noop,onMouseHover:p.noop})]})})})})};so.propTypes={socialMediumName:g().oneOf(["Social","Twitter","X"]).isRequired};const io=so;class oo extends r.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:i,socialMediumName:o,imageWarnings:n,description:a,descriptionInputPlaceholder:l,imageUrl:c,imageFallbackUrl:d,alt:p,title:u,titleInputPlaceholder:h,replacementVariables:g,recommendedReplacementVariables:m,onReplacementVariableSearchChange:y,isPremium:w,location:b}=this.props;return(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(io,{socialMediumName:o}),(0,f.jsx)(ui.SocialMetadataPreviewForm,{onDescriptionChange:e,socialMediumName:o,title:u,titleInputPlaceholder:h,onRemoveImageClick:i,imageSelected:!!c,imageUrl:c,imageFallbackUrl:d,imageAltText:p,onTitleChange:t,onSelectImageClick:s,description:a,descriptionInputPlaceholder:l,imageWarnings:n,replacementVariables:g,recommendedReplacementVariables:m,onReplacementVariableSearchChange:y,onMouseHover:this.setHoveredField,hoveredField:this.state.hoveredField,onSelect:this.setActiveField,activeField:this.state.activeField,isPremium:w,setEditorRef:this.setEditorRef,idSuffix:b})]})}}oo.propTypes={title:g().string.isRequired,onTitleChange:g().func.isRequired,description:g().string.isRequired,onDescriptionChange:g().func.isRequired,imageUrl:g().string.isRequired,imageFallbackUrl:g().string,onSelectImageClick:g().func.isRequired,onRemoveImageClick:g().func.isRequired,socialMediumName:g().string.isRequired,isPremium:g().bool,imageWarnings:g().array,descriptionInputPlaceholder:g().string,titleInputPlaceholder:g().string,replacementVariables:Zi.replacementVariablesShape,recommendedReplacementVariables:Zi.recommendedReplacementVariablesShape,onReplacementVariableSearchChange:g().func,location:g().string,alt:g().string},oo.defaultProps={imageWarnings:[],imageFallbackUrl:"",recommendedReplacementVariables:[],replacementVariables:[],isPremium:!1,descriptionInputPlaceholder:"",titleInputPlaceholder:"",onReplacementVariableSearchChange:null,location:"",alt:""};const ro=oo,no=(e,t,s)=>{const[i,o]=(0,r.useState)(!1),a=(0,n.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,n.__)("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,r.useEffect)(()=>{o(""===t&&e.toLowerCase().endsWith(".avif"))},[e,t]),i?[a]:s},ao=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:i="",imageUrl:o="",imageWarnings:n=[],...a})=>{const[l,c]=(0,r.useState)(""),d=no(i,o,n),p=(0,r.useCallback)(e=>{c(e.detail.metaTabId)},[c]);(0,r.useEffect)(()=>(setTimeout(t),window.addEventListener("YoastSEO:metaTabChange",p),()=>{window.removeEventListener("YoastSEO:metaTabChange",p)}),[]);const u={isPremium:e,onLoad:t,location:s,imageFallbackUrl:i,imageUrl:o,imageWarnings:d,activeMetaTabId:l,...a};return e?(0,f.jsx)(v.Slot,{name:`YoastFacebookPremium${s.charAt(0).toUpperCase()+s.slice(1)}`,fillProps:u}):(0,f.jsx)(ro,{...u})};ao.propTypes={isPremium:g().bool.isRequired,onLoad:g().func.isRequired,location:g().string.isRequired,imageFallbackUrl:g().string,imageUrl:g().string,imageWarnings:g().array};const lo=ao;function co(e){(function(e){const t=window.wp.media();return t.on("select",()=>{const s=t.state().get("selection").first();var i;e({type:(i=s.attributes).subtype,width:i.width,height:i.height,url:i.url,id:i.id,sizes:i.sizes,alt:i.alt||i.title||i.name})}),t})(e).open()}const po=()=>{co(e=>(0,t.dispatch)("yoast-seo/editor").setFacebookPreviewImage((e=>{const{width:t,height:s}=e,i=(0,ui.determineFacebookImageMode)({width:t,height:s}),o=ui.FACEBOOK_IMAGE_SIZES[i+"Width"],r=ui.FACEBOOK_IMAGE_SIZES[i+"Height"],n=Object.values(e.sizes).find(e=>e.width>=o&&e.height>=r);return{url:n?n.url:e.url,id:e.id,warnings:(0,de.validateFacebookImage)(e),alt:e.alt||""}})(e)))},uo=(0,re.compose)([(0,t.withSelect)(e=>{const{getFacebookDescription:t,getDescription:s,getFacebookTitle:i,getSeoTitle:o,getFacebookImageUrl:r,getImageFallback:n,getFacebookWarnings:a,getRecommendedReplaceVars:l,getReplaceVars:c,getSiteUrl:d,getSeoTitleTemplate:p,getSeoTitleTemplateNoFallback:h,getSocialTitleTemplate:g,getSeoDescriptionTemplate:m,getSocialDescriptionTemplate:y,getReplacedExcerpt:f,getFacebookAltText:w}=e("yoast-seo/editor");return{imageUrl:r(),imageFallbackUrl:n(),recommendedReplacementVariables:l(),replacementVariables:c(),description:t(),descriptionPreviewFallback:y()||s()||m()||f()||"",title:i(),titlePreviewFallback:g()||o()||h()||p()||"",imageWarnings:a(),siteUrl:d(),isPremium:!!u().isPremium,titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"Social",alt:w()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setFacebookPreviewTitle:i,setFacebookPreviewDescription:o,clearFacebookPreviewImage:r,loadFacebookPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:po,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:_s(l,a)}}),ds()])(lo),ho=({isPremium:e,onLoad:t,location:s,imageFallbackUrl:i="",imageUrl:o="",imageWarnings:n=[],...a})=>{const l=no(i,o,n);(0,r.useEffect)(()=>{setTimeout(t)},[]);const c={isPremium:e,onLoad:t,location:s,imageFallbackUrl:i,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)(ro,{...c})};ho.propTypes={isPremium:g().bool.isRequired,onLoad:g().func.isRequired,location:g().string.isRequired,imageFallbackUrl:g().string,imageUrl:g().string,imageWarnings:g().array};const go=ho,mo=()=>{co(e=>(0,t.dispatch)("yoast-seo/editor").setTwitterPreviewImage((e=>{const t="summary"!==(0,p.get)(window,"wpseoScriptData.metabox.twitterCardType")?"landscape":"square",s=ui.TWITTER_IMAGE_SIZES[t+"Width"],i=ui.TWITTER_IMAGE_SIZES[t+"Height"],o=Object.values(e.sizes).find(e=>e.width>=s&&e.height>=i);return{url:o?o.url:e.url,id:e.id,warnings:(0,de.validateTwitterImage)(e),alt:e.alt||""}})(e)))},yo=(0,re.compose)([(0,t.withSelect)(e=>{const{getTwitterDescription:t,getTwitterTitle:s,getTwitterImageUrl:i,getFacebookImageUrl:o,getFacebookTitle:r,getFacebookDescription:n,getDescription:a,getSeoTitle:l,getTwitterWarnings:c,getTwitterImageType:d,getImageFallback:p,getRecommendedReplaceVars:h,getReplaceVars:g,getSiteUrl:m,getSeoTitleTemplate:y,getSeoTitleTemplateNoFallback:f,getSocialTitleTemplate:w,getSeoDescriptionTemplate:b,getSocialDescriptionTemplate:x,getReplacedExcerpt:v,getTwitterAltText:k}=e("yoast-seo/editor");return{imageUrl:i(),imageFallbackUrl:o()||p(),recommendedReplacementVariables:h(),replacementVariables:g(),description:t(),descriptionPreviewFallback:x()||n()||a()||b()||v()||"",title:s(),titlePreviewFallback:w()||r()||l()||f()||y()||"",imageWarnings:c(),siteUrl:m(),isPremium:!!u().isPremium,isLarge:"summary"!==d(),titleInputPlaceholder:"",descriptionInputPlaceholder:"",socialMediumName:"X",alt:k()}}),(0,t.withDispatch)((e,t,{select:s})=>{const{setTwitterPreviewTitle:i,setTwitterPreviewDescription:o,clearTwitterPreviewImage:r,loadTwitterPreviewData:n,findCustomFields:a}=e("yoast-seo/editor"),l=s("yoast-seo/editor").getPostId();return{onSelectImageClick:mo,onRemoveImageClick:r,onDescriptionChange:o,onTitleChange:i,onLoad:n,onReplacementVariableSearchChange:_s(l,a)}}),ds()])(go),fo=y().legend`
	margin: 16px 0;
	padding: 0;
	color: ${G.colors.$color_headings};
	font-size: 12px;
	font-weight: 300;
`,wo=y().legend`
	margin: 0 0 16px;
	padding: 0;
	color: ${G.colors.$color_headings};
	font-size: 12px;
	font-weight: 300;
`,bo=y().div`
	padding: 16px;
`,xo=({useOpenGraphData:e,useTwitterData:t})=>(0,f.jsxs)(r.Fragment,{children:[t&&e&&(0,f.jsxs)(r.Fragment,{children:[(0,f.jsxs)(Ls,{hasSeparator:!1
/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,title:(0,n.__)("Social media appearance","wordpress-seo"),initialIsOpen:!0,children:[(0,f.jsx)(wo,{children:(0,n.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(uo,{}),(0,f.jsx)(fo,{children:(0,n.__)("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)(Ls,{title:(0,n.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(yo,{})})]}),e&&!t&&(0,f.jsxs)(bo,{children:[(0,f.jsx)(wo,{children:(0,n.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(uo,{})]}),!e&&t&&(0,f.jsxs)(bo,{children:[(0,f.jsx)(wo,{children:(0,n.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(yo,{})]})]});xo.propTypes={useOpenGraphData:g().bool.isRequired,useTwitterData:g().bool.isRequired};const vo=xo,ko=(0,t.withSelect)(e=>{const{getPreferences:t}=e("yoast-seo/editor"),{useOpenGraphData:s,useTwitterData:i}=t();return{useOpenGraphData:s,useTwitterData:i}})(vo);function _o({target:e}){return(0,f.jsx)(Q,{target:e,children:(0,f.jsx)(ko,{})})}_o.propTypes={target:g().string.isRequired};const jo=(0,de.makeOutboundLink)(),So=y().div`
	padding: 16px;
`,To="yoast-seo/editor";function Ro({location:e,show:t}){return t?(0,f.jsxs)(V.Alert,{type:"info",children:[(0,n.sprintf)(/* translators: %s Expands to "Yoast News SEO" */ /* translators: %s Expands to "Yoast News SEO" */
(0,n.__)("Are you working on a news article? %s helps you optimize your site for Google News.","wordpress-seo"),"Yoast News SEO")+" ",(0,f.jsx)(jo,{href:window.wpseoAdminL10n[`shortlinks.upsell.${e}.news`],children:(0,n.sprintf)(/* translators: %s: Expands to "Yoast News SEO". */ /* translators: %s: Expands to "Yoast News SEO". */
(0,n.__)("Buy %s now!","wordpress-seo"),"Yoast News SEO")})]}):null}Ro.propTypes={show:g().bool.isRequired,location:g().string.isRequired};const Co=(e,s,i)=>{const o=(0,t.useSelect)(e=>e(To).getIsProduct(),[]),r=(0,t.useSelect)(e=>e(To).getIsWooSeoActive(),[]),a=o&&r?{name:(0,n.__)("Item Page","wordpress-seo"),value:"ItemPage"}:e.find(e=>e.value===s);return[{name:(0,n.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,n.__)("Default for %1$s (%2$s)","wordpress-seo"),i,a?a.name:""),value:""},...e]},Eo=(e,t)=>T((e=>(0,n.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,n.__)("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"})}),Io=({helpTextTitle:e,helpTextLink:t,helpTextDescription:s})=>(0,f.jsx)(V.FieldGroup,{label:e,linkTo:t
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about structured data with Schema.org","wordpress-seo"),description:s});Io.propTypes={helpTextTitle:g().string.isRequired,helpTextLink:g().string.isRequired,helpTextDescription:g().string.isRequired};const Lo=({schemaPageTypeChange:e=p.noop,schemaPageTypeSelected:s=null,pageTypeOptions:i,schemaArticleTypeChange:o=p.noop,schemaArticleTypeSelected:a=null,articleTypeOptions:l,showArticleTypeInput:c,additionalHelpTextLink:d,helpTextLink:u,helpTextTitle:h,helpTextDescription:g,postTypeName:m,displayFooter:y=!1,defaultPageType:w,defaultArticleType:b,location:x,isNewsEnabled:v=!1})=>{const k=Co(i,w,m),_=Co(l,b,m),j=(0,t.useSelect)(e=>e(To).selectLink("https://yoa.st/product-schema-metabox"),[]),S=(0,t.useSelect)(e=>e(To).getIsWooSeoUpsell(),[]),[T,R]=(0,r.useState)(a),C=(0,n.__)("Want your products stand out in search results with rich results like price, reviews and more?","wordpress-seo"),E=(0,t.useSelect)(e=>e(To).getIsProduct(),[]),I=(0,t.useSelect)(e=>e(To).getIsWooSeoActive(),[]),L=(0,t.useSelect)(e=>e(To).selectAdminLink("?page=wpseo_page_settings"),[]),A=E&&I,F=(0,r.useCallback)((e,t)=>{R(t)},[]);return(0,r.useEffect)(()=>{F(null,a)},[a]),(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(Io,{helpTextLink:u,helpTextTitle:h,helpTextDescription:g}),(0,f.jsx)(V.FieldGroup,{label:(0,n.__)("What type of page or content is this?","wordpress-seo"),linkTo:d
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about page or content types","wordpress-seo")}),S&&(0,f.jsx)(Ss,{link:j,text:C}),(0,f.jsx)(V.Select,{id:(0,de.join)(["yoast-schema-page-type",x]),options:k,label:(0,n.__)("Page type","wordpress-seo"),onChange:e,selected:A?"ItemPage":s,disabled:A}),c&&(0,f.jsx)(V.Select,{id:(0,de.join)(["yoast-schema-article-type",x]),options:_,label:(0,n.__)("Article type","wordpress-seo"),onChange:o,selected:a,onOptionFocus:F}),(0,f.jsx)(Ro,{location:x,show:!v&&(P=T,M=b,"NewsArticle"===P||""===P&&"NewsArticle"===M)}),y&&!A&&(0,f.jsx)("p",{children:Eo(m,L)}),A&&(0,f.jsx)("p",{children:(0,n.sprintf)(/* translators: %1$s expands to Yoast WooCommerce SEO. */ /* translators: %1$s expands to Yoast WooCommerce SEO. */
(0,n.__)("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 P,M},Ao=g().arrayOf(g().shape({name:g().string,value:g().string}));Lo.propTypes={schemaPageTypeChange:g().func,schemaPageTypeSelected:g().string,pageTypeOptions:Ao.isRequired,schemaArticleTypeChange:g().func,schemaArticleTypeSelected:g().string,articleTypeOptions:Ao.isRequired,showArticleTypeInput:g().bool.isRequired,additionalHelpTextLink:g().string.isRequired,helpTextLink:g().string.isRequired,helpTextTitle:g().string.isRequired,helpTextDescription:g().string.isRequired,postTypeName:g().string.isRequired,displayFooter:g().bool,defaultPageType:g().string.isRequired,defaultArticleType:g().string.isRequired,location:g().string.isRequired,isNewsEnabled:g().bool};const Fo=({isMetabox:e,showArticleTypeInput:t=!1,articleTypeLabel:s="",additionalHelpTextLink:i="",pageTypeLabel:o,helpTextLink:n,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d=!1,loadSchemaArticleData:p,loadSchemaPageData:u,location:h,...g})=>{const m=(0,f.jsx)(Lo,{showArticleTypeInput:t,articleTypeLabel:s,additionalHelpTextLink:i,pageTypeLabel:o,helpTextLink:n,helpTextTitle:a,helpTextDescription:l,postTypeName:c,displayFooter:d,loadSchemaArticleData:p,loadSchemaPageData:u,location:h,...g});return e?(0,r.createPortal)((0,f.jsx)(So,{children:m}),document.getElementById("wpseo-meta-section-schema")):m};Fo.propTypes={isMetabox:g().bool.isRequired,showArticleTypeInput:g().bool,articleTypeLabel:g().string,additionalHelpTextLink:g().string,pageTypeLabel:g().string.isRequired,helpTextLink:g().string.isRequired,helpTextTitle:g().string.isRequired,helpTextDescription:g().string.isRequired,postTypeName:g().string.isRequired,displayFooter:g().bool,loadSchemaArticleData:g().func.isRequired,loadSchemaPageData:g().func.isRequired,location:g().string.isRequired};const Po=Fo;class Mo{static get articleTypeInput(){return document.getElementById("yoast_wpseo_schema_article_type")}static get defaultArticleType(){return Mo.articleTypeInput.getAttribute("data-default")}static get articleType(){return Mo.articleTypeInput.value}static set articleType(e){Mo.articleTypeInput.value=e}static get pageTypeInput(){return document.getElementById("yoast_wpseo_schema_page_type")}static get defaultPageType(){return Mo.pageTypeInput.getAttribute("data-default")}static get pageType(){return Mo.pageTypeInput.value}static set pageType(e){Mo.pageTypeInput.value=e}}const qo=e=>{const t=null!==Mo.articleTypeInput;(0,r.useEffect)(()=>{e.loadSchemaPageData(),t&&e.loadSchemaArticleData()},[]);const{pageTypeOptions:s,articleTypeOptions:i}=window.wpseoScriptData.metabox.schema,o={articleTypeLabel:(0,n.__)("Article type","wordpress-seo"),pageTypeLabel:(0,n.__)("Page type","wordpress-seo"),postTypeName:window.wpseoAdminL10n.postTypeNamePlural,helpTextTitle:(0,n.__)("Yoast SEO automatically describes your pages using schema.org","wordpress-seo"),helpTextDescription:(0,n.__)("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:i},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)(Po,{...a})};qo.propTypes={displayFooter:g().bool.isRequired,schemaPageTypeSelected:g().string.isRequired,schemaArticleTypeSelected:g().string.isRequired,defaultArticleType:g().string.isRequired,defaultPageType:g().string.isRequired,loadSchemaPageData:g().func.isRequired,loadSchemaArticleData:g().func.isRequired,schemaPageTypeChange:g().func.isRequired,schemaArticleTypeChange:g().func.isRequired,location:g().string.isRequired};const Oo=(0,re.compose)([(0,t.withSelect)(e=>{const{getPreferences:t,getPageType:s,getDefaultPageType:i,getArticleType:o,getDefaultArticleType:r}=e("yoast-seo/editor"),{displaySchemaSettingsFooter:n,isNewsEnabled:a}=t();return{displayFooter:n,isNewsEnabled:a,schemaPageTypeSelected:s(),schemaArticleTypeSelected:o(),defaultArticleType:r(),defaultPageType:i()}}),(0,t.withDispatch)(e=>{const{setPageType:t,setArticleType:s,getSchemaPageData:i,getSchemaArticleData:o}=e("yoast-seo/editor");return{loadSchemaPageData:i,loadSchemaArticleData:o,schemaPageTypeChange:t,schemaArticleTypeChange:s}}),ds()])(qo),No=window.yoast.relatedKeyphraseSuggestions;function Do({requestLimitReached:e,isSuccess:t,response:s,requestHasData:i,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,p.isEmpty)(e)&&"error"in e}(s)?"requestFailed":i?function(e){return e&&e.length>=4}(o)?"maxRelatedKeyphrases":null:"requestEmpty"}function Uo({keyphrase:e="",relatedKeyphrases:t=[],renderAction:s=null,requestLimitReached:i=!1,countryCode:o,setCountry:n,newRequest:a,response:l={},isRtl:c=!1,userLocale:d="en_US",isPending:p=!1,isSuccess:u=!1,requestHasData:h=!0,isPremium:g=!1,semrushUpsellLink:m="",premiumUpsellLink:y=""}){var w,b;const[x,v]=(0,r.useState)(o),_=(0,r.useCallback)(async()=>{a(o,e),v(o)},[o,e,a]);return(0,f.jsxs)(k.Root,{context:{isRtl:c},children:[!i&&!g&&(0,f.jsx)(No.PremiumUpsell,{url:y,className:"yst-mb-4"}),!i&&(0,f.jsx)(No.CountrySelector,{countryCode:o,activeCountryCode:x,onChange:n,onClick:_,className:"yst-mb-4",userLocale:d.split("_")[0]}),!p&&(0,f.jsx)(No.UserMessage,{variant:Do({requestLimitReached:i,isSuccess:u,response:l,requestHasData:h,relatedKeyphrases:t}),upsellLink:m}),(0,f.jsx)(No.KeyphrasesTable,{relatedKeyphrases:t,columnNames:null==l||null===(w=l.results)||void 0===w?void 0:w.columnNames,data:null==l||null===(b=l.results)||void 0===b?void 0:b.rows,isPending:p,renderButton:s,className:"yst-mt-4"})]})}Uo.propTypes={keyphrase:g().string,relatedKeyphrases:g().array,renderAction:g().func,requestLimitReached:g().bool,countryCode:g().string.isRequired,setCountry:g().func.isRequired,newRequest:g().func.isRequired,response:g().object,isRtl:g().bool,userLocale:g().string,isPending:g().bool,isSuccess:g().bool,requestHasData:g().bool,isPremium:g().bool,semrushUpsellLink:g().string,premiumUpsellLink:g().string};const $o=(0,re.compose)([(0,t.withSelect)(e=>{const{getFocusKeyphrase:t,getSEMrushSelectedCountry:s,getSEMrushRequestLimitReached:o,getSEMrushRequestResponse:r,getSEMrushRequestIsSuccess:n,getSEMrushIsRequestPending:a,getSEMrushRequestHasData:l,getPreference:c,getIsPremium:d,selectLinkParams:p}=e("yoast-seo/editor");return{keyphrase:t(),countryCode:s(),requestLimitReached:o(),response:r(),isSuccess:n(),isPending:a(),requestHasData:l(),isRtl:c("isRtl",!1),userLocale:c("userLocale","en_US"),isPremium:d(),semrushUpsellLink:(0,i.addQueryArgs)("https://yoa.st/semrush-prices",p()),premiumUpsellLink:(0,i.addQueryArgs)("https://yoa.st/413",p())}}),(0,t.withDispatch)(e=>{const{setSEMrushChangeCountry:t,setSEMrushNewRequest:s}=e("yoast-seo/editor");return{setCountry:e=>{t(e)},newRequest:(e,t)=>{s(e,t)}}})])(Uo),Wo=({isOpen:e,closeModal:t,id:s,upsellLink:i})=>(0,f.jsx)(Xs,{isOpen:e,onClose:t,id:s,upsellLink:i,title:(0,n.__)("Cover more search intent with related keyphrases","wordpress-seo"),description:(0,n.__)("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,n.__)("Fine-tune your content for every audience","wordpress-seo"),modalTitle:(0,n.__)("Add more keyphrases with Premium","wordpress-seo"),ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"}),Bo=()=>{const[e,,,t,s]=(0,k.useToggleState)(!1),o=(0,r.useContext)(c.LocationContext),{locationContext:a}=(0,c.useRootContext)(),l=(0,k.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)(Wo,{isOpen:e,closeModal:s,upsellLink:(0,i.addQueryArgs)(d,{context:a}),id:`yoast-additional-keyphrases-modal-${o}`}),"sidebar"===o&&(0,f.jsx)(be,{id:"yoast-additional-keyphrase-modal-open-button",title:(0,n.__)("Add related keyphrase","wordpress-seo"),prefixIcon:{icon:"plus",color:G.colors.$color_grey_medium_dark},onClick:t,children:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsx)(k.Badge,{size:"small",variant:"upsell",children:(0,f.jsx)(Gs,{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)(ce,{id:"yoast-additional-keyphrase-metabox-modal-open-button",onClick:t,children:[(0,f.jsx)(V.SvgIcon,{icon:"plus",color:G.colors.$color_grey_medium_dark}),(0,f.jsx)(ce.Text,{children:(0,n.__)("Add related keyphrase","wordpress-seo")}),(0,f.jsxs)(k.Badge,{size:"small",variant:"upsell",children:[(0,f.jsx)(Gs,{className:"yst-w-2.5 yst-h-2.5 yst-me-1 yst-shrink-0",...l}),(0,f.jsx)("span",{children:"Premium"})]})]})})]})},Ko=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),Ho=({store:e="yoast-seo/editor",location:s="sidebar"})=>{const o="black-friday-promotion",a=(0,t.useSelect)(t=>t(e).getIsPremium(),[e]),l=(0,t.useSelect)(t=>t(e).selectLinkParams(),[e]),c=(0,t.useSelect)(t=>t(e).isPromotionActive(o),[e]),d=(0,t.useSelect)(t=>t(e).getIsWooCommerceActive(),[e]),p=(0,t.useSelect)(t=>t(e).isAlertDismissed(o),[e]),u=(0,t.useSelect)(t=>t(e).getIsElementorEditor(),[e]),h=(0,r.useCallback)(()=>{(0,t.dispatch)(e).dismissAlert(o)},[e,o]),g=(0,i.addQueryArgs)("https://yoa.st/black-friday-sale",l),m=(0,k.useSvgAria)();return a||!c||p?null:(0,f.jsx)("div",{className:"yst-root",children:(0,f.jsxs)("div",{className:K()("sidebar"!==s||u?"yst-mx-4":"yst-mx-0","yst-border yst-rounded-lg yst-p-4 yst-max-w-md yst-mt-6 yst-relative yst-shadow-sm",d?"yst-border-woo-light":"yst-border-primary-200"),children:[(0,f.jsxs)(k.Badge,{size:"small",className:"yst-text-[10px] yst-bg-black yst-text-amber-300 yst-absolute yst--top-2",children:[(0,n.__)("BLACK FRIDAY","wordpress-seo")," "]}),(0,f.jsxs)("button",{className:"yst-absolute yst-top-4 yst-end-4",onClick:h,children:[(0,f.jsx)(Ko,{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,n.__)("Dismiss","wordpress-seo")})]}),(0,f.jsxs)("div",{className:K()("sidebar"===s?"":"yst-flex yst-justify-between yst-gap-3"),children:[(0,f.jsxs)("div",{className:d?"yst-text-woo-light":"yst-text-primary-500",children:[(0,f.jsx)("div",{className:"yst-text-2xl yst-font-bold",children:(0,n.__)("30% OFF","wordpress-seo")}),(0,f.jsx)("div",{className:"yst-flex yst-gap-2 yst-font-semibold yst-text-tiny",children:d?(0,f.jsxs)(f.Fragment,{children:["Yoast WooCommerce SEO ",(0,f.jsx)(Zs,{className:"yst-w-4 yst-scale-x-[-1]",...m})]}):(0,f.jsxs)(f.Fragment,{children:[" Yoast SEO Premium ",(0,f.jsx)(Y,{className:"yst-w-4",...m})]})})]}),(0,f.jsx)("div",{className:"yst-flex yst-items-end",children:(0,f.jsxs)(k.Button,{as:"a",className:K()("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,n.__)("Buy now!","wordpress-seo"),(0,f.jsx)(C,{className:"yst-w-4 rtl:yst-rotate-180",...m})]})})]})]})})};function zo(){return window.wpseoScriptData&&"1"===window.wpseoScriptData.isBlockEditor}Ho.propTypes={store:g().string,location:g().oneOf(["sidebar","metabox"])};const Yo=()=>{const{editorMode:e,activeAIButtonId:s}=(0,t.useSelect)(e=>({editorMode:e("core/edit-post").getEditorMode(),activeAIButtonId:e("yoast-seo/editor").getActiveAIFixesButton()}),[]),{setMarkerStatus:i}=(0,t.useDispatch)("yoast-seo/editor");(0,r.useEffect)(()=>(i("visual"===e&&s||"text"===e?"disabled":"enabled"),()=>{i("disabled")}),[e,s])},Vo=(Go=Ho,e=>!(()=>{var e,s;const i=(0,t.select)("yoast-seo/editor").getIsPremium(),o=(0,t.select)("yoast-seo/editor").getWarningMessage();return(i&&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)(Go,{...e}));var Go;function Zo({settings:e}){const{isTerm:s}=(0,t.useSelect)(e=>({isTerm:e("yoast-seo/editor").getIsTerm(),isProduct:e("yoast-seo/editor").getIsProduct(),isWooCommerceActive:e("yoast-seo/editor").getIsWooCommerceActive()}),[]),i=zo();return i&&Yo(),(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastMetabox",children:[(0,f.jsx)(ei,{renderPriority:1,children:(0,f.jsx)(Cs,{})},"warning"),(0,f.jsx)(ei,{renderPriority:2,children:(0,f.jsx)(Vo,{location:"metabox"})},"time-constrained-notification"),e.isKeywordAnalysisActive&&(0,f.jsxs)(ei,{renderPriority:8,children:[(0,f.jsx)(cs.KeywordInput,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive}),!window.wpseoScriptData.metabox.isPremium&&(0,f.jsx)(v.Fill,{name:"YoastRelatedKeyphrases",children:(0,f.jsx)($o,{})})]},"keyword-input"),(0,f.jsx)(ei,{renderPriority:9,children:(0,f.jsx)(Ls,{id:"yoast-snippet-editor-metabox",title:(0,n.__)("Search appearance","wordpress-seo"),initialIsOpen:!0,children:(0,f.jsx)(Rs,{hasPaperStyle:!1})})},"search-appearance"),e.isContentAnalysisActive&&(0,f.jsx)(ei,{renderPriority:10,children:(0,f.jsx)(cs.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(ei,{renderPriority:20,children:(0,f.jsx)(r.Fragment,{children:(0,f.jsx)(cs.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo-analysis"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(ei,{renderPriority:21,children:(0,f.jsx)(cs.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(ei,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Bo,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(ei,{renderPriority:23,children:(0,f.jsx)(ls,{location:"metabox"})},"wincher-seo-performance"),e.shouldUpsell&&!s&&(0,f.jsx)(ei,{renderPriority:25,children:(0,f.jsx)(Qs,{})},"internal-linking-suggestions-upsell"),e.isCornerstoneActive&&(0,f.jsx)(ei,{renderPriority:30,children:(0,f.jsx)(ps,{})},"cornerstone"),e.displayAdvancedTab&&(0,f.jsx)(ei,{renderPriority:40,children:(0,f.jsx)(Ls,{id:"collapsible-advanced-settings",title:(0,n.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(li,{})})},"advanced"),e.displaySchemaSettings&&(0,f.jsx)(ei,{renderPriority:50,children:(0,f.jsx)(Oo,{})},"schema"),i&&(0,f.jsx)(ei,{renderPriority:24,children:(0,f.jsx)(cs.ContentBlocks,{})},"content-blocks"),(0,f.jsx)(ei,{renderPriority:-1,children:(0,f.jsx)(_o,{target:"wpseo-section-social"})},"social"),e.isInsightsEnabled&&(0,f.jsx)(ei,{renderPriority:52,children:(0,f.jsx)(Vs,{location:"metabox"})},"insights")]})})}Zo.propTypes={settings:g().object.isRequired};const Xo=(0,re.compose)([(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})])(Zo);function Qo({target:e,store:t,theme:s}){return(0,f.jsxs)(Q,{target:e,children:[(0,f.jsx)(oe,{store:t,theme:s}),(0,f.jsx)(Xo,{store:t,theme:s})]})}Qo.propTypes={target:g().string.isRequired,store:g().object.isRequired,theme:g().object.isRequired};const Jo=({error:e})=>{const s=(0,r.useCallback)(()=>{var e,t;return null===(e=window)||void 0===e||null===(t=e.location)||void 0===t?void 0:t.reload()},[]),i=(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)(k.Root,{context:{isRtl:o},children:(0,f.jsx)(L,{error:e,children:(0,f.jsx)(L.VerticalButtons,{supportLink:i,handleRefreshClick:s})})})};function er({theme:e}){return(0,f.jsx)(ie,{theme:e,location:"sidebar",children:(0,f.jsx)(k.ErrorBoundary,{FallbackComponent:Jo,children:(0,f.jsx)(v.Slot,{name:"YoastSidebar",children:e=>_(e)})})})}function tr({score:e,label:t,scoreValue:s=""}){return(0,f.jsxs)("div",{className:"yoast-analysis-check",children:[(0,f.jsx)(V.SvgIcon,{...X(e)}),(0,f.jsxs)("span",{children:[" ",t," ",s&&(0,f.jsx)("strong",{children:s})]})]})}function sr({checklist:e,onClick:t}){const s=e.every(e=>"good"===e.score);return(0,f.jsxs)(r.Fragment,{children:[e.map(e=>(0,f.jsx)(tr,{...e},e.label)),(0,f.jsx)("br",{}),!s&&(0,f.jsx)(k.Root,{children:(0,f.jsx)(k.Button,{variant:"secondary",size:"small",onClick:t,children:(0,n.__)("Improve your post with Yoast SEO","wordpress-seo")})})]})}function ir(e){return(0,p.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,n.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,n.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,n.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(Z.interpreters.scoreToRating(e))}function or(e,t){const{isKeywordAnalysisActive:s}=t.getPreferences();if(s){const s=ir(t.getReadabilityResults().overallScore);e.push({label:(0,n.__)("Readability analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function rr(e,t){const{isContentAnalysisActive:s}=t.getPreferences();if(s){const s=ir(t.getResultsForFocusKeyword().overallScore),i=u().isPremium;e.push({label:i?(0,n.__)("Premium SEO analysis:","wordpress-seo"):(0,n.__)("SEO analysis:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderReadabilityText})}}function nr(e,t){const{isInclusiveLanguageAnalysisActive:s}=t.getPreferences();if(s){const s=ir(t.getInclusiveLanguageResults().overallScore);e.push({label:(0,n.__)("Inclusive language:","wordpress-seo"),score:s.className,scoreValue:s.screenReaderInclusiveLanguageText})}}Jo.propTypes={error:g().object.isRequired},tr.propTypes={score:h.string.isRequired,label:h.string.isRequired,scoreValue:h.string},sr.propTypes={checklist:g().array.isRequired,onClick:g().func.isRequired};const ar=(0,re.compose)([(0,t.withSelect)(function(e){const t=e("yoast-seo/editor"),s=[];return rr(s,t),or(s,t),nr(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")}}})])(sr),lr=(0,re.compose)([(0,t.withSelect)(e=>{const t=e("yoast-seo/editor"),s=ir(t.getResultsForFocusKeyword().overallScore),i=ir(t.getReadabilityResults().overallScore),{isKeywordAnalysisActive:o,isContentAnalysisActive:r}=t.getPreferences();let n,a;switch(i.className){case"good":n=G.colors.$color_good;break;case"ok":n=G.colors.$color_ok;break;default:n=G.colors.$color_bad}switch(s.className){case"good":a=G.colors.$color_good;break;case"ok":a=G.colors.$color_ok;break;default:a=G.colors.$color_bad}return{readabilityScoreColor:n,seoScoreColor:a,isKeywordAnalysisActive:o,isContentAnalysisActive:r}})])(x);var cr;function dr(){return dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},dr.apply(null,arguments)}const pr=e=>j.createElement("svg",dr({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 1600 1600"},e),cr||(cr=j.createElement("g",{fill:"none",fillRule:"evenodd"},j.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"}),j.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 ur;function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},hr.apply(null,arguments)}const gr=e=>j.createElement("svg",hr({xmlns:"http://www.w3.org/2000/svg",fill:"current",viewBox:"0 0 1200 1227"},e),ur||(ur=j.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 mr({permalink:e}){const t=encodeURI(e);return(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)("div",{children:(0,n.__)("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)(pr,{}),(0,n.__)("Facebook","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,n.__)("(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)(gr,{}),(0,n.__)("X","wordpress-seo"),(0,f.jsx)("span",{className:"screen-reader-text",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */
(0,n.__)("(Opens in a new browser tab)","wordpress-seo")})]})})]})]})}mr.propTypes={permalink:g().string.isRequired};const yr=(0,re.compose)([(0,t.withSelect)(e=>({permalink:e("core/editor").getPermalink()}))])(mr),fr=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),wr=window.wp.hooks;function br({isSeoDataDefault:e}){const s=(0,t.select)("yoast-seo/editor").getPostType(),i=(0,r.useMemo)(()=>(null==e?void 0:e.isAllTitlesDefault)||!1,[e]),o=(0,r.useMemo)(()=>(null==e?void 0:e.isAllDescriptionsDefault)||!1,[e]),a=(0,r.useMemo)(()=>"post"===s&&(i||o),[s,i,o]),l=(0,r.useMemo)(()=>i&&o?(0,n.__)("custom SEO titles and meta descriptions","wordpress-seo"):i?(0,n.__)("custom SEO titles","wordpress-seo"):o?(0,n.__)("custom meta descriptions","wordpress-seo"):void 0,[i,o]),c=(0,r.useMemo)(()=>i&&o?(0,n.__)("quick optimized SEO titles and meta descriptions","wordpress-seo"):i?(0,n.__)("quick optimized SEO titles","wordpress-seo"):o?(0,n.__)("quick optimized meta descriptions","wordpress-seo"):void 0,[i,o]),d=(0,r.useMemo)(()=>(0,n.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,n.__)("Stand out in the search results and attract more visitors by adding %1$s.","wordpress-seo"),l),[l]),p=(0,r.useMemo)(()=>T((0,n.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,n.__)("%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]),u=(0,r.useMemo)(()=>i?o?[]:(0,wr.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"title"}):[],[i,o]),h=(0,r.useMemo)(()=>o?(0,wr.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:"yoast-google-preview-pre-publish",type:"description"}):[],[i,o]),g=(()=>{var e,s;const i=null===(e=(0,t.useDispatch)("core/edit-post"))||void 0===e?void 0:e.openGeneralSidebar,o=null===(s=(0,t.useDispatch)("core/editor"))||void 0===s?void 0:s.closePublishSidebar,{openEditorModal:n}=(0,t.useDispatch)("yoast-seo/editor");return(0,r.useCallback)(()=>{o(),i("yoast-seo/seo-sidebar"),n("yoast-search-appearance-modal")},[o,i,n])})(),m=(0,r.useCallback)(()=>{g()},[g]);return a&&(0,f.jsxs)(r.Fragment,{children:[(0,f.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-1 yst-mb-[-25px]",children:[(0,f.jsx)(fr,{className:"yst-w-4 yst-h-4 yst-text-amber-500"}),(0,f.jsx)("h4",{children:(0,n.__)("Default SEO data detected","wordpress-seo")})]}),(0,f.jsx)("p",{children:d}),u.length+h.length>0&&(0,f.jsx)("p",{children:p}),(0,f.jsx)(v.Slot,{name:"yoast.replacementVariableEditor.additionalButtons.yoast-google-preview-pre-publish"}),u.map((e,t)=>(0,f.jsx)(r.Fragment,{children:e},`additional-button-pre-publish-sidebar-title-${t}`)),h.map((e,t)=>(0,f.jsx)(r.Fragment,{children:e},`additional-button-pre-publish-sidebar-description-${t}`)),(0,f.jsx)(k.Root,{children:(0,f.jsx)(k.Button,{variant:"secondary",size:"small",className:"yst-mt-2",onClick:m,children:(0,n.__)("Write custom SEO data","wordpress-seo")})})]})}function xr({checklist:e,onClick:t,isSeoDataDefault:s}){let i;return i=e.every(e=>"good"===e.score)?(0,n.__)("We've analyzed your post. Everything looks good. Well done!","wordpress-seo"):(0,n.__)("We've analyzed your post. There is still room for improvement!","wordpress-seo"),(0,f.jsx)(r.Fragment,{children:(0,f.jsxs)(c.LocationProvider,{value:"pre-publish",children:[(0,f.jsx)("p",{children:i}),(0,f.jsx)(sr,{checklist:e,onClick:t}),(0,f.jsx)(br,{isSeoDataDefault:s})]})})}function vr(e){const{isRecentTitlesDefault:t,isRecentDescriptionsDefault:s}=e.getPreferences(),i=e.getSnippetEditorData(),o=e.getSeoTitleTemplate(),r=e.getSeoDescriptionTemplate(),n=i.title.trim()===o.trim(),a=i.description.trim()===r.trim();return{isAllTitlesDefault:t&&n,isAllDescriptionsDefault:s&&a}}br.propTypes={isSeoDataDefault:g().object.isRequired},xr.propTypes={checklist:g().array.isRequired,onClick:g().func.isRequired,isSeoDataDefault:g().object.isRequired};const kr=(0,re.compose)([(0,t.withSelect)(function(e){const t=e("yoast-seo/editor"),s=[];return function(e,t){t.getFocusKeyphrase()||e.push({label:(0,n.__)("No focus keyword was entered","wordpress-seo"),score:"bad"})}(s,t),rr(s,t),or(s,t),nr(s,t),s.push(...Object.values(t.getChecklistItems())),{checklist:s,isSeoDataDefault:vr(t)}}),(0,t.withDispatch)(function(e){const{closePublishSidebar:t,openGeneralSidebar:s}=e("core/edit-post");return{onClick:()=>{t(),s("yoast-seo/seo-sidebar")}}})])(xr),_r=(0,re.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)}})]),jr=({children:e,id:t,hasIcon:s=!0,title:i,image:o=null,isAlertDismissed:r,onDismissed:a})=>r?null:(0,f.jsxs)("div",{id:t,className:"notice-yoast yoast is-dismissible yoast-webinar-dashboard yoast-general-page-notices",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:i})]}),(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,n.__)("Dismiss this notice.","wordpress-seo")})})]});jr.propTypes={children:g().node.isRequired,id:g().string.isRequired,hasIcon:g().bool,title:g().any.isRequired,image:g().elementType,isAlertDismissed:g().bool.isRequired,onDismissed:g().func.isRequired};const Sr=_r(jr),Tr="trustpilot-review-notification",Rr="yoast-seo/editor",Cr=()=>{const e=(0,t.useSelect)(e=>e(Rr).getIsPremium(),[]),s=(0,t.useSelect)(e=>e(Rr).isAlertDismissed(Tr),[]),{overallScore:i}=(0,t.useSelect)(e=>e(Rr).getResultsForFocusKeyword(),[]),{dismissAlert:o}=(0,t.useDispatch)(Rr),n=(0,r.useCallback)(()=>o(Tr),[o]),[a,l]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{var e;"good"===(null===(e=ir(i))||void 0===e?void 0:e.className)&&l(!0)},[i]),{shouldShow:!e&&!s&&a,dismiss:n}},Er=(0,de.makeOutboundLink)(),Ir=()=>{const{shouldShow:e,dismiss:s}=Cr(),{locationContext:i}=(0,c.useRootContext)(),o=(0,t.useSelect)(e=>e(Rr).selectLink("https://yoa.st/trustpilot-review",{context:i}),[i]);return(0,f.jsxs)(jr,{alertKey:Tr,store:Rr,id:Tr,title:(0,n.__)("Show Yoast SEO some love!","wordpress-seo"),hasIcon:!1,isAlertDismissed:!e,onDismissed:s,children:[(0,n.__)("Happy with the plugin?","wordpress-seo")," ",(0,f.jsx)(Er,{href:o,rel:"noopener noreferrer",children:(0,n.__)("Leave a quick review","wordpress-seo")}),"."]})};var Lr,Ar,Fr,Pr,Mr,qr,Or,Nr,Dr,Ur,$r,Wr,Br,Kr,Hr,zr,Yr,Vr,Gr,Zr,Xr,Qr,Jr,en,tn,sn,on,rn,nn,an,ln,cn,dn,pn,un,hn,gn,mn,yn,fn,wn,bn,xn,vn,kn,jn,Sn;function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},Tn.apply(null,arguments)}const Rn=e=>j.createElement("svg",Tn({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 448 360"},e),Lr||(Lr=j.createElement("circle",{cx:226,cy:211,r:149,fill:"#f0ecf0"})),Ar||(Ar=j.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"})),Fr||(Fr=j.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"})),Pr||(Pr=j.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"})),Mr||(Mr=j.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"})),qr||(qr=j.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"})),Or||(Or=j.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"})),Nr||(Nr=j.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"})),Dr||(Dr=j.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"})),Ur||(Ur=j.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"})),$r||($r=j.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"})),Wr||(Wr=j.createElement("circle",{cx:254.13,cy:104.05,r:4.19,fill:"#000001"})),Br||(Br=j.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"})),Kr||(Kr=j.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"})),Hr||(Hr=j.createElement("circle",{cx:219.55,cy:95.28,r:4,fill:"#000001"})),zr||(zr=j.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"})),Yr||(Yr=j.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"})),Vr||(Vr=j.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"})),Gr||(Gr=j.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"})),Zr||(Zr=j.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"})),Xr||(Xr=j.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"})),Qr||(Qr=j.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"})),Jr||(Jr=j.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"})),en||(en=j.createElement("circle",{cx:38.13,cy:30.03,r:3.14,fill:"#b89ac8"})),tn||(tn=j.createElement("circle",{cx:60.26,cy:39.96,r:3.14,fill:"#e31e0c"})),sn||(sn=j.createElement("circle",{cx:50.29,cy:25.63,r:3.14,fill:"#3baa45"})),on||(on=j.createElement("circle",{cx:22.19,cy:19.21,r:3.14,fill:"#2ca9e1"})),rn||(rn=j.createElement("circle",{cx:22.19,cy:30.03,r:3.14,fill:"#e31e0c"})),nn||(nn=j.createElement("circle",{cx:26.86,cy:8.28,r:3.14,fill:"#3baa45"})),an||(an=j.createElement("circle",{cx:49.32,cy:39.99,r:3.14,fill:"#e31e0c"})),ln||(ln=j.createElement("circle",{cx:63.86,cy:59.52,r:3.14,fill:"#f8ad39"})),cn||(cn=j.createElement("circle",{cx:50.88,cy:50.72,r:3.14,fill:"#3baa45"})),dn||(dn=j.createElement("circle",{cx:63.47,cy:76.17,r:3.14,fill:"#e31e0c"})),pn||(pn=j.createElement("circle",{cx:38.34,cy:14.83,r:3.14,fill:"#2ca9e1"})),un||(un=j.createElement("circle",{cx:44.44,cy:5.92,r:3.14,fill:"#f8ad39"})),hn||(hn=j.createElement("circle",{cx:57.42,cy:10.24,r:3.14,fill:"#e31e0c"})),gn||(gn=j.createElement("circle",{cx:66.81,cy:12.4,r:3.14,fill:"#2ca9e1"})),mn||(mn=j.createElement("circle",{cx:77.95,cy:5.14,r:3.14,fill:"#b89ac8"})),yn||(yn=j.createElement("circle",{cx:77.95,cy:30.34,r:3.14,fill:"#e31e0c"})),fn||(fn=j.createElement("circle",{cx:80.97,cy:16.55,r:3.14,fill:"#f8ad39"})),wn||(wn=j.createElement("circle",{cx:62.96,cy:27.27,r:3.14,fill:"#3baa45"})),bn||(bn=j.createElement("circle",{cx:75.36,cy:48.67,r:3.14,fill:"#2ca9e1"})),xn||(xn=j.createElement("circle",{cx:76.11,cy:65.31,r:3.14,fill:"#3baa45"})),vn||(vn=j.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"})),kn||(kn=j.createElement("path",{fill:"#074a67",d:"M67.75 251.08c0-4.65 10.13-72.65 10.13-72.65h2.8l-9.09 72.3z"})),jn||(jn=j.createElement("ellipse",{cx:255.38,cy:103.18,fill:"#fff",rx:1.84,ry:1.77})),Sn||(Sn=j.createElement("ellipse",{cx:221.24,cy:94.75,fill:"#fff",rx:1.84,ry:1.77}))),Cn=({store:e="yoast-seo/editor",image:s=Rn,url:i,...o})=>(0,t.useSelect)(t=>t(e).getIsPremium())?null:(0,f.jsxs)(Sr,{alertKey:"webinar-promo-notification",store:e,id:"webinar-promo-notification",title:(0,n.__)("Ready to boost your online visibility?","wordpress-seo"),image:s,url:i,...o,children:[T((0,n.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,n.__)("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:i,target:"_blank",rel:"noreferrer",children:(0,n.__)("Sign up today!","wordpress-seo")})]});Cn.propTypes={store:g().string,image:g().elementType,url:g().string.isRequired};const En=Cn,In=(e="yoast-seo/editor")=>{const s=(0,t.select)(e).isPromotionActive("black-friday-promotion"),i=(0,t.select)(e).isAlertDismissed("black-friday-promotion");return!s||i},Ln=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),An=({id:e,postTypeName:t,children:s,title:i,isOpen:o,open:a,close:l,shouldCloseOnClickOutside:d=!0,showChangesWarning:p=!0,SuffixHeroIcon:u=null})=>(0,f.jsxs)(r.Fragment,{children:[o&&(0,f.jsx)(c.LocationProvider,{value:"modal",children:(0,f.jsxs)(he,{title:i,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:[p&&(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,n.sprintf)((0,n.__)("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,n.sprintf)((0,n.__)("Return to your %s","wordpress-seo"),t)})]})]})]})}),(0,f.jsx)(be,{id:e+"-open-button",title:i,SuffixHeroIcon:u,suffixIcon:u?null:{size:"20px",icon:"pencil-square"},onClick:a})]});An.propTypes={id:g().string.isRequired,postTypeName:g().string.isRequired,children:g().oneOfType([g().node,g().arrayOf(g().node)]).isRequired,title:g().string.isRequired,isOpen:g().bool.isRequired,open:g().func.isRequired,close:g().func.isRequired,shouldCloseOnClickOutside:g().bool,showChangesWarning:g().bool,SuffixHeroIcon:g().element};const Fn=An,Pn=(0,re.compose)([(0,t.withSelect)((e,t)=>{const{getPostOrPageString:s,getIsModalOpen:i}=e("yoast-seo/editor");return{postTypeName:s(),isOpen:i(t.id)}}),(0,t.withDispatch)((e,t)=>{const{openEditorModal:s,closeEditorModal:i}=e("yoast-seo/editor");return{open:()=>s(t.id),close:i}})])(Fn),Mn=y()(Ln)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,qn=({location:e="sidebar"})=>{const s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]),i=(0,t.useSelect)(e=>e("yoast-seo/editor").isFleschReadingEaseAvailable(),[]),o=ae();return(0,f.jsx)(Pn,{title:(0,n.__)("Insights","wordpress-seo"),id:`yoast-insights-modal-${e}`,shouldCloseOnClickOutside:!s,showChangesWarning:!1,SuffixHeroIcon:(0,f.jsx)(Mn,{className:"yst-text-slate-500",...o}),children:(0,f.jsxs)("div",{className:"yoast-insights yoast-modal-content--columns",children:[(0,f.jsx)(Us,{location:e}),(0,f.jsxs)("div",{children:[i&&(0,f.jsx)("div",{className:"yoast-insights-row",children:(0,f.jsx)(Ms,{})}),(0,f.jsxs)("div",{className:"yoast-insights-row yoast-insights-row--columns",children:[(0,f.jsx)(As,{}),(0,f.jsx)($s,{})]}),(0,Es.isFeatureEnabled)("TEXT_FORMALITY")&&(0,f.jsx)(zs,{location:e,name:"YoastTextFormalityMetabox"})]})]})})};qn.propTypes={location:g().string};const On=qn,Nn=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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 Dn{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,p.isString)(e)?(0,p.isUndefined)(t)||(0,p.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,p.isString)(e)?(0,p.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,p.isString)(e)?(0,p.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,i){if(!(0,p.isString)(e))return console.error("Failed to register modification for plugin "+s+". Expected parameter `modification` to be a string."),!1;if(!(0,p.isFunction)(t))return console.error("Failed to register modification for plugin "+s+". Expected parameter `callable` to be a function."),!1;if(!(0,p.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,p.isNumber)(i)?i:10};return(0,p.isUndefined)(this.modifications[e])&&(this.modifications[e]=[]),this.modifications[e].push(o),!0}_registerAssessment(e,t,s,i){return(0,p.isString)(t)?(0,p.isObject)(s)?(0,p.isString)(i)?(t=i+"-"+t,e.addAssessment(t,s),!0):(console.error("Failed to register assessment for plugin "+i+". Expected parameter `pluginName` to be a string."),!1):(console.error("Failed to register assessment for plugin "+i+". Expected parameter `assessment` to be a function."),!1):(console.error("Failed to register test for plugin "+i+". Expected parameter `name` to be a string."),!1)}_applyModifications(e,t,s){let i=this.modifications[e];return!(0,p.isArray)(i)||i.length<1||(i=this._stripIllegalModifications(i),i.sort((e,t)=>e.priority-t.priority),(0,p.forEach)(i,function(i){const o=i.callable(t,s);typeof o==typeof t?t=o:console.error("Modification with name "+e+" performed by plugin with name "+i.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,p.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,p.reduce)(this.plugins,function(e,t){return e&&"ready"===t.status},!0)}_pollTimeExceeded(){(0,p.forEach)(this.plugins,function(e,t){(0,p.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,p.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,p.isUndefined)(this.plugins[e])}}let Un=null;const $n=()=>{if(null===Un){const e=(0,t.dispatch)("yoast-seo/editor").runAnalysis;Un=window.YoastSEO.app&&window.YoastSEO.app.pluggable?window.YoastSEO.app.pluggable:new Dn(e)}return Un},Wn=(e,t,s)=>$n().loaded?$n()._applyModifications(e,t,s):t,{stripHTMLTags:Bn}=de.strings,Kn=(e,s)=>{const i=(0,t.select)("yoast-seo/editor").getSnippetEditorTemplates();""===e.title&&(e.title=i.title),""===e.description&&(e.description=i.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:Bn(Wn("data_page_title",e.title)),description:Bn(Wn("data_meta_desc",e.description)),filteredSEOTitle:Bn(Wn("data_page_title",e.filteredSEOTitle))}},Hn=({isLoading:e,onLoad:t,location:s,...i})=>((0,r.useEffect)(()=>{setTimeout(()=>{e&&t()})}),e?null:(0,f.jsx)(ms,{icon:"eye",hasPaperStyle:i.hasPaperStyle,children:(0,f.jsx)(us.SnippetEditor,{...i,descriptionPlaceholder:(0,n.__)("Please provide a meta description by editing the snippet below.","wordpress-seo"),mapEditorDataToPreview:Kn,showCloseButton:!1,idSuffix:s})}));Hn.propTypes={isLoading:g().bool.isRequired,onLoad:g().func.isRequired,hasPaperStyle:g().bool.isRequired,location:g().string.isRequired};const zn=(0,re.compose)([(0,t.withSelect)(e=>{const{getBaseUrlFromSettings:t,getDateFromSettings:s,getEditorDataImageUrl:i,getFocusKeyphrase:o,getRecommendedReplaceVars:r,getSiteIconUrlFromSettings:n,getSnippetEditorData:a,getSnippetEditorIsLoading:l,getSnippetEditorMode:c,getSnippetEditorWordsToHighlight:d,isCornerstoneContent:p,getContentLocale:u,getSiteName:h,getReplaceVars:g}=e("yoast-seo/editor");return{baseUrl:t(),data:a(),date:s(),faviconSrc:n(),isLoading:l(),keyword:o(),mobileImageSrc:i(),mode:c(),recommendedReplacementVariables:r(),replacementVariables:g(),wordsToHighlight:d(),isCornerstone:p(),locale:u(),siteName:h()}}),(0,t.withDispatch)(e=>{const{updateData:t,switchMode:s,updateAnalysisData:i,loadSnippetEditorData:o}=e("yoast-seo/editor");return{onChange:(e,i)=>{switch(e){case"mode":s(i);break;case"slug":t({slug:i});break;default:t({[e]:i})}},onChangeAnalysisData:i,onLoad:o}}),ds()])(Hn),Yn=y()(Nn)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,Vn=()=>{const e=ae(),s=(0,t.useSelect)(e=>e("yoast-seo/editor").getIsElementorEditor(),[]);return(0,f.jsxs)(Pn,{title:(0,n.__)("Search appearance","wordpress-seo"),id:"yoast-search-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(Yn,{className:"yst-text-slate-500",...e}),children:[!0===s&&(0,f.jsx)(zn,{showCloseButton:!1,hasPaperStyle:!1}),!1===s&&(0,f.jsx)(Rs,{showCloseButton:!1,hasPaperStyle:!1})]})},Gn=j.forwardRef(function(e,t){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),j.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"}))}),Zn=y()(V.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);
	}

`,Xn=e=>(0,f.jsx)(Zn,{hasPadding:!1,hasSeparator:!0,...e}),Qn=y()(Gn)`
	width: 18px;
	height: 18px;
	margin: 3px;
`,Jn=e=>{const{useOpenGraphData:t,useTwitterData:s}=e;if(!t&&!s)return;const i=ae();return(0
/* translators: Social media appearance refers to a preview of how a page will be represented on social media. */,f.jsxs)(Pn,{title:(0,n.__)("Social media appearance","wordpress-seo"),id:"yoast-social-appearance-modal",shouldCloseOnClickOutside:!1,SuffixHeroIcon:(0,f.jsx)(Qn,{className:"yst-text-slate-500",...i}),children:[t&&(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(wo,{children:(0,n.__)("Determine how your post should look on social media like Facebook, X, Instagram, WhatsApp, Threads, LinkedIn, Slack, and more.","wordpress-seo")}),(0,f.jsx)(uo,{}),s&&(0,f.jsx)(fo,{children:(0,n.__)("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)(Xn,{title:(0,n.__)("X appearance","wordpress-seo"),hasSeparator:!0,initialIsOpen:!1,children:(0,f.jsx)(yo,{})}),!t&&s&&(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(wo,{children:(0,n.__)("To customize the appearance of your post specifically for X, please fill out the 'X appearance' settings below.","wordpress-seo")}),(0,f.jsx)(yo,{})]})]})};Jn.propTypes={useOpenGraphData:g().bool.isRequired,useTwitterData:g().bool.isRequired};const ea=Jn,ta=({title:e,children:t,prefixIcon:s=null,subTitle:i="",hasBetaBadgeLabel:o=!1,hasNewBadgeLabel:n=!1,buttonId:a=null,renderNewBadgeLabel:l=()=>{},initialIsOpen:c=!1})=>{const[d,p]=(0,r.useState)(c),u=(0,r.useRef)(null);(0,r.useEffect)(()=>{c&&u.current&&u.current.focus()},[]);const h=(0,r.useCallback)(()=>{p(e=>!e)},[p]);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:u,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)(V.SvgIcon,{icon:s.icon,color:s.color,size:s.size})}),!n&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("span",{className:"yoast-title-container",children:[(0,f.jsx)("div",{className:"yoast-title",children:e}),i&&(0,f.jsx)("div",{className:"yoast-subtitle",children:i})]}),o&&(0,f.jsx)(V.BetaBadge,{})]}),n&&(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}),i&&(0,f.jsx)("div",{className:"yoast-subtitle",children:i})]}),l()]}),(0,f.jsx)("span",{className:"yoast-chevron","aria-hidden":"true"})]})}),d&&t]})},sa=ta;function ia({settings:e}){const t=(({webinarIntroUrl:e})=>{const{shouldShow:t}=Cr(),s=(e=>{for(const t of e)if(null!=t&&t.getIsEligible())return t;return null})([{getIsEligible:()=>t,component:Ir},{getIsEligible:In,component:()=>(0,f.jsx)(En,{hasIcon:!1,image:null,url:e})},{getIsEligible:()=>!0,component:()=>(0,f.jsx)(Ho,{})}]);return(null==s?void 0:s.component)||null})({webinarIntroUrl:(0,p.get)(window,"wpseoScriptData.webinarIntroBlockEditorUrl","https://yoa.st/webinar-intro-block-editor")}),s=zo();return s&&Yo(),(0,f.jsx)(r.Fragment,{children:(0,f.jsxs)(v.Fill,{name:"YoastSidebar",children:[(0,f.jsxs)(ei,{renderPriority:1,children:[(0,f.jsx)(Cs,{}),(0,f.jsx)("div",{style:{margin:"0 16px"},children:t&&(0,f.jsx)(t,{})})]},"warning"),e.isKeywordAnalysisActive&&(0,f.jsx)(ei,{renderPriority:8,children:(0,f.jsx)(cs.KeywordInput,{isSEMrushIntegrationActive:e.isSEMrushIntegrationActive})},"keyword-input"),e.isKeywordAnalysisActive&&(0,f.jsx)(ei,{renderPriority:10,children:(0,f.jsx)(r.Fragment,{children:(0,f.jsx)(cs.SeoAnalysis,{shouldUpsell:e.shouldUpsell})})},"seo"),e.isContentAnalysisActive&&(0,f.jsx)(ei,{renderPriority:20,children:(0,f.jsx)(cs.ReadabilityAnalysis,{shouldUpsell:e.shouldUpsell})},"readability"),e.isInclusiveLanguageAnalysisActive&&(0,f.jsx)(ei,{renderPriority:21,children:(0,f.jsx)(cs.InclusiveLanguageAnalysis,{})},"inclusive-language-analysis"),e.isKeywordAnalysisActive&&(0,f.jsx)(ei,{renderPriority:22,children:e.shouldUpsell&&(0,f.jsx)(Bo,{})},"additional-keywords-upsell"),e.isKeywordAnalysisActive&&e.isWincherIntegrationActive&&(0,f.jsx)(ei,{renderPriority:23,children:(0,f.jsx)(ls,{location:"sidebar"})}),e.shouldUpsell&&(0,f.jsx)(ei,{renderPriority:25,children:(0,f.jsx)(Qs,{})},"internal-linking-suggestions-upsell"),(0,f.jsx)(ei,{renderPriority:26,children:(0,f.jsx)(Vn,{})},"search-appearance"),(e.useOpenGraphData||e.useTwitterData)&&(0,f.jsx)(ei,{renderPriority:27,children:(0,f.jsx)(ea,{useOpenGraphData:e.useOpenGraphData,useTwitterData:e.useTwitterData})},"social-appearance"),e.displaySchemaSettings&&(0,f.jsx)(ei,{renderPriority:28,children:(0,f.jsx)(sa,{title:(0,n.__)("Schema","wordpress-seo"),children:(0,f.jsx)(Oo,{})})},"schema"),s&&(0,f.jsx)(ei,{renderPriority:29,children:(0,f.jsx)(cs.ContentBlocks,{})},"content-blocks"),e.displayAdvancedTab&&(0,f.jsx)(ei,{renderPriority:30,children:(0,f.jsx)(sa,{title:(0,n.__)("Advanced","wordpress-seo"),children:(0,f.jsx)(li,{})})},"advanced"),e.isCornerstoneActive&&(0,f.jsx)(ei,{renderPriority:31,children:(0,f.jsx)(ps,{})},"cornerstone"),e.isInsightsEnabled&&(0,f.jsx)(ei,{renderPriority:32,children:(0,f.jsx)(On,{location:"sidebar"})})]})})}ta.propTypes={title:g().string.isRequired,children:g().oneOfType([g().node,g().arrayOf(g().node)]).isRequired,prefixIcon:g().object,subTitle:g().string,hasBetaBadgeLabel:g().bool,hasNewBadgeLabel:g().bool,buttonId:g().string,renderNewBadgeLabel:g().func,initialIsOpen:g().bool},ia.propTypes={settings:g().object.isRequired};const oa=(0,t.withSelect)((e,t)=>{const{getPreferences:s}=e("yoast-seo/editor");return{settings:s(),store:t.store}})(ia);function ra({trackAll:e=p.noop,hasTrackedKeyphrases:t=!1}){return(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(V.FieldGroup,{label:(0,n.__)("SEO performance","wordpress-seo"),linkTo:wpseoAdminL10n["shortlinks.wincher.seo_performance"]
/* translators: Hidden accessibility text. */,linkText:(0,n.__)("Learn more about the SEO performance feature.","wordpress-seo"),wrapperClassName:"yoast-field-group yoast-wincher-post-publish"}),(0,f.jsx)(ct,{}),t&&(0,f.jsx)("p",{children:(0,n.__)("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)(V.NewButton,{variant:"secondary",small:!0,onClick:e,children:(0,n.__)("Track all keyphrases on this page","wordpress-seo")})}),(0,f.jsx)(ls,{location:"postpublish"})]})}ra.propTypes={trackAll:g().func,hasTrackedKeyphrases:g().bool};const na=(0,re.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")}}})])(ra);window.wp.annotations;const aa=/(<([a-z]|\/)[^<>]+>)/gi,{htmlEntitiesRegex:la}=Z.helpers.htmlEntities,ca=e=>{let t=0;return(0,p.forEachRight)(e,e=>{const[s]=e;let i=s.length;/^<\/?br/.test(s)&&(i-=1),t+=i}),t},da="<yoastmark class='yoast-text-mark'>",pa="</yoastmark>",ua='<yoastmark class="yoast-text-mark">';function ha(e,t,s,i,o){const r=i.clientId,n=(0,l.create)({html:e,multilineTag:s.multilineTag,multilineWrapperTag:s.multilineWrapperTag}).text;return(0,p.flatMap)(o,s=>{let o;return o=s.hasBlockPosition&&s.hasBlockPosition()?function(e,t,s,i,o){if(t===e.getBlockClientId()){let t=e.getBlockPositionStart(),r=e.getBlockPositionEnd();if(e.isMarkForFirstBlockSection()){const e=((e,t,s)=>{const i="yoast/faq-block"===s?'<strong class="schema-faq-question">':'<strong class="schema-how-to-step-name">';return{blockStartOffset:e-=i.length,blockEndOffset:t-=i.length}})(t,r,s);t=e.blockStartOffset,r=e.blockEndOffset}if(i.slice(t,r)===o.slice(t,r))return[{startOffset:t,endOffset:r}];const n=((e,t,s)=>{const i=s.slice(0,e),o=s.slice(0,t),r=((e,t,s,i)=>{const o=[...e.matchAll(aa)];s-=ca(o);const r=[...t.matchAll(aa)];return{blockStartOffset:s,blockEndOffset:i-=ca(r)}})(i,o,e,t),n=((e,t,s,i)=>{let o=[...e.matchAll(la)];return(0,p.forEachRight)(o,e=>{const[,t]=e;s-=t.length}),o=[...t.matchAll(la)],(0,p.forEachRight)(o,e=>{const[,t]=e;i-=t.length}),{blockStartOffset:s,blockEndOffset:i}})(i,o,e=r.blockStartOffset,t=r.blockEndOffset);return{blockStartOffset:e=n.blockStartOffset,blockEndOffset:t=n.blockEndOffset}})(t,r,i);return[{startOffset:n.blockStartOffset,endOffset:n.blockEndOffset}]}return[]}(s,r,i.name,e,n):function(e,t){const s=t.getOriginal().replace(/(<([^>]+)>)/gi,""),i=t.getMarked().replace(/(<(?!\/?yoastmark)[^>]+>)/gi,""),o=function(e,t,s=!0){const i=[];if(0===e.length)return i;let o,r=0;for(s||(t=t.toLowerCase(),e=e.toLowerCase());(o=e.indexOf(t,r))>-1;)i.push(o),r=o+t.length;return i}(e,s);if(0===o.length)return[];const r=function(e){let t=e.indexOf(da);const s=t>=0;s||(t=e.indexOf(ua));let i=null;const o=[];for(;t>=0;){if(i=(e=s?e.replace(da,""):e.replace(ua,"")).indexOf(pa),i<t)return[];e=e.replace(pa,""),o.push({startOffset:t,endOffset:i}),t=s?e.indexOf(da):e.indexOf(ua),i=null}return o}(i),n=[];return r.forEach(e=>{o.forEach(i=>{const o=i+e.startOffset;let r=i+e.endOffset;0===e.startOffset&&e.endOffset===t.getOriginal().length&&(r=i+s.length),n.push({startOffset:o,endOffset:r})})}),n}(n,s),o?o.map(e=>({...e,block:r,richTextIdentifier:t})):[]})}const ga=e=>e[0].toUpperCase()+e.slice(1),ma=(e,t,s,i,o)=>(e=e.map(e=>{const r=`${e.id}-${o[0]}`,n=`${e.id}-${o[1]}`,a=ga(o[0]),l=ga(o[1]),c=e[`json${a}`],d=e[`json${l}`],{marksForFirstSection:p,marksForSecondSection:u}=((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=ha(c,r,s,i,p),g=ha(d,n,s,i,u);return h.concat(g)}),(0,p.flattenDeep)(e)),ya="yoast";let fa=[];const wa={"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 ba(){const e=fa.shift();e&&((0,t.dispatch)("core/annotations").__experimentalAddAnnotation(e),xa())}function xa(){(0,p.isFunction)(window.requestIdleCallback)?window.requestIdleCallback(ba,{timeout:1e3}):setTimeout(ba,150)}function va(){const e=(0,t.select)("core/block-editor").getSelectedBlock(),s=(0,t.select)("yoast-seo/editor").getActiveMarker();if(!e||!s)return;var i;i=e.clientId,(0,t.select)("core/annotations").__experimentalGetAnnotations().filter(e=>e.blockClientId===i&&e.source===ya).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 r=o.marks;var n;n=((e,t)=>{return(0,p.flatMap)((s=e.name,wa.hasOwnProperty(s)?wa[s]:[]),s=>"yoast/faq-block"===e.name?((e,t,s)=>{const i=t.attributes[e.key];return 0===i.length?[]:ma(i,s,e,t,["question","answer"])})(s,e,t):"yoast/how-to-block"===e.name?((e,t,s)=>{const i=t.attributes[e.key];if(i&&0===i.length)return[];const o=[];return"steps"===e.key&&o.push(ma(i,s,e,t,["name","text"])),"jsonDescription"===e.key&&(s=s.filter(e=>e.hasBlockPosition&&e.hasBlockPosition()?!e.getBlockAttributeId():e),o.push(ha(i,"description",e,t,s))),(0,p.flattenDeep)(o)})(s,e,t):function(e,t,s){const i=e.key,o=((e,t)=>{const s=e.attributes[t];return"string"==typeof s?s:(s||"").toString()})(t,i);return ha(o,i,e,t,s)}(s,e,t));var s})(e,r),fa=n.map(e=>({blockClientId:e.block,source:ya,richTextIdentifier:e.richTextIdentifier,range:{start:e.startOffset,end:e.endOffset}})),xa()}const ka=window.wp.htmlEntities,_a=(0,de.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: ${G.colors.$color_help_text};
	
	&:hover,
	&:focus {
		color: ${G.colors.$color_snippet_focus};	
	}
	
	// Overwrite the default blue active color for links.
	&:active {
		color: ${G.colors.$color_help_text};	
	}

	&::before {
		position: absolute;
		top: 0;
		left: 0;
		padding: 2px;
		content: "\f223";
	}
`);function ja({value:e,onChange:t}){var s;const[i,o]=(0,r.useState)(Boolean(null==e?void 0:e.cssClasses)),a=`${(0,re.useInstanceId)(ja,"css-classes-setting")}-input`;return(0,r.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,n.__)("Additional CSS class(es)","wordpress-seo"),checked:i,onChange:s=>{o(s),s||t({...e,cssClasses:""})}}),i&&(0,f.jsx)(v.__experimentalInputControl,{__next40pxDefaultSize:!0,id:a,label:(0,n.__)("Additional CSS class(es)","wordpress-seo"),hideLabelFromVision:!0,value:null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"",onChange:s=>{const i=(null!=s?s:"").replace(/,/g," ").replace(/\s+/g," ");t({...e,cssClasses:i})},onBlur:()=>{var s;const i=(null!==(s=null==e?void 0:e.cssClasses)&&void 0!==s?s:"").trim();i!==(null==e?void 0:e.cssClasses)&&t({...e,cssClasses:i})},placeholder:(0,n.__)("Separate multiple classes with spaces","wordpress-seo"),help:(0,n.__)("Separate multiple classes with spaces.","wordpress-seo")})]})}function Sa({isActive:e=!1,activeAttributes:t={},addingLink:s=!1,value:o={},onChange:a=p.noop,speak:c,stopAddingLink:d,contentRef:u={}}){const h=(0,r.useMemo)(p.uniqueId,[s]),[g,m]=(0,r.useState)(),y=(0,l.useAnchor)({editableContentElement:u.current,settings:{...Ea,isActive:e}}),w=(0,l.getActiveFormat)(o,"core/link"),b=e=>{var t;const{formats:s,start:i,text:o}=e,r=null==w||null===(t=w.attributes)||void 0===t?void 0:t.url;let n=i,a=i;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)===r})};for(!l(n)&&n>0&&l(n-1)&&(n--,a=n);n>0&&l(n-1);)n--;for(;a<((null==o?void 0:o.length)||0)&&l(a);)a++;return{start:n,end:a}};let x="";if(e&&w){const{start:e,end:t}=b(o);e<t&&(x=o.text.substring(e,t))}else o.start!==o.end&&(x=(0,l.getTextContent)((0,l.slice)(o)));const k={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:x,className:t.class,cssClasses:t.class,...g},_=e=>k.url===e.url&&(k.opensInNewTab!==e.opensInNewTab||k.noFollow!==e.noFollow||k.sponsored!==e.sponsored||k.cssClasses!==e.cssClasses),j=e=>{if("number"==typeof e||"string"==typeof e)return String(e)},S=(0,f.jsx)(_a,{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,n.__)("Learn more about marking a link as nofollow or sponsored.","wordpress-seo")})}),R=T((0,n.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,n.__)("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}),C=T((0,n.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,n.__)("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}),E=[{id:"opensInNewTab",title:(0,n.__)("Open in new tab","wordpress-seo")},{id:"noFollow",title:R},{id:"sponsored",title:C},{id:"cssClasses",title:(0,n.__)("Additional CSS class(es)","wordpress-seo"),render:(e,t,s)=>(0,f.jsx)(ja,{value:t,onChange:s},e.id)}],{__experimentalLinkControl:I}=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)(I,{value:k,onChange:t=>{var s;t={...g,...t};const r=_(t);if((e=>_(e)&&!e.url)(t=(e=>{var t;return _(t=e)&&!0===t.sponsored&&!0!==k.sponsored&&(e.noFollow=!0),(e=>_(e)&&!1===e.noFollow&&!1!==k.noFollow)(e)&&(e.sponsored=!1),e})(t)))return void m(t);const u=(0,i.prependHTTP)(t.url),h=function({url:e,type:t,id:s,opensInNewWindow:i,noFollow:o,sponsored:r,className:n}){const a={type:"core/link",attributes:{url:e}};t&&(a.attributes.type=t),s&&(a.attributes.id=s);let l=[];return i&&(a.attributes.target="_blank",l.push("noreferrer noopener")),r&&(l.push("sponsored"),l.push("nofollow")),o&&l.push("nofollow"),l.length>0&&(l=(0,p.uniq)(l),a.attributes.rel=l.join(" ")),n&&(a.attributes.class=n),a}({url:u,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 i=((e,t)=>e.title?e.title:t)(t,s),r=(0,l.applyFormat)((0,l.create)({text:i}),e,0,i.length);a((0,l.insert)(o,r))})(h,t,u):((e,t)=>{const{start:s,end:i}=b(o),r=s<i?o.text.substring(s,i):"";let n;if(void 0!==t&&""!==t&&t!==r&&s<i){const r=(0,l.remove)(o,s,i);r.start=s,r.end=s;const a=(0,l.applyFormat)((0,l.create)({text:t}),e,0,t.length);n=(0,l.insert)(r,a)}else n=(0,l.applyFormat)(o,e),n.start=n.end;n.activeFormats=[],a(n)})(h,t.title),r||d(),(t=>{!function(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,i.getProtocol)(t);if(!(0,i.isValidProtocol)(e))return!1;if((0,p.startsWith)(e,"http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const s=(0,i.getAuthority)(t);if(!(0,i.isValidAuthority)(s))return!1;const o=(0,i.getPath)(t);if(o&&!(0,i.isValidPath)(o))return!1;const r=(0,i.getQueryString)(t);if(r&&!(0,i.isValidQueryString)(r))return!1;const n=(0,i.getFragment)(t);if(n&&!(0,i.isValidFragment)(n))return!1}return!((0,p.startsWith)(t,"#")&&!(0,i.isValidFragment)(t))}(t)?c((0,n.__)("Warning: the link has been inserted but may have errors. Please test it.","wordpress-seo"),"assertive"):c(e?(0,n.__)("Link edited.","wordpress-seo"):(0,n.__)("Link inserted.","wordpress-seo"),"assertive")})(u)},forceIsEditingLink:s,hasTextControl:!0,settings:E})},h)}Sa.propTypes={isActive:g().bool,activeAttributes:g().object,addingLink:g().bool,value:g().object,onChange:g().func,speak:g().func.isRequired,stopAddingLink:g().func.isRequired,contentRef:g().object};const Ta=(0,v.withSpokenMessages)(Sa),Ra="core/link",Ca=(0,n.__)("Link","wordpress-seo"),Ea={name:Ra,title:Ca,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,i.isURL)(o)?(window.console.log("Created link:\n\n",o),(0,l.applyFormat)(e,{type:Ra,attributes:{url:(0,ka.decodeEntities)(o)}})):e},edit:(0,v.withSpokenMessages)(class extends r.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,i.isURL)(s)?t((0,l.applyFormat)(e,{type:Ra,attributes:{url:s}})):s&&(0,i.isEmail)(s)?t((0,l.applyFormat)(e,{type:Ra,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,Ra)),s((0,n.__)("Link removed.","wordpress-seo"),"assertive")}render(){const{isActive:e,activeAttributes:t,value:s,onChange:i}=this.props,{RichTextToolbarButton:o,RichTextShortcut:a}=window.wp.blockEditor;return(0,f.jsxs)(r.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,n.__)("Unlink","wordpress-seo"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&(0,f.jsx)(o,{name:"link",icon:"admin-links",title:Ca,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&(0,f.jsx)(Ta,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:t,value:s,onChange:i,contentRef:this.props.contentRef})]})}})};function Ia(){const e=u();return(0,p.get)(e,"contentLocale","en_US")}const{updateReplacementVariable:La,updateData:Aa,hideReplacementVariables:Fa,setContentImage:Pa,updateSettings:Ma,setEditorDataContent:qa,setEditorDataTitle:Oa,setEditorDataExcerpt:Na,setEditorDataImageUrl:Da,setEditorDataSlug:Ua}=d.actions,$a=globalThis.jQuery;window.yoast=window.yoast||{},window.yoast.initEditorIntegration=function(s){(function(s){const i=u(),l=i.isPremium?"Yoast SEO Premium":"Yoast SEO",d=(0,f.jsx)(x,{});(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 p={isRtl:i.isRtl},h=s.getState().preferences,g=h.isKeywordAnalysisActive||h.isContentAnalysisActive,m=h.isKeywordAnalysisActive&&h.isWincherIntegrationActive;!function(){var e;const s="yoast-seo/document-panel",i=null===(e=(0,t.select)("core/preferences"))||void 0===e?void 0:e.get("core","openPanels");var o;i&&!i.includes(s)&&(null===(o=(0,t.dispatch)("core/editor"))||void 0===o||o.toggleEditorPanelOpened(s))}();const y={locationContext:"block-sidebar"},w={locationContext:"block-metabox"};(0,a.registerPlugin)("yoast-seo",{render:()=>(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(o.PluginSidebarMoreMenuItem,{target:"seo-sidebar",icon:(0,f.jsx)(lr,{}),children:l}),(0,f.jsx)(o.PluginSidebar,{name:"seo-sidebar",title:l,children:(0,f.jsx)(c.Root,{context:y,children:(0,f.jsx)(er,{store:s,theme:p})})}),(0,f.jsxs)(r.Fragment,{children:[(0,f.jsx)(oa,{store:s,theme:p}),(0,f.jsx)(c.Root,{context:w,children:(0,f.jsx)(Qo,{target:"wpseo-metabox-root",store:s,theme:p})})]}),g&&(0,f.jsx)(o.PluginPrePublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,n.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(r.Fragment,{}),children:(0,f.jsx)(kr,{})}),(0,f.jsxs)(o.PluginPostPublishPanel,{className:"yoast-seo-sidebar-panel",title:(0,n.__)("Yoast SEO","wordpress-seo"),initialOpen:!0,icon:(0,f.jsx)(r.Fragment,{}),children:[(0,f.jsx)(yr,{}),m&&(0,f.jsx)(na,{})]}),g&&(0,f.jsx)(o.PluginDocumentSettingPanel,{name:"document-panel",className:"yoast-seo-sidebar-panel",title:(0,n.__)("Yoast SEO","wordpress-seo"),icon:(0,f.jsx)(r.Fragment,{}),children:(0,f.jsx)(ar,{})})]}),icon:(0,f.jsx)(lr,{})})})(s),function(){if("function"==typeof(0,p.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"),[Ea].forEach(({name:s,replaces:i,...o})=>{if(i&&(0,t.dispatch)("core/rich-text").removeFormatTypes(i),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,n.__)("Marking links with nofollow/sponsored has been disabled for WordPress installs < 5.4.","wordpress-seo")+" "+(0,n.sprintf)(
// translators: %1$s expands to Yoast SEO.
// translators: %1$s expands to Yoast SEO.
(0,n.__)("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,p.isFunction)((0,t.select)("core/block-editor").getBlocks)&&(0,t.select)("core/annotations")&&(0,p.isFunction)((0,t.dispatch)("core/annotations").__experimentalAddAnnotation)&&e.dispatch(d.actions.setMarkerStatus("enabled"))}(s);const h=(0,i.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=[]){var s,i;this._data=this.getInitialData(e),s=this._data,i=this._store,(0,p.forEach)(s,(e,t)=>{xs.includes(t)||i.dispatch(fs(t,e))}),this._store.dispatch(Fa(t)),this.subscribeToGutenberg(),this.subscribeToYoastSEO()}getInitialData(e){const t=this.collectGutenbergData();return e=function(e,t){if(!e.custom_taxonomies)return e;const s={};return(0,p.forEach)(e.custom_taxonomies,(e,t)=>{const{name:i,label:o,descriptionName:r,descriptionLabel:n}=function(e){const t=vs(e);return{name:"ct_"+t,label:ws(e+" (custom taxonomy)"),descriptionName:"ct_desc_"+t,descriptionLabel:ws(e+" description (custom taxonomy)")}}(t),a="string"==typeof e.name?(0,de.decodeHTML)(e.name):e.name,l="string"==typeof e.description?(0,de.decodeHTML)(e.description):e.description;s[i]={value:a,label:o},s[r]={value:l,label:n}}),t.dispatch(function(e){return{type:"SNIPPET_EDITOR_UPDATE_REPLACEMENT_VARIABLES_BATCH",updatedVariables:e}}(s)),(0,p.omit)({...e},"custom_taxonomies")}(e=function(e,t){return e.custom_fields?((0,p.forEach)(e.custom_fields,(e,s)=>{const{name:i,label:o}=function(e){return{name:"cf_"+vs(e),label:ws(e+" (custom field)")}}(s);t.dispatch(fs(i,e,o))}),(0,p.omit)({...e},"custom_fields")):e}(e,this._store),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 i=(0,t.select)("core/editor").getEditorBlocks();1===i.length&&"core/freeform"===i[0].name&&(s=(0,e.getBlockContent)(i[0]));const o=this.calculateContentImage(s),r=this.getPostAttribute("excerpt")||"";return{content:s,title:this.getPostAttribute("title")||"",slug:this.getSlug(),excerpt:r||ks(s,"ja"===Ia()?80:156),excerpt_only:r,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=Z.languageProcessing.imageInText(e);if(0===t.length)return"";const s=$a.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(qa(e.content)),this._data.title!==e.title&&(this._store.dispatch(Oa(e.title)),this._store.dispatch(La("title",e.title))),this._data.excerpt!==e.excerpt&&(this._store.dispatch(Na(e.excerpt)),this._store.dispatch(La("excerpt",e.excerpt)),this._store.dispatch(La("excerpt_only",e.excerpt_only))),this._data.slug!==e.slug&&(this._store.dispatch(Ua(e.slug)),this._store.dispatch(Aa({slug:e.slug}))),this._data.snippetPreviewImageURL!==e.snippetPreviewImageURL&&(this._store.dispatch(Da(e.snippetPreviewImageURL)),this._store.dispatch(Aa({snippetPreviewImageURL:e.snippetPreviewImageURL}))),this._data.contentImage!==e.contentImage&&this._store.dispatch(Pa(e.contentImage)),this._data.baseUrl!==e.baseUrl&&this._store.dispatch(Ma({baseUrl:e.baseUrl}))}reapplyMarkers(){const{getActiveMarker:e,getMarkerPauseStatus:s}=(0,t.select)("yoast-seo/editor"),i=e(),o=s();i&&!o&&va()}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(),i=e.getResultsForFocusKeyword();return(this._previousReadabilityResults!==s||this._previousSeoResults!==i)&&(this._previousReadabilityResults=s,this._previousSeoResults=i,!0)}onNewAnalysisResultsAvailable(){this.reapplyMarkers()}subscribeToGutenberg(){this._previousRenderingMode=(0,t.select)("core/editor").getRenderingMode&&(0,t.select)("core/editor").getRenderingMode(),this.subscriber=(0,p.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}}})()})();