JezK
Edit File: bulk-editor-page.js
(()=>{var e={818(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))});e.exports=n},998(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))});e.exports=n},1298(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}))});e.exports=n},1609(e){"use strict";e.exports=window.React},1802(e){"use strict";e.exports=window.yoast.propTypes},2353(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});e.exports=n},2485(e,t){var s;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var a=typeof s;if("string"===a||"number"===a)e.push(s);else if(Array.isArray(s)){if(s.length){var i=n.apply(null,s);i&&e.push(i)}}else if("object"===a){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){e.push(s.toString());continue}for(var o in s)r.call(s,o)&&s[o]&&e.push(o)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(s=function(){return n}.apply(t,[]))||(e.exports=s)}()},2514(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))});e.exports=n},3473(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"}))});e.exports=n},3527(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))});e.exports=n},3626(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}))});e.exports=n},4198(e,t){var s;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var a=typeof s;if("string"===a||"number"===a)e.push(s);else if(Array.isArray(s)&&s.length){var i=n.apply(null,s);i&&e.push(i)}else if("object"===a)for(var o in s)r.call(s,o)&&s[o]&&e.push(o)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(s=function(){return n}.apply(t,[]))||(e.exports=s)}()},4892(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.exports=n},5074(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))});e.exports=n},5687(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M10.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))});e.exports=n},5770(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"}))});e.exports=n},6650(e,t,s){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},a=function(){function e(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,s,r){return s&&e(t.prototype,s),r&&e(t,r),t}}(),i=c(s(1609)),o=c(s(1802)),l=c(s(4198));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}var u={animating:"rah-animating",animatingUp:"rah-animating--up",animatingDown:"rah-animating--down",animatingToHeightZero:"rah-animating--to-height-zero",animatingToHeightAuto:"rah-animating--to-height-auto",animatingToHeightSpecific:"rah-animating--to-height-specific",static:"rah-static",staticHeightZero:"rah-static--height-zero",staticHeightAuto:"rah-static--height-auto",staticHeightSpecific:"rah-static--height-specific"},h=["animateOpacity","animationStateClasses","applyInlineTransitions","children","contentClassName","delay","duration","easing","height","onAnimationEnd","onAnimationStart"];function p(e){for(var t=arguments.length,s=Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];if(!s.length)return e;for(var n={},a=Object.keys(e),i=0;i<a.length;i++){var o=a[i];-1===s.indexOf(o)&&(n[o]=e[o])}return n}function m(e){e.forEach(function(e){return cancelAnimationFrame(e)})}function f(e){return!isNaN(parseFloat(e))&&isFinite(e)}function y(e){return"string"==typeof e&&e.search("%")===e.length-1&&f(e.substr(0,e.length-1))}function g(e,t){e&&"function"==typeof e&&e(t)}var v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));s.animationFrameIDs=[];var r="auto",a="visible";f(e.height)?(r=e.height<0||"0"===e.height?0:e.height,a="hidden"):y(e.height)&&(r="0%"===e.height?0:e.height,a="hidden"),s.animationStateClasses=n({},u,e.animationStateClasses);var i=s.getStaticStateClasses(r);return s.state={animationStateClasses:i,height:r,overflow:a,shouldUseTransitions:!1},s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){var e=this.state.height;this.contentElement&&this.contentElement.style&&this.hideContent(e)}},{key:"componentDidUpdate",value:function(e,t){var s,r,n=this,a=this.props,i=a.delay,o=a.duration,c=a.height,u=a.onAnimationEnd,h=a.onAnimationStart;if(this.contentElement&&c!==e.height){var p;this.showContent(t.height),this.contentElement.style.overflow="hidden";var v=this.contentElement.offsetHeight;this.contentElement.style.overflow="";var w=o+i,b=null,x={height:null,overflow:"hidden"},S="auto"===t.height;f(c)?(b=c<0||"0"===c?0:c,x.height=b):y(c)?(b="0%"===c?0:c,x.height=b):(b=v,x.height="auto",x.overflow=null),S&&(x.height=b,b=v);var k=(0,l.default)((d(p={},this.animationStateClasses.animating,!0),d(p,this.animationStateClasses.animatingUp,"auto"===e.height||c<e.height),d(p,this.animationStateClasses.animatingDown,"auto"===c||c>e.height),d(p,this.animationStateClasses.animatingToHeightZero,0===x.height),d(p,this.animationStateClasses.animatingToHeightAuto,"auto"===x.height),d(p,this.animationStateClasses.animatingToHeightSpecific,x.height>0),p)),_=this.getStaticStateClasses(x.height);this.setState({animationStateClasses:k,height:b,overflow:"hidden",shouldUseTransitions:!S}),clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),S?(x.shouldUseTransitions=!0,m(this.animationFrameIDs),this.animationFrameIDs=(s=function(){n.setState(x),g(h,{newHeight:x.height})},(r=[])[0]=requestAnimationFrame(function(){r[1]=requestAnimationFrame(function(){s()})}),r),this.animationClassesTimeoutID=setTimeout(function(){n.setState({animationStateClasses:_,shouldUseTransitions:!1}),n.hideContent(x.height),g(u,{newHeight:x.height})},w)):(g(h,{newHeight:b}),this.timeoutID=setTimeout(function(){x.animationStateClasses=_,x.shouldUseTransitions=!1,n.setState(x),"auto"!==c&&n.hideContent(b),g(u,{newHeight:b})},w))}}},{key:"componentWillUnmount",value:function(){m(this.animationFrameIDs),clearTimeout(this.timeoutID),clearTimeout(this.animationClassesTimeoutID),this.timeoutID=null,this.animationClassesTimeoutID=null,this.animationStateClasses=null}},{key:"showContent",value:function(e){0===e&&(this.contentElement.style.display="")}},{key:"hideContent",value:function(e){0===e&&(this.contentElement.style.display="none")}},{key:"getStaticStateClasses",value:function(e){var t;return(0,l.default)((d(t={},this.animationStateClasses.static,!0),d(t,this.animationStateClasses.staticHeightZero,0===e),d(t,this.animationStateClasses.staticHeightSpecific,e>0),d(t,this.animationStateClasses.staticHeightAuto,"auto"===e),t))}},{key:"render",value:function(){var e,t=this,s=this.props,r=s.animateOpacity,a=s.applyInlineTransitions,o=s.children,c=s.className,u=s.contentClassName,m=s.delay,f=s.duration,y=s.easing,g=s.id,v=s.style,w=this.state,b=w.height,x=w.overflow,S=w.animationStateClasses,k=w.shouldUseTransitions,_=n({},v,{height:b,overflow:x||v.overflow});k&&a&&(_.transition="height "+f+"ms "+y+" "+m+"ms",v.transition&&(_.transition=v.transition+", "+_.transition),_.WebkitTransition=_.transition);var E={};r&&(E.transition="opacity "+f+"ms "+y+" "+m+"ms",E.WebkitTransition=E.transition,0===b&&(E.opacity=0));var j=(0,l.default)((d(e={},S,!0),d(e,c,c),e)),C=void 0!==this.props["aria-hidden"]?this.props["aria-hidden"]:0===b;return i.default.createElement("div",n({},p.apply(void 0,[this.props].concat(h)),{"aria-hidden":C,className:j,id:g,style:_}),i.default.createElement("div",{className:u,style:E,ref:function(e){return t.contentElement=e}},o))}}]),t}(i.default.Component);v.propTypes={"aria-hidden":o.default.bool,animateOpacity:o.default.bool,animationStateClasses:o.default.object,applyInlineTransitions:o.default.bool,children:o.default.any.isRequired,className:o.default.string,contentClassName:o.default.string,delay:o.default.number,duration:o.default.number,easing:o.default.string,height:function(e,t,s){var n=e[t];return"number"==typeof n&&n>=0||y(n)||"auto"===n?null:new TypeError('value "'+n+'" of type "'+(void 0===n?"undefined":r(n))+'" is invalid type for '+t+" in "+s+'. It needs to be a positive number, string "auto" or percentage string (e.g. "15%").')},id:o.default.string,onAnimationEnd:o.default.func,onAnimationStart:o.default.func,style:o.default.object},v.defaultProps={animateOpacity:!1,animationStateClasses:u,applyInlineTransitions:!0,duration:250,delay:0,easing:"ease",style:{}},t.A=v},6702(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.exports=n},7219(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))});e.exports=n},8738(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))});e.exports=n},8843(e,t,s){const r=s(1609),n=r.forwardRef(function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"}))});e.exports=n}},t={};function s(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.components,t=window.wp.data,r=window.wp.domReady;var n=s.n(r);const a=window.wp.element,i=window.wp.plugins,o=window.yoast.dashboardFrontend,l=window.lodash;var c=s(1609);const d=window.ReactDOM;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},u.apply(this,arguments)}var h;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(h||(h={}));const p="popstate";function m(e,t){if(!1===e||null==e)throw new Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function y(e,t){return{usr:e.state,key:e.key,idx:t}}function g(e,t,s,r){return void 0===s&&(s=null),u({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?w(t):t,{state:s,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function v(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&"?"!==s&&(t+="?"===s.charAt(0)?s:"?"+s),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function w(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b(e,t,s,r){void 0===r&&(r={});let{window:n=document.defaultView,v5Compat:a=!1}=r,i=n.history,o=h.Pop,l=null,c=d();function d(){return(i.state||{idx:null}).idx}function f(){o=h.Pop;let e=d(),t=null==e?null:e-c;c=e,l&&l({action:o,location:b.location,delta:t})}function w(e){let t="null"!==n.location.origin?n.location.origin:n.location.href,s="string"==typeof e?e:v(e);return s=s.replace(/ $/,"%20"),m(t,"No window.location.(origin|href) available to create URL for href: "+s),new URL(s,t)}null==c&&(c=0,i.replaceState(u({},i.state,{idx:c}),""));let b={get action(){return o},get location(){return e(n,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(p,f),l=e,()=>{n.removeEventListener(p,f),l=null}},createHref:e=>t(n,e),createURL:w,encodeLocation(e){let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){o=h.Push;let r=g(b.location,e,t);s&&s(r,e),c=d()+1;let u=y(r,c),p=b.createHref(r);try{i.pushState(u,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;n.location.assign(p)}a&&l&&l({action:o,location:b.location,delta:1})},replace:function(e,t){o=h.Replace;let r=g(b.location,e,t);s&&s(r,e),c=d();let n=y(r,c),u=b.createHref(r);i.replaceState(n,"",u),a&&l&&l({action:o,location:b.location,delta:0})},go:e=>i.go(e)};return b}var x;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(x||(x={}));const S=new Set(["lazy","caseSensitive","path","id","index","children"]);function k(e,t,s,r){return void 0===s&&(s=[]),void 0===r&&(r={}),e.map((e,n)=>{let a=[...s,String(n)],i="string"==typeof e.id?e.id:a.join("-");if(m(!0!==e.index||!e.children,"Cannot specify children on an index route"),m(!r[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let s=u({},e,t(e),{id:i});return r[i]=s,s}{let s=u({},e,t(e),{id:i,children:void 0});return r[i]=s,e.children&&(s.children=k(e.children,t,a,r)),s}})}function _(e,t,s){return void 0===s&&(s="/"),E(e,t,s,!1)}function E(e,t,s,r){let n=B(("string"==typeof t?w(t):t).pathname||"/",s);if(null==n)return null;let a=j(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,s)=>e===t[s])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let i=null;for(let e=0;null==i&&e<a.length;++e){let t=F(n);i=O(a[e],t,r)}return i}function j(e,t,s,r){void 0===t&&(t=[]),void 0===s&&(s=[]),void 0===r&&(r="");let n=(e,n,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:n,route:e};i.relativePath.startsWith("/")&&(m(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let o=q([r,i.relativePath]),l=s.concat(i);e.children&&e.children.length>0&&(m(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+o+'".'),j(e.children,t,l,o)),(null!=e.path||e.index)&&t.push({path:o,score:I(o,e.index),routesMeta:l})};return e.forEach((e,t)=>{var s;if(""!==e.path&&null!=(s=e.path)&&s.includes("?"))for(let s of C(e.path))n(e,t,s);else n(e,t)}),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[s,...r]=t,n=s.endsWith("?"),a=s.replace(/\?$/,"");if(0===r.length)return n?[a,""]:[a];let i=C(r.join("/")),o=[];return o.push(...i.map(e=>""===e?a:[a,e].join("/"))),n&&o.push(...i),o.map(t=>e.startsWith("/")&&""===t?"/":t)}const R=/^:[\w-]+$/,A=3,T=2,P=1,D=10,N=-2,L=e=>"*"===e;function I(e,t){let s=e.split("/"),r=s.length;return s.some(L)&&(r+=N),t&&(r+=T),s.filter(e=>!L(e)).reduce((e,t)=>e+(R.test(t)?A:""===t?P:D),r)}function O(e,t,s){void 0===s&&(s=!1);let{routesMeta:r}=e,n={},a="/",i=[];for(let e=0;e<r.length;++e){let o=r[e],l=e===r.length-1,c="/"===a?t:t.slice(a.length)||"/",d=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:l},c),u=o.route;if(!d&&l&&s&&!r[r.length-1].route.index&&(d=M({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!d)return null;Object.assign(n,d.params),i.push({params:n,pathname:q([a,d.pathname]),pathnameBase:H(q([a,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(a=q([a,d.pathnameBase]))}return i}function M(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[s,r]=function(e,t,s){void 0===t&&(t=!1),void 0===s&&(s=!0),f("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,s)=>(r.push({paramName:t,isOptional:null!=s}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),n+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?n+="\\/*$":""!==e&&"/"!==e&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),n=t.match(s);if(!n)return null;let a=n[0],i=a.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:r.reduce((e,t,s)=>{let{paramName:r,isOptional:n}=t;if("*"===r){let e=o[s]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[s];return e[r]=n&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:i,pattern:e}}function F(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function B(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&"/"!==r?null:e.slice(s)||"/"}function U(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+s+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function $(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}const q=e=>e.join("/").replace(/\/\/+/g,"/"),H=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",V=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class W{constructor(e,t,s,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}}function G(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const J=["post","put","patch","delete"],Y=new Set(J),K=["get",...J],Z=new Set(K),X=new Set([301,302,303,307,308]),Q=new Set([307,308]),ee={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},te={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},se={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},re=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ne=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ae="remix-router-transitions";function ie(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,s=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,r=!s;let n;if(m(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)n=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;n=e=>({hasErrorBoundary:t(e)})}else n=ne;let a,i,o,l={},c=k(e.routes,n,void 0,l),d=e.basename||"/",p=e.unstable_dataStrategy||me,y=e.unstable_patchRoutesOnNavigation,v=u({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),w=null,b=new Set,j=new Set,C=null,R=null,A=null,T=null!=e.hydrationData,P=_(c,e.history.location,d),D=null;if(null==P&&!y){let t=je(404,{pathname:e.history.location.pathname}),{matches:s,route:r}=Ee(c);P=s,D={[r.id]:t}}if(P&&!e.hydrationData&&ut(P,c,e.history.location.pathname).active&&(P=null),P)if(P.some(e=>e.route.lazy))i=!1;else if(P.some(e=>e.route.loader))if(v.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,r=e=>!e.route.loader||("function"!=typeof e.route.loader||!0!==e.route.loader.hydrate)&&(t&&void 0!==t[e.route.id]||s&&void 0!==s[e.route.id]);if(s){let e=P.findIndex(e=>void 0!==s[e.route.id]);i=P.slice(0,e+1).every(r)}else i=P.every(r)}else i=null!=e.hydrationData;else i=!0;else if(i=!1,P=[],v.v7_partialHydration){let t=ut(null,c,e.history.location.pathname);t.active&&t.matches&&(P=t.matches)}let N,L,I={historyAction:e.history.action,location:e.history.location,matches:P,initialized:i,navigation:ee,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},O=h.Pop,M=!1,F=!1,U=new Map,$=null,q=!1,H=!1,z=[],V=new Set,W=new Map,J=0,Y=-1,K=new Map,Z=new Set,X=new Map,ie=new Map,de=new Set,ue=new Map,we=new Map,be=new Map;function Re(e,t){void 0===t&&(t={}),I=u({},I,e);let s=[],r=[];v.v7_fetcherPersist&&I.fetchers.forEach((e,t)=>{"idle"===e.state&&(de.has(t)?r.push(t):s.push(t))}),[...b].forEach(e=>e(I,{deletedFetchers:r,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync})),v.v7_fetcherPersist&&(s.forEach(e=>I.fetchers.delete(e)),r.forEach(e=>Xe(e)))}function Ne(t,s,r){var n,i;let o,{flushSync:l}=void 0===r?{}:r,d=null!=I.actionData&&null!=I.navigation.formMethod&&Ie(I.navigation.formMethod)&&"loading"===I.navigation.state&&!0!==(null==(n=t.state)?void 0:n._isRedirect);o=s.actionData?Object.keys(s.actionData).length>0?s.actionData:null:d?I.actionData:null;let p=s.loaderData?Se(I.loaderData,s.loaderData,s.matches||[],s.errors):I.loaderData,m=I.blockers;m.size>0&&(m=new Map(m),m.forEach((e,t)=>m.set(t,se)));let f,y=!0===M||null!=I.navigation.formMethod&&Ie(I.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);if(a&&(c=a,a=void 0),q||O===h.Pop||(O===h.Push?e.history.push(t,t.state):O===h.Replace&&e.history.replace(t,t.state)),O===h.Pop){let e=U.get(I.location.pathname);e&&e.has(t.pathname)?f={currentLocation:I.location,nextLocation:t}:U.has(t.pathname)&&(f={currentLocation:t,nextLocation:I.location})}else if(F){let e=U.get(I.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),U.set(I.location.pathname,e)),f={currentLocation:I.location,nextLocation:t}}Re(u({},s,{actionData:o,loaderData:p,historyAction:O,location:t,initialized:!0,navigation:ee,revalidation:"idle",restoreScrollPosition:dt(t,s.matches||I.matches),preventScrollReset:y,blockers:m}),{viewTransitionOpts:f,flushSync:!0===l}),O=h.Pop,M=!1,F=!1,q=!1,H=!1,z=[]}async function Le(t,s,r){N&&N.abort(),N=null,O=t,q=!0===(r&&r.startUninterruptedRevalidation),function(e,t){if(C&&A){let s=ct(e,t);C[s]=A()}}(I.location,I.matches),M=!0===(r&&r.preventScrollReset),F=!0===(r&&r.enableViewTransition);let n=a||c,i=r&&r.overrideNavigation,o=_(n,s,d),l=!0===(r&&r.flushSync),p=ut(o,n,s.pathname);if(p.active&&p.matches&&(o=p.matches),!o){let{error:e,notFoundMatches:t,route:r}=it(s.pathname);return void Ne(s,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:l})}if(I.initialized&&!H&&(m=I.location,f=s,m.pathname===f.pathname&&m.search===f.search&&(""===m.hash?""!==f.hash:m.hash===f.hash||""!==f.hash))&&!(r&&r.submission&&Ie(r.submission.formMethod)))return void Ne(s,{matches:o},{flushSync:l});var m,f;N=new AbortController;let y,g=ve(e.history,s,N.signal,r&&r.submission);if(r&&r.pendingError)y=[_e(o).route.id,{type:x.error,error:r.pendingError}];else if(r&&r.submission&&Ie(r.submission.formMethod)){let t=await async function(e,t,s,r,n,a){void 0===a&&(a={}),Je();let i,o=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,s);if(Re({navigation:o},{flushSync:!0===a.flushSync}),n){let s=await ht(r,t.pathname,e.signal);if("aborted"===s.type)return{shortCircuited:!0};if("error"===s.type){let{boundaryId:e,error:r}=ot(t.pathname,s);return{matches:s.partialMatches,pendingActionResult:[e,{type:x.error,error:r}]}}if(!s.matches){let{notFoundMatches:e,error:s,route:r}=it(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:x.error,error:s}]}}r=s.matches}let l=Ue(r,t);if(l.route.action||l.route.lazy){if(i=(await We("action",I,e,[l],r,null))[l.route.id],e.signal.aborted)return{shortCircuited:!0}}else i={type:x.error,error:je(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})};if(De(i)){let t;return t=a&&null!=a.replace?a.replace:ge(i.response.headers.get("Location"),new URL(e.url),d)===I.location.pathname+I.location.search,await Ve(e,i,!0,{submission:s,replace:t}),{shortCircuited:!0}}if(Te(i))throw je(400,{type:"defer-action"});if(Pe(i)){let e=_e(r,l.route.id);return!0!==(a&&a.replace)&&(O=h.Push),{matches:r,pendingActionResult:[e.route.id,i]}}return{matches:r,pendingActionResult:[l.route.id,i]}}(g,s,r.submission,o,p.active,{replace:r.replace,flushSync:l});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Pe(r)&&G(r.error)&&404===r.error.status)return N=null,void Ne(s,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}o=t.matches||o,y=t.pendingActionResult,i=qe(s,r.submission),l=!1,p.active=!1,g=ve(e.history,g.url,g.signal)}let{shortCircuited:w,matches:b,loaderData:S,errors:k}=await async function(t,s,r,n,i,o,l,h,p,m,f){let y=i||qe(s,o),g=o||l||$e(y),w=!(q||v.v7_partialHydration&&p);if(n){if(w){let e=Be(f);Re(u({navigation:y},void 0!==e?{actionData:e}:{}),{flushSync:m})}let e=await ht(r,s.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let{boundaryId:t,error:r}=ot(s.pathname,e);return{matches:e.partialMatches,loaderData:{},errors:{[t]:r}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=it(s.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}r=e.matches}let b=a||c,[x,S]=ce(e.history,I,r,g,s,v.v7_partialHydration&&!0===p,v.v7_skipActionErrorRevalidation,H,z,V,de,X,Z,b,d,f);if(lt(e=>!(r&&r.some(t=>t.route.id===e))||x&&x.some(t=>t.route.id===e)),Y=++J,0===x.length&&0===S.length){let e=tt();return Ne(s,u({matches:r,loaderData:{},errors:f&&Pe(f[1])?{[f[0]]:f[1].error}:null},ke(f),e?{fetchers:new Map(I.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(w){let e={};if(!n){e.navigation=y;let t=Be(f);void 0!==t&&(e.actionData=t)}S.length>0&&(e.fetchers=function(e){return e.forEach(e=>{let t=I.fetchers.get(e.key),s=He(void 0,t?t.data:void 0);I.fetchers.set(e.key,s)}),new Map(I.fetchers)}(S)),Re(e,{flushSync:m})}S.forEach(e=>{W.has(e.key)&&Qe(e.key),e.controller&&W.set(e.key,e.controller)});let k=()=>S.forEach(e=>Qe(e.key));N&&N.signal.addEventListener("abort",k);let{loaderResults:_,fetcherResults:E}=await Ge(I,r,x,S,t);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",k),S.forEach(e=>W.delete(e.key));let j=Ce(_);if(j)return await Ve(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=Ce(E),j)return Z.add(j.key),await Ve(t,j.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:C,errors:R}=xe(I,r,0,_,f,S,E,ue);ue.forEach((e,t)=>{e.subscribe(s=>{(s||e.done)&&ue.delete(t)})}),v.v7_partialHydration&&p&&I.errors&&Object.entries(I.errors).filter(e=>{let[t]=e;return!x.some(e=>e.route.id===t)}).forEach(e=>{let[t,s]=e;R=Object.assign(R||{},{[t]:s})});let A=tt(),T=st(Y),P=A||T||S.length>0;return u({matches:r,loaderData:C,errors:R},P?{fetchers:new Map(I.fetchers)}:{})}(g,s,o,p.active,i,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&!0===r.initialHydration,l,y);w||(N=null,Ne(s,u({matches:b||o},ke(y),{loaderData:S,errors:k})))}function Be(e){return e&&!Pe(e[1])?{[e[0]]:e[1].data}:I.actionData?0===Object.keys(I.actionData).length?null:I.actionData:void 0}async function Ve(r,n,a,i){let{submission:o,fetcherSubmission:l,replace:c}=void 0===i?{}:i;n.response.headers.has("X-Remix-Revalidate")&&(H=!0);let p=n.response.headers.get("Location");m(p,"Expected a Location header on the redirect Response"),p=ge(p,new URL(r.url),d);let f=g(I.location,p,{_isRedirect:!0});if(s){let s=!1;if(n.response.headers.has("X-Remix-Reload-Document"))s=!0;else if(re.test(p)){const r=e.history.createURL(p);s=r.origin!==t.location.origin||null==B(r.pathname,d)}if(s)return void(c?t.location.replace(p):t.location.assign(p))}N=null;let y=!0===c||n.response.headers.has("X-Remix-Replace")?h.Replace:h.Push,{formMethod:v,formAction:w,formEncType:b}=I.navigation;!o&&!l&&v&&w&&b&&(o=$e(I.navigation));let x=o||l;if(Q.has(n.response.status)&&x&&Ie(x.formMethod))await Le(y,f,{submission:u({},x,{formAction:p}),preventScrollReset:M,enableViewTransition:a?F:void 0});else{let e=qe(f,o);await Le(y,f,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:M,enableViewTransition:a?F:void 0})}}async function We(e,t,s,r,a,i){let o,c={};try{o=await async function(e,t,s,r,n,a,i,o,l,c){let d=a.map(e=>e.route.lazy?async function(e,t,s){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let n=s[e.id];m(n,"No route found in manifest");let a={};for(let e in r){let t=void 0!==n[e]&&"hasErrorBoundary"!==e;f(!t,'Route "'+n.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||S.has(e)||(a[e]=r[e])}Object.assign(n,a),Object.assign(n,u({},t(n),{lazy:void 0}))}(e.route,l,o):void 0),h=a.map((e,s)=>{let a=d[s],i=n.some(t=>t.route.id===e.route.id);return u({},e,{shouldLoad:i,resolve:async s=>(s&&"GET"===r.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?async function(e,t,s,r,n,a){let i,o,l=r=>{let i,l=new Promise((e,t)=>i=t);o=()=>i(),t.signal.addEventListener("abort",o);let c=n=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+s.route.id+"]")):r({request:t,params:s.params,context:a},...void 0!==n?[n]:[]),d=(async()=>{try{return{type:"data",result:await(n?n(e=>c(e)):c())}}catch(e){return{type:"error",result:e}}})();return Promise.race([d,l])};try{let n=s.route[e];if(r)if(n){let e,[t]=await Promise.all([l(n).catch(t=>{e=t}),r]);if(void 0!==e)throw e;i=t}else{if(await r,n=s.route[e],!n){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw je(405,{method:t.method,pathname:r,routeId:s.route.id})}return{type:x.data,result:void 0}}i=await l(n)}else{if(!n){let e=new URL(t.url);throw je(404,{pathname:e.pathname+e.search})}i=await l(n)}m(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+s.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:x.error,result:e}}finally{o&&t.signal.removeEventListener("abort",o)}return i}(t,r,e,a,s,c):Promise.resolve({type:x.data,result:void 0}))})}),p=await e({matches:h,request:r,params:a[0].params,fetcherKey:i,context:c});try{await Promise.all(d)}catch(e){}return p}(p,e,0,s,r,a,i,l,n)}catch(e){return r.forEach(t=>{c[t.route.id]={type:x.error,error:e}}),c}for(let[e,t]of Object.entries(o))if(Ae(t)){let r=t.result;c[e]={type:x.redirect,response:ye(r,s,e,a,d,v.v7_relativeSplatPath)}}else c[e]=await fe(t);return c}async function Ge(t,s,r,n,a){let i=t.matches,o=We("loader",0,a,r,s,null),l=Promise.all(n.map(async t=>{if(t.matches&&t.match&&t.controller){let s=(await We("loader",0,ve(e.history,t.path,t.controller.signal),[t.match],t.matches,t.key))[t.match.route.id];return{[t.key]:s}}return Promise.resolve({[t.key]:{type:x.error,error:je(404,{pathname:t.path})}})})),c=await o,d=(await l).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([Oe(s,c,a.signal,i,t.loaderData),Me(s,d,n)]),{loaderResults:c,fetcherResults:d}}function Je(){H=!0,z.push(...lt()),X.forEach((e,t)=>{W.has(t)&&(V.add(t),Qe(t))})}function Ye(e,t,s){void 0===s&&(s={}),I.fetchers.set(e,t),Re({fetchers:new Map(I.fetchers)},{flushSync:!0===(s&&s.flushSync)})}function Ke(e,t,s,r){void 0===r&&(r={});let n=_e(I.matches,t);Xe(e),Re({errors:{[n.route.id]:s},fetchers:new Map(I.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Ze(e){return v.v7_fetcherPersist&&(ie.set(e,(ie.get(e)||0)+1),de.has(e)&&de.delete(e)),I.fetchers.get(e)||te}function Xe(e){let t=I.fetchers.get(e);!W.has(e)||t&&"loading"===t.state&&K.has(e)||Qe(e),X.delete(e),K.delete(e),Z.delete(e),de.delete(e),V.delete(e),I.fetchers.delete(e)}function Qe(e){let t=W.get(e);m(t,"Expected fetch controller: "+e),t.abort(),W.delete(e)}function et(e){for(let t of e){let e=ze(Ze(t).data);I.fetchers.set(t,e)}}function tt(){let e=[],t=!1;for(let s of Z){let r=I.fetchers.get(s);m(r,"Expected fetcher: "+s),"loading"===r.state&&(Z.delete(s),e.push(s),t=!0)}return et(e),t}function st(e){let t=[];for(let[s,r]of K)if(r<e){let e=I.fetchers.get(s);m(e,"Expected fetcher: "+s),"loading"===e.state&&(Qe(s),K.delete(s),t.push(s))}return et(t),t.length>0}function rt(e){I.blockers.delete(e),we.delete(e)}function nt(e,t){let s=I.blockers.get(e)||se;m("unblocked"===s.state&&"blocked"===t.state||"blocked"===s.state&&"blocked"===t.state||"blocked"===s.state&&"proceeding"===t.state||"blocked"===s.state&&"unblocked"===t.state||"proceeding"===s.state&&"unblocked"===t.state,"Invalid blocker state transition: "+s.state+" -> "+t.state);let r=new Map(I.blockers);r.set(e,t),Re({blockers:r})}function at(e){let{currentLocation:t,nextLocation:s,historyAction:r}=e;if(0===we.size)return;we.size>1&&f(!1,"A router only supports one blocker at a time");let n=Array.from(we.entries()),[a,i]=n[n.length-1],o=I.blockers.get(a);return o&&"proceeding"===o.state?void 0:i({currentLocation:t,nextLocation:s,historyAction:r})?a:void 0}function it(e){let t=je(404,{pathname:e}),s=a||c,{matches:r,route:n}=Ee(s);return lt(),{notFoundMatches:r,route:n,error:t}}function ot(e,t){return{boundaryId:_e(t.partialMatches).route.id,error:je(400,{type:"route-discovery",pathname:e,message:null!=t.error&&"message"in t.error?t.error:String(t.error)})}}function lt(e){let t=[];return ue.forEach((s,r)=>{e&&!e(r)||(s.cancel(),t.push(r),ue.delete(r))}),t}function ct(e,t){return R&&R(e,t.map(e=>function(e,t){let{route:s,pathname:r,params:n}=e;return{id:s.id,pathname:r,params:n,data:t[s.id],handle:s.handle}}(e,I.loaderData)))||e.key}function dt(e,t){if(C){let s=ct(e,t),r=C[s];if("number"==typeof r)return r}return null}function ut(e,t,s){if(y){if(j.has(s))return{active:!1,matches:e};if(!e)return{active:!0,matches:E(t,s,d,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:E(t,s,d,!0)}}return{active:!1,matches:null}}async function ht(e,t,s){let r=e;for(;;){let e=null==a,i=a||c;try{await he(y,t,r,i,l,n,be,s)}catch(e){return{type:"error",error:e,partialMatches:r}}finally{e&&(c=[...c])}if(s.aborted)return{type:"aborted"};let o=_(i,t,d);if(o)return pt(t,j),{type:"success",matches:o};let u=E(i,t,d,!0);if(!u||r.length===u.length&&r.every((e,t)=>e.route.id===u[t].route.id))return pt(t,j),{type:"success",matches:null};r=u}}function pt(e,t){if(t.size>=1e3){let e=t.values().next().value;t.delete(e)}t.add(e)}return o={get basename(){return d},get future(){return v},get state(){return I},get routes(){return c},get window(){return t},initialize:function(){if(w=e.history.listen(t=>{let{action:s,location:r,delta:n}=t;if(L)return L(),void(L=void 0);f(0===we.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=at({currentLocation:I.location,nextLocation:r,historyAction:s});if(a&&null!=n){let t=new Promise(e=>{L=e});return e.history.go(-1*n),void nt(a,{state:"blocked",location:r,proceed(){nt(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(I.blockers);e.set(a,se),Re({blockers:e})}})}return Le(s,r)}),s){!function(e,t){try{let s=e.sessionStorage.getItem(ae);if(s){let e=JSON.parse(s);for(let[s,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(s,new Set(r||[]))}}catch(e){}}(t,U);let e=()=>function(e,t){if(t.size>0){let s={};for(let[e,r]of t)s[e]=[...r];try{e.sessionStorage.setItem(ae,JSON.stringify(s))}catch(e){f(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,U);t.addEventListener("pagehide",e),$=()=>t.removeEventListener("pagehide",e)}return I.initialized||Le(h.Pop,I.location,{initialHydration:!0}),o},subscribe:function(e){return b.add(e),()=>b.delete(e)},enableScrollRestoration:function(e,t,s){if(C=e,A=t,R=s||null,!T&&I.navigation===ee){T=!0;let e=dt(I.location,I.matches);null!=e&&Re({restoreScrollPosition:e})}return()=>{C=null,A=null,R=null}},navigate:async function t(s,r){if("number"==typeof s)return void e.history.go(s);let n=oe(I.location,I.matches,d,v.v7_prependBasename,s,v.v7_relativeSplatPath,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:i,error:o}=le(v.v7_normalizeFormMethod,!1,n,r),l=I.location,c=g(I.location,a,r&&r.state);c=u({},c,e.history.encodeLocation(c));let p=r&&null!=r.replace?r.replace:void 0,m=h.Push;!0===p?m=h.Replace:!1===p||null!=i&&Ie(i.formMethod)&&i.formAction===I.location.pathname+I.location.search&&(m=h.Replace);let f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,y=!0===(r&&r.unstable_flushSync),w=at({currentLocation:l,nextLocation:c,historyAction:m});if(!w)return await Le(m,c,{submission:i,pendingError:o,preventScrollReset:f,replace:r&&r.replace,enableViewTransition:r&&r.unstable_viewTransition,flushSync:y});nt(w,{state:"blocked",location:c,proceed(){nt(w,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),t(s,r)},reset(){let e=new Map(I.blockers);e.set(w,se),Re({blockers:e})}})},fetch:function(t,s,n,i){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");W.has(t)&&Qe(t);let o=!0===(i&&i.unstable_flushSync),l=a||c,u=oe(I.location,I.matches,d,v.v7_prependBasename,n,v.v7_relativeSplatPath,s,null==i?void 0:i.relative),h=_(l,u,d),p=ut(h,l,u);if(p.active&&p.matches&&(h=p.matches),!h)return void Ke(t,s,je(404,{pathname:u}),{flushSync:o});let{path:f,submission:y,error:g}=le(v.v7_normalizeFormMethod,!0,u,i);if(g)return void Ke(t,s,g,{flushSync:o});let w=Ue(h,f);M=!0===(i&&i.preventScrollReset),y&&Ie(y.formMethod)?async function(t,s,r,n,i,o,l,u){function h(e){if(!e.route.action&&!e.route.lazy){let e=je(405,{method:u.formMethod,pathname:r,routeId:s});return Ke(t,s,e,{flushSync:l}),!0}return!1}if(Je(),X.delete(t),!o&&h(n))return;let p=I.fetchers.get(t);Ye(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(u,p),{flushSync:l});let f=new AbortController,y=ve(e.history,r,f.signal,u);if(o){let e=await ht(i,r,y.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:n}=ot(r,e);return void Ke(t,s,n,{flushSync:l})}if(!e.matches)return void Ke(t,s,je(404,{pathname:r}),{flushSync:l});if(h(n=Ue(i=e.matches,r)))return}W.set(t,f);let g=J,w=(await We("action",0,y,[n],i,t))[n.route.id];if(y.signal.aborted)return void(W.get(t)===f&&W.delete(t));if(v.v7_fetcherPersist&&de.has(t)){if(De(w)||Pe(w))return void Ye(t,ze(void 0))}else{if(De(w))return W.delete(t),Y>g?void Ye(t,ze(void 0)):(Z.add(t),Ye(t,He(u)),Ve(y,w,!1,{fetcherSubmission:u}));if(Pe(w))return void Ke(t,s,w.error)}if(Te(w))throw je(400,{type:"defer-action"});let b=I.navigation.location||I.location,x=ve(e.history,b,f.signal),S=a||c,k="idle"!==I.navigation.state?_(S,I.navigation.location,d):I.matches;m(k,"Didn't find any matches after fetcher action");let E=++J;K.set(t,E);let j=He(u,w.data);I.fetchers.set(t,j);let[C,R]=ce(e.history,I,k,u,b,!1,v.v7_skipActionErrorRevalidation,H,z,V,de,X,Z,S,d,[n.route.id,w]);R.filter(e=>e.key!==t).forEach(e=>{let t=e.key,s=I.fetchers.get(t),r=He(void 0,s?s.data:void 0);I.fetchers.set(t,r),W.has(t)&&Qe(t),e.controller&&W.set(t,e.controller)}),Re({fetchers:new Map(I.fetchers)});let A=()=>R.forEach(e=>Qe(e.key));f.signal.addEventListener("abort",A);let{loaderResults:T,fetcherResults:P}=await Ge(I,k,C,R,x);if(f.signal.aborted)return;f.signal.removeEventListener("abort",A),K.delete(t),W.delete(t),R.forEach(e=>W.delete(e.key));let D=Ce(T);if(D)return Ve(x,D.result,!1);if(D=Ce(P),D)return Z.add(D.key),Ve(x,D.result,!1);let{loaderData:L,errors:M}=xe(I,k,0,T,void 0,R,P,ue);if(I.fetchers.has(t)){let e=ze(w.data);I.fetchers.set(t,e)}st(E),"loading"===I.navigation.state&&E>Y?(m(O,"Expected pending action"),N&&N.abort(),Ne(I.navigation.location,{matches:k,loaderData:L,errors:M,fetchers:new Map(I.fetchers)})):(Re({errors:M,loaderData:Se(I.loaderData,L,k,M),fetchers:new Map(I.fetchers)}),H=!1)}(t,s,f,w,h,p.active,o,y):(X.set(t,{routeId:s,path:f}),async function(t,s,r,n,a,i,o,l){let c=I.fetchers.get(t);Ye(t,He(l,c?c.data:void 0),{flushSync:o});let d=new AbortController,u=ve(e.history,r,d.signal);if(i){let e=await ht(a,r,u.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:n}=ot(r,e);return void Ke(t,s,n,{flushSync:o})}if(!e.matches)return void Ke(t,s,je(404,{pathname:r}),{flushSync:o});n=Ue(a=e.matches,r)}W.set(t,d);let h=J,p=(await We("loader",0,u,[n],a,t))[n.route.id];if(Te(p)&&(p=await Fe(p,u.signal,!0)||p),W.get(t)===d&&W.delete(t),!u.signal.aborted){if(!de.has(t))return De(p)?Y>h?void Ye(t,ze(void 0)):(Z.add(t),void await Ve(u,p,!1)):void(Pe(p)?Ke(t,s,p.error):(m(!Te(p),"Unhandled fetcher deferred data"),Ye(t,ze(p.data))));Ye(t,ze(void 0))}}(t,s,f,w,h,p.active,o,y))},revalidate:function(){Je(),Re({revalidation:"loading"}),"submitting"!==I.navigation.state&&("idle"!==I.navigation.state?Le(O||I.historyAction,I.navigation.location,{overrideNavigation:I.navigation,enableViewTransition:!0===F}):Le(I.historyAction,I.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ze,deleteFetcher:function(e){if(v.v7_fetcherPersist){let t=(ie.get(e)||0)-1;t<=0?(ie.delete(e),de.add(e)):ie.set(e,t)}else Xe(e);Re({fetchers:new Map(I.fetchers)})},dispose:function(){w&&w(),$&&$(),b.clear(),N&&N.abort(),I.fetchers.forEach((e,t)=>Xe(t)),I.blockers.forEach((e,t)=>rt(t))},getBlocker:function(e,t){let s=I.blockers.get(e)||se;return we.get(e)!==t&&we.set(e,t),s},deleteBlocker:rt,patchRoutes:function(e,t){let s=null==a;pe(e,t,a||c,l,n),s&&(c=[...c],Re({}))},_internalFetchControllers:W,_internalActiveDeferreds:ue,_internalSetRoutes:function(e){l={},a=k(e,n,void 0,l)}},o}function oe(e,t,s,r,n,a,i,o){let l,c;if(i){l=[];for(let e of t)if(l.push(e),e.route.id===i){c=e;break}}else l=t,c=t[t.length-1];let d=function(e,t,s,r){let n;void 0===r&&(r=!1),"string"==typeof e?n=w(e):(n=u({},e),m(!n.pathname||!n.pathname.includes("?"),U("?","pathname","search",n)),m(!n.pathname||!n.pathname.includes("#"),U("#","pathname","hash",n)),m(!n.search||!n.search.includes("#"),U("#","search","hash",n)));let a,i=""===e||""===n.pathname,o=i?"/":n.pathname;if(null==o)a=s;else{let e=t.length-1;if(!r&&o.startsWith("..")){let t=o.split("/");for(;".."===t[0];)t.shift(),e-=1;n.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:s,search:r="",hash:n=""}="string"==typeof e?w(e):e,a=s?s.startsWith("/")?s:function(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?s.length>1&&s.pop():"."!==e&&s.push(e)}),s.length>1?s.join("/"):"/"}(s,t):t;return{pathname:a,search:z(r),hash:V(n)}}(n,a),c=o&&"/"!==o&&o.endsWith("/"),d=(i||"."===o)&&s.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}(n||".",function(e,t){let s=$(e);return t?s.map((e,t)=>t===s.length-1?e.pathname:e.pathnameBase):s.map(e=>e.pathnameBase)}(l,a),B(e.pathname,s)||e.pathname,"path"===o);return null==n&&(d.search=e.search,d.hash=e.hash),null!=n&&""!==n&&"."!==n||!c||!c.route.index||Be(d.search)||(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==s&&(d.pathname="/"===d.pathname?s:q([s,d.pathname])),v(d)}function le(e,t,s,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:s};if(r.formMethod&&(n=r.formMethod,!Z.has(n.toLowerCase())))return{path:s,error:je(405,{method:r.formMethod})};var n;let a,i,o=()=>({path:s,error:je(400,{type:"invalid-body"})}),l=r.formMethod||"get",c=e?l.toUpperCase():l.toLowerCase(),d=Re(s);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Ie(c))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[s,r]=t;return""+e+s+"="+r+"\n"},""):String(r.body);return{path:s,submission:{formMethod:c,formAction:d,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Ie(c))return o();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:s,submission:{formMethod:c,formAction:d,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return o()}}}if(m("function"==typeof FormData,"FormData is not available in this environment"),r.formData)a=we(r.formData),i=r.formData;else if(r.body instanceof FormData)a=we(r.body),i=r.body;else if(r.body instanceof URLSearchParams)a=r.body,i=be(a);else if(null==r.body)a=new URLSearchParams,i=new FormData;else try{a=new URLSearchParams(r.body),i=be(a)}catch(e){return o()}let u={formMethod:c,formAction:d,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Ie(u.formMethod))return{path:s,submission:u};let h=w(s);return t&&h.search&&Be(h.search)&&a.append("index",""),h.search="?"+a,{path:v(h),submission:u}}function ce(e,t,s,r,n,a,i,o,l,c,d,h,p,m,f,y){let g=y?Pe(y[1])?y[1].error:y[1].data:void 0,v=e.createURL(t.location),w=e.createURL(n),b=y&&Pe(y[1])?y[0]:void 0,x=b?function(e,t){let s=e;if(t){let r=e.findIndex(e=>e.route.id===t);r>=0&&(s=e.slice(0,r))}return s}(s,b):s,S=y?y[1].statusCode:void 0,k=i&&S&&S>=400,E=x.filter((e,s)=>{let{route:n}=e;if(n.lazy)return!0;if(null==n.loader)return!1;if(a)return!("function"==typeof n.loader&&!n.loader.hydrate&&(void 0!==t.loaderData[n.id]||t.errors&&void 0!==t.errors[n.id]));if(function(e,t,s){let r=!t||s.route.id!==t.route.id,n=void 0===e[s.route.id];return r||n}(t.loaderData,t.matches[s],e)||l.some(t=>t===e.route.id))return!0;let i=t.matches[s],c=e;return ue(e,u({currentUrl:v,currentParams:i.params,nextUrl:w,nextParams:c.params},r,{actionResult:g,actionStatus:S,defaultShouldRevalidate:!k&&(o||v.pathname+v.search===w.pathname+w.search||v.search!==w.search||de(i,c))}))}),j=[];return h.forEach((e,n)=>{if(a||!s.some(t=>t.route.id===e.routeId)||d.has(n))return;let i=_(m,e.path,f);if(!i)return void j.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let l=t.fetchers.get(n),h=Ue(i,e.path),y=!1;p.has(n)?y=!1:c.has(n)?(c.delete(n),y=!0):y=l&&"idle"!==l.state&&void 0===l.data?o:ue(h,u({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:s[s.length-1].params},r,{actionResult:g,actionStatus:S,defaultShouldRevalidate:!k&&o})),y&&j.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}),[E,j]}function de(e,t){let s=e.route.path;return e.pathname!==t.pathname||null!=s&&s.endsWith("*")&&e.params["*"]!==t.params["*"]}function ue(e,t){if(e.route.shouldRevalidate){let s=e.route.shouldRevalidate(t);if("boolean"==typeof s)return s}return t.defaultShouldRevalidate}async function he(e,t,s,r,n,a,i,o){let l=[t,...s.map(e=>e.route.id)].join("-");try{let d=i.get(l);d||(d=e({path:t,matches:s,patch:(e,t)=>{o.aborted||pe(e,t,r,n,a)}}),i.set(l,d)),d&&"object"==typeof(c=d)&&null!=c&&"then"in c&&await d}finally{i.delete(l)}var c}function pe(e,t,s,r,n){if(e){var a;let s=r[e];m(s,"No route found to patch children into: routeId = "+e);let i=k(t,n,[e,"patch",String((null==(a=s.children)?void 0:a.length)||"0")],r);s.children?s.children.push(...i):s.children=i}else{let e=k(t,n,["patch",String(s.length||"0")],r);s.push(...e)}}async function me(e){let{matches:t}=e,s=t.filter(e=>e.shouldLoad);return(await Promise.all(s.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[s[r].route.id]:t}),{})}async function fe(e){let{result:t,type:s}=e;if(Le(t)){let e;try{let s=t.headers.get("Content-Type");e=s&&/\bapplication\/json\b/.test(s)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:x.error,error:e}}return s===x.error?{type:x.error,error:new W(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:x.data,data:e,statusCode:t.status,headers:t.headers}}if(s===x.error){if(Ne(t)){var r,n;if(t.data instanceof Error)return{type:x.error,error:t.data,statusCode:null==(n=t.init)?void 0:n.status};t=new W((null==(r=t.init)?void 0:r.status)||500,void 0,t.data)}return{type:x.error,error:t,statusCode:G(t)?t.status:void 0}}var a,i,o,l;return function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:x.deferred,deferredData:t,statusCode:null==(a=t.init)?void 0:a.status,headers:(null==(i=t.init)?void 0:i.headers)&&new Headers(t.init.headers)}:Ne(t)?{type:x.data,data:t.data,statusCode:null==(o=t.init)?void 0:o.status,headers:null!=(l=t.init)&&l.headers?new Headers(t.init.headers):void 0}:{type:x.data,data:t}}function ye(e,t,s,r,n,a){let i=e.headers.get("Location");if(m(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!re.test(i)){let o=r.slice(0,r.findIndex(e=>e.route.id===s)+1);i=oe(new URL(t.url),o,n,!0,i,a),e.headers.set("Location",i)}return e}function ge(e,t,s){if(re.test(e)){let r=e,n=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=null!=B(n.pathname,s);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function ve(e,t,s,r){let n=e.createURL(Re(t)).toString(),a={signal:s};if(r&&Ie(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):"text/plain"===t?a.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?a.body=we(r.formData):a.body=r.formData}return new Request(n,a)}function we(e){let t=new URLSearchParams;for(let[s,r]of e.entries())t.append(s,"string"==typeof r?r:r.name);return t}function be(e){let t=new FormData;for(let[s,r]of e.entries())t.append(s,r);return t}function xe(e,t,s,r,n,a,i,o){let{loaderData:l,errors:c}=function(e,t,s,r,n){let a,i={},o=null,l=!1,c={},d=s&&Pe(s[1])?s[1].error:void 0;return e.forEach(s=>{if(!(s.route.id in t))return;let u=s.route.id,h=t[u];if(m(!De(h),"Cannot handle redirect results in processLoaderData"),Pe(h)){let t=h.error;if(void 0!==d&&(t=d,d=void 0),o=o||{},n)o[u]=t;else{let s=_e(e,u);null==o[s.route.id]&&(o[s.route.id]=t)}i[u]=void 0,l||(l=!0,a=G(h.error)?h.error.status:500),h.headers&&(c[u]=h.headers)}else Te(h)?(r.set(u,h.deferredData),i[u]=h.deferredData.data,null==h.statusCode||200===h.statusCode||l||(a=h.statusCode),h.headers&&(c[u]=h.headers)):(i[u]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(a=h.statusCode),h.headers&&(c[u]=h.headers))}),void 0!==d&&s&&(o={[s[0]]:d},i[s[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:c}}(t,r,n,o,!1);return a.forEach(t=>{let{key:s,match:r,controller:n}=t,a=i[s];if(m(a,"Did not find corresponding fetcher result"),!n||!n.signal.aborted)if(Pe(a)){let t=_e(e.matches,null==r?void 0:r.route.id);c&&c[t.route.id]||(c=u({},c,{[t.route.id]:a.error})),e.fetchers.delete(s)}else if(De(a))m(!1,"Unhandled fetcher revalidation redirect");else if(Te(a))m(!1,"Unhandled fetcher deferred data");else{let t=ze(a.data);e.fetchers.set(s,t)}}),{loaderData:l,errors:c}}function Se(e,t,s,r){let n=u({},t);for(let a of s){let s=a.route.id;if(t.hasOwnProperty(s)?void 0!==t[s]&&(n[s]=t[s]):void 0!==e[s]&&a.route.loader&&(n[s]=e[s]),r&&r.hasOwnProperty(s))break}return n}function ke(e){return e?Pe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function _e(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function Ee(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function je(e,t){let{pathname:s,routeId:r,method:n,type:a,message:i}=void 0===t?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(o="Bad Request","route-discovery"===a?l='Unable to match URL "'+s+'" - the `unstable_patchRoutesOnNavigation()` function threw the following error:\n'+i:n&&s&&r?l="You made a "+n+' request to "'+s+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===a?l="defer() is not supported in actions":"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(o="Forbidden",l='Route "'+r+'" does not match URL "'+s+'"'):404===e?(o="Not Found",l='No route matches URL "'+s+'"'):405===e&&(o="Method Not Allowed",n&&s&&r?l="You made a "+n.toUpperCase()+' request to "'+s+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':n&&(l='Invalid request method "'+n.toUpperCase()+'"')),new W(e||500,o,new Error(l),!0)}function Ce(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[s,r]=t[e];if(De(r))return{key:s,result:r}}}function Re(e){return v(u({},"string"==typeof e?w(e):e,{hash:""}))}function Ae(e){return Le(e.result)&&X.has(e.result.status)}function Te(e){return e.type===x.deferred}function Pe(e){return e.type===x.error}function De(e){return(e&&e.type)===x.redirect}function Ne(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Le(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ie(e){return Y.has(e.toLowerCase())}async function Oe(e,t,s,r,n){let a=Object.entries(t);for(let i=0;i<a.length;i++){let[o,l]=a[i],c=e.find(e=>(null==e?void 0:e.route.id)===o);if(!c)continue;let d=r.find(e=>e.route.id===c.route.id),u=null!=d&&!de(d,c)&&void 0!==(n&&n[c.route.id]);Te(l)&&u&&await Fe(l,s,!1).then(e=>{e&&(t[o]=e)})}}async function Me(e,t,s){for(let r=0;r<s.length;r++){let{key:n,routeId:a,controller:i}=s[r],o=t[n];e.find(e=>(null==e?void 0:e.route.id)===a)&&Te(o)&&(m(i,"Expected an AbortController for revalidating fetcher deferred result"),await Fe(o,i.signal,!0).then(e=>{e&&(t[n]=e)}))}}async function Fe(e,t,s){if(void 0===s&&(s=!1),!await e.deferredData.resolveData(t)){if(s)try{return{type:x.data,data:e.deferredData.unwrappedData}}catch(e){return{type:x.error,error:e}}return{type:x.data,data:e.deferredData.data}}}function Be(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function Ue(e,t){let s="string"==typeof t?w(t).search:t.search;if(e[e.length-1].route.index&&Be(s||""))return e[e.length-1];let r=$(e);return r[r.length-1]}function $e(e){let{formMethod:t,formAction:s,formEncType:r,text:n,formData:a,json:i}=e;if(t&&s&&r)return null!=n?{formMethod:t,formAction:s,formEncType:r,formData:void 0,json:void 0,text:n}:null!=a?{formMethod:t,formAction:s,formEncType:r,formData:a,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:s,formEncType:r,formData:void 0,json:i,text:void 0}:void 0}function qe(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function He(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ze(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ve.apply(this,arguments)}Symbol("deferred");const We=c.createContext(null),Ge=c.createContext(null),Je=c.createContext(null),Ye=c.createContext(null),Ke=c.createContext({outlet:null,matches:[],isDataRoute:!1}),Ze=c.createContext(null);function Xe(){return null!=c.useContext(Ye)}function Qe(e,t,s,r){Xe()||m(!1);let{navigator:n}=c.useContext(Je),{matches:a}=c.useContext(Ke),i=a[a.length-1],o=i?i.params:{},l=(i&&i.pathname,i?i.pathnameBase:"/");i&&i.route;let d,u=(Xe()||m(!1),c.useContext(Ye).location);if(t){var p;let e="string"==typeof t?w(t):t;"/"===l||(null==(p=e.pathname)?void 0:p.startsWith(l))||m(!1),d=e}else d=u;let f=d.pathname||"/",y=f;if("/"!==l){let e=l.replace(/^\//,"").split("/");y="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=_(e,{pathname:y}),v=function(e,t,s,r){var n;if(void 0===t&&(t=[]),void 0===s&&(s=null),void 0===r&&(r=null),null==e){var a;if(!s)return null;if(s.errors)e=s.matches;else{if(!(null!=(a=r)&&a.v7_partialHydration&&0===t.length&&!s.initialized&&s.matches.length>0))return null;e=s.matches}}let i=e,o=null==(n=s)?void 0:n.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));e>=0||m(!1),i=i.slice(0,Math.min(i.length,e+1))}let l=!1,d=-1;if(s&&r&&r.v7_partialHydration)for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(d=e),t.route.id){let{loaderData:e,errors:r}=s,n=t.route.loader&&void 0===e[t.route.id]&&(!r||void 0===r[t.route.id]);if(t.route.lazy||n){l=!0,i=d>=0?i.slice(0,d+1):[i[0]];break}}}return i.reduceRight((e,r,n)=>{let a,u=!1,h=null,p=null;var m;s&&(a=o&&r.route.id?o[r.route.id]:void 0,h=r.route.errorElement||tt,l&&(d<0&&0===n?(at[m="route-fallback"]||(at[m]=!0),u=!0,p=null):d===n&&(u=!0,p=r.route.hydrateFallbackElement||null)));let f=t.concat(i.slice(0,n+1)),y=()=>{let t;return t=a?h:u?p:r.route.Component?c.createElement(r.route.Component,null):r.route.element?r.route.element:e,c.createElement(rt,{match:r,routeContext:{outlet:e,matches:f,isDataRoute:null!=s},children:t})};return s&&(r.route.ErrorBoundary||r.route.errorElement||0===n)?c.createElement(st,{location:s.location,revalidation:s.revalidation,component:h,error:a,children:y(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):y()},null)}(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:q([l,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:q([l,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,s,r);return t&&v?c.createElement(Ye.Provider,{value:{location:Ve({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:h.Pop}},v):v}function et(){let e=function(){var e;let t=c.useContext(Ze),s=function(){let e=c.useContext(Ge);return e||m(!1),e}(nt.UseRouteError),r=function(){let e=function(){let e=c.useContext(Ke);return e||m(!1),e}(),t=e.matches[e.matches.length-1];return t.route.id||m(!1),t.route.id}(nt.UseRouteError);return void 0!==t?t:null==(e=s.errors)?void 0:e[r]}(),t=G(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),s?c.createElement("pre",{style:r},s):null,null)}const tt=c.createElement(et,null);class st extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?c.createElement(Ke.Provider,{value:this.props.routeContext},c.createElement(Ze.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rt(e){let{routeContext:t,match:s,children:r}=e,n=c.useContext(We);return n&&n.static&&n.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=s.route.id),c.createElement(Ke.Provider,{value:t},r)}var nt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(nt||{});const at={};function it(e){m(!1)}function ot(e){let{basename:t="/",children:s=null,location:r,navigationType:n=h.Pop,navigator:a,static:i=!1,future:o}=e;Xe()&&m(!1);let l=t.replace(/^\/*/,"/"),d=c.useMemo(()=>({basename:l,navigator:a,static:i,future:Ve({v7_relativeSplatPath:!1},o)}),[l,o,a,i]);"string"==typeof r&&(r=w(r));let{pathname:u="/",search:p="",hash:f="",state:y=null,key:g="default"}=r,v=c.useMemo(()=>{let e=B(u,l);return null==e?null:{location:{pathname:e,search:p,hash:f,state:y,key:g},navigationType:n}},[l,u,p,f,y,g,n]);return null==v?null:c.createElement(Je.Provider,{value:d},c.createElement(Ye.Provider,{children:s,value:v}))}function lt(e,t){void 0===t&&(t=[]);let s=[];return c.Children.forEach(e,(e,r)=>{if(!c.isValidElement(e))return;let n=[...t,r];if(e.type===c.Fragment)return void s.push.apply(s,lt(e.props.children,n));e.type!==it&&m(!1),e.props.index&&e.props.children&&m(!1);let a={id:e.props.id||n.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=lt(e.props.children,n)),s.push(a)}),s}function ct(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:c.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:c.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:c.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},dt.apply(this,arguments)}c.startTransition,new Promise(()=>{}),c.Component,new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}function ut(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=dt({},t,{errors:ht(t.errors)})),t}function ht(e){if(!e)return null;let t=Object.entries(e),s={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)s[e]=new W(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if(r.__subType){let t=window[r.__subType];if("function"==typeof t)try{let n=new t(r.message);n.stack="",s[e]=n}catch(e){}}if(null==s[e]){let t=new Error(r.message);t.stack="",s[e]=t}}else s[e]=r;return s}const pt=c.createContext({isTransitioning:!1}),mt=c.createContext(new Map),ft=c.startTransition,yt=d.flushSync;function gt(e){yt?yt(e):e()}c.useId;class vt{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function wt(e){let{fallbackElement:t,router:s,future:r}=e,[n,a]=c.useState(s.state),[i,o]=c.useState(),[l,d]=c.useState({isTransitioning:!1}),[u,h]=c.useState(),[p,m]=c.useState(),[f,y]=c.useState(),g=c.useRef(new Map),{v7_startTransition:v}=r||{},w=c.useCallback(e=>{v?function(e){ft?ft(e):e()}(e):e()},[v]),b=c.useCallback((e,t)=>{let{deletedFetchers:r,unstable_flushSync:n,unstable_viewTransitionOpts:i}=t;r.forEach(e=>g.current.delete(e)),e.fetchers.forEach((e,t)=>{void 0!==e.data&&g.current.set(t,e.data)});let l=null==s.window||null==s.window.document||"function"!=typeof s.window.document.startViewTransition;if(i&&!l){if(n){gt(()=>{p&&(u&&u.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});let t=s.window.document.startViewTransition(()=>{gt(()=>a(e))});return t.finished.finally(()=>{gt(()=>{h(void 0),m(void 0),o(void 0),d({isTransitioning:!1})})}),void gt(()=>m(t))}p?(u&&u.resolve(),p.skipTransition(),y({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(o(e),d({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else n?gt(()=>a(e)):w(()=>a(e))},[s.window,p,u,g,w]);c.useLayoutEffect(()=>s.subscribe(b),[s,b]),c.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new vt)},[l]),c.useEffect(()=>{if(u&&i&&s.window){let e=i,t=u.promise,r=s.window.document.startViewTransition(async()=>{w(()=>a(e)),await t});r.finished.finally(()=>{h(void 0),m(void 0),o(void 0),d({isTransitioning:!1})}),m(r)}},[w,i,u,s.window]),c.useEffect(()=>{u&&i&&n.location.key===i.location.key&&u.resolve()},[u,p,n.location,i]),c.useEffect(()=>{!l.isTransitioning&&f&&(o(f.state),d({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),y(void 0))},[l.isTransitioning,f]),c.useEffect(()=>{},[]);let x=c.useMemo(()=>({createHref:s.createHref,encodeLocation:s.encodeLocation,go:e=>s.navigate(e),push:(e,t,r)=>s.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>s.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}),[s]),S=s.basename||"/",k=c.useMemo(()=>({router:s,navigator:x,static:!1,basename:S}),[s,x,S]),_=c.useMemo(()=>({v7_relativeSplatPath:s.future.v7_relativeSplatPath}),[s.future.v7_relativeSplatPath]);return c.createElement(c.Fragment,null,c.createElement(We.Provider,{value:k},c.createElement(Ge.Provider,{value:n},c.createElement(mt.Provider,{value:g.current},c.createElement(pt.Provider,{value:l},c.createElement(ot,{basename:S,location:n.location,navigationType:n.historyAction,navigator:x,future:_},n.initialized||s.future.v7_partialHydration?c.createElement(bt,{routes:s.routes,future:s.future,state:n}):t))))),null)}const bt=c.memo(xt);function xt(e){let{routes:t,future:s,state:r}=e;return Qe(t,void 0,r,s)}var St,kt,_t;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(_t=St||(St={})).UseScrollRestoration="useScrollRestoration",_t.UseSubmit="useSubmit",_t.UseSubmitFetcher="useSubmitFetcher",_t.UseFetcher="useFetcher",_t.useViewTransitionState="useViewTransitionState",function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(kt||(kt={}));const Et=window.yoast.uiLibrary;var jt=s(1802),Ct=s.n(jt);const Rt="yoast-seo/editor",At=((0,l.mapValues)({post:"title",term:"term_title"},e=>`%%${e}%%`),window.wp.i18n),Tt=(e,t)=>{try{return(0,a.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}};s(6702);const Pt=window.ReactJSXRuntime;Ct().string.isRequired,s(2514);var Dt=s(818),Nt=s.n(Dt);Ct().string.isRequired,Ct().string.isRequired,Ct().shape({src:Ct().string.isRequired,width:Ct().string,height:Ct().string}).isRequired,Ct().shape({value:Ct().bool.isRequired,status:Ct().string.isRequired,set:Ct().func.isRequired}).isRequired,Ct().string,Ct().string,Ct().string;const Lt=({handleRefreshClick:e,supportLink:t})=>(0,Pt.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,Pt.jsx)(Et.Button,{onClick:e,children:(0,At.__)("Refresh this page","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,At.__)("Contact support","wordpress-seo")})]});Lt.propTypes={handleRefreshClick:Ct().func.isRequired,supportLink:Ct().string.isRequired};const It=({handleRefreshClick:e,supportLink:t})=>(0,Pt.jsxs)("div",{className:"yst-grid yst-grid-cols-1 yst-gap-y-2",children:[(0,Pt.jsx)(Et.Button,{className:"yst-order-last",onClick:e,children:(0,At.__)("Refresh this page","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{variant:"secondary",as:"a",href:t,target:"_blank",rel:"noopener",children:(0,At.__)("Contact support","wordpress-seo")})]});It.propTypes={handleRefreshClick:Ct().func.isRequired,supportLink:Ct().string.isRequired};const Ot=({error:e,children:t=null})=>(0,Pt.jsxs)("div",{role:"alert",className:"yst-max-w-screen-sm yst-p-8 yst-space-y-4",children:[(0,Pt.jsx)(Et.Title,{children:(0,At.__)("Something went wrong. An unexpected error occurred.","wordpress-seo")}),(0,Pt.jsx)("p",{children:(0,At.__)("We're very sorry, but it seems like the following error has interrupted our application:","wordpress-seo")}),(0,Pt.jsx)(Et.Alert,{variant:"error",children:(null==e?void 0:e.message)||(0,At.__)("Undefined error message.","wordpress-seo")}),(0,Pt.jsx)("p",{children:(0,At.__)("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]});Ot.propTypes={error:Ct().object.isRequired,children:Ct().node},Ot.VerticalButtons=It,Ot.HorizontalButtons=Lt;Ct().string,Ct().node.isRequired,Ct().node.isRequired,Ct().node,Ct().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"}})),Ct().string.isRequired,Ct().string;const Mt=({href:e,children:t=null,...s})=>(0,Pt.jsxs)(Et.Link,{target:"_blank",rel:"noopener noreferrer",...s,href:e,children:[t,(0,Pt.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,At.__)("(Opens in a new browser tab)","wordpress-seo")})]});Mt.propTypes={href:Ct().string.isRequired,children:Ct().node};s(8738);(0,At.__)("Create optimized SEO titles & meta descriptions in seconds","wordpress-seo"),(0,At.__)("Apply AI suggestions to improve content in 1 click","wordpress-seo"),(0,At.__)("Manage redirects with ease and without extra plugins","wordpress-seo"),(0,At.__)("Optimize pages for multiple keywords with guidance","wordpress-seo"),(0,At.__)("Add product details to help your listings stand out","wordpress-seo"),(0,At.__)("Make sure search engines show the right version of your product page","wordpress-seo"),(0,At.__)("Create optimized SEO titles & meta descriptions with AI","wordpress-seo"),(0,At.__)("Receive clear SEO and readability guidance to optimize your products","wordpress-seo"),(0,At.__)("Generate SEO optimized metadata in seconds with AI","wordpress-seo"),(0,At.__)("Make your articles visible, be seen in Google News","wordpress-seo"),(0,At.__)("Built to get found by search, AI, and real users","wordpress-seo"),(0,At.__)("Easy Local SEO. Show up in Google Maps results","wordpress-seo"),(0,At.__)("Internal links and redirect management, easy","wordpress-seo"),(0,At.__)("Access to friendly help when you need it, day or night","wordpress-seo");var Ft=s(2485),Bt=s.n(Ft);Ct().string.isRequired,Ct().object.isRequired,Ct().func.isRequired,Ct().bool.isRequired;var Ut=s(3473),$t=s.n(Ut);Ct().string.isRequired,Ct().object,Ct().func.isRequired,Ct().bool.isRequired,Ct().string.isRequired,Ct().object.isRequired,Ct().string.isRequired,Ct().func.isRequired,Ct().bool.isRequired;var qt=s(5074),Ht=s.n(qt);Ct().bool.isRequired,Ct().func,Ct().func,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired;window.yoast.reactHelmet;const zt="request",Vt="success",Wt="error",Gt="loading";var Jt,Yt;function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Kt.apply(null,arguments)}Ct().string.isRequired,Ct().shape({src:Ct().string.isRequired,width:Ct().string,height:Ct().string}).isRequired,Ct().shape({value:Ct().bool.isRequired,status:Ct().string.isRequired,set:Ct().func.isRequired}).isRequired,Ct().bool;const Zt=e=>c.createElement("svg",Kt({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:"yoast-logo_svg__w-40",viewBox:"0 0 842 224"},e),Jt||(Jt=c.createElement("path",{fill:"#a61e69",d:"M166.55 54.09c-38.69 0-54.17 25.97-54.17 54.88s15.25 56.02 54.17 56.02 54.07-27.19 54-54.26c-.09-32.97-16.77-56.65-54-56.65Zm-23.44 56.52c.94-38.69 30.66-38.65 40.59-24.79 9.05 12.63 10.9 55.81-17.14 55.5-12.92-.14-23.06-8.87-23.44-30.71Zm337.25 27.55V82.11h20.04V57.78h-20.04V28.39h-30.95v29.39h-15.7v24.33h15.7v52.87c0 30.05 20.95 47.91 43.06 51.61l9.24-24.88c-12.89-1.63-21.23-11.27-21.35-23.54Zm-156.15-8.87V87.16c0-1.54-.1-2.98-.25-4.39-2.68-34.04-51.02-33.97-88.46-20.9l10.82 21.78c24.38-11.58 38.97-8.59 44.07-2.89.13.15.26.29.38.45.01.02.03.04.04.06 2.6 3.51 1.98 9.05 1.98 13.41-31.86 0-65.77 4.23-65.77 39.17 0 26.56 33.28 43.65 68.06 18.33l5.16 12.45h29.81c-2.66-14.62-5.85-27.14-5.85-35.34Zm-31.18-.23c-24.51 27.43-46.96 1.61-23.97-9.65 6.77-2.31 15.95-2.41 23.97-2.41v12.06Zm78.75-44.17c0-10.38 16.61-15.23 42.82-3.27l9.06-22.01c-35.27-10.66-83.44-11.62-83.75 25.28-.15 17.68 11.19 27.19 27.52 33.26 11.31 4.2 27.64 6.38 27.59 15.39-.06 11.77-25.38 13.57-48.42-2.26l-9.31 23.87c31.43 15.64 89.87 16.08 89.56-23.12-.31-38.76-55.08-32.11-55.08-47.14ZM99.3 1 54.44 125.61 32.95 58.32H1l35.78 91.89a33.49 33.49 0 0 1 0 24.33c-4 10.25-10.65 19.03-26.87 21.21v27.24c31.58 0 48.65-19.41 63.88-61.96L133.48 1H99.3ZM598.64 139.05c0 8.17-2.96 14.58-8.87 19.23-5.91 4.65-14.07 6.98-24.47 6.98s-18.92-1.61-25.54-4.84v-14.2c4.19 1.97 8.65 3.52 13.37 4.65 4.72 1.13 9.11 1.7 13.18 1.7 5.95 0 10.35-1.13 13.18-3.39 2.83-2.26 4.25-5.3 4.25-9.11 0-3.43-1.3-6.35-3.9-8.74-2.6-2.39-7.97-5.22-16.1-8.48-8.39-3.39-14.3-7.27-17.74-11.63-3.44-4.36-5.16-9.59-5.16-15.71 0-7.67 2.72-13.7 8.18-18.1 5.45-4.4 12.77-6.6 21.95-6.6s17.57 1.93 26.29 5.78l-4.78 12.26c-8.18-3.43-15.47-5.15-21.89-5.15-4.87 0-8.55 1.06-11.07 3.17-2.52 2.12-3.77 4.91-3.77 8.39 0 2.39.5 4.43 1.51 6.13s2.66 3.3 4.97 4.81c2.3 1.51 6.46 3.5 12.45 5.97 6.75 2.81 11.7 5.43 14.85 7.86 3.15 2.43 5.45 5.18 6.92 8.23 1.46 3.06 2.2 6.66 2.2 10.81Zm68.53 24.96h-52.02V72.12h52.02v12.7h-36.99v25.01h34.66v12.57h-34.66v28.85h36.99v12.76Zm100.24-46.07c0 14.96-3.74 26.59-11.23 34.88-7.49 8.3-18.08 12.44-31.8 12.44s-24.54-4.12-31.99-12.35c-7.44-8.23-11.17-19.93-11.17-35.1s3.74-26.82 11.23-34.95c7.49-8.13 18.17-12.19 32.05-12.19s24.24 4.13 31.7 12.38c7.47 8.26 11.2 19.88 11.2 34.88Zm-70.2 0c0 11.31 2.29 19.89 6.86 25.74 4.57 5.85 11.35 8.77 20.32 8.77s15.67-2.89 20.22-8.67c4.55-5.78 6.82-14.39 6.82-25.83s-2.25-19.82-6.76-25.64-11.23-8.74-20.16-8.74-15.82 2.91-20.41 8.74c-4.59 5.82-6.89 14.37-6.89 25.64Z"})),Yt||(Yt=c.createElement("path",{fill:"#77b227",d:"m790.45 165.35 36.05-94.96H840l-36.02 94.96h-13.53z"})));s(5687),Ct().bool.isRequired,Ct().func.isRequired,Ct().func,Ct().string;Ct().func.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().string.isRequired,Ct().func.isRequired,Ct().string.isRequired,Ct().shape({termsOfService:Ct().string,privacyPolicy:Ct().string,learnMore:Ct().string});const Xt=({children:e})=>(0,Pt.jsx)("p",{className:"yst-mt-2",children:e});Xt.propTypes={children:Ct().node.isRequired};const Qt=(0,At.__)("Something went wrong","wordpress-seo"),es=({linkStoreName:e=Rt})=>{const s=(0,t.useSelect)(t=>t(e).selectLink("https://yoa.st/ai-common-errors"),[e]),r=(0,t.useSelect)(t=>t(e).selectAdminLink("?page=wpseo_page_support"),[e]);return(0,Pt.jsx)(Xt,{children:Tt((0,At.sprintf)(/* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ /* translators: %1$s and %3$s expand to an opening tag. %2$s and %4$s expand to a closing tag. */ (0,At.__)("Please try again later. If this issue persists, you can learn more about possible reasons for this error on our page about %1$scommon AI feature problems and errors%2$s. In case you need further help, please %3$scontact our support team%4$s.","wordpress-seo"),"<a1>","</a1>","<a2>","</a2>"),{a1:(0,Pt.jsx)(Mt,{variant:"error",href:s}),a2:(0,Pt.jsx)(Mt,{variant:"error",href:r})})})};es.propTypes={linkStoreName:Ct().string};const ts=({linkStoreName:e=Rt,className:t=""})=>(0,Pt.jsxs)(Et.Alert,{variant:"error",className:t,children:[(0,Pt.jsx)("span",{className:"yst-block yst-font-medium",children:Qt}),(0,Pt.jsx)(es,{linkStoreName:e})]});ts.propTypes={linkStoreName:Ct().string,className:Ct().string},(0,At.__)("Not enough content","wordpress-seo"),(0,At.__)("SEO analysis required","wordpress-seo"),(0,At.__)("You've reached the Yoast AI rate limit","wordpress-seo");const ss=window.wp.apiFetch;var rs=s.n(ss);(0,At.__)("Subscription required","wordpress-seo");Ct().arrayOf(Ct().string),Ct().arrayOf(Ct().string),(0,At.__)("Connection timeout","wordpress-seo"),(0,At.__)("Usage policy violation","wordpress-seo"),(0,At.__)("Something went wrong","wordpress-seo");Ct().string,Ct().string,(0,At.__)("Something went wrong","wordpress-seo");const ns=({children:e})=>(0,Pt.jsx)(Et.Modal.Description,{as:"div",className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:e}),as=({children:e})=>(0,Pt.jsx)("div",{className:"yst-mt-6 yst-flex yst-flex-row yst-justify-end yst-gap-3",children:e}),is=({onClose:e,...t})=>(0,Pt.jsx)(Et.Button,{variant:"secondary",onClick:e,...t,children:(0,At.__)("Close","wordpress-seo")}),os=({isOpen:e,title:t,onClose:s=l.noop,children:r})=>{const n=(0,Et.useSvgAria)();return(0,Pt.jsx)(Et.Modal,{isOpen:e,onClose:s,children:(0,Pt.jsx)(Et.Modal.Panel,{className:"yst-max-w-lg",closeButtonScreenReaderText:(0,At.__)("Dismiss","wordpress-seo"),children:(0,Pt.jsxs)("div",{className:"yst-flex yst-items-start yst-gap-4",children:[(0,Pt.jsx)("div",{className:"yst-flex-shrink-0 yst-flex yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,Pt.jsx)(Ht(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...n})}),(0,Pt.jsxs)("div",{className:"yst-text-start yst-flex-1 yst-min-w-0",children:[(0,Pt.jsx)(Et.Modal.Title,{className:"yst-text-lg yst-leading-6 yst-font-medium yst-text-slate-900",children:t}),r]})]})})})};Ct().bool,Ct().func.isRequired,Ct().func.isRequired,Ct().bool,Ct().bool,Ct().func,Ct().func,Ct().bool,Ct().bool,Ct().func,Ct().func,Ct().string,Ct().bool,Ct().bool,Ct().func,Ct().func,Ct().bool,Ct().func,Ct().bool,Ct().func,Ct().bool,Ct().func,Ct().bool,Ct().func,Ct().arrayOf(Ct().string),Ct().bool,Ct().func,Ct().bool,Ct().func,(0,At.__)("Yoast AI cannot reach your site","wordpress-seo");Ct().string,Ct().bool,Ct().func;const ls=e=>e.replace(/[\n\r]+/g," "),cs=(e,t,s)=>{let r="",n=t;for(const t of e){if(n+=t.tokens.length,n>s)return{text:r,tokenCount:n,exceeded:!0};r+=ls(t.text)}return{text:r,tokenCount:n,exceeded:!1}},ds=window.yoast.reduxJsToolkit,us="adminUrl",hs=(0,ds.createSlice)({name:us,initialState:"",reducers:{setAdminUrl:(e,{payload:t})=>t}}),ps=(hs.getInitialState,{selectAdminUrl:e=>(0,l.get)(e,us,"")});ps.selectAdminLink=(0,ds.createSelector)([ps.selectAdminUrl,(e,t)=>t],(e,t="")=>{try{return new URL(t,e).href}catch(t){return e}}),hs.actions,hs.reducer;const ms="replacementVariables",fs=e=>({recommended:(0,l.get)(e,"recommended",{}),shared:(0,l.get)(e,"shared",[]),specific:(0,l.get)(e,"specific",{}),variables:(0,l.get)(e,"variables",[])}),ys=(0,ds.createSlice)({name:ms,initialState:fs({}),reducers:{}}),gs=e=>(0,l.get)(e,[ms,"recommended"],{}),vs=e=>(0,l.get)(e,[ms,"shared"],[]),ws=e=>(0,l.get)(e,[ms,"specific"],{}),bs=e=>(0,l.get)(e,[ms,"variables"],[]),xs=(0,ds.createSelector)([vs,ws,(e,t)=>t,(e,t,s)=>s],(e,t,s,r)=>[...e,...(0,l.get)(t,s,(0,l.get)(t,r,[]))]),Ss={selectRecommendedReplacementVariables:gs,selectSharedReplacementVariables:vs,selectSpecificReplacementVariables:ws,selectReplacementVariables:bs,selectSpecificReplacementVariablesFor:xs,selectReplacementVariablesFor:(0,ds.createSelector)([bs,xs],(e,t)=>(0,l.filter)(e,({name:e})=>(0,l.includes)(t,e))),selectRecommendedReplacementVariablesFor:(0,ds.createSelector)([gs,(e,t)=>t,(e,t,s)=>s],(e,t,s)=>(0,l.get)(e,t,(0,l.get)(e,s,[])))},ks=ys.actions,_s=ys.reducer,Es="hasConsent",js=(0,ds.createSlice)({name:Es,initialState:{hasConsent:!1,endpoint:""},reducers:{giveAiGeneratorConsent:(e,{payload:t})=>{e.hasConsent=t},setAiGeneratorConsentEndpoint:(e,{payload:t})=>{e.endpoint=t}}}),Cs=(js.getInitialState,js.actions,js.reducer,window.wp.url),Rs="linkParams",As=(0,ds.createSlice)({name:Rs,initialState:{},reducers:{setLinkParams:(e,{payload:t})=>t}}),Ts=As.getInitialState,Ps={selectLinkParam:(e,t,s={})=>(0,l.get)(e,`${Rs}.${t}`,s),selectLinkParams:e=>(0,l.get)(e,Rs,{})};Ps.selectLink=(0,ds.createSelector)([Ps.selectLinkParams,(e,t)=>t,(e,t,s={})=>s],(e,t,s)=>(0,Cs.addQueryArgs)(t,{...e,...s}));const Ds=As.actions,Ns=As.reducer,Ls="myyoastConnection",Is=(0,ds.createSlice)({name:Ls,initialState:{isAvailable:!1,canConnect:!1,connectUrl:null,learnMoreUrl:""},reducers:{}}),Os=Is.getInitialState,Ms={selectMyyoastConnection:e=>(0,l.get)(e,Ls,Os())},Fs=Is.actions,Bs=Is.reducer,Us=(0,ds.createSlice)({name:"notifications",initialState:{},reducers:{addNotification:{reducer:(e,{payload:t})=>{e[t.id]={id:t.id,variant:t.variant,size:t.size,title:t.title,description:t.description}},prepare:({id:e,variant:t="info",size:s="default",title:r,description:n})=>({payload:{id:e||(0,ds.nanoid)(),variant:t,size:s,title:r||"",description:n}})},removeNotification:(e,{payload:t})=>(0,l.omit)(e,t)}}),$s=(Us.getInitialState,Us.actions,Us.reducer,"optInNotification"),qs="setOptInNotificationSeen",Hs=(0,ds.createSlice)({name:$s,initialState:{seen:{}},reducers:{hideOptInNotification(e,t){const s=t.payload;e.seen[s]=!0}}}),zs=Hs.getInitialState,Vs={selectIsOptInNotificationSeen:(e,t)=>(0,l.get)(e,[$s,"seen",t],!1)},Ws={...Hs.actions,setOptInNotificationSeen:function*(e){yield{type:`${qs}/${zt}`};try{return yield{type:qs,payload:e},{type:`${qs}/${Vt}`,payload:e}}catch(t){return console.error("Error setting opt-in notification as seen:",t),{type:`${qs}/${Wt}`,payload:e}}}},Gs={[qs]:async({payload:e})=>{await rs()({path:"yoast/v1/seen-opt-in-notification",method:"POST",data:{key:e}})}},Js=Hs.reducer,Ys="pluginUrl",Ks=(0,ds.createSlice)({name:Ys,initialState:"",reducers:{setPluginUrl:(e,{payload:t})=>t}}),Zs=(Ks.getInitialState,{selectPluginUrl:e=>(0,l.get)(e,Ys,"")});Zs.selectImageLink=(0,ds.createSelector)([Zs.selectPluginUrl,(e,t,s="images")=>s,(e,t)=>t],(e,t,s)=>[(0,l.trimEnd)(e,"/"),(0,l.trim)(t,"/"),(0,l.trimStart)(s,"/")].join("/")),Ks.actions,Ks.reducer;const Xs="wistiaEmbedPermission",Qs=(0,ds.createSlice)({name:Xs,initialState:{value:!1,status:"idle",error:{}},reducers:{setWistiaEmbedPermissionValue:(e,{payload:t})=>{e.value=Boolean(t)}},extraReducers:e=>{e.addCase(`${Xs}/${zt}`,e=>{e.status=Gt}),e.addCase(`${Xs}/${Vt}`,(e,{payload:t})=>{e.status="success",e.value=Boolean(t&&t.value)}),e.addCase(`${Xs}/${Wt}`,(e,{payload:t})=>{e.status="error",e.value=Boolean(t&&t.value),e.error={code:(0,l.get)(t,"error.code",500),message:(0,l.get)(t,"error.message","Unknown")}})}});var er;Qs.getInitialState,Qs.actions,Qs.reducer;const tr=(0,ds.createSlice)({name:"documentTitle",initialState:(0,l.defaultTo)(null===(er=document)||void 0===er?void 0:er.title,""),reducers:{setDocumentTitle:(e,{payload:t})=>t}}),sr=(tr.getInitialState,tr.actions,tr.reducer,window.yoast.analysis),rr="@yoast/bulk-editor",nr=20,ar="search",ir="social",or="focusKeyphrase",lr="title",cr="description",dr={[ar]:{[lr]:"seo_title",[cr]:"meta_description"},[ir]:{[lr]:"social_title",[cr]:"social_description"}},ur="bulk_editor_tour",hr="yoast.bulkEditor.TableCellWithField",pr={premium:{link:"https://yoa.st/bulk-editor-ai-upsell",ctbId:"f6a84663-465f-4cb5-8ba5-f7a6d72224b2"},woo:{link:"https://yoa.st/bulk-editor-ai-upsell-woo",ctbId:"5b32250e-e6f0-44ae-ad74-3cefc8e427f9"}},mr=(0,At.__)("Instantly create SEO titles, meta descriptions, and social metadata for all your content. Upgrade to unlock bulk AI generation and streamline your workflow.","wordpress-seo"),fr="yoast-measurement-element";function yr(e){let t=document.getElementById(fr);return t||(t=function(){const e=document.createElement("div");return e.id=fr,e.style.position="absolute",e.style.left="-9999em",e.style.top=0,e.style.height=0,e.style.overflow="hidden",e.style.fontFamily="arial, sans-serif",e.style.fontSize="20px",e.style.fontWeight="400",document.body.appendChild(e),e}()),t.innerText=e,t.offsetWidth}const gr=window.wp.hooks;let vr=null;const wr=e=>(null===vr&&(vr=Promise.resolve().then(async()=>{const t=new window.yoast.Researcher.default,s=(0,gr.applyFilters)("yoast.bulkEditor.analysis.configureResearcher",()=>{});return await s(t,e),t}).catch(e=>{throw vr=null,e})),vr),br=()=>({contentLocale:(0,l.get)(window,["wpseoBulkEditorData","analysis","contentLocale"],"en_US"),keywordAnalysisActive:!0===(0,l.get)(window,["wpseoBulkEditorData","analysis","keywordAnalysisActive"],!1)}),xr=({title:e,description:t,keyphrase:s,locale:r})=>new sr.Paper("",{keyword:s||"",title:e||"",titleWidth:yr(e||""),description:t||"",locale:r}),Sr=(e,t)=>(e.assess(t),e.calculateOverallScore()),kr={seoTitle:{getAssessor:e=>new sr.assessors.SeoTitleAssessor(e),param:"seo_title_score",onTitle:!0},metaDescription:{getAssessor:e=>new sr.assessors.MetaDescriptionAssessor(e),param:"meta_description_score",onTitle:!1}},_r=(e,t)=>{var s;return null!==(s=e.endpoint)&&void 0!==s?s:t.endpoint},Er=(e,t,s)=>e===or&&s&&"focus_keyphrase"in s?s.focus_keyphrase:t,jr=e=>{var t,s;return null==e||null===(t=e.results)||void 0===t||null===(s=t[0])||void 0===s?void 0:s.sanitized},Cr=(e,t,s)=>{var r;return e===(null!==(r=null==t?void 0:t[`${s}Fallback`])&&void 0!==r?r:"")?"":e},Rr=(e,t,s)=>{const r=null==t?void 0:t.rendered;null!=t&&t.success&&r&&e({id:t.id,title:r.seo_title,description:r.meta_description,keyphrase:s})},Ar=(e,t,s,r)=>{var n,a;if(t!==ar)return;const i=null!==(n=null==s?void 0:s.results)&&void 0!==n?n:[],o=Er(or,null!==(a=r.draft[or])&&void 0!==a?a:"",jr(s));Rr(e,i[0],o)},Tr=({dataProvider:e,remoteDataProvider:s,fieldSets:r,activeFieldSet:n,items:i,updateItem:o})=>{const l=(0,t.useSelect)(e=>e(rr).selectEditingRows(),[]),{startEdit:c,updateDraftField:d,setSavingField:u,closeField:h,discardEdit:p,stopEdit:m}=(0,t.useDispatch)(rr),[f,y]=(0,a.useState)(!1),[g,v]=(0,a.useState)(!1),w=(0,a.useRef)(!1),b=(0,a.useMemo)(()=>(({dataProvider:e,remoteDataProvider:t})=>{const s=e.getEndpoint("update_scores"),{contentLocale:r,keywordAnalysisActive:n}=br();return async({id:e,title:a,description:i,keyphrase:o})=>{if(n&&s&&t)try{const n=await wr(r),l=xr({title:a,description:i,keyphrase:o,locale:r}),c=((e,t,s)=>{const r={id:e};return t>0&&(r.seo_title_score=t),s>0&&(r.meta_description_score=s),r})(e,Sr(new sr.assessors.SeoTitleAssessor(n),l),Sr(new sr.assessors.MetaDescriptionAssessor(n),l));if(1===Object.keys(c).length)return;await t.fetchJson(s,{},{method:"POST",body:JSON.stringify({items:[c]})})}catch(e){}}})({dataProvider:e,remoteDataProvider:s}),[e,s]),x=(0,a.useMemo)(()=>(({dataProvider:e,remoteDataProvider:t})=>{const s=e.getEndpoint("update_scores"),{contentLocale:r,keywordAnalysisActive:n}=br();return async({id:e,fieldKey:a,value:i,keyphrase:o})=>{const l=kr[a];if(n&&s&&t&&l)try{await(async({endpoint:e,remoteDataProvider:t,contentLocale:s,scorer:r,id:n,value:a,keyphrase:i})=>{const o=await wr(s),l=xr({title:r.onTitle?a:"",description:r.onTitle?"":a,keyphrase:i,locale:s}),c=Sr(r.getAssessor(o),l);c<=0||await t.fetchJson(e,{},{method:"POST",body:JSON.stringify({items:[{id:n,[r.param]:c}]})})})({endpoint:s,remoteDataProvider:t,contentLocale:r,scorer:l,id:e,value:i,keyphrase:o})}catch(e){}}})({dataProvider:e,remoteDataProvider:s}),[e,s]),S=(0,a.useCallback)((e,t,s)=>{var r;o(e,t,s);const n=i.find(t=>t.id===e);x({id:e,fieldKey:t,value:s,keyphrase:null!==(r=null==n?void 0:n[or])&&void 0!==r?r:""})},[o,i,x]),k=(0,a.useCallback)(()=>v(!1),[]);(0,a.useEffect)(()=>{0===Object.keys(l).length&&v(!1)},[l]);const _=(0,a.useCallback)(()=>m(),[m]),E=(0,a.useCallback)(({id:e,key:t})=>h({id:e,key:t}),[h]),j=(0,a.useCallback)(e=>{const t=i.find(t=>t.id===e);if(!t)return;const s=Object.fromEntries(r[n].fields.map(e=>[e.key,t[e.key]||t[`${e.key}Fallback`]||""]));c({id:e,draft:s})},[i,r,n,c]),C=(0,a.useCallback)(e=>p({id:e}),[p]),R=(0,a.useCallback)(async({id:t,key:a})=>{const c=r[n],d=c.fields.find(e=>e.key===a),p=l[t];if(!d||!p)return;const m=e.getEndpoint(_r(d,c));if(!m)return;const f=i.find(e=>e.id===t),y=Cr(p.draft[a],f,a);u({id:t,key:a,isSaving:!0});try{const e=await s.fetchJson(m,{},{method:"POST",body:JSON.stringify({items:[{id:t,[d.param]:y}]})});o(t,a,Er(a,y,jr(e))),h({id:t,key:a}),((e,t,s,r)=>{1===r.openFields.length&&Ar(e,t,s,r)})(b,n,e,p)}catch(e){u({id:t,key:a,isSaving:!1}),v(!0)}},[r,n,e,s,l,i,u,h,o,b]),A=(0,a.useCallback)(async t=>{const a=r[n],c=l[t];if(!c||!s)return;const d=i.find(e=>e.id===t),p={};c.openFields.forEach(s=>{const r=a.fields.find(e=>e.key===s);if(!r)return;const n=_r(r,a),i=e.getEndpoint(n);if(!i)return;p[n]||(p[n]={endpoint:i,item:{id:t},applied:[]});const o=Cr(c.draft[s],d,s);p[n].item[r.param]=o,p[n].applied.push({key:s,value:o})});const m=Object.values(p);if(0===m.length)return;c.openFields.forEach(e=>u({id:t,key:e,isSaving:!0}));const f=m.map(e=>({applied:e.applied,promise:s.fetchJson(e.endpoint,{},{method:"POST",body:JSON.stringify({items:[e.item]})})})),y=await Promise.allSettled(f.map(e=>e.promise));let g=!1;y.forEach((e,s)=>{if("fulfilled"!==e.status)return f[s].applied.forEach(({key:e})=>u({id:t,key:e,isSaving:!1})),void(g=!0);const r=jr(e.value);f[s].applied.forEach(({key:e,value:s})=>{o(t,e,Er(e,s,r)),h({id:t,key:e})}),Ar(b,n,e.value,c)}),g&&v(!0)},[r,n,e,s,l,i,u,o,h,b]),T=(0,a.useCallback)(async()=>{const t=r[n];if(w.current)return null;if(!s||0===Object.keys(l).length)return!0;const a={};Object.entries(l).forEach(([s,r])=>{const n=Number(s);r.openFields.forEach(s=>{const o=t.fields.find(e=>e.key===s);if(!o)return;const l=_r(o,t),c=e.getEndpoint(l);if(!c)return;a[l]||(a[l]={endpoint:c,rows:{}}),a[l].rows[n]||(a[l].rows[n]={item:{id:n},applied:[]});const d=i.find(e=>e.id===n),u=Cr(r.draft[s],d,s);a[l].rows[n].item[o.param]=u,a[l].rows[n].applied.push({id:n,key:s,value:u})})});const c=Object.values(a);if(0===c.length)return!0;const d=c.flatMap(e=>{const t=Object.values(e.rows),r=[];for(let e=0;e<t.length;e+=nr)r.push(t.slice(e,e+nr));return r.map(t=>({applied:t.flatMap(e=>e.applied),promise:s.fetchJson(e.endpoint,{},{method:"POST",body:JSON.stringify({items:t.map(e=>e.item)})})}))});w.current=!0,y(!0),v(!1);try{const e=await Promise.allSettled(d.map(e=>e.promise));e.forEach((e,t)=>{var s,r;if("fulfilled"!==e.status)return;const a=Object.fromEntries((null!==(s=null===(r=e.value)||void 0===r?void 0:r.results)&&void 0!==s?s:[]).map(e=>[e.id,e.sanitized]));d[t].applied.forEach(({id:e,key:t,value:s})=>{o(e,t,Er(t,s,a[e])),h({id:e,key:t})}),((e,t,s,r)=>{var n;t===ar&&(null!==(n=null==s?void 0:s.results)&&void 0!==n?n:[]).forEach(t=>{var s,n,a;const i=Er(or,null!==(s=null===(n=r[t.id])||void 0===n||null===(a=n.draft)||void 0===a?void 0:a[or])&&void 0!==s?s:"",null==t?void 0:t.sanitized);Rr(e,t,i)})})(b,n,e.value,l)});const t=e.some(e=>"rejected"===e.status);return t&&v(!0),!t}finally{w.current=!1,y(!1)}},[r,n,e,s,l,i,o,h,b]);return{editing:(0,a.useMemo)(()=>({editingRows:l,isApplyingAll:f,hasSaveError:g,dismissSaveError:k,onStartEdit:j,onChangeField:d,onApplyField:R,onApplyRow:A,onApplyAll:T,onDiscardAll:_,onCancelEdit:C,onDiscardField:E,onFieldApplied:S}),[l,f,g,k,j,d,R,A,T,_,C,E,S]),stopEditing:m}},Pr=e=>{var t,s,r,n,a;return{id:e.id,title:e.title,status:e.status,editLink:e.edit_link,focusKeyphrase:e.focus_keyphrase,seoTitle:e.seo_title,metaDescription:e.meta_description,socialTitle:e.social_title,socialDescription:e.social_description,seoTitleFallback:null!==(t=e.seo_title_fallback)&&void 0!==t?t:"",metaDescriptionFallback:null!==(s=e.meta_description_fallback)&&void 0!==s?s:"",socialTitleFallback:null!==(r=e.social_title_fallback)&&void 0!==r?r:"",socialDescriptionFallback:null!==(n=e.social_description_fallback)&&void 0!==n?n:"",editable:e.editable,needsImprovement:null!==(a=e.needs_improvement)&&void 0!==a?a:{}}};var Dr=s(7219),Nr=s.n(Dr),Lr=s(3527),Ir=s.n(Lr),Or=s(998),Mr=s.n(Or);const Fr=()=>{const e=(0,t.useSelect)(e=>e(rr).selectActiveFieldSet(),[]);return(0,a.useCallback)(t=>{const s=document.getElementById(`yst-bulk-editor-select-menu-${e}-button`);s?s.focus():t.currentTarget.blur()},[e])},Br=({variant:e="info",role:t="status",className:s="",onDismiss:r,children:n})=>{const i=(0,Et.useSvgAria)(),o=Fr(),l=(0,a.useCallback)(e=>{o(e),r()},[o,r]);return(0,Pt.jsxs)(Et.Alert,{variant:e,as:"div",role:t,className:Bt()("yst-mt-2 first:yst-mt-0 yst-rounded-none yst-relative",s),children:[n,(0,Pt.jsx)("button",{type:"button",className:"yst-absolute yst-end-4 yst-top-4 yst-text-current hover:yst-opacity-75 yst-cursor-pointer",onClick:l,"aria-label":(0,At.__)("Dismiss","wordpress-seo"),children:(0,Pt.jsx)(Mr(),{className:"yst-h-5 yst-w-5",...i})})]})},Ur=({hasExclusions:e,onDismiss:t})=>e?(0,Pt.jsx)(Br,{onDismiss:t,children:(0,Pt.jsx)("span",{className:"yst-block yst-pe-8",children:(0,At.__)("Your selection has been updated. Private, password-protected, or non-indexed items can't be bulk edited and were excluded.","wordpress-seo")})}):null,$r=({total:e,onDismiss:t})=>{if(e<=nr)return null;const s=(0,At.sprintf)(/* translators: %1$d expands to the maximum number of items at a time. */ /* translators: %1$d expands to the maximum number of items at a time. */ (0,At.__)("Only the first %1$d items from your selection were carried over. The bulk editor supports up to %1$d items at a time.","wordpress-seo"),nr);return(0,Pt.jsx)(Br,{onDismiss:t,children:(0,Pt.jsx)("span",{className:"yst-block yst-pe-8",children:s})})};var qr=s(1298),Hr=s.n(qr);const zr=e=>{const s="product"===e,r=s?pr.woo:pr.premium,n=(0,t.useSelect)(e=>e(rr).selectLink(r.link),[r.link]),i=(0,t.useSelect)(e=>e(rr).selectLink("https://yoa.st/bulk-editor-learn-more"),[]);return(0,a.useMemo)(()=>({upsellLink:n,ctbId:r.ctbId,upsellLabel:(0,At.sprintf)(/* translators: %1$s expands to "Yoast SEO Premium" or "Yoast WooCommerce SEO". */ /* translators: %1$s expands to "Yoast SEO Premium" or "Yoast WooCommerce SEO". */ (0,At.__)("Unlock with %1$s","wordpress-seo"),s?"Yoast WooCommerce SEO":"Yoast SEO Premium"),learnMoreLink:i,description:s?(0,At.__)("Instantly create SEO titles, meta descriptions, and social metadata for all your products, posts, pages and more. Upgrade to unlock bulk AI generation and streamline your workflow.","wordpress-seo"):mr}),[n,r.ctbId,s,i])},Vr=({isOpen:e,onClose:t,contentType:s})=>{const{upsellLabel:r,upsellLink:n,ctbId:i,learnMoreLink:o,description:l=mr}=zr(s),c=(0,a.useRef)(null),d=(0,Et.useSvgAria)(),u=i?{"data-action":"load-nfd-ctb","data-ctb-id":i}:{};return(0,Pt.jsx)(Et.Modal,{isOpen:e,onClose:t,initialFocus:c,children:(0,Pt.jsx)(Et.Modal.Panel,{className:"yst-max-w-sm yst-p-6",closeButtonScreenReaderText:(0,At.__)("Close","wordpress-seo"),children:(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-gap-6 yst-text-center",children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-gap-4",children:[(0,Pt.jsx)("span",{className:"yst-flex yst-h-12 yst-w-12 yst-items-center yst-justify-center yst-rounded-full yst-bg-ai-100",children:(0,Pt.jsx)(Et.GradientSparklesIcon,{className:"yst-h-6 yst-w-6",...d})}),(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-items-center yst-gap-2",children:[(0,Pt.jsx)(Et.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium yst-text-slate-900",children:(0,At.__)("Generate Metadata in Bulk","wordpress-seo")}),(0,Pt.jsx)(Et.Modal.Description,{as:"p",className:"yst-text-sm yst-text-slate-600",children:l})]})]}),(0,Pt.jsxs)(Et.Button,{as:"a",ref:c,variant:"upsell",href:n,target:"_blank",rel:"noopener noreferrer",className:"yst-w-full",...u,children:[(0,Pt.jsx)(Hr(),{className:"yst--ms-1 yst-me-2 yst-h-5 yst-w-5","aria-hidden":"true"}),r,(0,Pt.jsx)("span",{className:"yst-sr-only",children:(0,At.__)("(Opens in a new browser tab)","wordpress-seo")})]}),o&&(0,Pt.jsxs)(Mt,{href:o,variant:"primary",className:"yst-inline-flex yst-items-center yst-gap-1 yst-text-sm yst-font-medium yst-no-underline",children:[(0,At.__)("Learn more","wordpress-seo"),(0,Pt.jsx)($t(),{className:"yst-h-4 yst-w-4 yst-icon-rtl","aria-hidden":"true"})]})]})})})},Wr=({onClose:e,isOpen:s})=>{const r=(0,Et.useSvgAria)(),n=(0,t.useSelect)(e=>e(rr).selectPreference("premiumUpdateUrl",""));return(0,Pt.jsxs)(os,{isOpen:s,onClose:e,title:(0,At.__)("Your plugin needs an update","wordpress-seo"),children:[(0,Pt.jsx)(ns,{children:(0,At.sprintf)(/** translators: %s: plugin name */ /** translators: %s: plugin name */ (0,At.__)("To use AI features, please update %s to the latest version.","wordpress-seo"),"Yoast SEO Premium")}),(0,Pt.jsxs)(as,{children:[(0,Pt.jsx)(is,{onClick:e}),n&&(0,Pt.jsxs)(Et.Button,{id:"yst-bulk-editor-update-modal",className:"yst-pe-2.5 yst-flex yst-gap-1.5 yst-items-center",href:n,target:"_blank",rel:"noopener noreferrer",as:"a",children:[(0,At.__)("Update now","wordpress-seo"),(0,Pt.jsx)("span",{className:"yst-sr-only",children:(0,At.__)("(Opens in a new browser tab)","wordpress-seo")}),(0,Pt.jsx)($t(),{className:"yst-h-4 yst-w-4 rtl:yst-rotate-180 yst-shrink-0",...r})]})]})]})},Gr=({item:e})=>(0,Pt.jsxs)(Et.DropdownMenu.ButtonItem,{className:"yst-flex yst-items-center yst-gap-2 yst-justify-start yst-px-4 yst-py-2 yst-font-normal yst-text-start yst-text-slate-800 hover:!yst-bg-slate-50 focus:!yst-bg-slate-50",onClick:e.onClick,"aria-label":e.ariaLabel,children:[e.icon,e.label]});var Jr=s(4892),Yr=s.n(Jr);const Kr=({onSelectAll:e,onDeselectAll:t,selectedCount:s,totalCount:r,smartSelectItems:n=[],id:i})=>{const o=(0,Et.useSvgAria)(),l=(0,a.useMemo)(()=>[{key:"select-all",label:(0,At.__)("Select all","wordpress-seo"),onClick:e},{key:"deselect-all",label:(0,At.__)("Deselect all","wordpress-seo"),onClick:t}],[e,t]),c=(0,gr.applyFilters)("yoast.bulkEditor.selectMenuItems",l,{selectedCount:s,totalCount:r});return(0,Pt.jsxs)(Et.DropdownMenu,{as:"div",className:"yst-relative",id:i,children:[(0,Pt.jsxs)(Et.DropdownMenu.Trigger,{as:Et.Button,variant:"primary",size:"small",className:"yst-gap-1.5",id:`${i}-button`,children:[(0,At.__)("Select","wordpress-seo"),(0,Pt.jsx)(Yr(),{className:"yst-h-4 yst-w-4",...o})]}),(0,Pt.jsxs)(Et.DropdownMenu.List,{className:"yst-absolute yst-z-10 yst-start-0 yst-top-full yst-mt-1 yst-w-[169px]",children:[c.map(e=>(0,Pt.jsx)(Gr,{item:e},e.key)),n.length>0&&(0,Pt.jsx)("div",{role:"separator",className:"yst-my-1 yst-border-t yst-border-slate-200"}),n.map(e=>(0,Pt.jsx)(Gr,{item:e},e.key))]})]})},Zr=({idSuffix:e="",isAllSelected:t,isIndeterminate:s=!1,onToggleAll:r,onSelectAll:n,onDeselectAll:i,selectedCount:o,totalCount:l,contentTypeLabel:c,smartSelectItems:d=[]})=>{const u=c?c.toLowerCase():(0,At.__)("items","wordpress-seo"),h=(0,a.useRef)(null);return(0,a.useEffect)(()=>{h.current&&(h.current.indeterminate=s)},[s]),(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-4",children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-4","data-tour-id":"selection-toolbar",children:[(0,Pt.jsx)(Et.Checkbox,{ref:h,id:`bulk-editor-select-all${e}`,name:`bulk-editor-select-all${e}`,value:"all","aria-label":(0,At.__)("Select all","wordpress-seo"),checked:t,onChange:r}),(0,Pt.jsx)(Kr,{onSelectAll:n,onDeselectAll:i,selectedCount:o,totalCount:l,smartSelectItems:d,id:`yst-bulk-editor-select-menu${e}`})]}),o>0&&(0,Pt.jsx)("span",{className:"yst-font-medium yst-text-slate-800",children:(0,At.sprintf)(/* translators: %1$d expands to the number of selected items, %2$d to the total, %3$s to the content type (e.g. pages). */ /* translators: %1$d expands to the number of selected items, %2$d to the total, %3$s to the content type (e.g. pages). */ (0,At.__)("%1$d of %2$d %3$s selected","wordpress-seo"),o,l,u)})]})},Xr=({contentType:e})=>{const{isPremium:s,isPremiumVersionSupported:r,isAiEnabled:n}=(0,t.useSelect)(e=>{const t=e(rr);return{isPremium:t.selectPreference("isPremium",!1),isPremiumVersionSupported:t.selectPreference("isPremiumVersionSupported",!1),isAiEnabled:t.selectPreference("isAiEnabled",!1)}},[]),[a,,,i,o]=(0,Et.useToggleState)(!1);return!n||r?null:(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(Et.Button,{variant:"ai-secondary",size:"small",className:"yst-bg-white",onClick:i,children:(0,At.__)("Generate SEO titles","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{variant:"ai-secondary",size:"small",className:"yst-bg-white",onClick:i,children:(0,At.__)("Generate meta descriptions","wordpress-seo")}),!s&&(0,Pt.jsx)(Vr,{isOpen:a,onClose:o,contentType:e}),s&&!r&&(0,Pt.jsx)(Wr,{isOpen:a,onClose:o})]})},Qr=({editCount:e,onApplyAll:t,onDiscardAll:s,isApplying:r=!1})=>{const n=(0,a.useId)(),i=(0,Et.useSvgAria)();return(0,Pt.jsxs)("div",{className:"yst-grow yst-flex yst-justify-end yst-items-center yst-gap-4",children:[(0,Pt.jsx)("span",{id:n,className:"yst-text-sm yst-font-medium yst-text-slate-800",children:(0,At.sprintf)(/* translators: %d expands to the number of rows with unsaved changes. */ /* translators: %d expands to the number of rows with unsaved changes. */ (0,At._n)("%d row with unsaved changes","%d rows with unsaved changes",e,"wordpress-seo"),e)}),(0,Pt.jsxs)("div",{className:"yst-flex yst-gap-2",children:[(0,Pt.jsxs)(Et.Button,{variant:"secondary",size:"small",className:"yst-gap-1.5",onClick:t,disabled:r,"aria-describedby":n,children:[(0,Pt.jsx)(Nr(),{className:"yst-h-4 yst-w-4 yst-text-green-500",...i}),(0,At.__)("Save edits","wordpress-seo")]}),(0,Pt.jsxs)(Et.Button,{variant:"secondary",size:"small",className:"yst-gap-1.5",onClick:s,disabled:r,"aria-describedby":n,children:[(0,Pt.jsx)(Ir(),{className:"yst-h-4 yst-w-4 yst-text-red-500",...i}),(0,At.__)("Cancel edits","wordpress-seo")]})]})]})},en=({onDismiss:e})=>(0,Pt.jsx)(Br,{variant:"error",role:"alert",onDismiss:e,children:(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-1",children:[(0,Pt.jsx)("span",{className:"yst-block yst-font-medium",children:(0,At.__)("Couldn't save your edits.","wordpress-seo")}),(0,Pt.jsx)("span",{className:"yst-font-normal",children:(0,At.__)("Something went wrong. Please try again.","wordpress-seo")})]})}),tn=({preselectedTotal:t=0,onDismissPreselection:s,hasExcludedPreselected:r=!1,onDismissExclusion:n,hasSaveError:a,onDismissSaveError:i})=>(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)($r,{total:t,onDismiss:s}),(0,Pt.jsx)(Ur,{hasExclusions:r,onDismiss:n}),a&&(0,Pt.jsx)(en,{onDismiss:i}),(0,Pt.jsx)(e.Slot,{name:"yoast.bulkEditor.bulkNotices"})]}),sn=({isActive:t,selectedIds:s,activeFieldSet:r,contentType:n,hasUnsavedEdits:a,editCount:i,onApplyAll:o,onDiscardAll:l,isApplyingAll:c})=>(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-3 yst-border-y yst-border-slate-200 yst-bg-slate-100 yst-px-4 yst-py-3",children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-gap-3","data-tour-id":"generate-actions",children:[(0,Pt.jsx)(Xr,{contentType:n}),t&&(0,Pt.jsx)(e.Slot,{name:"yoast.bulkEditor.bulkActions",fillProps:{selectedIds:s,activeFieldSet:r,contentType:n,hasUnsavedEdits:a}})]}),t&&a&&(0,Pt.jsx)(Qr,{editCount:i,onApplyAll:o,onDiscardAll:l,isApplying:c})]}),rn=({isActive:e,selectedIds:t,activeFieldSet:s,contentType:r,hasUnsavedEdits:n,editCount:a,onApplyAll:i,onDiscardAll:o,isApplyingAll:l,hasSaveError:c,onDismissSaveError:d,preselectedTotal:u,onDismissPreselection:h,hasExcludedPreselected:p,onDismissExclusion:m})=>(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col",children:[e&&(0,Pt.jsx)(tn,{preselectedTotal:u,onDismissPreselection:h,hasExcludedPreselected:p,onDismissExclusion:m,hasSaveError:c,onDismissSaveError:d}),(0,Pt.jsx)(sn,{isActive:e,selectedIds:t,activeFieldSet:s,contentType:r,hasUnsavedEdits:n,editCount:a,onApplyAll:i,onDiscardAll:o,isApplyingAll:l})]});var nn=s(8843),an=s.n(nn);const on=()=>{const e=(0,t.useSelect)(e=>e(rr).selectStatuses(),[]),s=(0,t.useSelect)(e=>e(rr).selectNeedsImprovement(),[]),r=(0,t.useSelect)(e=>e(rr).selectActiveFieldSet(),[]),n=(0,t.useSelect)(e=>e(rr).selectOverviewIds(),[]),i=(0,t.useSelect)(e=>e(rr).selectIsOverviewFilterActive(),[]),{setStatuses:o,setNeedsImprovement:l,setOverviewFilterActive:c}=(0,t.useDispatch)(rr),[d,u]=(0,a.useState)(!1),h=(0,a.useRef)(null),p=(0,a.useRef)(null),m=(0,Et.useSvgAria)(),f=(0,a.useMemo)(()=>[{value:"publish",label:(0,At.__)("Published","wordpress-seo")},{value:"future",label:(0,At.__)("Scheduled","wordpress-seo")},{value:"pending",label:(0,At.__)("Pending","wordpress-seo")},{value:"draft",label:(0,At.__)("Draft","wordpress-seo")}],[]),y=(0,a.useMemo)(()=>[{value:"overview",label:(0,At.__)("Overview selection","wordpress-seo")}],[]),g=(0,a.useCallback)(e=>c(e.includes("overview")),[c]),v=r===ir,w=(0,a.useMemo)(()=>[{value:lr,label:v?(0,At.__)("Social titles","wordpress-seo"):(0,At.__)("SEO titles","wordpress-seo")},{value:cr,label:v?(0,At.__)("Social descriptions","wordpress-seo"):(0,At.__)("Meta descriptions","wordpress-seo")}],[v]),b=(0,a.useCallback)(()=>u(e=>!e),[]);(0,a.useEffect)(()=>{if(!d)return()=>{};const e=()=>{var e;u(!1),null===(e=p.current)||void 0===e||e.focus()},t=t=>{h.current&&!h.current.contains(t.target)&&e()},s=t=>{"Escape"===t.key&&e()};return document.addEventListener("mousedown",t),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",s)}},[d]);const x=e.length+s.length+(i?1:0);return(0,Pt.jsxs)("div",{ref:h,className:"yst-relative",children:[(0,Pt.jsxs)(Et.Button,{ref:p,variant:"secondary",size:"small",onClick:b,"aria-expanded":d,"aria-haspopup":"dialog",children:[(0,At.__)("Filters","wordpress-seo"),x>0&&(0,Pt.jsx)(Et.Badge,{variant:"plain",size:"small",className:"yst-mx-2 !yst-rounded",children:x}),(0,Pt.jsx)(an(),{className:"yst-h-4 yst-w-4 yst-text-slate-500 "+(x>0?"":"yst-ms-2"),...m})]}),(0,Pt.jsxs)(Et.Popover,{isVisible:d,setIsVisible:u,position:"bottom-left",className:"before:yst-hidden !yst-top-full yst-mt-1 yst-py-0.5 yst-px-0 yst-shadow-lg","aria-label":(0,At.__)("Filters","wordpress-seo"),children:[n.length>0&&(0,Pt.jsx)(Et.CheckboxGroup,{id:"bulk-editor-overview-filter",className:"yst-bulk-editor-filter-group yst-bulk-editor-overview-selection",options:y,values:i?["overview"]:[],onChange:g}),(0,Pt.jsx)(Et.CheckboxGroup,{id:"bulk-editor-status-filter",className:"yst-bulk-editor-filter-group",options:f,values:e,onChange:o}),(0,Pt.jsx)(Et.CheckboxGroup,{id:"bulk-editor-needs-improvement-filter",label:(0,At.__)("Needs improvement","wordpress-seo"),className:"yst-bulk-editor-filter-group yst-bulk-editor-needs-improvement",options:w,values:s,onChange:l})]})]})};var ln,cn;function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},dn.apply(null,arguments)}const un=e=>c.createElement("svg",dn({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},e),ln||(ln=c.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"})),cn||(cn=c.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"}))),hn=({id:e,title:t,content:s,currentStep:r,totalSteps:n,isLastStep:i,onNext:o,onBack:l=null,onSkip:c,position:d="right",className:u=""})=>{const h=(0,Et.useSvgAria)(),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{const e=setTimeout(()=>{var e;return null===(e=p.current)||void 0===e?void 0:e.focus()},300);return()=>clearTimeout(e)},[r]);const m=(0,a.useCallback)(e=>!e&&c(),[c]),f=(0,a.useCallback)(e=>{"Escape"===e.key?(e.preventDefault(),c()):"Tab"===e.key&&(e=>{const t=[...e.currentTarget.querySelectorAll("button, a[href], input, select, textarea, [tabindex]:not([tabindex='-1'])")].filter(e=>!e.disabled);if(0===t.length)return;const s=e.shiftKey?t[0]:t[t.length-1];document.activeElement===s&&(e.preventDefault(),(e.shiftKey?t[t.length-1]:t[0]).focus())})(e)},[c]);return(0,Pt.jsx)(Et.Popover,{id:e,hasBackdrop:!1,role:"dialog","aria-labelledby":`${e}-title`,"aria-describedby":`${e}-content`,isVisible:!0,setIsVisible:m,position:d,className:`yst-bulk-editor-tour-card ${u}`.trim(),onKeyDown:f,children:(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-gap-3 yst-items-center",children:[(0,Pt.jsx)("div",{className:"yst-flex-shrink-0",children:(0,Pt.jsx)(un,{className:"yst-w-5 yst-h-5 yst-fill-primary-500",...h})}),(0,Pt.jsx)("div",{className:"yst-flex-grow",children:(0,Pt.jsx)(Et.Popover.Title,{id:`${e}-title`,as:"h3",style:{textAlign:"start"},children:(0,At.sprintf)(/* translators: %1$d is the step number, %2$s is the step title. */ /* translators: %1$d is the step number, %2$s is the step title. */ (0,At.__)("Step %1$d: %2$s","wordpress-seo"),r,t)})}),(0,Pt.jsx)(Et.Popover.CloseButton,{screenReaderLabel:(0,At.__)("Close the tour","wordpress-seo")})]}),(0,Pt.jsx)(Et.Popover.Content,{id:`${e}-content`,className:"yst-font-normal yst-ms-8 yst-me-5 yst-mt-1",style:{textAlign:"start"},children:s}),(0,Pt.jsxs)("div",{className:"yst-flex yst-gap-3 yst-justify-between yst-items-center yst-mt-3",children:[(0,Pt.jsx)("span",{className:"yst-ms-8 yst-text-slate-500",children:(0,Pt.jsx)("span",{dir:"ltr",children:(0,a.createInterpolateElement)((0,At.sprintf)(/* translators: %1$s is the current step number, %2$s is the total number of steps. */ /* translators: %1$s is the current step number, %2$s is the total number of steps. */ (0,At.__)("<current>%1$s</current> / %2$s","wordpress-seo"),r,n),{current:(0,Pt.jsx)("span",{className:"yst-font-medium yst-text-slate-600"})})})}),(0,Pt.jsxs)("div",{className:"yst-flex yst-gap-3 yst-items-center",children:[l&&(0,Pt.jsx)(Et.Button,{size:"small",variant:"tertiary",onClick:l,children:(0,At.__)("Back","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{size:"small",ref:p,variant:"primary",onClick:o,className:"yst-flex yst-gap-1",children:i?(0,At.__)("Got it!","wordpress-seo"):(0,Pt.jsxs)(Pt.Fragment,{children:[(0,At.__)("Next","wordpress-seo"),(0,Pt.jsx)(Nt(),{className:"yst-h-4 yst-w-4 rtl:yst-rotate-180",...h})]})})]})]})]})})},pn=e=>{const t=parseFloat(getComputedStyle(e).borderTopLeftRadius)||0;return t>0?t:e.firstElementChild&&parseFloat(getComputedStyle(e.firstElementChild).borderTopLeftRadius)||0},mn=e=>null!==e.offsetParent&&e.getBoundingClientRect().width>0,fn=e=>{const t=Math.min(...e.map(e=>e.left)),s=Math.min(...e.map(e=>e.top));return{top:`${s}px`,left:`${t}px`,width:Math.max(...e.map(e=>e.left+e.width))-t+"px",height:Math.max(...e.map(e=>e.top+e.height))-s+"px"}},yn=(e,t,{endSelector:s=null,perChild:r=!1,childSelector:n=null}={})=>{const[i,o]=(0,a.useState)(null),[l,c]=(0,a.useState)(!1),[d,u]=(0,a.useState)(e);return e!==d&&(u(e),c(!1)),(0,a.useEffect)(()=>{if(!t)return;let a=null,i=null;const l=Date.now()+2e3,d=()=>{const t=(u=e,null!==(h=[...document.querySelectorAll(u)].find(e=>null!==e.offsetParent))&&void 0!==h?h:null);var u,h;t?(e=>{e.scrollIntoView({block:"nearest"});let t="";const a=()=>{const a=((e,t,s,r)=>{if(t)return(s?[...e.querySelectorAll(s)]:[...e.children]).filter(mn).map(e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height,rx:pn(e)}});const n=e.getBoundingClientRect(),a=r?e.querySelector(r):null,i=n.top-6,o=a?a.getBoundingClientRect().bottom:n.bottom+6;return[{top:i,left:n.left-6,width:n.width+6+6,height:o-i,rx:8}]})(e,r,n,s);if(0===a.length)return void("none"!==t&&(t="none",o(null)));const i=(e=>{const t=document.querySelector(".yst-tour-spotlight");if(!t)return e;const{left:s,top:r}=t.getBoundingClientRect();return 0===s&&0===r?e:e.map(e=>({...e,left:e.left-s,top:e.top-r}))})(a),l={rects:i,bounds:fn(i),viewport:{width:window.innerWidth,height:window.innerHeight}},c=JSON.stringify(l);c!==t&&(t=c,o(l))};a(),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a);const l=new ResizeObserver(a);l.observe(e);const c=new MutationObserver(a);c.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0});let d=null,u=0;const h=()=>{a(),u+=1,u<40&&(d=requestAnimationFrame(h))};d=requestAnimationFrame(h),i=()=>{null!==d&&cancelAnimationFrame(d),window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a),l.disconnect(),c.disconnect()}})(t):Date.now()<l?a=setTimeout(d,100):c(!0)};return d(),()=>{a&&clearTimeout(a),i&&i(),o(null)}},[e,t,s,r,n]),{spotlight:i,targetMissing:l}},gn="yoast-bulk-editor-tour-spotlight-mask",vn=({onSelectAll:e,onDeselectAll:s,hasSelection:r})=>{const{isSeen:n,isAiEnabled:i}=(0,t.useSelect)(e=>{const t=e(rr);return{isSeen:t.selectIsOptInNotificationSeen(ur),isAiEnabled:t.selectPreference("isAiEnabled",!1)}},[]),{setOptInNotificationSeen:o,hideOptInNotification:l}=(0,t.useDispatch)(rr),c=(0,a.useMemo)(()=>[{id:"bulk-editor-tour-content-type",tourId:"content-type-nav",highlightEndSelector:"[data-tour-highlight-end]",position:"right",title:(0,At.__)("Select your content type","wordpress-seo"),content:(0,At.__)("This will refine the content to what you want to update.","wordpress-seo")},{id:"bulk-editor-tour-appearance",tourId:"appearance-tabs",highlightChildren:!0,position:"right",title:(0,At.__)("Select search or social appearance","wordpress-seo"),content:(0,At.__)("Easily switch between them anytime.","wordpress-seo")},{id:"bulk-editor-tour-multi-select",tourId:"selection-toolbar",highlightChildren:!0,position:"right",title:(0,At.__)("Multi-select","wordpress-seo"),content:(0,At.__)("Choose the rows you want to update. Use the dropdown for additional options.","wordpress-seo")},{id:"bulk-editor-tour-generate",tourId:"generate-actions",highlightChildren:!0,highlightChildrenSelector:"button",position:"right",requiresSelection:!0,title:(0,At.__)("Get SEO-friendly options at scale","wordpress-seo"),content:(0,At.__)("Generate up to 20 results at a time. Great for website refreshes!","wordpress-seo")}].filter(e=>!e.requiresSelection||i),[i]),[d,u]=(0,a.useState)(0),[h,p]=(0,a.useState)(!1),m=(0,a.useRef)(!1),f=!n&&!h,y=c[d],g=d===c.length-1;(0,a.useEffect)(()=>{f&&y.requiresSelection&&!r&&(m.current=!0,e())},[f,y,r,e]);const{spotlight:v,targetMissing:w}=yn(`[data-tour-id="${y.tourId}"]`,f,{endSelector:y.highlightEndSelector,perChild:y.highlightChildren,childSelector:y.highlightChildrenSelector}),b=(0,a.useCallback)(()=>{m.current&&(s(),m.current=!1),p(!0),o(ur),l(ur)},[s,o,l]),x=(0,a.useCallback)(()=>{g?b():u(e=>e+1)},[g,b]),S=(0,a.useCallback)(()=>u(e=>Math.max(0,e-1)),[]);if((0,a.useEffect)(()=>{f&&w&&x()},[f,w,x]),!f||!v)return null;const{rects:k,bounds:_,viewport:E}=v;return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{className:"yst-fixed yst-inset-0 yst-z-[100000]"}),(0,Pt.jsxs)("svg",{className:"yst-tour-spotlight yst-fixed yst-inset-0 yst-z-[100000]",width:E.width,height:E.height,"aria-hidden":"true",children:[(0,Pt.jsx)("defs",{children:(0,Pt.jsxs)("mask",{id:gn,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:E.width,height:E.height,children:[(0,Pt.jsx)("rect",{x:"0",y:"0",width:E.width,height:E.height,fill:"#fff"}),k.map((e,t)=>(0,Pt.jsx)("rect",{x:e.left,y:e.top,width:e.width,height:e.height,rx:e.rx,fill:"#000"},t))]})}),(0,Pt.jsx)("rect",{x:"0",y:"0",width:E.width,height:E.height,fill:"#64748b",fillOpacity:"0.75",mask:`url(#${gn})`})]}),(0,Pt.jsx)("div",{className:"yst-fixed yst-z-[100000]",style:_,children:(0,Pt.jsx)(hn,{id:y.id,title:y.title,content:y.content,position:y.position,currentStep:d+1,totalSteps:c.length,isLastStep:g,onNext:x,onBack:d>0?S:null,onSkip:b})})]})},wn=({total:e,totalPages:s,isPending:r})=>{const n=(0,t.useSelect)(e=>e(rr).selectPage(),[]),{requestSwitch:i}=(0,t.useDispatch)(rr),{matches:o}=(0,Et.useMediaQuery)("(min-width: 640px)"),l=(0,a.useCallback)(e=>i({kind:"page",target:e}),[i]);if(0===e)return null;const c=20*(n-1)+1,d=Math.min(20*n,e);return(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-justify-between",children:[(0,Pt.jsx)("p",{className:"yst-hidden sm:yst-block yst-text-sm yst-text-slate-600",children:(0,a.createInterpolateElement)((0,At.sprintf)(/* translators: %1$s is the first result number, %2$s the last result number, %3$s the total number of results. */ /* translators: %1$s is the first result number, %2$s the last result number, %3$s the total number of results. */ (0,At.__)("Showing %1$s to %2$s of %3$s results","wordpress-seo"),"<from/>","<to/>","<total/>"),{from:(0,Pt.jsx)("span",{className:"yst-font-semibold",children:c}),to:(0,Pt.jsx)("span",{className:"yst-font-semibold",children:d}),total:(0,Pt.jsx)("span",{className:"yst-font-semibold",children:e})})}),(0,Pt.jsx)(Et.Pagination,{className:"max-sm:yst-flex max-sm:yst-w-full max-sm:[&>*]:yst-flex-1 max-sm:[&_button]:yst-justify-center max-sm:[&_button]:!yst-px-1" /* translators: Hidden accessibility label for the pagination navigation landmark. */,"aria-label":(0,At.__)("Results pagination","wordpress-seo"),current:n,total:s,onNavigate:l,maxPageButtons:o?6:5,disabled:r /* translators: Hidden accessibility text. */,screenReaderTextPrevious:(0,At.__)("Previous","wordpress-seo") /* translators: Hidden accessibility text. */,screenReaderTextNext:(0,At.__)("Next","wordpress-seo")})]})},bn=window.yoast.replacementVariableEditor,xn=({isSlotFilled:e,hasExternalPendingChanges:t,hasExternalGeneration:s,item:r})=>e||t||s||!r.editable,Sn={openFields:[],draft:{},savingFields:{}};var kn=s(6650);const En=({value:e,...t})=>{const s=[/<[^>]*>/u.test(e)&&(0,At.__)("Your keyphrase contains HTML tags that will be stripped on save.","wordpress-seo"),191===e.length&&(0,At.__)("You reached the maximum limit of 191 characters.","wordpress-seo"),e.includes(",")&&(0,At.__)("Are you trying to use multiple keyphrases? You should add them separately in the editor.","wordpress-seo")].filter(Boolean),r=s.length>0?{variant:"warning",message:s.map((e,t)=>(0,Pt.jsx)("span",{className:"yst-block",children:e},t))}:null;return(0,Pt.jsx)(Et.TextareaField,{className:"yst-bulk-editor-textarea-field",validation:r,maxLength:191,rows:2,...t,value:e})},jn=({item:t,fieldSetId:s})=>{const r=(e=>{switch(e){case"draft":return(0,At.__)("Draft","wordpress-seo");case"pending":return(0,At.__)("Pending","wordpress-seo");case"future":return(0,At.__)("Scheduled","wordpress-seo");default:return""}})(t.status);return(0,Pt.jsx)(Et.Table.Header,{scope:"row",className:"yst-text-left !yst-text-[13px] !yst-text-slate-800",children:(0,Pt.jsxs)("div",{className:"yst-flex yst-items-start yst-gap-1.5",children:[(0,Pt.jsx)(e.Slot,{name:`yoast.bulkEditor.TableRowIndicator/${s}/${t.id}`,fillProps:{item:t,fieldSetId:s},children:e=>e}),(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col",children:[t.editLink?(0,Pt.jsxs)("a",{href:t.editLink,className:"yst-bulk-editor-title-link",target:"_blank",rel:"noopener noreferrer",children:[t.title,(0,Pt.jsx)("span",{className:"yst-sr-only",children:/* translators: Hidden accessibility text. */ /* translators: Hidden accessibility text. */ (0,At.__)("(Opens in a new browser tab)","wordpress-seo")})]}):(0,Pt.jsx)("span",{children:t.title}),r&&(0,Pt.jsx)("span",{className:"yst-mt-1 yst-font-normal yst-text-slate-500",children:`- ${r}`})]})]})})},Cn=({field:e,itemId:t,itemTitle:s,value:r,isSaving:n,onChange:i,replacementVariables:o,recommendedReplacementVariables:l,fieldSetId:c})=>{const[d,u]=(0,a.useState)(0);(0,a.useEffect)(()=>u("auto"),[]);const h=(0,a.useCallback)(t=>i({key:e.key,value:t}),[i,e.key]),p=(0,a.useCallback)(t=>i({key:e.key,value:t.target.value}),[i,e.key]),m=(0,a.useMemo)(()=>(null!=r&&r.match(/%%\w+%%$/)?`${r} `:r)||"",[r]),f=`bulk-editor-edit-${t}-${c}-${e.key}`,y=(0,At.sprintf)(/* translators: %1$s expands to the field label, %2$s to the content item title. */ /* translators: %1$s expands to the field label, %2$s to the content item title. */ (0,At.__)("%1$s for %2$s","wordpress-seo"),e.label,s);return e.key===or?(0,Pt.jsx)(Et.Table.Cell,{children:(0,Pt.jsx)(kn.A,{easing:"ease-out",duration:100,height:d,animateOpacity:!0,children:(0,Pt.jsx)(En,{id:f,"aria-label":y,value:r,disabled:n,onChange:p,rows:2})})}):(0,Pt.jsx)(Et.Table.Cell,{children:(0,Pt.jsx)(kn.A,{easing:"ease-out",duration:100,height:d,animateOpacity:!0,children:(0,Pt.jsx)(bn.ReplacementVariableEditor,{content:m,onChange:h,type:e.type,isDisabled:n,fieldId:f,replacementVariables:o,recommendedReplacementVariables:l /* translators: %1$s expands to the field label, %2$s to the content item title. */,label:y})})})},Rn=({field:e,item:t,replacementVariables:s,recommendedReplacementVariables:r})=>e.key===or?(0,Pt.jsx)(Et.Table.Cell,{className:"yst-bulk-editor-cell-value",children:t[e.key]},e.key):(0,Pt.jsxs)(Et.Table.Cell,{className:"yst-bulk-editor-cell-value",children:[(0,Pt.jsx)("span",{id:`bulk-editor-preview-${e.key}-${t.id}`,className:"yst-sr-only",children:(0,At.sprintf)(/* translators: %1$s expands to the field label, %2$s to the content item title. */ /* translators: %1$s expands to the field label, %2$s to the content item title. */ (0,At.__)("%1$s for %2$s","wordpress-seo"),e.label,t.title)}),(0,Pt.jsx)(bn.ReplacementVariableEditorStandalone,{content:t[e.key]||t[`${e.key}Fallback`]||"",onChange:l.noop,type:e.type,isDisabled:!0,replacementVariables:s,recommendedReplacementVariables:r,ariaLabelledBy:`bulk-editor-preview-${e.key}-${t.id}`,fieldId:`bulk-editor-${e.key}-${t.id}`})]},e.key),An=({item:s,fields:r,fieldSetId:n,isSelected:i,onToggleRow:o,edit:l,editing:c,hasExternalPendingChanges:d=!1,hasExternalGeneration:u=!1})=>{const{isEditing:h,openFields:p,draft:m,savingFields:f}=(e=>({isEditing:Boolean(e),...null!=e?e:Sn}))(l),{onStartEdit:y,onChangeField:g,onApplyField:v,onApplyRow:w,onCancelEdit:b,onDiscardField:x,onFieldApplied:S,isApplyingAll:k}=c,{replacementVariables:_,recommendedReplacementVariables:E}=(0,t.useSelect)(e=>{const t=e(rr).selectActiveContentTypeName();return{replacementVariables:e(rr).selectReplacementVariablesFor(t,"custom_post_type"),recommendedReplacementVariables:e(rr).selectRecommendedReplacementVariablesFor(t,"custom_post_type")}},[]),j=Object.keys(f).length>0||k,C=[(0,e.__experimentalUseSlotFills)(`${hr}/seoTitle/${s.id}`),(0,e.__experimentalUseSlotFills)(`${hr}/metaDescription/${s.id}`),(0,e.__experimentalUseSlotFills)(`${hr}/socialTitle/${s.id}`),(0,e.__experimentalUseSlotFills)(`${hr}/socialDescription/${s.id}`)].some(e=>(null==e?void 0:e.length)>0),R=(0,a.useCallback)(e=>o(s.id,e.nativeEvent.shiftKey),[o,s.id]),A=(0,a.useCallback)(()=>y(s.id),[y,s.id]),T=(0,a.useCallback)(()=>b(s.id),[b,s.id]),P=(0,a.useCallback)(({key:e,value:t})=>g({id:s.id,key:e,value:t}),[g,s.id]),D=(0,a.useCallback)(()=>w(s.id),[w,s.id]),N=(0,At.sprintf)((0,At.__)("Edit %s","wordpress-seo"),s.title),L=(0,At.sprintf)((0,At.__)("Save %s","wordpress-seo"),s.title),I=(0,At.sprintf)((0,At.__)("Cancel editing %s","wordpress-seo"),s.title);return(0,Pt.jsxs)(Et.Table.Row,{children:[(0,Pt.jsx)(Et.Table.Cell,{children:(0,Pt.jsx)(Et.Checkbox,{id:`bulk-editor-select-${s.id}-${n}`,name:`bulk-editor-select-${s.id}`,value:String(s.id),className:"yst-mt-0.5" /* translators: %s expands to the content item title. */,"aria-label":(0,At.sprintf)((0,At.__)("Select %s","wordpress-seo"),s.title),checked:i,onChange:R,disabled:!s.editable})}),(0,Pt.jsx)(jn,{item:s,fieldSetId:n}),r.map(t=>{var r;return(0,Pt.jsx)(a.Fragment,{children:(0,Pt.jsx)(e.Slot,{name:`${hr}/${t.key}/${s.id}`,fillProps:{field:t,item:s,value:null!==(r=m[t.key])&&void 0!==r?r:"",isSaving:j,onSaveField:()=>v({id:s.id,key:t.key}),onDiscardField:()=>x({id:s.id,key:t.key}),onFieldApplied:e=>S(s.id,t.key,e)},children:e=>{var r;return e.length>0?e:p.includes(t.key)?(0,Pt.jsx)(Cn,{field:t,itemId:s.id,itemTitle:s.title,value:null!==(r=m[t.key])&&void 0!==r?r:"",isSaving:j,fieldSetId:n,onChange:P,replacementVariables:_,recommendedReplacementVariables:E}):(0,Pt.jsx)(Rn,{field:t,item:s,replacementVariables:_,recommendedReplacementVariables:E})}})},t.key)}),(0,Pt.jsx)(Et.Table.Cell,{children:h?(0,Pt.jsxs)("span",{className:"yst-flex yst-flex-col yst-items-end yst-gap-1.5 yst--me-2.5",children:[(0,Pt.jsx)(Et.Button,{variant:"tertiary",size:"small",onClick:D,disabled:j,"aria-label":L,children:(0,At.__)("Save","wordpress-seo")}),(0,Pt.jsx)("span",{"aria-hidden":"true",className:"yst-w-full yst-border-t yst-border-slate-200"}),(0,Pt.jsx)(Et.Button,{variant:"tertiary",size:"small",onClick:T,disabled:j,"aria-label":I,children:(0,At.__)("Cancel","wordpress-seo")})]}):(0,Pt.jsx)("span",{className:"yst-flex yst-justify-end",children:(0,Pt.jsx)(Et.Button,{variant:"tertiary",size:"small",className:"yst--me-2.5",onClick:A,"aria-label":N,disabled:xn({isSlotFilled:C,hasExternalPendingChanges:d,hasExternalGeneration:u,item:s}),children:(0,At.__)("Edit","wordpress-seo")})})})]})},Tn=({columnCount:e})=>(0,Pt.jsx)(Pt.Fragment,{children:Array.from({length:20},(t,s)=>(0,Pt.jsx)(Et.Table.Row,{children:Array.from({length:e},(e,t)=>(0,Pt.jsx)(Et.Table.Cell,{children:(0,Pt.jsx)("span",{"aria-hidden":"true",children:(0,Pt.jsx)(Et.SkeletonLoader,{className:"yst-w-full",children:" "})})},`skeleton-${s}-${t}`))},`skeleton-${s}`))}),Pn=({items:e,fields:t,fieldSetId:s,columnCount:r,selection:n,editing:a,isLoading:i,hasExternalPendingChanges:o=!1,hasExternalGeneration:l=!1})=>{const{selectedIds:c,onToggleRow:d}=n;return i&&0===e.length?(0,Pt.jsx)(Tn,{columnCount:r}):0===e.length?(0,Pt.jsx)(Et.Table.Row,{children:(0,Pt.jsx)(Et.Table.Cell,{colSpan:r,className:"yst-text-center yst-text-slate-500",children:(0,At.__)("No content found.","wordpress-seo")})}):e.map(e=>(0,Pt.jsx)(An,{item:e,fields:t,fieldSetId:s,isSelected:c.includes(e.id),onToggleRow:d,edit:a.editingRows[e.id],editing:a,hasExternalPendingChanges:o,hasExternalGeneration:l},e.id))},Dn=({fields:e,columnCount:t,selectionToolbar:s,bulkActions:r,showBulkActions:n,filters:a})=>(0,Pt.jsxs)(Et.Table.Head,{children:[s&&(0,Pt.jsx)(Et.Table.Row,{children:(0,Pt.jsx)(Et.Table.Cell,{colSpan:t,className:"yst-bg-slate-50 yst-rounded-ss-lg yst-rounded-se-lg !yst-py-3.5",children:(0,Pt.jsxs)("div",{className:"yst-flex yst-items-center yst-justify-between yst-gap-4",children:[s,a]})})}),r&&(0,Pt.jsx)(Et.Table.Row,{"aria-hidden":!n,children:(0,Pt.jsx)(Et.Table.Cell,{colSpan:t,style:{padding:0},children:(0,Pt.jsx)(kn.A,{easing:"ease-in-out",duration:300,height:n?"auto":0,animateOpacity:!0,children:r})})}),(0,Pt.jsxs)(Et.Table.Row,{className:"[&_th]:!yst-text-slate-800 [&_th]:!yst-py-3 [&_th]:!yst-leading-[19px]",children:[(0,Pt.jsx)(Et.Table.Header,{scope:"col",children:(0,Pt.jsx)("span",{className:"yst-sr-only",children:(0,At.__)("Select","wordpress-seo")})}),(0,Pt.jsx)(Et.Table.Header,{scope:"col",children:(0,At.__)("Title","wordpress-seo")}),e.map(e=>(0,Pt.jsx)(Et.Table.Header,{scope:"col",children:e.label},e.key)),(0,Pt.jsx)(Et.Table.Header,{scope:"col",children:(0,Pt.jsx)("span",{className:"yst-flex yst-justify-end",children:(0,At.__)("Actions","wordpress-seo")})})]})]}),Nn=(e,t)=>`yst-table-auto sm:yst-table-fixed yst-w-full [&_thead]:!yst-border-t-0 [&_td]:yst-align-top [&_th]:yst-align-top [&_th]:yst-font-medium [&_tbody_td]:!yst-border-t-slate-100 [&_tbody_th]:!yst-border-t-slate-100 [&_thead_th]:!yst-border-b-slate-200 [&_tr>*:nth-child(2)]:!yst-ps-1.5${t?" [&_tbody_.yst-table-row:last-of-type_.yst-table-cell]:!yst-rounded-none":""} yst-transition-opacity yst-duration-150 ${e?"yst-opacity-60":"yst-opacity-100"}`,Ln=({columnCount:e,children:t})=>t?(0,Pt.jsx)("tfoot",{children:(0,Pt.jsx)(Et.Table.Row,{children:(0,Pt.jsx)(Et.Table.Cell,{colSpan:e,className:"yst-border-t yst-border-slate-200 yst-bg-white yst-rounded-es-lg yst-rounded-ee-lg",children:t})})}):null,In=({items:e,fieldSet:t,selection:s={},editing:r={},isLoading:n=!1,selectionToolbar:a,bulkActions:i,showBulkActions:o=!1,filters:c,footer:d,hasExternalPendingChanges:u,hasExternalGeneration:h})=>{const p=3+t.fields.length,m={selectedIds:[],isAllSelected:!1,onToggleRow:l.noop,onToggleAll:l.noop,...s},f={editingRows:{},onStartEdit:l.noop,onChangeField:l.noop,onApplyField:l.noop,onCancelEdit:l.noop,...r};return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)("div",{role:"status",className:"yst-sr-only",children:n?(0,At.__)("Loading content…","wordpress-seo"):""}),(0,Pt.jsxs)(Et.Table,{"aria-label":t.label,"aria-busy":n,className:Nn(n,Boolean(d)),children:[(0,Pt.jsxs)("colgroup",{children:[(0,Pt.jsx)("col",{className:"sm:yst-w-[38px]"}),(0,Pt.jsx)("col",{}),t.fields.map(e=>(0,Pt.jsx)("col",{className:e.width},e.key)),(0,Pt.jsx)("col",{className:"sm:yst-w-[5%]"})]}),(0,Pt.jsx)(Dn,{fields:t.fields,columnCount:p,selectionToolbar:a,bulkActions:i,showBulkActions:o,filters:c}),(0,Pt.jsx)(Et.Table.Body,{children:(0,Pt.jsx)(Pn,{items:e,fields:t.fields,fieldSetId:t.id,columnCount:p,selection:m,editing:f,isLoading:n,hasExternalPendingChanges:u,hasExternalGeneration:h})}),(0,Pt.jsx)(Ln,{columnCount:p,children:d})]})]})},On=e=>`bulk-editor-tab-${e}`,Mn=e=>`bulk-editor-tabpanel-${e}`,Fn=({tab:e,isActive:t,disabled:s=!1,onChange:r,onKeyDown:n})=>{const i=(0,a.useCallback)(()=>r(e.id),[r,e.id]);return(0,Pt.jsx)(Et.Button,{id:On(e.id),role:"tab",variant:"tertiary","aria-selected":t,"aria-controls":Mn(e.id),tabIndex:t?0:-1,disabled:s,onClick:i,onKeyDown:n,className:Bt()(t?"yst-bg-slate-100 yst-text-slate-800":"yst-text-slate-600 hover:yst-bg-slate-100","hover:yst-font-medium focus:yst-text-slate-800 hover:yst-text-slate-800 hover:yst-bg-slate-100 hover:yst-text-opacity-100 !yst-leading-[19px]"),children:e.label})},Bn=({tabs:e,activeTab:t,disabled:s=!1,onChange:r,label:n})=>{const i=(0,a.useRef)(null),o=(0,a.useCallback)(n=>{var a;if(s)return;const o=e.findIndex(e=>e.id===t),l=!!i.current&&"rtl"===getComputedStyle(i.current).direction,c=((e,t,s,r)=>{var n;const a=(t+1)%s,i=(t-1+s)%s;return null!==(n={ArrowRight:r?i:a,ArrowLeft:r?a:i,Home:0,End:s-1}[e])&&void 0!==n?n:null})(n.key,o,e.length,l);if(null===c)return;n.preventDefault();const d=e[c];r(d.id),null===(a=document.getElementById(On(d.id)))||void 0===a||a.focus()},[e,t,r,s]);return(0,Pt.jsx)("div",{ref:i,role:"tablist","aria-label":n,className:"yst-flex yst-gap-4","data-tour-id":"appearance-tabs",children:e.map(e=>(0,Pt.jsx)(Fn,{tab:e,isActive:e.id===t,disabled:s,onChange:r,onKeyDown:o},e.id))})},Un=({tabId:e,isActive:t,children:s})=>(0,Pt.jsx)("div",{id:Mn(e),role:"tabpanel","aria-labelledby":On(e),hidden:!t,children:s}),$n=({isOpen:e,onSave:t=l.noop,onDiscard:s=l.noop,onClose:r=l.noop,isSaving:n=!1})=>{const i=(0,Et.useSvgAria)(),o=(0,a.useRef)(null);return(0,Pt.jsx)(Et.Modal,{isOpen:e,onClose:r,initialFocus:o,children:(0,Pt.jsxs)(Et.Modal.Panel,{className:"yst-max-w-md",hasCloseButton:!1,children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-items-start yst-gap-4",children:[(0,Pt.jsx)("div",{className:"yst-flex yst-flex-shrink-0 yst-items-center yst-justify-center yst-h-10 yst-w-10 yst-rounded-full yst-bg-red-100",children:(0,Pt.jsx)(Ht(),{className:"yst-h-6 yst-w-6 yst-text-red-600",...i})}),(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-2 yst-max-w-xs",children:[(0,Pt.jsx)(Et.Modal.Title,{className:"yst-text-lg yst-font-medium yst-text-slate-900",children:(0,At.__)("Unsaved changes","wordpress-seo")}),(0,Pt.jsx)(Et.Modal.Description,{className:"yst-text-sm yst-text-slate-600",children:(0,At.__)("If you leave now, any changes you made will be lost. Would you like to save before continuing?","wordpress-seo")})]})]}),(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-2 yst-mt-6",children:[(0,Pt.jsx)(Et.Button,{ref:o,type:"button",variant:"primary",onClick:t,disabled:n,children:(0,At.__)("Save changes","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{type:"button",variant:"secondary",onClick:s,disabled:n,children:(0,At.__)("Continue without saving","wordpress-seo")}),(0,Pt.jsx)(Et.Button,{type:"button",variant:"tertiary",onClick:r,disabled:n,children:(0,At.__)("Cancel","wordpress-seo")})]})]})})};var qn=s(2353),Hn=s.n(qn);const zn="bulk-editor-search",Vn=({contentTypeLabel:e})=>{const{setSearch:s}=(0,t.useDispatch)(rr),[r,n]=(0,a.useState)(""),i=(0,a.useMemo)(()=>(0,l.debounce)(e=>{const t=e.trim();(0===t.length||t.length>=3)&&s(t)},200),[s]);(0,a.useEffect)(()=>()=>i.cancel(),[i]);const o=(0,a.useCallback)(e=>{n(e.target.value),i(e.target.value)},[i]),c=(0,a.useCallback)(e=>{e.preventDefault(),i.cancel(),s(r.trim())},[r,s,i]);let d=(0,At.__)("Search","wordpress-seo"),u=(0,At.__)("Search…","wordpress-seo");return e&&(d=(0,At.sprintf)(/* translators: %s expands to the lowercase content type label, e.g. "pages". */ /* translators: %s expands to the lowercase content type label, e.g. "pages". */ (0,At.__)("Search for %s","wordpress-seo"),e.toLowerCase()),u=`${d}…`),(0,Pt.jsxs)("form",{role:"search",onSubmit:c,className:"yst-w-full sm:yst-w-80",children:[(0,Pt.jsx)("label",{htmlFor:zn,className:"yst-sr-only",children:d}),(0,Pt.jsxs)("div",{className:"yst-flex yst-h-10 yst-items-stretch yst-rounded-md yst-border yst-border-slate-300 yst-bg-white yst-shadow-sm focus-within:yst-border-primary-500 focus-within:yst-ring-1 focus-within:yst-ring-primary-500",children:[(0,Pt.jsxs)("div",{className:"yst-relative yst-flex-1",children:[(0,Pt.jsx)(Hn(),{className:"yst-pointer-events-none yst-absolute yst-top-1/2 yst--translate-y-1/2 yst-start-3 yst-h-5 yst-w-5 yst-text-slate-400","aria-hidden":"true"}),(0,Pt.jsx)("input",{id:zn,type:"search",value:r,onChange:o,placeholder:u,className:"yst-w-full yst-border-0 yst-bg-transparent yst-py-1.5 yst-ps-10 yst-pe-3 yst-text-sm yst-text-slate-800 yst-placeholder-slate-500 focus:yst-outline-none focus:yst-ring-0"})]}),(0,Pt.jsx)(Et.Button,{type:"submit",variant:"tertiary",className:"yst-flex-none yst-rounded-none yst-border-s yst-border-slate-300 yst-px-4 yst-text-slate-700 hover:yst-text-slate-900 focus-visible:yst-outline-none focus-visible:yst-ring-2 focus-visible:yst-ring-inset focus-visible:yst-ring-primary-500",children:(0,At.__)("Search","wordpress-seo")})]})]})},Wn=()=>(0,Pt.jsx)(Et.ScoreIcon,{score:"bad",isEmoji:!1,className:"yst-h-3 yst-w-3"}),Gn=({dataProvider:s,remoteDataProvider:r,contentType:n,contentTypeLabel:i})=>{const o=(0,a.useMemo)(()=>(()=>{const e={key:or,label:(0,At.__)("Focus keyphrase","wordpress-seo"),param:"focus_keyphrase",width:"sm:yst-w-[19%]"};return{[ar]:{id:ar,label:(0,At.__)("Search appearance","wordpress-seo"),endpoint:"update_search",fields:[e,{key:"seoTitle",label:(0,At.__)("SEO title","wordpress-seo"),param:"seo_title",width:"sm:yst-w-[19%]",type:"title"},{key:"metaDescription",label:(0,At.__)("Meta description","wordpress-seo"),param:"meta_description",width:"sm:yst-w-[33%]",type:"description"}]},[ir]:{id:ir,label:(0,At.__)("Social appearance","wordpress-seo"),endpoint:"update_social",fields:[e,{key:"socialTitle",label:(0,At.__)("Social title","wordpress-seo"),param:"social_title",width:"sm:yst-w-[19%]",type:"title"},{key:"socialDescription",label:(0,At.__)("Social description","wordpress-seo"),param:"social_description",width:"sm:yst-w-[33%]",type:"description"}]}}})(),[]),l=(0,a.useMemo)(()=>Object.values(o).map(({id:e,label:t})=>({id:e,label:t})),[o]),{activeFieldSet:c,selectedIds:d,preselectedTotal:u,hasExcludedPreselected:h,isAiEnabled:p,hasExternalPendingChanges:m,hasExternalGeneration:f,pendingSwitch:y}=(0,t.useSelect)(e=>{const t=e(rr);return{activeFieldSet:t.selectActiveFieldSet(),selectedIds:t.selectSelectedIds(),preselectedTotal:t.selectPreselectedTotal(),hasExcludedPreselected:t.selectHasExcludedPreselected(),isAiEnabled:t.selectPreference("isAiEnabled",!1),hasExternalPendingChanges:t.selectHasExternalPendingChanges(),hasExternalGeneration:t.selectHasExternalGeneration(),pendingSwitch:t.selectPendingSwitch()}},[]),{requestSwitch:g,commitSwitch:v,clearPendingSwitch:w,toggleRow:b,selectAll:x,deselectAll:S,dismissPreselectionNotice:k,dismissExclusionNotice:_,selectRange:E}=(0,t.useDispatch)(rr),{data:j=[],total:C=0,totalPages:R=0,isPending:A,updateItem:T}=(({dataProvider:e,remoteDataProvider:s,contentType:r})=>{const[n,i]=(0,a.useState)({data:[],total:0,totalPages:0,error:null,isPending:!0}),o=(0,a.useCallback)((e,t,s)=>{i(r=>({...r,data:r.data.map(r=>r.id===e?{...r,[t]:s}:r)}))},[]),l=(0,a.useRef)(),c=(0,t.useSelect)(e=>e(rr).selectSearch(),[]),d=(0,t.useSelect)(e=>e(rr).selectPage(),[]),u=(0,t.useSelect)(e=>e(rr).selectStatuses(),[]),h=(0,t.useSelect)(e=>e(rr).selectNeedsImprovement(),[]),p=(0,t.useSelect)(e=>e(rr).selectActiveFieldSet(),[]),m=(0,t.useSelect)(e=>e(rr).selectOverviewIds(),[]),f=(0,t.useSelect)(e=>e(rr).selectIsOverviewFilterActive(),[]),{pruneSelection:y}=(0,t.useDispatch)(rr),g=(0,a.useMemo)(()=>{var e;const t=null!==(e=dr[p])&&void 0!==e?e:{};return h.map(e=>t[e]).filter(Boolean)},[h,p]),v=e.getEndpoint("posts");return(0,a.useEffect)(()=>{var e;if(!v)return void i({data:[],total:0,totalPages:0,error:null,isPending:!1});null===(e=l.current)||void 0===e||e.abort();const t=new AbortController;l.current=t,i(e=>({...e,isPending:!0}));const n={content_type:r,per_page:String(20),page:String(d),search:c,status:u,needs_improvement:g};return f&&m.length>0&&(n.include=m.map(String)),s.fetchJson(v,n,{signal:t.signal}).then(e=>{if(l.current===t){const t=(e=>{const{posts:t=[],total:s=0,total_pages:r=0}=null!=e?e:{};return{data:t.map(Pr),total:s,totalPages:r,error:null,isPending:!1}})(e);i(t),f&&m.length>0&&y(t.data.filter(e=>e.editable).map(e=>e.id))}}).catch(e=>{l.current===t&&"AbortError"!==(null==e?void 0:e.name)&&i({data:[],total:0,totalPages:0,error:e,isPending:!1})}),()=>t.abort()},[v,r,s,c,d,u,g,m,f,y]),{...n,updateItem:o}})({dataProvider:s,remoteDataProvider:r,contentType:n}),{editing:P,stopEditing:D}=Tr({dataProvider:s,remoteDataProvider:r,fieldSets:o,activeFieldSet:c,items:j,updateItem:T}),N=Object.keys(P.editingRows).length,L=N>0,I=(0,a.useCallback)(e=>g({kind:"fieldSet",target:e}),[g]),O=(0,a.useCallback)(async()=>{!1===await P.onApplyAll()&&w()},[P,w]),M=(0,a.useCallback)(()=>{D()},[D]),F=(0,a.useCallback)(()=>w(),[w]),B=(0,a.useCallback)(()=>{y&&v(y)},[y,v]);(0,a.useEffect)(()=>{null===y||L||m||B()},[y,L,m,B]);const{isAllSelected:U,isIndeterminate:$,selectedCount:q,totalCount:H,hasSelection:z}=((e,t,s,r)=>{if(e)return{isAllSelected:!1,isIndeterminate:!1,selectedCount:0,totalCount:0,hasSelection:!1};const n=s.filter(e=>e.editable).map(e=>e.id),a=t.length,i=n.length>0&&n.every(e=>t.includes(e));return{isAllSelected:i,isIndeterminate:a>0&&!i,selectedCount:a,totalCount:r,hasSelection:a>0}})(A,d,j,C),V=(0,a.useRef)(null);(0,a.useEffect)(()=>{0===d.length&&(V.current=null)},[d]);const W=(0,a.useCallback)((e,t)=>{const s=j.filter(e=>e.editable).map(e=>e.id);t&&null!==V.current?E({anchorId:V.current,targetId:e,allIds:s}):(V.current=d.includes(e)?null:e,b(e))},[j,d,b,E]),G=(({preselectedTotal:e,hasExcludedPreselected:t})=>e>nr||t)({preselectedTotal:u,hasExcludedPreselected:h}),J=(({hasSelection:e,isAiEnabled:t,hasUnsavedEdits:s,hasExternalPendingChanges:r,hasOverviewNotice:n})=>e&&t||s||r||n)({hasSelection:z,isAiEnabled:p,hasUnsavedEdits:L,hasExternalPendingChanges:m,hasOverviewNotice:G}),Y=(0,a.useCallback)(()=>{A||(V.current=null,x(j.filter(e=>e.editable).map(e=>e.id)))},[A,x,j]),K=(0,a.useCallback)(()=>{V.current=null,S()},[S]),Z=(0,a.useCallback)(()=>z?K():Y(),[z,K,Y]),X=(0,a.useCallback)(e=>{V.current=null,x(e)},[x]),Q=(0,a.useMemo)(()=>(({activeFieldSet:e,items:t,isPending:s,selectAll:r})=>{const n=dr[e];if(!n)return[];const a=e=>{s||r(t.filter(t=>{var s;return t.editable&&(null===(s=t.needsImprovement)||void 0===s?void 0:s[e])}).map(e=>e.id))},i=e===ir;return[{key:"select-title-needs-improvement",label:i?(0,At.__)("Social titles","wordpress-seo"):(0,At.__)("SEO titles","wordpress-seo"),ariaLabel:i?(0,At.__)("Select pages with social titles that need improvement","wordpress-seo"):(0,At.__)("Select pages with SEO titles that need improvement","wordpress-seo"),icon:(0,Pt.jsx)(Wn,{}),onClick:()=>a(n[lr])},{key:"select-description-needs-improvement",label:i?(0,At.__)("Social descriptions","wordpress-seo"):(0,At.__)("Meta descriptions","wordpress-seo"),ariaLabel:i?(0,At.__)("Select pages with social descriptions that need improvement","wordpress-seo"):(0,At.__)("Select pages with meta descriptions that need improvement","wordpress-seo"),icon:(0,Pt.jsx)(Wn,{}),onClick:()=>a(n[cr])}]})({activeFieldSet:c,items:j,isPending:A,selectAll:X}),[c,j,A,X]),ee=(0,a.useMemo)(()=>({selectedIds:d,onToggleRow:W}),[d,W]);return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsxs)("div",{className:"yst-p-8 yst-space-y-6",children:[(0,Pt.jsxs)("div",{className:"yst-flex yst-flex-col yst-gap-4 sm:yst-flex-row sm:yst-items-start sm:yst-justify-between",children:[(0,Pt.jsx)(Bn,{tabs:l,activeTab:c,disabled:f,onChange:I,label:(0,At.__)("Bulk editor views","wordpress-seo")}),(0,Pt.jsx)(Vn,{contentTypeLabel:i},n)]}),l.map(e=>(0,Pt.jsx)(Un,{tabId:e.id,isActive:e.id===c,children:(0,Pt.jsx)(In,{items:j,fieldSet:o[e.id],selection:ee,editing:P,selectionToolbar:(0,Pt.jsx)(Zr,{idSuffix:`-${e.id}`,isAllSelected:U,isIndeterminate:$,onToggleAll:Z,onSelectAll:Y,onDeselectAll:K,selectedCount:q,totalCount:H,contentTypeLabel:i,smartSelectItems:Q}),bulkActions:(0,Pt.jsx)(rn,{isActive:e.id===c,selectedIds:d,activeFieldSet:c,contentType:n,hasUnsavedEdits:L,editCount:N,onApplyAll:P.onApplyAll,onDiscardAll:P.onDiscardAll,isApplyingAll:P.isApplyingAll,hasSaveError:P.hasSaveError,onDismissSaveError:P.dismissSaveError,preselectedTotal:u,onDismissPreselection:k,hasExcludedPreselected:h,onDismissExclusion:_}),showBulkActions:J,filters:(0,Pt.jsx)(on,{}),isLoading:A,hasExternalPendingChanges:m,hasExternalGeneration:f,footer:C>0?(0,Pt.jsx)(wn,{total:C,totalPages:R,isPending:A}):null})},e.id)),(0,Pt.jsx)($n,{isOpen:L&&null!==y,isSaving:P.isApplyingAll,onSave:O,onDiscard:M,onClose:F}),(0,Pt.jsx)(e.Slot,{name:"yoast.bulkEditor.pendingChangesModal",fillProps:{isOpen:null!==y&&!L,onCommit:B,onCancel:F}})]}),(0,Pt.jsx)(vn,{onSelectAll:Y,onDeselectAll:K,hasSelection:z})]})};var Jn=s(5770),Yn=s.n(Jn),Kn=s(3626),Zn=s.n(Kn);const Xn=({href:e,disabled:t=!1,onNavigate:s=l.noop})=>{const r=(0,a.useCallback)(r=>{t?r.preventDefault():s(r,e)},[t,s,e]);return(0,Pt.jsxs)(Et.Link,{href:e,onClick:r,"aria-disabled":t,className:Bt()("yst-flex yst-items-center yst-gap-1.5 yst-rounded-md yst-px-3 yst-py-2 yst-text-sm yst-font-medium yst-no-underline yst-text-slate-800 hover:yst-bg-slate-50 hover:yst-text-slate-900",{"yst-opacity-50 yst-cursor-not-allowed hover:yst-bg-transparent hover:yst-text-slate-800":t}),children:[(0,Pt.jsx)(Zn(),{className:"yst-w-4 yst-h-4 yst-text-slate-400 rtl:yst-rotate-180","aria-hidden":"true"}),(0,At.__)("Back to Tools","wordpress-seo")]})},Qn=["post","page"],ea=({contentType:e,disabled:t,onChange:s,isHighlightEnd:r=!1})=>{const n=(0,a.useCallback)(()=>s(e.id),[s,e.id]);return(0,Pt.jsx)(Et.SidebarNavigation.SubmenuItem,{as:"button",type:"button",pathProp:"value",value:e.id,label:e.label,disabled:t,onClick:n,className:Bt()("yst-w-full",{"yst-opacity-50":t}),...r?{"data-tour-highlight-end":"true"}:{}})},ta=({logoHref:e,isPremium:t,idSuffix:s,disabled:r,onNavigate:n})=>{const i=(0,Et.useSvgAria)(),o=(0,a.useCallback)(t=>{r?t.preventDefault():n(t,e)},[r,n,e]);return(0,Pt.jsx)(Et.Link,{id:`link-bulk-editor-logo${s}`,href:e,onClick:o,"aria-disabled":r,className:Bt()("yst-inline-block yst-rounded-md focus:yst-ring-primary-500",{"yst-opacity-50 yst-cursor-not-allowed":r}),"aria-label":t?"Yoast SEO Premium":"Yoast SEO",children:(0,Pt.jsx)(Zt,{className:"yst-w-40",...i})})},sa=({contentTypes:e,onChange:t,backToToolsUrl:s,disabled:r,onNavigate:n=l.noop,logoHref:a="/wp-admin/",isPremium:i=!1,visibleLimit:o=5,idSuffix:c=""})=>{const d=e.length-o,u=e.slice(0,2).reduce((e,t,s)=>Qn.includes(t.id)?s:e,-1),h=(0,At.sprintf)(/* translators: %d expands to the number of additional content types. */ /* translators: %d expands to the number of additional content types. */ (0,At._n)("Show %d more","Show %d more",d,"wordpress-seo"),d);return(0,Pt.jsxs)("div",{className:"yst-space-y-6",children:[(0,Pt.jsx)(ta,{logoHref:a,isPremium:i,idSuffix:c,disabled:r,onNavigate:n}),(0,Pt.jsx)(Xn,{href:s,disabled:r,onNavigate:n}),(0,Pt.jsx)("div",{"data-tour-id":"content-type-nav",children:(0,Pt.jsx)(Et.SidebarNavigation.MenuItemWithLimiter,{id:`bulk-editor-nav-content-types${c}`,label:(0,At.__)("Bulk editor","wordpress-seo"),icon:Yn(),defaultOpen:!0,limit:o,buttonId:`bulk-editor-nav-more${c}`,showMoreLabel:h,showLessLabel:(0,At.__)("Show less","wordpress-seo"),children:e.map((e,s)=>(0,Pt.jsx)(ea,{contentType:e,disabled:r,onChange:t,isHighlightEnd:s===u},e.id))})})]})},ra=({title:e,description:t=null})=>(0,Pt.jsx)("header",{className:"yst-p-8 yst-border-b yst-border-slate-200",children:(0,Pt.jsxs)("div",{className:"yst-max-w-screen-sm",children:[(0,Pt.jsx)(Et.Title,{children:e}),t&&(0,Pt.jsx)("p",{className:"yst-text-tiny yst-mt-3",children:t})]})}),na=({dataProvider:e,remoteDataProvider:s})=>{var r;const n=(0,t.useSelect)(e=>e(rr).selectActiveContentTypeName(),[]),i=(0,t.useSelect)(e=>e(rr).selectPreference("isPremium",!1),[]),o=(0,t.useSelect)(e=>Object.keys(e(rr).selectEditingRows()).length>0,[]),l=(0,t.useSelect)(e=>e(rr).selectHasExternalGeneration(),[]),{requestSwitch:c}=(0,t.useDispatch)(rr);(0,Et.useBeforeUnload)(o,(0,At.__)("There are unsaved changes on this page. Leaving means that those changes will be lost. Are you sure you want to leave this page?","wordpress-seo"));const d=(0,a.useCallback)((e,t)=>{[e.defaultPrevented,0!==e.button,e.metaKey,e.ctrlKey,e.shiftKey,e.altKey].some(Boolean)||(e.preventDefault(),c({kind:"navigate",target:t}))},[c]),u=e.getContentTypes().map(({name:e,label:t,singularLabel:s})=>({id:e,label:t,singularLabel:s})),h=null!==(r=u.find(({id:e})=>e===n))&&void 0!==r?r:u[0],{id:p,label:m,singularLabel:f}={id:(y=h)?y.id:"",label:y?y.label:"",singularLabel:y?y.singularLabel:""};var y;const g=(0,a.useRef)(p);g.current=p;const v=(0,a.useCallback)(e=>{e!==g.current&&c({kind:"contentType",target:e})},[c]),{title:w,description:b}=(e=>{const t=e?e.label:(0,At.__)("Content","wordpress-seo"),s=t.toLowerCase();return{ /* translators: %s expands to the content type label, e.g. "Pages". */ title:(0,At.sprintf)((0,At.__)("Bulk editor: %s","wordpress-seo"),t),description:(0,At.sprintf)(/* translators: %1$s and %2$s expand to the lowercase content type label, e.g. "pages". */ /* translators: %1$s and %2$s expand to the lowercase content type label, e.g. "pages". */ (0,At.__)("The bulk editor for %1$s is a tool that you can use to quickly make changes to your search and social media appearance for multiple %2$s.","wordpress-seo"),s,s)}})(h),x={contentTypes:u,onChange:v,backToToolsUrl:e.getLink("tools")||"/wp-admin/",disabled:l,onNavigate:d,logoHref:e.getLink("dashboard")||"/wp-admin/",isPremium:i};return(0,Pt.jsxs)(Et.SidebarNavigation,{activePath:p,children:[(0,Pt.jsx)(Et.SidebarNavigation.Mobile,{openButtonId:"button-open-bulk-editor-navigation-mobile",closeButtonId:"button-close-bulk-editor-navigation-mobile",openButtonScreenReaderText:(0,At.__)("Open bulk editor navigation","wordpress-seo"),closeButtonScreenReaderText:(0,At.__)("Close bulk editor navigation","wordpress-seo"),"aria-label":(0,At.__)("Bulk editor navigation","wordpress-seo"),children:(0,Pt.jsx)(sa,{...x,idSuffix:"-mobile"})}),(0,Pt.jsxs)("div",{className:"yst-p-4 min-[783px]:yst-p-8 yst-flex yst-items-start yst-gap-6",children:[(0,Pt.jsx)("aside",{className:"yst-w-56 yst-shrink-0 yst-hidden min-[783px]:yst-block",children:(0,Pt.jsx)(Et.SidebarNavigation.Sidebar,{"aria-label":(0,At.__)("Bulk editor menu","wordpress-seo"),children:(0,Pt.jsx)(sa,{...x})})}),(0,Pt.jsx)("div",{className:"yst-grow yst-max-w-page yst-min-w-0 yst-mb-8",children:(0,Pt.jsxs)(Et.Paper,{as:"main",children:[(0,Pt.jsx)(ra,{title:w,description:b}),(0,Pt.jsx)(Gn,{dataProvider:e,remoteDataProvider:s,contentType:p,contentTypeLabel:m,contentTypeSingularLabel:f})]})})]})]})};function aa(e,t){return e.get(function(e,t,s){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:s;throw new TypeError("Private element is not present on this object")}(e,t))}function ia(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,aa(t,e))}function oa(e,t,s){return function(e,t,s){if(t.set)t.set.call(e,s);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=s}}(e,aa(t,e),s),s}function la(e,t,s){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,s)}var ca=new WeakMap,da=new WeakMap,ua=new WeakMap;class ha{constructor({contentTypes:e=[],endpoints:t={},links:s={}}={}){la(this,ca,{writable:!0,value:void 0}),la(this,da,{writable:!0,value:void 0}),la(this,ua,{writable:!0,value:void 0}),oa(this,ca,e),oa(this,da,t),oa(this,ua,s)}getContentTypes(){return ia(this,ca)}getEndpoint(e){return ia(this,da)[e]||""}getEndpoints(){return ia(this,da)}getLink(e){return ia(this,ua)[e]||""}getLinks(){return ia(this,ua)}}const pa=(0,ds.createSlice)({name:"activeContentType",initialState:"",reducers:{setActiveContentType:(e,{payload:t})=>t}}),ma={selectActiveContentTypeName:e=>(0,l.get)(e,"activeContentType","")},fa=pa.actions,ya=pa.reducer,ga=[ar,ir],va=()=>ar,wa=(0,ds.createSlice)({name:"activeFieldSet",initialState:va(),reducers:{setActiveFieldSet:(e,{payload:t})=>ga.includes(t)?t:e}}),ba={selectActiveFieldSet:e=>(0,l.get)(e,"activeFieldSet",ar)},xa=wa.actions,Sa=wa.reducer,ka=(0,ds.createSlice)({name:"edits",initialState:{rows:{}},reducers:{startEdit:(e,{payload:t})=>{e.rows[t.id]={openFields:Object.keys(t.draft),draft:{...t.draft},savingFields:{}}},updateDraftField:(e,{payload:t})=>{const s=e.rows[t.id];s&&(s.draft[t.key]=t.value)},setSavingField:(e,{payload:t})=>{const s=e.rows[t.id];s&&(t.isSaving?s.savingFields[t.key]=!0:delete s.savingFields[t.key])},closeField:(e,{payload:t})=>{const s=e.rows[t.id];s&&(s.openFields=s.openFields.filter(e=>e!==t.key),delete s.draft[t.key],delete s.savingFields[t.key],0===s.openFields.length&&delete e.rows[t.id])},discardEdit:(e,{payload:t})=>{delete e.rows[t.id]},stopEdit:()=>({rows:{}})}}),_a={selectEditingRows:e=>(0,l.get)(e,"edits.rows",{})},Ea=ka.actions,ja=ka.reducer,Ca=(0,ds.createSlice)({name:"externalPendingChanges",initialState:!1,reducers:{setHasExternalPendingChanges:(e,{payload:t})=>Boolean(t)}}),Ra={selectHasExternalPendingChanges:e=>(0,l.get)(e,"externalPendingChanges",!1)},Aa=Ca.actions,Ta=Ca.reducer,Pa=(0,ds.createSlice)({name:"externalGeneration",initialState:!1,reducers:{setHasExternalGeneration:(e,{payload:t})=>Boolean(t)}}),Da={selectHasExternalGeneration:e=>(0,l.get)(e,"externalGeneration",!1)},Na=Pa.actions,La=Pa.reducer,Ia=(0,ds.createSlice)({name:"pendingSwitch",initialState:null,reducers:{setPendingSwitch:(e,{payload:t})=>t,clearPendingSwitch:()=>null}}),Oa={selectPendingSwitch:e=>(0,l.get)(e,"pendingSwitch",null)},Ma={...Ia.actions,requestSwitch:({kind:e,target:t})=>({select:s,dispatch:r})=>{const n={contentType:s.selectActiveContentTypeName,fieldSet:s.selectActiveFieldSet,page:s.selectPage}[e];if(n){if(t===n())return;if(s.selectHasExternalGeneration())return}Object.keys(s.selectEditingRows()).length>0||s.selectHasExternalPendingChanges()?r.setPendingSwitch({kind:e,target:t}):r.commitSwitch({kind:e,target:t})},commitSwitch:({kind:e,target:t})=>({dispatch:s})=>"navigate"===e?(s.clearPendingSwitch(),void(window.location.href=t)):"page"===e?(s.setPage(t),void s.clearPendingSwitch()):("contentType"===e?(s.setActiveContentType(t),s.stopEdit()):s.setActiveFieldSet(t),void s.clearPendingSwitch())},Fa=Ia.reducer,Ba=()=>({...(0,l.get)(window,"wpseoBulkEditorData.preferences",{})}),Ua=(0,ds.createSlice)({name:"preferences",initialState:Ba(),reducers:{}}),$a={selectPreference:(e,t,s={})=>(0,l.get)(e,`preferences.${t}`,s),selectPreferences:e=>(0,l.get)(e,"preferences",{})},qa=Ua.actions,Ha=Ua.reducer,za=(0,ds.createSlice)({name:"query",initialState:{search:"",page:1,statuses:[],needsImprovement:[],overviewIds:[],isOverviewFilterActive:!1},reducers:{setSearch:(e,{payload:t})=>{e.search=t,e.page=1},setPage:(e,{payload:t})=>{e.page=t},setStatuses:(e,{payload:t})=>{e.statuses=t,e.page=1},setNeedsImprovement:(e,{payload:t})=>{e.needsImprovement=t,e.page=1},setOverviewFilterActive:(e,{payload:t})=>{e.isOverviewFilterActive=Boolean(t),e.page=1}},extraReducers:e=>{e.addCase(fa.setActiveContentType,()=>({search:"",page:1,statuses:[],needsImprovement:[],overviewIds:[],isOverviewFilterActive:!1})),e.addCase(xa.setActiveFieldSet,e=>{e.needsImprovement.length>0&&(e.needsImprovement=[],e.page=1)})}}),Va={selectSearch:e=>(0,l.get)(e,"query.search",""),selectPage:e=>(0,l.get)(e,"query.page",1),selectStatuses:e=>(0,l.get)(e,"query.statuses",[]),selectNeedsImprovement:e=>(0,l.get)(e,"query.needsImprovement",[]),selectOverviewIds:e=>(0,l.get)(e,"query.overviewIds",[]),selectIsOverviewFilterActive:e=>(0,l.get)(e,"query.isOverviewFilterActive",!1),selectQuery:e=>(0,l.get)(e,"query",{search:"",page:1,statuses:[],needsImprovement:[],overviewIds:[],isOverviewFilterActive:!1})},Wa=za.actions,Ga=za.reducer,Ja=(0,ds.createSlice)({name:"selection",initialState:{selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1},reducers:{toggleRow:(e,{payload:t})=>{e.selectedIds.includes(t)?e.selectedIds=e.selectedIds.filter(e=>e!==t):e.selectedIds.push(t)},selectAll:(e,{payload:t})=>{e.selectedIds=[...t],e.preselectedTotal=0,e.hasExcludedPreselected=!1},deselectAll:()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1}),pruneSelection:(e,{payload:t})=>{const s=e.selectedIds.filter(e=>t.includes(e));s.length<e.selectedIds.length&&(e.hasExcludedPreselected=!0),e.selectedIds=s},dismissPreselectionNotice:e=>{e.preselectedTotal=0},dismissExclusionNotice:e=>{e.hasExcludedPreselected=!1},selectRange:(e,{payload:{anchorId:t,targetId:s,allIds:r}})=>{const n=r.indexOf(t),a=r.indexOf(s);if(-1===n||-1===a)return;const[i,o]=n<=a?[n,a]:[a,n],l=r.slice(i,o+1),c=new Set(e.selectedIds);l.forEach(e=>c.add(e)),e.selectedIds=[...c]}},extraReducers:e=>{e.addCase(Wa.setStatuses,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(Wa.setSearch,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(Wa.setNeedsImprovement,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(Wa.setPage,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(Wa.setOverviewFilterActive,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(fa.setActiveContentType,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1})),e.addCase(xa.setActiveFieldSet,()=>({selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1}))}}),Ya={selectSelectedIds:e=>(0,l.get)(e,"selection.selectedIds",[]),selectPreselectedTotal:e=>(0,l.get)(e,"selection.preselectedTotal",0),selectHasExcludedPreselected:e=>(0,l.get)(e,"selection.hasExcludedPreselected",!1)},Ka=Ja.actions,Za=Ja.reducer;window.yoast=window.yoast||{},window.yoast.bulkEditor=window.yoast.bulkEditor||{},window.yoast.bulkEditor.components={...window.yoast.bulkEditor.components,UpsellModal:Vr,GenericAlert:ts},window.yoast.bulkEditor.hooks={...window.yoast.bulkEditor.hooks,useAiUpsell:zr,useActionBarFocusReturn:Fr},window.yoast.bulkEditor.helpers={...window.yoast.bulkEditor.helpers,preparePromptContent:async(e,{maxTokens:t=300}={})=>{const{contentLocale:s,shortcodes:r}={contentLocale:(0,l.get)(window,["wpseoBulkEditorData","analysis","contentLocale"],"en_US"),shortcodes:(0,l.get)(window,["wpseoBulkEditorData","analysis","shortcodes"],[])},n=await wr(s),a=new sr.Paper(String(null!=e?e:"").slice(0,2e4),{locale:s,shortcodes:r});return(0,sr.ensureTree)(a,n),n.setPaper(a),((e,t)=>{let s="",r=0;for(const a of Array.isArray(e)?e:[]){var n;const e=cs(null!==(n=a.sentences)&&void 0!==n?n:[],r,t);if(s+=e.text,r=e.tokenCount,e.exceeded)break;s+=" ",r+=1}return s.trimEnd()||"."})(n.getResearch("getParagraphs"),t)},getVisibleContentLength:e=>sr.languageProcessing.sanitizeString(e||"").length},window.yoast.bulkEditor.constants={...window.yoast.bulkEditor.constants,MAX_TOKENS_DEFAULT:300,MAX_TOKENS_IRREGULAR:150},n()(()=>{var s;const r=document.getElementById("yoast-seo-bulk-editor");if(!r)return;const n=(0,l.get)(window,"wpseoBulkEditorData.myyoastConnection",null),c=(0,l.get)(window,"wpseoBulkEditorData.replacementVariables",{}),d=(0,l.get)(window,"wpseoBulkEditorData.contentTypes",[]),u=((e={})=>{const t=(Array.isArray(e.postIds)?e.postIds:[]).map(Number).filter(e=>Number.isInteger(e)&&e>0).slice(0,nr);return{activeContentType:"string"==typeof e.contentType?e.contentType:"",selection:{selectedIds:t,preselectedTotal:t.length>0?Math.max(Number(e.selectedCount)||0,t.length):0},query:{overviewIds:t,isOverviewFilterActive:t.length>0}}})((0,l.get)(window,"wpseoBulkEditorData.initialSelection",{}));var h;(({initialState:e={}}={})=>{(0,t.register)((({initialState:e})=>(0,t.createReduxStore)(rr,{actions:{...Ds,...qa,...ks,...xa,...fa,...Wa,...Ka,...Ea,...Aa,...Na,...Ma,...Ws,...Fs},selectors:{...Ps,...$a,...Ss,...ba,...ma,...Va,...Ya,..._a,...Ra,...Da,...Oa,...Vs,...Ms},initialState:(0,l.merge)({},{[Rs]:Ts(),preferences:Ba(),activeFieldSet:va(),activeContentType:"",query:{search:"",page:1,statuses:[],needsImprovement:[],overviewIds:[],isOverviewFilterActive:!1},selection:{selectedIds:[],preselectedTotal:0,hasExcludedPreselected:!1},edits:{rows:{}},externalPendingChanges:!1,externalGeneration:!1,pendingSwitch:null,[$s]:zs(),[Ls]:Os()},e),reducer:(0,t.combineReducers)({[Rs]:Ns,preferences:Ha,replacementVariables:_s,activeFieldSet:Sa,activeContentType:ya,query:Ga,selection:Za,edits:ja,externalPendingChanges:Ta,externalGeneration:La,pendingSwitch:Fa,[$s]:Js,[Ls]:Bs}),controls:{...Gs}}))({initialState:e}))})({initialState:{[Rs]:(0,l.get)(window,"wpseoBulkEditorData.linkParams",{}),[Ls]:(h=n,{isAvailable:Boolean(h)&&(0,l.get)(h,"isProvisioned",!1),canConnect:(0,l.get)(h,"canConnect",!1),connectUrl:(0,l.get)(h,"connectUrl",null),learnMoreUrl:(0,l.get)(h,"learnMoreUrl","")}),[ms]:fs(c),...u,activeContentType:u.activeContentType||(null===(s=d[0])||void 0===s?void 0:s.name)||"",[$s]:{seen:(0,l.get)(window,"wpseoBulkEditorData.optInNotificationSeen",{})}}}),(()=>{const e=document.getElementById("wpcontent"),t=document.getElementById("adminmenuwrap");e&&t&&(e.style.minHeight=`${t.offsetHeight}px`)})();const p=(0,t.select)(rr).selectPreference("isRtl",!1),m=(0,l.get)(window,"wpseoBulkEditorData.nonce",""),y=new ha({contentTypes:(0,l.get)(window,"wpseoBulkEditorData.contentTypes",[]),endpoints:(0,l.get)(window,"wpseoBulkEditorData.endpoints",{}),links:(0,l.get)(window,"wpseoBulkEditorData.links",{})}),x=new o.RemoteDataProvider({headers:{"X-WP-Nonce":m}}),S=(k=lt((0,Pt.jsx)(it,{path:"/",element:(0,Pt.jsx)(na,{dataProvider:y,remoteDataProvider:x})})),ie({basename:void 0,future:dt({},void 0,{v7_prependBasename:!0}),history:(_={window:void 0},void 0===_&&(_={}),b(function(e,t){let{pathname:s="/",search:r="",hash:n=""}=w(e.location.hash.substr(1));return s.startsWith("/")||s.startsWith(".")||(s="/"+s),g("",{pathname:s,search:r,hash:n},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let s=e.document.querySelector("base"),r="";if(s&&s.getAttribute("href")){let t=e.location.href,s=t.indexOf("#");r=-1===s?t:t.slice(0,s)}return r+"#"+("string"==typeof t?t:v(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},_)),hydrationData:ut(),routes:k,mapRouteProperties:ct,unstable_dataStrategy:void 0,unstable_patchRoutesOnNavigation:void 0,window:void 0}).initialize());var k,_;(0,a.createRoot)(r).render((0,Pt.jsx)("div",{dir:p?"rtl":"ltr",className:"yst-root",children:(0,Pt.jsxs)(e.SlotFillProvider,{children:[(0,Pt.jsx)(wt,{router:S}),(0,Pt.jsx)(i.PluginArea,{scope:"yoast-seo-bulk-editor"})]})}))})})()})();