You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
64 KiB
JavaScript

!function(){var t={184:function(t,e){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var a=typeof r;if("string"===a||"number"===a)t.push(r);else if(Array.isArray(r)){if(r.length){var o=i.apply(null,r);o&&t.push(o)}}else if("object"===a){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){t.push(r.toString());continue}for(var u in r)n.call(r,u)&&r[u]&&t.push(u)}}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){"use strict";var t={};r.r(t),r.d(t,{deleteSchema:function(){return $t},refreshResults:function(){return It},resetDirtyMetadata:function(){return D},resetRedirection:function(){return z},saveSchema:function(){return Wt},saveTemplate:function(){return Jt},schemaUpdated:function(){return Kt},setEditingSchemaId:function(){return zt},setEditorTab:function(){return Lt},setTemplateTab:function(){return Gt},setVersion:function(){return Ot},toggleFrontendScore:function(){return w},toggleIsDiviPageSettingsBarActive:function(){return Et},toggleIsDiviRankMathModalActive:function(){return At},toggleLoaded:function(){return Tt},toggleSchemaEditor:function(){return Ft},toggleSchemaTemplates:function(){return Ht},toggleSnippetEditor:function(){return Y},updateAIScore:function(){return Xt},updateAdvancedRobots:function(){return _},updateAnalysisScore:function(){return k},updateAppData:function(){return y},updateAppUi:function(){return g},updateBreadcrumbTitle:function(){return P},updateCanonicalUrl:function(){return S},updateDescription:function(){return N},updateEditSchema:function(){return qt},updateEditSchemas:function(){return Bt},updateFacebookDescription:function(){return O},updateFacebookHasOverlay:function(){return j},updateFacebookImage:function(){return E},updateFacebookImageID:function(){return A},updateFacebookImageOverlay:function(){return M},updateFacebookTitle:function(){return I},updateFeaturedImage:function(){return x},updateHasRedirect:function(){return L},updateHighlightedParagraphs:function(){return jt},updateKeywords:function(){return b},updateKeywordsData:function(){return Qt},updatePermalink:function(){return C},updatePillarContent:function(){return v},updatePostID:function(){return R},updatePrimaryTermID:function(){return F},updateRedirection:function(){return H},updateRedirectionItem:function(){return K},updateRobots:function(){return T},updateSchemas:function(){return Vt},updateSelectedKeyword:function(){return Pt},updateSerpDescription:function(){return X},updateSerpSlug:function(){return Q},updateSerpTitle:function(){return J},updateSnippetPreviewType:function(){return Z},updateSocialTab:function(){return Dt},updateTitle:function(){return U},updateTwitterAppCountry:function(){return _t},updateTwitterAppDescription:function(){return dt},updateTwitterAppGoogleplayID:function(){return wt},updateTwitterAppGoogleplayName:function(){return kt},updateTwitterAppGoogleplayUrl:function(){return St},updateTwitterAppIpadID:function(){return gt},updateTwitterAppIpadName:function(){return bt},updateTwitterAppIpadUrl:function(){return vt},updateTwitterAppIphoneID:function(){return mt},updateTwitterAppIphoneName:function(){return ht},updateTwitterAppIphoneUrl:function(){return yt},updateTwitterAuthor:function(){return it},updateTwitterCardType:function(){return et},updateTwitterDescription:function(){return nt},updateTwitterHasOverlay:function(){return ut},updateTwitterImage:function(){return ot},updateTwitterImageID:function(){return at},updateTwitterImageOverlay:function(){return ct},updateTwitterPlayerSize:function(){return lt},updateTwitterPlayerStreamCtype:function(){return ft},updateTwitterPlayerStreamUrl:function(){return pt},updateTwitterPlayerUrl:function(){return st},updateTwitterTitle:function(){return rt},updateTwitterUseFacebook:function(){return tt}});var e={};r.r(e),r.d(e,{appData:function(){return ae},appUi:function(){return pe}});var n={};r.r(n),r.d(n,{getAdvancedRobots:function(){return be},getAnalysisScore:function(){return me},getAppData:function(){return fe},getBreadcrumbTitle:function(){return we},getCanonicalUrl:function(){return ve},getContentAIScore:function(){return Nr},getDescription:function(){return ze},getDirtyMetadata:function(){return de},getEditSchemas:function(){return or},getEditingSchema:function(){return ur},getEditorTab:function(){return sr},getFacebookAuthor:function(){return Re},getFacebookDescription:function(){return Me},getFacebookHasOverlay:function(){return Ne},getFacebookImage:function(){return Ue},getFacebookImageID:function(){return Ce},getFacebookImageOverlay:function(){return xe},getFacebookTitle:function(){return je},getFeaturedImage:function(){return Le},getFeaturedImageHtml:function(){return Ge},getHighlightedParagraphs:function(){return Ae},getKeywords:function(){return he},getKeywordsData:function(){return Ur},getPermalink:function(){return Ke},getPillarContent:function(){return ye},getPostID:function(){return Fe},getPreviewSchema:function(){return cr},getPrimaryTermID:function(){return Be},getRedirectionID:function(){return Ve},getRedirectionItem:function(){return $e},getRedirectionType:function(){return qe},getRedirectionUrl:function(){return We},getRichSnippets:function(){return ke},getRobots:function(){return ge},getSchemas:function(){return ar},getSelectedKeyword:function(){return Te},getSerpDescription:function(){return Ze},getSerpSlug:function(){return Ye},getSerpTitle:function(){return Xe},getShowScoreFrontend:function(){return Se},getSnippetPreviewType:function(){return er},getSocialTab:function(){return Pe},getTemplateTab:function(){return lr},getTitle:function(){return He},getTwitterAppCountry:function(){return Ar},getTwitterAppDescription:function(){return wr},getTwitterAppGoogleplayID:function(){return Ir},getTwitterAppGoogleplayName:function(){return Or},getTwitterAppGoogleplayUrl:function(){return Er},getTwitterAppIpadID:function(){return Tr},getTwitterAppIpadName:function(){return Pr},getTwitterAppIpadUrl:function(){return Dr},getTwitterAppIphoneID:function(){return kr},getTwitterAppIphoneName:function(){return Sr},getTwitterAppIphoneUrl:function(){return _r},getTwitterAuthor:function(){return hr},getTwitterCardType:function(){return fr},getTwitterDescription:function(){return mr},getTwitterHasOverlay:function(){return br},getTwitterImage:function(){return gr},getTwitterImageID:function(){return yr},getTwitterImageOverlay:function(){return vr},getTwitterPlayerSize:function(){return Mr},getTwitterPlayerStream:function(){return Rr},getTwitterPlayerStreamCtype:function(){return Cr},getTwitterPlayerUrl:function(){return jr},getTwitterTitle:function(){return dr},getTwitterUseFacebook:function(){return pr},hasRedirect:function(){return Je},hasSchemaUpdated:function(){return ir},isDiviPageSettingsBarActive:function(){return Oe},isDiviRankMathModalActive:function(){return Ee},isLoaded:function(){return _e},isPro:function(){return Ie},isRefreshing:function(){return De},isSchemaEditorOpen:function(){return rr},isSchemaTemplatesOpen:function(){return nr},isSnippetEditorOpen:function(){return tr}});var i=jQuery,a=r.n(i),o=wp.i18n,u=wp.data,c=wp.element,s=wp.plugins,l=wp.hooks,p=wp.editPost;function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function m(t){var e=function(t,e){if("object"!==f(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===f(e)?e:String(e)}var h=new(function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=null,(r=m(r="map"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"swap",value:function(t,e){var r=this;if(!(t=t||""))return"";var n=new RegExp(/%(([a-z0-9_-]+)\(([^)]*)\)|[^\s]+)%/,"giu");return t.replace(" %page%","").replace("%sep% %sep%","%sep%").replace(n,(function(t){return r.replace(e,t)})).trim()}},{key:"replace",value:function(t,e){var r=e.toLowerCase().slice(1,-1);return["term_description","user_description"].includes(r)?"undefined"!=typeof tinymce&&tinymce.activeEditor&&"rank_math_description_editor"===tinymce.activeEditor.id?tinymce.activeEditor.getContent():a()("#description").val():r.includes("customfield(")?(r=r.replace("customfield(","").replace(")",""))in rankMath.customFields?rankMath.customFields[r]:"":(t=t||this.getMap(),(r="seo_description"===(r="seo_title"===(r=r.includes("(")?r.split("(")[0]:r)?"title":r)?"excerpt":r)in t?t[r]:"")}},{key:"getMap",value:function(){var t=this;return null!==this.map||(this.map={},a().each(rankMath.variables,(function(e,r){e=e.toLowerCase().replace(/%+/g,"").split("(")[0],t.map[e]=r.example}))),this.map}},{key:"setVariable",value:function(t,e){null!==this.map?this.map[t]=e:void 0!==rankMath.variables[t]&&(rankMath.variables[t].example=e)}}])&&d(e.prototype,r),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());function y(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e=(0,l.applyFilters)("rank_math_sanitize_data",e,t,r),null!==n&&(n=(0,l.applyFilters)("rank_math_sanitize_meta_value",n,t,r)),n=null===n?e:n,(0,l.doAction)("rank_math_data_changed",t,e,r),{type:"RANK_MATH_APP_DATA",key:t,value:e,metaKey:r,metaValue:n}}function g(t,e){return(0,l.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function b(t){return h.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),y("keywords",t,"rank_math_focus_keyword")}function v(t){return y("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function w(t){return y("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function k(t){return y("score",t,"rank_math_seo_score")}function S(t){return y("canonicalUrl",t,"rank_math_canonical_url")}function _(t){return y("advancedRobots",t,"rank_math_advanced_robots")}function T(t){return y("robots",t,"rank_math_robots",Object.keys(t))}function P(t){return y("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function D(){return y("dirtyMetadata",{})}function I(t){return y("facebookTitle",t,"rank_math_facebook_title")}function O(t){return y("facebookDescription",t,"rank_math_facebook_description")}function E(t){return y("facebookImage",t,"rank_math_facebook_image")}function A(t){return y("facebookImageID",t,"rank_math_facebook_image_id")}function j(t){return y("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function M(t){return y("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function R(t){return rankMath.objectID=t,y("postID",t)}function C(t){return y("permalink",t,"permalink")}function U(t){return y("title",t,"rank_math_title")}function N(t){return y("description",t,"rank_math_description")}function x(t){return y("featuredImage",t)}function F(t,e){return y("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function H(t,e){return y(t,e)}function K(t){return g("redirectionItem",t)}function z(){return g("redirectionItem",{})}function L(t){return g("hasRedirect",t)}var G=rankMathAnalyzer,B=lodash,V=document.createElement("div");function q(t){return t&&"string"==typeof t&&(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),V.innerHTML=t,t=V.textContent,V.textContent=""),t}var W=function(t,e){return t=(t=G.Helpers.cleanText(t)).replace(/\r?\n|\r/g," "),e?(0,B.truncate)(t,{length:e,separator:" "}):t},$=function(t){if((0,B.isEmpty)(t))return"";t=G.Helpers.stripScript(t),t=G.Helpers.stripStyle(t),t=(0,B.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,B.filter)(G.Helpers.matchParagraphs(t,!0,!0),(function(t){return""!==t.trim()}));if(!e.length)return"";var r=rankMathEditor.getPrimaryKeyword();if(""!==r){var n=(0,B.filter)(e,(function(t){return(0,B.includes)(t.toLowerCase(),r.toLowerCase())}));if(0<n.length)return W(n[0],160)}return W(e[0],160)};function J(t){return t=h.swap(""!==t?t:rankMath.assessor.serpData.titleTemplate),rankMathEditor.refresh("title"),g("serpTitle",q(t))}function Q(t){return t=""!==t?t:rankMathEditor.assessor.dataCollector.getSlug(),rankMathEditor.refresh("permalink"),g("serpSlug",t)}function X(t){return t=h.swap(function(t){var e=rankMathEditor.assessor.dataCollector.getData(),r=e.excerpt,n=$(e.content),i=(0,B.isUndefined)(r)||(0,B.isEmpty)(r)?n:(0,B.unescape)(r);if(h.setVariable("excerpt",i),h.setVariable("seo_description",i),""!==(t=q((0,l.applyFilters)("rankMath/description",t))))return G.Helpers.cleanText(t);if(!(0,B.isUndefined)(r)&&!(0,B.isEmpty)(r))return G.Helpers.cleanText(r);var a=(0,B.unescape)(rankMath.assessor.serpData.descriptionTemplate);return(0,B.isUndefined)(a)||""===a?n:G.Helpers.cleanText(a)}(t)),rankMathEditor.refresh("description"),g("serpDescription",t)}function Y(t){return g("isSnippetEditorOpen",t)}function Z(t){return g("snippetPreviewType",t)}function tt(t){return y("twitterUseFacebook",t,"rank_math_twitter_use_facebook",!0===t?"on":"off")}function et(t){return y("twitterCardType",t,"rank_math_twitter_card_type")}function rt(t){return y("twitterTitle",t,"rank_math_twitter_title")}function nt(t){return y("twitterDescription",t,"rank_math_twitter_description")}function it(t){return y("twitterAuthor",t,"rank_math_twitter_author")}function at(t){return y("twitterImageID",t,"rank_math_twitter_image_id")}function ot(t){return y("twitterImage",t,"rank_math_twitter_image")}function ut(t){return y("twitterHasOverlay",t,"rank_math_twitter_enable_image_overlay",!0===t?"on":"off")}function ct(t){return y("twitterImageOverlay",t,"rank_math_twitter_image_overlay")}function st(t){return y("twitterPlayerUrl",t,"rank_math_twitter_player_url")}function lt(t){return y("twitterPlayerSize",t,"rank_math_twitter_player_size")}function pt(t){return y("twitterPlayerStream",t,"rank_math_twitter_player_stream")}function ft(t){return y("twitterPlayerStreamCtype",t,"rank_math_twitter_player_stream_ctype")}function dt(t){return y("twitterAppDescription",t,"rank_math_twitter_app_description")}function mt(t){return y("twitterAppIphoneID",t,"rank_math_twitter_app_iphone_id")}function ht(t){return y("twitterAppIphoneName",t,"rank_math_twitter_app_iphone_name")}function yt(t){return y("twitterAppIphoneUrl",t,"rank_math_twitter_app_iphone_url")}function gt(t){return y("twitterAppIpadID",t,"rank_math_twitter_app_ipad_id")}function bt(t){return y("twitterAppIpadName",t,"rank_math_twitter_app_ipad_name")}function vt(t){return y("twitterAppIpadUrl",t,"rank_math_twitter_app_ipad_url")}function wt(t){return y("twitterAppGoogleplayID",t,"rank_math_twitter_app_googleplay_id")}function kt(t){return y("twitterAppGoogleplayName",t,"rank_math_twitter_app_googleplay_name")}function St(t){return y("twitterAppGoogleplayUrl",t,"rank_math_twitter_app_googleplay_url")}function _t(t){return y("twitterAppCountry",t,"rank_math_twitter_app_country")}function Tt(t){return g("isLoaded",t)}function Pt(t){return g("selectedKeyword",t)}function Dt(t){return g("socialTab",t)}function It(){return g("refreshResults",Date.now())}function Ot(){return g("isPro",!0)}function Et(t){return g("isDiviPageSettingsBarActive",t)}function At(t){return g("isDiviRankMathModalActive",t)}function jt(t){return g("highlightedParagraphs",t)}var Mt=wp.apiFetch,Rt=r.n(Mt);function Ct(t){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(t)}function Ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ut(Object(r),!0).forEach((function(e){xt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ut(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Ct(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ct(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ft(t){return g("isSchemaEditorOpen",t)}function Ht(t){return g("isSchemaTemplatesOpen",t)}function Kt(t){return g("schemaUpdated",t)}function zt(t){return g("editingSchemaId",t)}function Lt(t){return g("editorTab",t)}function Gt(t){return g("templateTab",t)}function Bt(t){return g("editSchemas",t)}function Vt(t){return y("schemas",t)}function qt(t,e){var r=Nt({},(0,u.select)("rank-math").getEditSchemas());return r[t]=e,g("editSchemas",r)}function Wt(t,e){var r=Nt({},(0,u.select)("rank-math").getSchemas());return r[t]=e,y("schemas",r)}function $t(t){var e=Nt({},(0,u.select)("rank-math").getSchemas());return delete e[t],(0,l.doAction)("rank_math_schema_trash",t),y("schemas",e,"rank_math_delete_"+t,"")}function Jt(t,e,r){return Rt()({method:"POST",path:"rankmath/v1/saveTemplate",data:{schema:t,postId:r}}).then((function(r){e({loading:!1,showNotice:!0,postId:r.id}),setTimeout((function(){e({showNotice:!1}),(0,B.get)(rankMath,"isTemplateScreen",!1)&&(document.title=(0,o.__)("Edit Schema","rank-math"),window.history.pushState(null,"",r.link.replace(/&amp;/g,"&")))}),2e3),rankMath.schemaTemplates.push({schema:t,title:t.metadata.title,type:t["@type"]})})),e({loading:!0}),{type:"DONT_WANT_TO_DO_SOMETHING"}}function Qt(t){return g("keywordsData",t)}function Xt(t){return y("contentAIScore",t,"rank_math_contentai_score")}function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function te(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach((function(e){ee(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ee(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Yt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Yt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var re=rankMath.assessor.serpData,ne=rankMath.assessor.hasRedirection,ie={postID:null,title:re.title?re.title:re.titleTemplate,description:re.description,keywords:re.focusKeywords,pillarContent:re.pillarContent,featuredImage:"",permalink:!1,primaryTerm:re.primaryTerm,robots:re.robots,advancedRobots:re.advancedRobots,canonicalUrl:re.canonicalUrl,breadcrumbTitle:re.breadcrumbTitle,showScoreFrontend:re.showScoreFrontend,redirectionID:ne?(0,B.get)(rankMath.assessor,"redirection.id",""):"",redirectionType:ne?(0,B.get)(rankMath.assessor,"redirection.header_code",""):"",redirectionUrl:ne?(0,B.get)(rankMath.assessor,"redirection.url_to",""):"",facebookTitle:re.facebookTitle,facebookImage:re.facebookImage,facebookImageID:re.facebookImageID,facebookAuthor:re.facebookAuthor,facebookDescription:re.facebookDescription,facebookHasOverlay:re.facebookHasOverlay,facebookImageOverlay:re.facebookImageOverlay,twitterTitle:re.twitterTitle,twitterImage:re.twitterImage,twitterAuthor:re.twitterAuthor,twitterImageID:re.twitterImageID,twitterCardType:re.twitterCardType,twitterUseFacebook:re.twitterUseFacebook,twitterDescription:re.twitterDescription,twitterHasOverlay:re.twitterHasOverlay,twitterImageOverlay:re.twitterImageOverlay,twitterPlayerUrl:re.twitterPlayerUrl,twitterPlayerSize:re.twitterPlayerSize,twitterPlayerStream:re.twitterPlayerStream,twitterPlayerStreamCtype:re.twitterPlayerStreamCtype,twitterAppDescription:re.twitterAppDescription,twitterAppIphoneName:re.twitterAppIphoneName,twitterAppIphoneID:re.twitterAppIphoneID,twitterAppIphoneUrl:re.twitterAppIphoneUrl,twitterAppIpadName:re.twitterAppIpadName,twitterAppIpadID:re.twitterAppIpadID,twitterAppIpadUrl:re.twitterAppIpadUrl,twitterAppGoogleplayName:re.twitterAppGoogleplayName,twitterAppGoogleplayID:re.twitterAppGoogleplayID,twitterAppGoogleplayUrl:re.twitterAppGoogleplayUrl,twitterAppCountry:re.twitterAppCountry,schemas:(0,B.get)(rankMath,"schemas",{}),score:0,contentAIScore:{},dirtyMetadata:{}};function ae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie,e=arguments.length>1?arguments[1]:void 0,r=te({},t.dirtyMetadata);return!1!==e.metaKey&&(r[e.metaKey]=e.metaValue),"RANK_MATH_APP_DATA"===e.type?"dirtyMetadata"===e.key?te(te({},t),{},{dirtyMetadata:e.value}):te(te({},t),{},ee(ee({},e.key,e.value),"dirtyMetadata",r)):t}function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function ue(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ce(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ue(Object(r),!0).forEach((function(e){se(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function se(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==oe(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===oe(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var le={isLoaded:!1,isPro:!1,selectedKeyword:{tag:"",index:0,data:{value:""}},hasRedirect:rankMath.assessor.hasRedirection&&!(0,B.isEmpty)((0,B.get)(rankMath.assessor,"redirection.id",""))&&!(0,B.isEmpty)((0,B.get)(rankMath.assessor,"redirection.url_to","")),serpTitle:"",serpSlug:"",serpDescription:"",isSnippetEditorOpen:!1,snippetPreviewType:"",refreshResults:"",redirectionItem:{},socialTab:"facebook",highlightedParagraphs:[],editorTab:"",templateTab:"",editSchemas:{},editingSchemaId:"",isSchemaEditorOpen:!1,isSchemaTemplatesOpen:!1,schemaUpdated:!1,isDiviRankMathModalActive:!1,isDiviPageSettingsBarActive:!1,keywordsData:(0,B.get)(rankMath,"ca_data",[])};function pe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?ce(ce({},t),{},se({},e.key,e.value)):t}function fe(t){return t.appData}function de(t){return t.appData.dirtyMetadata}function me(t){return t.appData.score}function he(t){return t.appData.keywords}function ye(t){return t.appData.pillarContent}function ge(t){return t.appData.robots}function be(t){return t.appData.advancedRobots}function ve(t){return t.appData.canonicalUrl}function we(t){return t.appData.breadcrumbTitle}function ke(t){return"todo"}function Se(t){return t.appData.showScoreFrontend}function _e(t){return t.appUi.isLoaded}function Te(t){return t.appUi.selectedKeyword}function Pe(t){return t.appUi.socialTab}function De(t){return t.appUi.refreshResults}function Ie(t){return t.appUi.isPro}function Oe(t){return t.appUi.isDiviPageSettingsBarActive}function Ee(t){return t.appUi.isDiviRankMathModalActive}function Ae(t){return t.appUi.highlightedParagraphs}function je(t){return t.appData.facebookTitle}function Me(t){return t.appData.facebookDescription}function Re(t){return t.appData.facebookAuthor}function Ce(t){return t.appData.facebookImageID}function Ue(t){return t.appData.facebookImage}function Ne(t){return t.appData.facebookHasOverlay}function xe(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function Fe(t){return t.appData.postID}function He(t){return t.appData.title}function Ke(t){return t.appData.permalink}function ze(t){return t.appData.description}function Le(t){return t.appData.featuredImage}function Ge(t){var e=t.appData.featuredImage;return'<img src="'.concat(e.source_url,'" alt="').concat(e.alt_text,'" >')}function Be(t){return t.appData.primaryTerm}function Ve(t){return t.appData.redirectionID}function qe(t){return t.appData.redirectionType}function We(t){return t.appData.redirectionUrl}function $e(t){return t.appUi.redirectionItem}function Je(t){return t.appUi.hasRedirect}var Qe=wp.url;function Xe(t){return q(t.appUi.serpTitle)}function Ye(t){return(0,Qe.safeDecodeURIComponent)(t.appUi.serpSlug)}function Ze(t){return t.appUi.serpDescription}function tr(t){return t.appUi.isSnippetEditorOpen}function er(t){return t.appUi.snippetPreviewType}function rr(t){return t.appUi.isSchemaEditorOpen}function nr(t){return t.appUi.isSchemaTemplatesOpen}function ir(t){return t.appUi.schemaUpdated}function ar(t){return t.appData.schemas}function or(t){return t.appUi.editSchemas}function ur(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function cr(t){return t.appData.schemas[t.appUi.editingSchemaId]}function sr(t){return t.appUi.editorTab}function lr(t){return t.appUi.templateTab}function pr(t){return t.appData.twitterUseFacebook}function fr(t){return t.appData.twitterCardType}function dr(t){return t.appData.twitterTitle}function mr(t){return t.appData.twitterDescription}function hr(t){return t.appData.twitterAuthor}function yr(t){return t.appData.twitterImageID}function gr(t){return t.appData.twitterImage}function br(t){return t.appData.twitterHasOverlay}function vr(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function wr(t){return t.appData.twitterAppDescription}function kr(t){return t.appData.twitterAppIphoneID}function Sr(t){return t.appData.twitterAppIphoneName}function _r(t){return t.appData.twitterAppIphoneUrl}function Tr(t){return t.appData.twitterAppIpadID}function Pr(t){return t.appData.twitterAppIpadName}function Dr(t){return t.appData.twitterAppIpadUrl}function Ir(t){return t.appData.twitterAppGoogleplayID}function Or(t){return t.appData.twitterAppGoogleplayName}function Er(t){return t.appData.twitterAppGoogleplayUrl}function Ar(t){return t.appData.twitterAppCountry}function jr(t){return t.appData.twitterPlayerUrl}function Mr(t){return t.appData.twitterPlayerSize}function Rr(t){return t.appData.twitterPlayerStream}function Cr(t){return t.appData.twitterPlayerStreamCtype}function Ur(t){return t.appUi.keywordsData}function Nr(t){return t.appData.contentAIScore}var xr=(0,u.registerStore)("rank-math",{reducer:(0,u.combineReducers)(e),selectors:n,actions:t});function Fr(){return xr}var Hr={"&amp;":"&","&quot;":'"',"&#39;":"'"},Kr=/&(?:amp|quot|#(0+)?39);/g,zr=RegExp(Kr.source);var Lr=function(t){return t&&zr.test(t)?t.replace(Kr,(function(t){return Hr[t]||"'"})):t||""};function Gr(t){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(t)}function Br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==Gr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Gr(a)?a:String(a)),n)}var i,a}var Vr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.analyzer=new G.Analyzer({i18n:o,analyses:rankMath.assessor.researchesTests}),this.dataCollector=e,this.registerRefresh(),this.updateKeywordResult=this.updateKeywordResult.bind(this),this.sanitizeData=this.sanitizeData.bind(this),(0,l.addAction)("rankMath_analysis_keywordUsage_updated","rank-math",this.updateKeywordResult),(0,l.addFilter)("rank_math_sanitize_meta_value","rank-math",this.sanitizeData),(0,l.addFilter)("rank_math_sanitize_data","rank-math",this.sanitizeData)}var e,r,n;return e=t,r=[{key:"updateKeywordResult",value:function(t,e){rankMathEditor.resultManager.update(t,{keywordNotUsed:e}),t===this.getSelectedKeyword().toLowerCase()&&(0,u.dispatch)("rank-math").refreshResults()}},{key:"sanitizeData",value:function(t,e){return"schemas"===e||(0,B.isObject)(t)||(0,B.isEmpty)(t)?t:G.Helpers.sanitizeAppData(t)}},{key:"getPaper",value:function(t,e){var r=Fr().getState(),n=this.dataCollector.getData(),i=new G.Paper("",{locale:rankMath.localeFull});return i.setTitle(r.appUi.serpTitle),i.setPermalink(n.slug),i.setDescription(r.appUi.serpDescription),i.setUrl(n.permalink),i.setText(Lr((0,l.applyFilters)("rank_math_content",n.content))),i.setKeyword(t),i.setKeywords(e),i.setSchema(r.appData.schemas),(0,B.isUndefined)(n.featuredImage)||(i.setThumbnail(n.featuredImage.source_url),i.setThumbnailAltText(G.Helpers.removeDiacritics(n.featuredImage.alt_text))),(0,B.isEmpty)(r.appData.contentAIScore)&&(0,B.isEmpty)(rankMath.ca_keyword)||i.setContentAI(!0),i}},{key:"registerRefresh",value:function(){var t=this;this.refresh=(0,B.debounce)((function(e){var r=Fr().getState();if(!1!==r.appUi.isLoaded){var n=r.appData.keywords.split(","),i=[];(0,l.doAction)("rank_math_"+e+"_refresh"),n.map((function(e,r){var a=t.getPaper(G.Helpers.removeDiacritics(e),n),o=0===r?rankMath.assessor.researchesTests:t.filterTests(t.getSecondaryKeywordTests());i.push(t.analyzer.analyzeSome(o,a).then((function(t){rankMathEditor.resultManager.update(a.getKeyword(),t,0===r),0===r&&(0,u.dispatch)("rank-math").updateAnalysisScore(rankMathEditor.resultManager.getScore(a.getKeyword()))}))),Promise.all(i).then((function(){(0,u.dispatch)("rank-math").refreshResults()}))}))}}),500)}},{key:"getSecondaryKeywordTests",value:function(){return["keywordInContent","lengthContent","keywordInSubheadings","keywordDensity","lengthPermalink","linksHasExternals","linksNotAllExternals","linksHasInternal","titleSentiment","titleHasPowerWords","titleHasNumber","contentHasTOC","contentHasShortParagraphs","contentHasAssets"]}},{key:"getPrimaryKeyword",value:function(){var t=Fr().getState().appData.keywords;return G.Helpers.removeDiacritics(t.split(",")[0])}},{key:"getSelectedKeyword",value:function(){var t=Fr().getState(),e=""!==t.appUi.selectedKeyword.data.value?t.appUi.selectedKeyword.data.value:t.appData.keywords.split(",")[0];return G.Helpers.removeDiacritics(e)}},{key:"getResearch",value:function(t){return this.analyzer.researcher.getResearch(t)}},{key:"filterTests",value:function(t){return(0,B.intersection)(t,rankMath.assessor.researchesTests)}}],r&&Br(e.prototype,r),n&&Br(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),qr=Vr;function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function $r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==Wr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Wr(a)?a:String(a)),n)}var i,a}var Jr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),rankMath.is_front_page&&((0,l.addFilter)("rankMath_analysis_contentLength","rank-math",this.contentLength),(0,l.addFilter)("rankMath_analysis_contentLength_boundaries","rank-math",this.contentLengthBoundary))}var e,r,n;return e=t,(r=[{key:"contentLength",value:function(t){return{hasScore:t.hasScore,failed:(0,o.__)("Content is %1$d words long. Consider using at least 300 words.","rank-math"),tooltipText:(0,o.__)("Minimum recommended content length should be 300 words.","rank-math"),emptyContent:(0,o.sprintf)((0,o.__)("Content should be %1$s long.","rank-math"),'<a href="https://rankmath.com/kb/score-100-in-tests/?utm_source=Plugin&utm_campaign=WP#overall-content-length" target="_blank">'+(0,o.__)("300 words","rank-math")+"</a>")}}},{key:"contentLengthBoundary",value:function(){return{recommended:{boundary:299,score:8},belowRecommended:{boundary:200,score:5},low:{boundary:50,score:2}}}}])&&$r(e.prototype,r),n&&$r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function Xr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==Qr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Qr(a)?a:String(a)),n)}var i,a}var Yr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"setup",value:function(t){Fr(),this.resultManager=new G.ResultManager,this.assessor=new qr(t),new Jr,(0,l.doAction)("rank_math_loaded")}},{key:"refresh",value:function(t){this.assessor.refresh(t)}},{key:"getPrimaryKeyword",value:function(){return this.assessor.getPrimaryKeyword()}},{key:"getSelectedKeyword",value:function(){return this.assessor.getSelectedKeyword()}},{key:"updatePermalink",value:function(t){throw"Implement the function"}},{key:"updatePermalinkSanitize",value:function(t){throw"Implement the function"}}])&&Xr(e.prototype,r),n&&Xr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Zr=function(){return!((0,B.isNil)(window.wp)||(0,B.isNil)(wp.data)||(0,B.isNil)(wp.data.select("core/editor"))||!window.document.body.classList.contains("block-editor-page")||!(0,B.isFunction)(wp.data.select("core/editor").getEditedPostAttribute))};function tn(t){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn(t)}function en(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?en(Object(r),!0).forEach((function(e){an(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,on(n.key),n)}}function an(t,e,r){return(e=on(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function on(t){var e=function(t,e){if("object"!==tn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===tn(e)?e:String(e)}var un=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),an(this,"initialize",!1),an(this,"isSavingRedirection",!1),an(this,"isSavingSchemas",!1),an(this,"oldSlug",!1),this._data={id:!1,slug:!1,permalink:!1,content:!1,title:!1,excerpt:!1,featuredImage:!1},this.refresh=this.refresh.bind(this),this.isSavingPost=this.isSavingPost.bind(this),this.getPostAttribute=this.getPostAttribute.bind(this),this.subscribeToGutenberg()}var e,r,n;return e=t,(r=[{key:"collectGutenbergData",value:function(){if(Zr())return this._coreEditorSelect||(this._coreEditorSelect=(0,u.select)("core/editor")),!1===this.oldSlug&&""!==this.getSlug()&&(this.oldSlug=this.getSlug()),{id:this.getPostID(),slug:this.getSlug(),permalink:this.getPermalink(),content:this.getPostAttribute("content"),title:this.getPostAttribute("title"),excerpt:this.getPostAttribute("excerpt"),featuredImage:this.getFeaturedImage()}}},{key:"getPostID",value:function(){return this._coreEditorSelect.getCurrentPostId()}},{key:"getPermalink",value:function(){if("auto-draft"===this.getPostAttribute("status"))return"";var t=this.getPostAttribute("generated_slug");return"auto-draft"!==t&&"en"===rankMath.locale||(t=""),(0,Qe.safeDecodeURIComponent)(this._coreEditorSelect.getPermalink())}},{key:"getSlug",value:function(){var t=this.getPostAttribute("generated_slug");return"auto-draft"!==t&&"en"===rankMath.locale||(t=""),(0,Qe.safeDecodeURIComponent)(this.getPostAttribute("slug")||t)}},{key:"getFeaturedImage",value:function(){var t=this.getPostAttribute("featured_media");if(this.isValidMediaId(t)){var e=(0,u.select)("core").getMedia(t);if(!(0,B.isUndefined)(e))return e}}},{key:"isValidMediaId",value:function(t){return"number"==typeof t&&0<t}},{key:"getPostAttribute",value:function(t){return Zr()?(this._coreEditorSelect||(this._coreEditorSelect=(0,u.select)("core/editor")),this._coreEditorSelect.getEditedPostAttribute(t)):""}},{key:"subscribeToGutenberg",value:function(){this.subscriber=(0,B.debounce)(this.refresh,500),(0,u.subscribe)(this.subscriber),(0,u.subscribe)(this.isSavingPost)}},{key:"refresh",value:function(){var t=rn({},this._data);this._data=this.collectGutenbergData(),this.handleEditorChange(t)}},{key:"isSavingPost",value:function(){var t=(0,u.select)("core/editor");if(!t.isAutosavingPost()&&t.isSavingPost()){var e=(0,u.select)("rank-math").getDirtyMetadata();(0,B.isEmpty)(e)||(Rt()({method:"POST",path:"rankmath/v1/updateMeta",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,meta:e,content:this.getPostAttribute("content")}}).then((function(t){(0,l.doAction)("rank_math_metadata_updated",t)})),(0,u.dispatch)("rank-math").resetDirtyMetadata()),"publish"===this.getPostAttribute("status")&&(this.saveRedirection(),this.autoCreateRedirectionNotice()),this.saveSchemas()}}},{key:"saveSchemas",value:function(){var t=this;if(!this.isSavingSchemas){var e=(0,u.select)("rank-math").getSchemas();if(!(0,B.isEmpty)(e)&&(0,u.select)("rank-math").hasSchemaUpdated()){this.isSavingSchemas=!0;var r=(0,u.select)("rank-math").getEditSchemas();Rt()({method:"POST",path:"rankmath/v1/updateSchemas",data:{objectID:this.getPostID(),objectType:rankMath.objectType,schemas:e}}).then((function(n){var i=rn({},e),a=rn({},r);(0,B.isEmpty)(n)||(0,B.map)(n,(function(t,e){i["schema-"+t]=rn({},i[e]),a["schema-"+t]=rn({},a[e]),delete i[e],delete a[e]})),(0,u.dispatch)("rank-math").updateSchemas(i),(0,u.dispatch)("rank-math").updateEditSchemas(a),setTimeout((function(){(0,u.dispatch)("rank-math").schemaUpdated(!1),(0,l.doAction)("rank_math_schema_changed"),t.isSavingSchemas=!1}),2e3)}))}}}},{key:"saveRedirection",value:function(){var t=this;if(!this.isSavingRedirection){var e=(0,u.select)("rank-math").getRedirectionItem();if(!(0,B.isEmpty)(e)){this.isSavingRedirection=!0,e.objectID=this.getPostID(),e.redirectionSources=this.getPermalink();var r=(0,u.dispatch)("rank-math"),n=(0,u.dispatch)("core/notices");r.resetRedirection(),Rt()({method:"POST",path:"rankmath/v1/updateRedirection",data:e}).then((function(e){"delete"===e.action?(n.createInfoNotice(e.message,{id:"redirectionNotice"}),r.updateRedirection("redirectionID",0)):"update"===e.action?n.createInfoNotice(e.message,{id:"redirectionNotice"}):"new"===e.action&&(r.updateRedirection("redirectionID",e.id),n.createSuccessNotice(e.message,{id:"redirectionNotice"})),setTimeout((function(){t.isSavingRedirection=!1,n.removeNotice("redirectionNotice")}),2e3)}))}}}},{key:"autoCreateRedirectionNotice",value:function(){if(rankMath.assessor.hasRedirection&&(0,B.get)(rankMath,["assessor","autoCreateRedirection"],!1)&&!(0,u.select)("core/editor").isEditedPostNew()&&!1!==this.oldSlug){var t=this.getSlug();if(this.oldSlug!==t){var e=(0,u.dispatch)("core/notices");this.oldSlug=t,e.createSuccessNotice((0,o.__)("Auto redirection created.","rank-math"),{id:"redirectionAutoCreationNotice"}),setTimeout((function(){e.removeNotice("redirectionAutoCreationNotice")}),2e3)}}}},{key:"handleEditorChange",value:function(t){var e=this,r={id:"handleIDChange",slug:"handleSlugChange",title:"handleTitleChange",excerpt:"handleExcerptChange",content:"handleContentChange",featuredImage:"handleFeaturedImageChange"};if((0,B.isInteger)(t.id))return this.initialize?void(0,B.forEach)(r,(function(r,n){e._data[n]!==t[n]&&e[r](e._data[n])})):(this.initialize=!0,(0,B.forEach)(r,(function(t,r){e[t](e._data[r])})),void rankMathEditor.refresh("init"));(0,u.dispatch)("rank-math").refreshResults()}},{key:"handleIDChange",value:function(t){(0,u.dispatch)("rank-math").updatePostID(t),(0,u.dispatch)("rank-math").toggleLoaded(!0)}},{key:"handleSlugChange",value:function(){""!==this.getSlug()&&!1===this.oldSlug&&(this.oldSlug=this.getSlug()),rankMathEditor.refresh("permalink")}},{key:"handleTitleChange",value:function(t){h.setVariable("title",t),h.setVariable("term",t),h.setVariable("author",t),(0,u.dispatch)("rank-math").updateSerpTitle((0,u.select)("rank-math").getTitle()),rankMathEditor.refresh("title")}},{key:"handleExcerptChange",value:function(t){h.setVariable("excerpt",t),h.setVariable("excerpt_only",t),h.setVariable("wc_shortdesc",t),h.setVariable("seo_description",t),(0,u.dispatch)("rank-math").updateSerpDescription((0,u.select)("rank-math").getDescription())}},{key:"handleFeaturedImageChange",value:function(t){(0,u.dispatch)("rank-math").updateFeaturedImage(t),rankMathEditor.refresh("featuredImage")}},{key:"handleContentChange",value:function(){(0,u.dispatch)("rank-math").updateSerpDescription((0,u.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"getData",value:function(){return this._data}}])&&nn(e.prototype,r),n&&nn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),cn=wp.blocks,sn=[],ln=function(t){return(0,B.isEmpty)(sn)||(0,B.forEach)(sn,(function(e){(0,B.forEach)(e,(function(e){t+=e}))})),t},pn=function(){var t=(0,u.select)("core"),e=(0,u.select)("core/block-editor");(0,l.addFilter)("rank_math_content","rank-math",ln,11),(0,u.subscribe)((0,B.debounce)((function(){var r=e.getBlocks();if(!(0,B.isEmpty)(r)){var n=!1;(0,B.forEach)(r,(function(e){if((0,cn.isReusableBlock)(e)){var r=e.attributes.ref,i=function(t){return t&&t.content?(0,B.isFunction)(t.content)?t.content(t):t.content:""}(t.getEditedEntityRecord("postType","wp_block",r));if(!sn[r])return sn[r]={id:r,clientId:e.clientId,content:i},void(n=!0);sn[r].content!==i&&(sn[r].content=i,n=!0)}})),n&&rankMathEditor.refresh("content")}}),500))},fn=r(184),dn=r.n(fn);function mn(t){return 100<t?"bad-fk dark":80<t?"good-fk":50<t?"ok-fk":"bad-fk"}var hn=(0,u.withSelect)((function(t){var e=t("rank-math");return{score:e.getAnalysisScore(),isRefreshing:e.isRefreshing()}}))((function(t){var e=t.score;return wp.element.createElement("div",{className:"seo-score "+mn(e)},wp.element.createElement("div",{className:"score-text"},e," / 100"))}));function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function gn(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==yn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==yn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===yn(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var bn=(0,u.withSelect)((function(t){var e=t("rank-math");return{isLoaded:e.isLoaded(),score:e.getAnalysisScore()}}))((function(t){var e=t.isLoaded,r=t.score,n=dn()("rank-math-toolbar-score",gn(gn({},mn(r),!0),"loading",!e));return wp.element.createElement("div",{className:n},wp.element.createElement("i",{className:"rm-icon rm-icon-rank-math"}),wp.element.createElement(hn,null))})),vn=wp.components,wn=(0,u.withSelect)((function(t){var e=t("rank-math"),r=e.getTwitterUseFacebook()?e.getFacebookTitle():e.getTwitterTitle();return(0,B.isEmpty)(r)&&(r=e.getSerpTitle()),{title:r,permalink:t("core/editor").getPermalink()}}))((function(t){var e=t.title,r=t.permalink,n=encodeURI(r),i=encodeURI(e);return wp.element.createElement(c.Fragment,null,wp.element.createElement("p",null,(0,o.__)("Notify your readers by sharing!","rank-math")),wp.element.createElement("div",{className:"rank-math-social-share-buttons"},wp.element.createElement("div",{className:"rank-math-share-button rm-facebook"},wp.element.createElement("a",{href:"https://www.facebook.com/sharer/sharer.php?u="+n,target:"_blank",rel:"noopener noreferrer"},wp.element.createElement(vn.Dashicon,{icon:"facebook-alt"}))),wp.element.createElement("div",{className:"rank-math-share-button rm-twitter"},wp.element.createElement("a",{href:"https://twitter.com/share?url="+n+"&text="+i,target:"_blank",rel:"noopener noreferrer"},wp.element.createElement(vn.Dashicon,{icon:"twitter"}))),wp.element.createElement("div",{className:"rank-math-share-button rm-email"},wp.element.createElement("a",{href:"mailto:?subject="+i+"&body="+n,target:"_blank",rel:"noopener noreferrer"},wp.element.createElement(vn.Dashicon,{icon:"email"})))))}));function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function Sn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==kn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===kn(a)?a:String(a)),n)}var i,a}function _n(t,e){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_n(t,e)}function Tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Dn(t);if(e){var i=Dn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pn(t)}(this,r)}}function Pn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Dn(t){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dn(t)}var In=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_n(t,e)}(a,t);var e,r,n,i=Tn(a);function a(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.apply(this,arguments)).onChange=t.onChange.bind(Pn(t)),t.state={loading:!0,availableTerms:[],selectedTerms:[]},t}return e=a,(r=[{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){(0,B.invoke)(this.fetchRequest,["abort"])}},{key:"componentDidUpdate",value:function(t,e){if(t.selectedTermIds.length<this.props.selectedTermIds.length){var r=(0,B.difference)(this.props.selectedTermIds,t.selectedTermIds)[0];if(!this.termIsAvailable(r))return void this.fetchTerms()}t.selectedTermIds!==this.props.selectedTermIds&&this.updateSelectedTerms(this.state.availableTerms,this.props.selectedTermIds),e.selectedTerms!==this.state.selectedTerms&&this.handleSelectedTermsChange()}},{key:"termIsAvailable",value:function(t){return!!this.state.availableTerms.find((function(e){return e.id===t}))}},{key:"updateSelectedTerms",value:function(t,e){this.setState({selectedTerms:this.filterSelectedTerms(t,e)})}},{key:"handleSelectedTermsChange",value:function(){var t=this.state.selectedTerms,e=this.props.primaryTermID;t.find((function(t){return t.id===e}))||this.onChange(t.length?t[0].id:"")}},{key:"fetchTerms",value:function(){var t=this,e=this.props.taxonomy;e&&(this.fetchRequest=Rt()({path:(0,Qe.addQueryArgs)("/wp/v2/".concat(e.rest_base),{per_page:-1,orderby:"count",order:"desc",_fields:"id,name"})}),this.fetchRequest.then((function(e){t.fetchRequest=null,t.setState({loading:!1,availableTerms:e,selectedTerms:t.filterSelectedTerms(e,t.props.selectedTermIds)})}),(function(e){"abort"!==e.statusText&&(t.fetchRequest=null,t.setState({loading:!1}))})))}},{key:"filterSelectedTerms",value:function(t,e){return t.filter((function(t){return e.includes(t.id)}))}},{key:"onChange",value:function(t){(0,u.dispatch)("rank-math").updatePrimaryTermID(t,this.props.taxonomy.slug)}},{key:"shouldComponentUpdate",value:function(t,e){return this.props.selectedTermIds!==t.selectedTermIds||this.props.primaryTermID!==t.primaryTermID||this.state.selectedTerms!==e.selectedTerms}},{key:"render",value:function(){return this.state.selectedTerms.length<2?null:this.state.loading?[wp.element.createElement(vn.Spinner,{key:"spinner"}),wp.element.createElement("p",{key:"spinner-text"},"Loading")]:wp.element.createElement(vn.SelectControl,{label:(0,o.__)("Select Primary Term","rank-math"),value:this.props.primaryTermID,options:this.state.selectedTerms.map((function(t){return{value:t.id,label:(0,B.unescape)(t.name)}})),onChange:this.onChange})}}])&&Sn(e.prototype,r),n&&Sn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.Component);function On(t){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(t)}function En(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==On(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==On(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===On(a)?a:String(a)),n)}var i,a}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}function jn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Mn(t);if(e){var i=Mn(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===On(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Mn(t){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mn(t)}var Rn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}(a,t);var e,r,n,i=jn(a);function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return e=a,r&&En(e.prototype,r),n&&En(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(In),Cn=(0,u.withSelect)((function(t,e){var r=e.slug,n=t("core").getTaxonomy(r),i=t("core/editor").getEditedPostAttribute;return{taxonomy:n,selectedTermIds:n?i(n.rest_base):[],primaryTermID:t("rank-math").getPrimaryTermID()}}))(Rn),Un=function(t){var e=t.TermComponent;return function(t){return!1!==rankMath.assessor.primaryTaxonomy&&t.slug===rankMath.assessor.primaryTaxonomy.name}(t)?wp.element.createElement(c.Fragment,null,wp.element.createElement(e,t),wp.element.createElement(vn.PanelRow,{className:"rank-math-primary-term-picker"},wp.element.createElement(Cn,t))):wp.element.createElement(e,t)};function Nn(t){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nn(t)}function xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==Nn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===Nn(a)?a:String(a)),n)}var i,a}function Fn(t,e,r){return e&&xn(t.prototype,e),r&&xn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Hn=Fn((function t(){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"post"===rankMath.objectType&&rankMath.postSettings.linkSuggestions){a().fn.extend({insertLink:function(t,e){var r=this[0],n="";if(r.selectionStart||"0"===r.selectionStart){var i=r.selectionStart,a=r.selectionEnd,o=r.scrollTop;n='<a href="'+t+'">'+r.value.substring(i,a)+"</a>",i===a&&(n='<a href="'+t+'">'+e+"</a>"),r.value=r.value.substring(0,i)+n+r.value.substring(a,r.value.length),r.focus(),r.selectionStart=i+n.length,r.selectionEnd=i+n.length,r.scrollTop=o}else n='<a href="'+t+'">'+e+"</a>",r.value+=n,r.focus()}});if("function"==typeof ClipboardJS&&a()(".suggestion-copy").on("click",(function(t){t.preventDefault(),new ClipboardJS(".suggestion-copy");var e=a()(this).parent().next(".suggestion-title"),r=e.html();e.text("Link Copied"),setTimeout((function(){e.html(r)}),1500)})),"object"!==("undefined"==typeof tinymce?"undefined":Nn(tinymce)))return!0;var e=null,r=null;a()(".suggestion-insert").on("click",(function(t){t.preventDefault();var n,i,o,c,s=a()(this);if(s.hasClass("clicked"))return!0;if(null!==tinymce.activeEditor&&!0!==tinymce.activeEditor.isHidden()&&"content"===tinymce.activeEditor.id){e=tinymce.activeEditor,r=a()(e.getBody());var l=e.selection.getContent()||"";if(r.find("a[data-mce-selected]").length){var p=(n="",i="",o=e.selection.getStart(),(c=e.dom.getParent(o,"a[href]"))||(i=e.selection.getContent({format:"raw"}))&&-1!==i.indexOf("</a>")&&((n=i.match(/href="([^">]+)"/))&&n[1]&&(c=e.$('a[href="'+n[1]+'"]',o)[0]),c&&e.selection.select(c)),c);e.dom.setAttribs(p,{href:s.data("url")}),a()(p).text()!==l&&e.insertContent(l)}else l.length?e.insertContent('<a href="'+s.data("url")+'">'+l+"</a>"):e.insertContent('<a href="'+s.data("url")+'">'+s.data("text")+"</a>")}else if(Zr()){var f=(0,u.select)("core/block-editor").getSelectedBlock().clientId,d=(0,u.select)("core/block-editor").getSelectionStart().offset,m=(0,u.select)("core/block-editor").getSelectionEnd().offset;if(document.getSelection){var h=document.getSelection();if(h.rangeCount){var y=h.getRangeAt(0),g=a()("#block-"+f).text().substring(d,m),b=document.createElement("a");b.href=s.data("url"),b.innerText=""!==g?g:s.data("text"),y.deleteContents(),y.insertNode(b);var v=h.focusNode.innerHTML;(0,u.dispatch)("core/block-editor").updateBlock(f,{attributes:{content:v}})}}}var w=s.closest(".suggestion-item").find(".suggestion-title"),k=w.html();w.text("Link Inserted"),s.addClass("clicked"),setTimeout((function(){var t,e,r,n;w.html(k),s.removeClass("clicked"),!0===rankMath.postSettings.useFocusKeyword&&(e=s,r=(t=w).data("fkcount")||0,n=t.data("fk"),(r+=1)===n.length&&(r=0),t.find(">a").text(n[r]),t.data("fkcount",r),e.data("text",n[r]))}),1500)})),a()("#rank_math_metabox_link_suggestions").find("h2").append(a()("#rank-math-link-suggestions-tooltip").html())}})),Kn=(0,vn.createSlotFill)("RankMathAfterEditor"),zn=Kn.Fill,Ln=Kn.Slot,Gn=function(t){var e=t.children,r=t.className;return wp.element.createElement(zn,null,wp.element.createElement(vn.PanelRow,{className:r},e))};Gn.Slot=Ln;var Bn=Gn,Vn=(0,vn.createSlotFill)("RankMathAdvancedTab"),qn=Vn.Fill,Wn=Vn.Slot,$n=function(t){var e=t.children,r=t.className;return wp.element.createElement(qn,null,wp.element.createElement(vn.PanelRow,{className:r},e))};$n.Slot=Wn;var Jn=$n,Qn=(0,vn.createSlotFill)("RankMathAfterFocusKeyword"),Xn=Qn.Fill,Yn=Qn.Slot,Zn=function(t){var e=t.children,r=t.className;return wp.element.createElement(Xn,null,wp.element.createElement("div",{className:r},e))};Zn.Slot=Yn;var ti=Zn;function ei(t){return ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(t)}function ri(){return ri=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ri.apply(this,arguments)}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(i=n.key,a=void 0,a=function(t,e){if("object"!==ei(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ei(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===ei(a)?a:String(a)),n)}var i,a}function ii(){return ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ui(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},ii.apply(this,arguments)}function ai(t,e){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ai(t,e)}function oi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ui(t);if(e){var i=ui(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ui(t){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(t)}var ci=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}(a,t);var e,r,n,i=oi(a);function a(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return e=a,(r=[{key:"setup",value:function(t){Fr(),this.registerSlots=this.registerSlots.bind(this),(0,l.addAction)("rank_math_loaded","rank-math",this.registerSlots,0),ii(ui(a.prototype),"setup",this).call(this,t),this.registerPostPublish(),this.registerPrimaryTermSelector(),new Hn,new pn}},{key:"registerSlots",value:function(){this.registerSidebar(),this.RankMathAfterEditor=Bn,this.RankMathAfterFocusKeyword=ti,this.RankMathAdvancedTab=Jn,this.slots={AfterEditor:Bn,AfterFocusKeyword:ti,AdvancedTab:Jn}}},{key:"registerSidebar",value:function(){(0,s.registerPlugin)("rank-math",{icon:wp.element.createElement(bn,null),render:function(){return wp.element.createElement(c.Fragment,null,wp.element.createElement(p.PluginSidebarMoreMenuItem,{target:"seo-by-rank-math-sidebar",icon:wp.element.createElement(bn,null)},o.__("Rank Math","rank-math")),wp.element.createElement(p.PluginSidebar,{name:"seo-by-rank-math-sidebar",title:o.__("Rank Math","rank-math"),className:"rank-math-sidebar-panel"},(0,l.applyFilters)("rank_math_app",{})()))}})}},{key:"registerPostPublish",value:function(){(0,s.registerPlugin)("rank-math-post-publish",{render:function(){return wp.element.createElement(p.PluginPostPublishPanel,{initialOpen:!0,title:o.__("Rank Math","rank-math"),className:"rank-math-post-publish",icon:wp.element.createElement(c.Fragment,null)},wp.element.createElement(wn,null))}})}},{key:"registerPrimaryTermSelector",value:function(){(0,l.addFilter)("editor.PostTaxonomyType","rank-math",(function(t){return function(e){return wp.element.createElement(Un,ri({TermComponent:t},e))}}))}},{key:"updatePermalink",value:function(t){(0,u.dispatch)("core/editor").editPost({slug:t})}},{key:"updatePermalinkSanitize",value:function(t){t=this.assessor.getResearch("slugify")(t),(0,u.dispatch)("core/editor").editPost({slug:t})}}])&&ni(e.prototype,r),n&&ni(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(Yr);a()(document).ready((function(){window.rankMathEditor=new ci,window.rankMathGutenberg=window.rankMathEditor,window.rankMathEditor.setup(new un)}))}()}();