!function(){"use strict";var t={n:function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},dn:function(t){(Object.getOwnPropertyDescriptor(t,"name")||{}).writable||Object.defineProperty(t,"name",{value:"default",configurable:!0})}},e={};t.r(e),t.d(e,{deleteSchema:function(){return Ve},lockModifiedDate:function(){return gt},refreshResults:function(){return De},resetDirtyMetadata:function(){return bt},resetRedirection:function(){return Rt},resetStore:function(){return vt},saveSchema:function(){return Ge},saveTemplate:function(){return We},schemaUpdated:function(){return Ne},setEditingSchemaId:function(){return Fe},setEditorTab:function(){return Ke},setTemplateTab:function(){return Le},setVersion:function(){return Ie},toggleFrontendScore:function(){return pt},toggleIsDiviPageSettingsBarActive:function(){return Oe},toggleIsDiviRankMathModalActive:function(){return Ee},toggleLoaded:function(){return Se},toggleSchemaEditor:function(){return Ue},toggleSchemaTemplates:function(){return xe},toggleSnippetEditor:function(){return Xt},updateAIScore:function(){return $e},updateAdvancedRobots:function(){return mt},updateAnalysisScore:function(){return ft},updateAppData:function(){return ut},updateAppUi:function(){return ct},updateBreadcrumbTitle:function(){return yt},updateCanonicalUrl:function(){return dt},updateDescription:function(){return Et},updateEditSchema:function(){return He},updateEditSchemas:function(){return ze},updateFacebookDescription:function(){return wt},updateFacebookHasOverlay:function(){return Pt},updateFacebookImage:function(){return _t},updateFacebookImageID:function(){return St},updateFacebookImageOverlay:function(){return Tt},updateFacebookTitle:function(){return kt},updateFeaturedImage:function(){return jt},updateHasRedirect:function(){return Ut},updateHighlightedParagraphs:function(){return je},updateKeywords:function(){return st},updatePermalink:function(){return It},updatePillarContent:function(){return lt},updatePostID:function(){return Dt},updatePrimaryTermID:function(){return At},updateRedirection:function(){return Mt},updateRedirectionItem:function(){return Ct},updateRobots:function(){return ht},updateSchemas:function(){return Be},updateSelectedKeyword:function(){return Pe},updateSerpDescription:function(){return Qt},updateSerpSlug:function(){return Jt},updateSerpTitle:function(){return qt},updateSnippetPreviewType:function(){return Yt},updateSocialTab:function(){return Te},updateTitle:function(){return Ot},updateTwitterAppCountry:function(){return _e},updateTwitterAppDescription:function(){return fe},updateTwitterAppGoogleplayID:function(){return ve},updateTwitterAppGoogleplayName:function(){return ke},updateTwitterAppGoogleplayUrl:function(){return we},updateTwitterAppIpadID:function(){return ye},updateTwitterAppIpadName:function(){return ge},updateTwitterAppIpadUrl:function(){return be},updateTwitterAppIphoneID:function(){return de},updateTwitterAppIphoneName:function(){return me},updateTwitterAppIphoneUrl:function(){return he},updateTwitterAuthor:function(){return ne},updateTwitterCardType:function(){return te},updateTwitterDescription:function(){return re},updateTwitterHasOverlay:function(){return oe},updateTwitterImage:function(){return ie},updateTwitterImageID:function(){return ae},updateTwitterImageOverlay:function(){return ue},updateTwitterPlayerSize:function(){return se},updateTwitterPlayerStreamCtype:function(){return pe},updateTwitterPlayerStreamUrl:function(){return le},updateTwitterPlayerUrl:function(){return ce},updateTwitterTitle:function(){return ee},updateTwitterUseFacebook:function(){return Zt}});var r={};t.r(r),t.d(r,{appData:function(){return Ze},appUi:function(){return ir}});var n={};t.r(n),t.d(n,{getAdvancedRobots:function(){return fr},getAnalysisScore:function(){return cr},getAppData:function(){return or},getBreadcrumbTitle:function(){return mr},getCanonicalUrl:function(){return dr},getDescription:function(){return xr},getDirtyMetadata:function(){return ur},getEditSchemas:function(){return en},getEditingSchema:function(){return rn},getEditorTab:function(){return an},getFacebookAuthor:function(){return Or},getFacebookDescription:function(){return Ir},getFacebookHasOverlay:function(){return Ar},getFacebookImage:function(){return jr},getFacebookImageID:function(){return Er},getFacebookImageOverlay:function(){return Mr},getFacebookTitle:function(){return Dr},getFeaturedImage:function(){return Nr},getFeaturedImageHtml:function(){return Fr},getHighlightedParagraphs:function(){return Tr},getKeywords:function(){return sr},getPermalink:function(){return Ur},getPillarContent:function(){return lr},getPostID:function(){return Cr},getPreviewSchema:function(){return nn},getPrimaryTermID:function(){return Kr},getRedirectionID:function(){return Lr},getRedirectionItem:function(){return Hr},getRedirectionType:function(){return zr},getRedirectionUrl:function(){return Br},getRichSnippets:function(){return hr},getRobots:function(){return pr},getSchemas:function(){return tn},getSelectedKeyword:function(){return vr},getSerpDescription:function(){return qr},getSerpSlug:function(){return $r},getSerpTitle:function(){return Wr},getShowScoreFrontend:function(){return yr},getSnippetPreviewType:function(){return Qr},getSocialTab:function(){return kr},getTemplateTab:function(){return on},getTitle:function(){return Rr},getTwitterAppCountry:function(){return Dn},getTwitterAppDescription:function(){return yn},getTwitterAppGoogleplayID:function(){return Sn},getTwitterAppGoogleplayName:function(){return Pn},getTwitterAppGoogleplayUrl:function(){return Tn},getTwitterAppIpadID:function(){return kn},getTwitterAppIpadName:function(){return wn},getTwitterAppIpadUrl:function(){return _n},getTwitterAppIphoneID:function(){return gn},getTwitterAppIphoneName:function(){return bn},getTwitterAppIphoneUrl:function(){return vn},getTwitterAuthor:function(){return pn},getTwitterCardType:function(){return cn},getTwitterDescription:function(){return ln},getTwitterHasOverlay:function(){return mn},getTwitterImage:function(){return dn},getTwitterImageID:function(){return fn},getTwitterImageOverlay:function(){return hn},getTwitterPlayerSize:function(){return On},getTwitterPlayerStream:function(){return En},getTwitterPlayerStreamCtype:function(){return jn},getTwitterPlayerUrl:function(){return In},getTwitterTitle:function(){return sn},getTwitterUseFacebook:function(){return un},hasRedirect:function(){return Gr},hasSchemaUpdated:function(){return Zr},isDiviPageSettingsBarActive:function(){return Sr},isDiviRankMathModalActive:function(){return Pr},isLoaded:function(){return br},isModifiedDateLocked:function(){return gr},isPro:function(){return _r},isRefreshing:function(){return wr},isSchemaEditorOpen:function(){return Xr},isSchemaTemplatesOpen:function(){return Yr},isSnippetEditorOpen:function(){return Jr}});const a=jQuery;var i=t.n(a);const o=lodash,u=wp.hooks,c=wp.data,s=wp.element,l=rankMathAnalyzer,p=wp.i18n;function f(t){return 100]*?>/gi,"")};t.dn(v);const k=function(t){return t.replace(/]*>([\S\s]*?)<\/style>/gim,"")};t.dn(k);const w=function(t){return t.replace(/ | /gi," ").replace(/\s{2,}/g," ").replace(/\s\./g,".").replace(/^\s+|\s+$/g,"")};t.dn(w);const _=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.replace(/]*>([\S\s]*?)<\/script>/gim,e)};t.dn(_);const S=function(t){return t.replace(/[‘’‛`]/g,"'").replace(/[“”〝〞〟‟„]/g,'"')};t.dn(S);const P=function(t){return t.replace(//g,"")};t.dn(P);const T=function(t){return t.replace(/&\S+?;/g,"")};function D(t){return(0,o.isUndefined)(t)||!t?"":(0,o.flow)([k,_,v,P,T,w,S])(t)}t.dn(T);var I={};(0,o.isUndefined)(rankMath.assessor)||(0,o.forEach)(rankMath.assessor.diacritics,function(t,e){return I[e]=new RegExp(t,"g")});const O=function(t){if((0,o.isUndefined)(t))return t;for(var e in I)t=t.replace(I[e],e);return t};t.dn(O);const E=wp.compose,j=wp.components;function A(t){return A="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},A(t)}function M(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 C(t){for(var e=1;e3?(a=m===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=d&&((a=r<2&&dn||n>m)&&(i[4]=r,i[5]=n,f.n=m,u=0))}if(a||r>1)return o;throw p=!0,n}return function(a,l,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===l&&d(l,m),u=l,c=m;(e=u<2?t:c)||!p;){i||(u?u<3?(u>1&&(f.n=-1),d(u,c)):f.n=c:f.v=c);try{if(s=2,i){if(u||(a="next"),e=i[a]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+a+"' method"),u=1);i=t}else if((e=(p=f.n<0)?c:r.call(n,f))!==o)break}catch(e){i=t,u=1,c=e}finally{s=1}}return{value:e,done:p}}}(r,a,i),!0),s}var o={};function u(){}function c(){}function s(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(F(e={},n,function(){return this}),e),p=s.prototype=u.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,F(t,a,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=s,F(p,"constructor",s),F(s,"constructor",c),c.displayName="GeneratorFunction",F(s,a,"GeneratorFunction"),F(p),F(p,a,"Generator"),F(p,n,function(){return this}),F(p,"toString",function(){return"[object Generator]"}),(N=function(){return{w:i,m:f}})()}function F(t,e,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}F=function(t,e,r,n){function i(e,r){F(t,e,function(t){return this._invoke(e,r,t)})}e?a?a(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},F(t,e,r,n)}function K(t,e,r,n,a,i,o){try{var u=t[i](o),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,a)}function L(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(t){K(i,n,a,o,u,"next",t)}function u(t){K(i,n,a,o,u,"throw",t)}o(void 0)})}}function z(t,e){for(var r=0;r'),i()("#misc-publishing-actions").append(this.scoreElem),setTimeout(function(){t.scoreText=' SEO: '+p.__("Not available","seo-by-rank-math")+"",t.scoreElem.html(t.scoreText),t.scoreText=t.scoreElem.find("strong"),t.fkScoreText=''+p.__("Not available","seo-by-rank-math")+"",t.fkScoreElem=i()('
'+t.fkScoreText+"
"),t.fkScoreText=t.fkScoreElem.find("span"),i()("#rank-math-metabox-wrapper .rank-math-focus-keyword").find("tags").parent("div").append(t.fkScoreElem),t.updateScore=t.updateScore.bind(t),t.updateScore(),(0,u.addAction)("rank_math_refresh_results","rank-math",t.updateScore)},2e3))}},{key:"addLockModifiedDate",value:function(){var t=i()("#misc-publishing-actions");t.length&&rankMath.showLockModifiedDate&&(t.append('
'),(0,s.createRoot)(document.getElementById("rank-math-lock-modified-date")).render(wp.element.createElement(U,null)))}},{key:"updateScore",value:function(){var t=rankMathEditor.resultManager.getScore(rankMathEditor.getPrimaryKeyword()),e=f(t);this.scoreElem.removeClass("loading bad-fk ok-fk good-fk"),this.fkScoreElem.removeClass("loading bad-fk ok-fk good-fk"),this.scoreElem.addClass(e),this.fkScoreElem.addClass(e),this.scoreText.html(t+" / 100"),this.fkScoreText.html(t+" / 100")}},{key:"sanitizeData",value:function(t,e){return"schemas"===e||(0,o.isObject)(t)||(0,o.isEmpty)(t)?t:(r=t,(0,o.isUndefined)(r)?"":(0,o.flow)([k,_,v,P])(r));var r}},{key:"getPaper",value:function(t,e){var r=this.dataCollector.getData(),n=new l.Paper("",{locale:rankMath.localeFull});n.setTitle((0,c.select)("rank-math").getSerpTitle()),n.setPermalink(r.slug),n.setDescription((0,c.select)("rank-math").getSerpDescription()),n.setUrl(r.permalink),n.setText(b((0,u.applyFilters)("rank_math_content",r.content))),n.setKeyword(t),n.setKeywords(e),n.setSchema((0,c.select)("rank-math").getSchemas()),(0,o.isUndefined)(r.featuredImage)||(n.setThumbnail(r.featuredImage.source_url),n.setThumbnailAltText(O(r.featuredImage.alt_text)));var a=(0,c.select)("rank-math-content-ai");if(!(0,o.isEmpty)(a)){var i=a.getData(),s=a.getScore();n.setContentAI(s||!(0,o.isEmpty)(i.keyword))}return n}},{key:"registerRefresh",value:function(){var t=this;this.refresh=(0,o.debounce)(function(e){if(!1!==(0,c.select)("rank-math").isLoaded()){var r=(0,c.select)("rank-math").getKeywords().split(","),n=[];(0,u.doAction)("rank_math_"+e+"_refresh"),r.map(function(e,a){var i=t.getPaper(O(e),r),o=0===a?rankMath.assessor.researchesTests:t.filterTests(t.getSecondaryKeywordTests());n.push(t.analyzer.analyzeSome(o,i).then(function(t){rankMathEditor.resultManager.update(i.getKeyword(),t,0===a),0===a&&(0,c.dispatch)("rank-math").updateAnalysisScore(rankMathEditor.resultManager.getScore(i.getKeyword()))})),Promise.all(n).then(function(){(0,c.dispatch)("rank-math").refreshResults(),t.refreshResults()})})}},500)}},{key:"updateKeywordResult",value:function(t,e){rankMathEditor.resultManager.update(t,{keywordNotUsed:e}),t===rankMathEditor.getSelectedKeyword().toLowerCase()&&(0,c.dispatch)("rank-math").refreshResults()}},{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=(0,c.select)("rank-math").getKeywords();return O(t.split(",")[0])}},{key:"getSelectedKeyword",value:function(){var t=(0,c.select)("rank-math").getKeywords(),e=(0,c.select)("rank-math").getSelectedKeyword(),r=""!==e.data.value?e.data.value:t.split(",")[0];return O(r)}},{key:"getResearch",value:function(t){return this.analyzer.researcher.getResearch(t)}},{key:"refreshResults",value:function(){(0,u.doAction)("rank_math_refresh_results")}},{key:"filterTests",value:function(t){return(0,o.intersection)(t,rankMath.assessor.researchesTests)}},{key:"saveEvent",value:function(){var t=this;if(!(0,o.isUndefined)(this.dataCollector.form)&&!(0,o.isUndefined)(this.dataCollector.updateBtn)){var e=!0;this.dataCollector.form.on("submit",function(r){if(e&&!(0,o.isUndefined)(r.originalEvent)){r.preventDefault();var n=t.dataCollector.updateBtn.data("disable")&&t.dataCollector.saveDraft.length?t.dataCollector.saveDraft:t.dataCollector.updateBtn;n.addClass("disabled").parent().find(".spinner").addClass("is-active"),e=!1;var a=r.originalEvent.submitter||null,u=t.saveMeta(),c=t.saveSchemas(u),s=t.saveRedirection(c),l=function(){if(n.removeClass("disabled"),a){var e=i()(a).attr("name"),r=i()(a).attr("value");e&&t.dataCollector.form.append(i()("",{type:"hidden",name:e,value:r}))}t.dataCollector.form[0].requestSubmit()};return Promise.all([u,c,s]).then(l).catch(l),!1}})}}},{key:"saveMeta",value:function(){return new Promise(function(t){var e=(0,c.select)("rank-math").getDirtyMetadata();(0,o.isEmpty)(e)?t(!0):(m()({method:"POST",path:"rankmath/v1/updateMeta",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,meta:e,content:rankMathEditor.assessor.dataCollector.getContent()}}).then(function(){t(!0)}).catch(function(){t(!0)}),(0,c.dispatch)("rank-math").resetDirtyMetadata())})}},{key:"saveRedirection",value:function(t){return new Promise(function(){var e=L(N().m(function e(r){var n,a,i;return N().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t;case 1:if(n=(0,c.select)("rank-math").getRedirectionItem(),!(0,o.isEmpty)(n)){e.n=2;break}return r(!0),e.a(2);case 2:n.objectID=window.rankMath.objectID,n.objectType=window.rankMath.objectType,n.redirectionSources=rankMathEditor.assessor.dataCollector.getData("permalink"),a=(0,c.dispatch)("rank-math"),i=(0,c.dispatch)("core/notices"),a.resetRedirection(),m()({method:"POST",path:"rankmath/v1/updateRedirection",data:n}).then(function(t){"delete"===t.action?(i.createInfoNotice(t.message,{id:"redirectionNotice"}),a.updateRedirection("redirectionID",0)):"update"===t.action?i.createInfoNotice(t.message,{id:"redirectionNotice"}):"new"===t.action&&(a.updateRedirection("redirectionID",t.id),i.createSuccessNotice(t.message,{id:"redirectionNotice"})),setTimeout(function(){i.removeNotice("redirectionNotice")},2e3),r(!0)}).catch(function(){r(!0)});case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())}},{key:"saveSchemas",value:function(t){return new Promise(function(){var e=L(N().m(function e(r){var n;return N().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t;case 1:if(n=(0,c.select)("rank-math").getSchemas(),!(0,o.isEmpty)(n)&&(0,c.select)("rank-math").hasSchemaUpdated()){e.n=2;break}return r(!0),e.a(2);case 2:m()({method:"POST",path:"rankmath/v1/updateSchemas",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,schemas:n}}).then(function(){r(!0)}).catch(function(){r(!0)});case 3:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())}}],e&&z(t.prototype,e),r&&z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();const G=H;const V=function(){return!((0,o.isNil)(window.wp)||(0,o.isNil)(wp.data)||(0,o.isNil)(wp.data.select("core/editor"))||!window.document.body.classList.contains("block-editor-page")||!(0,o.isFunction)(wp.data.select("core/editor").getEditedPostAttribute))},W=function(){return!(0,o.isNull)(document.getElementById("site-editor"))};t.dn(W);const $=function(){if(!W())return!1;var t=wp.data.select("core/editor"),e=t.getCurrentPostId();if(rankMath.frontPageId&&rankMath.frontPageId===e)return!0;var r=t.getCurrentTemplateId()||e;return!(!(0,o.endsWith)(r,"//home")&&!(0,o.endsWith)(r,"//front-page"))||!(!(0,o.endsWith)(r,"//page")&&!(0,o.endsWith)(r,"//index"))&&"/"===new URLSearchParams(window.location.search).get("p")};function q(t){return q="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},q(t)}function J(t,e){for(var r=0;r'+(0,p.__)("300 words","seo-by-rank-math")+"")}}},{key:"contentLengthBoundary",value:function(){return{recommended:{boundary:299,score:8},belowRecommended:{boundary:200,score:5},low:{boundary:50,score:2}}}}])&&J(t.prototype,e),r&&J(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();function Y(t){return Y="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},Y(t)}function Z(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"content";console.warn("RankMathApp.reloadPlugin is deprecated, use rankMathEditor.refresh()"),this.refresh(e)}}],e&&Z(t.prototype,e),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();const rt=et;function nt(t){return nt="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},nt(t)}function at(t,e){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e=(0,u.applyFilters)("rank_math_sanitize_data",e,t,r),null!==n&&(n=(0,u.applyFilters)("rank_math_sanitize_meta_value",n,t,r)),n=null===n?e:n,(0,u.doAction)("rank_math_data_changed",t,e,r),{type:"RANK_MATH_APP_DATA",key:t,value:e,metaKey:r,metaValue:n}}function ct(t,e){return(0,u.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function st(t){return ot.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),ut("keywords",t,"rank_math_focus_keyword")}function lt(t){return ut("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function pt(t){return ut("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function ft(t){return ut("score",t,"rank_math_seo_score")}function dt(t){return ut("canonicalUrl",t,"rank_math_canonical_url")}function mt(t){return ut("advancedRobots",t,"rank_math_advanced_robots")}function ht(t){return ut("robots",t,"rank_math_robots",Object.keys(t))}function yt(t){return ut("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function gt(t){return ut("lockModifiedDate",t,"rank_math_lock_modified_date")}function bt(){return ut("dirtyMetadata",{})}function vt(t){return{type:"RESET_STORE",value:t}}function kt(t){return ut("facebookTitle",t,"rank_math_facebook_title")}function wt(t){return ut("facebookDescription",t,"rank_math_facebook_description")}function _t(t){return ut("facebookImage",t,"rank_math_facebook_image")}function St(t){return ut("facebookImageID",t,"rank_math_facebook_image_id")}function Pt(t){return ut("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function Tt(t){return ut("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function Dt(t){return rankMath.objectID=t,ut("postID",t)}function It(t){return ut("permalink",t,"permalink")}function Ot(t){return ut("title",t,"rank_math_title")}function Et(t){return ut("description",t,"rank_math_description")}function jt(t){return ut("featuredImage",t)}function At(t,e){return ut("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function Mt(t,e){return ut(t,e)}function Ct(t){return ct("redirectionItem",t)}function Rt(){return ct("redirectionItem",{})}function Ut(t){return ct("hasRedirect",t)}const xt=wp.autop;var Nt="[^<>&/\\[\\]\0- =]+?",Ft=new RegExp("\\["+Nt+"( [^\\]]+?)?\\]","g"),Kt=new RegExp("\\[/"+Nt+"\\]","g");const Lt=function(t){return t.replace(Ft,"").replace(Kt,"")};t.dn(Lt);const zt=function(t,e){var r=function(t,e){for(var r,n=/]+)?>(.*?)<\/p>/gi,a=[];null!==(r=n.exec(t));)a.push(r);return(0,o.map)(a,function(t){return e?D(t[1]):t[1]})}(t=(0,o.flow)([Lt,P,xt.autop])(t),e=e||!1);return 0]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),Bt.innerHTML=t,t=Bt.textContent,Bt.textContent=""),t}t.dn($t);var Gt=function(t,e){return t=(t=D(t)).replace(/\r?\n|\r/g," "),e?(0,o.truncate)(t,{length:e,separator:" "}):t},Vt=function(t){if((0,o.isEmpty)(t))return"";t=_(t),t=k(t),t=(0,o.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,o.filter)(zt(t,!0),function(t){return""!==t.trim()});if(!e.length)return"";var r=rankMathEditor.getPrimaryKeyword();if(""!==r){var n=(0,o.filter)(e,function(t){return(0,o.includes)(t.toLowerCase(),r.toLowerCase())});if(00&&void 0!==arguments[0]?arguments[0]:Ye(rankMath),e=arguments.length>1?arguments[1]:void 0,r=Qe({},t.dirtyMetadata);return!1!==e.metaKey&&(r[e.metaKey]=e.metaValue),"RESET_STORE"===e.type?Qe({},Ye(e.value)):"RANK_MATH_APP_DATA"===e.type?"dirtyMetadata"===e.key?Qe(Qe({},t),{},{dirtyMetadata:e.value}):Qe(Qe({},t),{},Xe(Xe({},e.key,e.value),"dirtyMetadata",r)):t}function tr(t){return tr="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},tr(t)}function er(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 rr(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:ar,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?rr(rr({},t),{},nr({},e.key,e.value)):t}function or(t){return t.appData}function ur(t){return t.appData.dirtyMetadata}function cr(t){return t.appData.score}function sr(t){return t.appData.keywords}function lr(t){return t.appData.pillarContent}function pr(t){return t.appData.robots}function fr(t){return t.appData.advancedRobots}function dr(t){return t.appData.canonicalUrl}function mr(t){return t.appData.breadcrumbTitle}function hr(t){return"todo"}function yr(t){return t.appData.showScoreFrontend}function gr(t){return t.appData.lockModifiedDate}function br(t){return t.appUi.isLoaded}function vr(t){return t.appUi.selectedKeyword}function kr(t){return t.appUi.socialTab}function wr(t){return t.appUi.refreshResults}function _r(t){return t.appUi.isPro}function Sr(t){return t.appUi.isDiviPageSettingsBarActive}function Pr(t){return t.appUi.isDiviRankMathModalActive}function Tr(t){return t.appUi.highlightedParagraphs}function Dr(t){return t.appData.facebookTitle}function Ir(t){return t.appData.facebookDescription}function Or(t){return t.appData.facebookAuthor}function Er(t){return t.appData.facebookImageID}function jr(t){return t.appData.facebookImage}function Ar(t){return t.appData.facebookHasOverlay}function Mr(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function Cr(t){return t.appData.postID}function Rr(t){return t.appData.title}function Ur(t){return t.appData.permalink}function xr(t){return t.appData.description}function Nr(t){return t.appData.featuredImage}function Fr(t){var e=t.appData.featuredImage;return'').concat(e.alt_text,'')}function Kr(t){return t.appData.primaryTerm}function Lr(t){return String(t.appData.redirectionID)}function zr(t){return t.appData.redirectionType}function Br(t){return t.appData.redirectionUrl}function Hr(t){return t.appUi.redirectionItem}function Gr(t){return t.appUi.hasRedirect}const Vr=wp.url;function Wr(t){return Ht(t.appUi.serpTitle)}function $r(t){return(0,Vr.safeDecodeURIComponent)(t.appUi.serpSlug)}function qr(t){return t.appUi.serpDescription}function Jr(t){return t.appUi.isSnippetEditorOpen}function Qr(t){return t.appUi.snippetPreviewType}function Xr(t){return t.appUi.isSchemaEditorOpen}function Yr(t){return t.appUi.isSchemaTemplatesOpen}function Zr(t){return t.appUi.schemaUpdated}function tn(t){return t.appData.schemas}function en(t){return t.appUi.editSchemas}function rn(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function nn(t){return t.appData.schemas[t.appUi.editingSchemaId]}function an(t){return t.appUi.editorTab}function on(t){return t.appUi.templateTab}function un(t){return t.appData.twitterUseFacebook}function cn(t){return t.appData.twitterCardType}function sn(t){return t.appData.twitterTitle}function ln(t){return t.appData.twitterDescription}function pn(t){return t.appData.twitterAuthor}function fn(t){return t.appData.twitterImageID}function dn(t){return t.appData.twitterImage}function mn(t){return t.appData.twitterHasOverlay}function hn(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function yn(t){return t.appData.twitterAppDescription}function gn(t){return t.appData.twitterAppIphoneID}function bn(t){return t.appData.twitterAppIphoneName}function vn(t){return t.appData.twitterAppIphoneUrl}function kn(t){return t.appData.twitterAppIpadID}function wn(t){return t.appData.twitterAppIpadName}function _n(t){return t.appData.twitterAppIpadUrl}function Sn(t){return t.appData.twitterAppGoogleplayID}function Pn(t){return t.appData.twitterAppGoogleplayName}function Tn(t){return t.appData.twitterAppGoogleplayUrl}function Dn(t){return t.appData.twitterAppCountry}function In(t){return t.appData.twitterPlayerUrl}function On(t){return t.appData.twitterPlayerSize}function En(t){return t.appData.twitterPlayerStream}function jn(t){return t.appData.twitterPlayerStreamCtype}(0,c.registerStore)("rank-math",{reducer:(0,c.combineReducers)(r),selectors:n,actions:e});function An(t){return An="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},An(t)}function Mn(t,e){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];("auto-draft"!==this.getStatus()||e)&&this.elemSlug.val(t),i()("#editable-post-name").text(t),i()("#editable-post-name-full").text(t),this._data.slug=this.getSlug(),this._data.permalink=this.getPermalink(),(0,c.dispatch)("rank-math").updateSerpSlug(t),rankMathEditor.refresh("permalink")}},{key:"handleTitleChange",value:function(t){ot.setVariable("title",t),ot.setVariable("term",t),ot.setVariable("author",t),(0,c.dispatch)("rank-math").updateSerpTitle((0,c.select)("rank-math").getTitle()),rankMathEditor.refresh("title")}},{key:"handleExcerptChange",value:function(){this._data.excerpt=this.getExcerpt(),(0,c.dispatch)("rank-math").updateSerpDescription((0,c.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"handleFeaturedImageChange",value:function(){this._data.featuredImage=this.getFeaturedImage(),(0,c.dispatch)("rank-math").updateFeaturedImage(this.getFeaturedImage()),rankMathEditor.refresh("featuredImage")}},{key:"handleContentChange",value:function(){this._data.excerpt=this.getExcerpt(),this._data.content=this.getContent(),(0,c.dispatch)("rank-math").updateSerpDescription((0,c.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t?this._data[t]:this._data;return(0,u.applyFilters)("rank_math_dataCollector_data",e)}},{key:"updateData",value:function(t,e){this._data[t]=e}},{key:"isTinymce",value:function(){return"undefined"!=typeof tinymce}},{key:"getStatus",value:function(){var t=!(0,o.isUndefined)(this.postStatus)&&this.postStatus.length?this.postStatus.val():"";return(0,o.isUndefined)(t)?"":t}}],e&&Mn(t.prototype,e),r&&Mn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();const Un=Rn;function xn(t){return xn="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},xn(t)}function Nn(t,e){for(var r=0;r"+r.responseText+"").find("#editable-post-name-full").text(),rankMathEditor.updatePermalink(o))}}),this.saveDraft.on("click",function(){t.updateBtn.attr("data-disable","true")})}},{key:"assessThumbnail",value:function(t){this.featuredImage={source_url:t.src,alt_text:t.alt},this.handleFeaturedImageChange(t)}}])&&Nn(r.prototype,n),a&&Nn(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(Un);const Gn=Hn;function Vn(t){return Vn="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},Vn(t)}function Wn(t,e){for(var r=0;r'+r.value.substring(a,i)+"",a===i&&(n=''+e+""),r.value=r.value.substring(0,a)+n+r.value.substring(i,r.value.length),r.focus(),r.selectionStart=a+n.length,r.selectionEnd=a+n.length,r.scrollTop=o}else n=''+e+"",r.value+=n,r.focus()}});if("function"==typeof ClipboardJS&&i()(".suggestion-copy").on("click",function(t){t.preventDefault(),new ClipboardJS(".suggestion-copy");var e=i()(this).parent().next(".suggestion-title"),r=e.html();e.text("Link Copied"),setTimeout(function(){e.html(r)},1500)}),"object"!==("undefined"==typeof tinymce?"undefined":va(tinymce)))return!0;var e=null,r=null;i()(".suggestion-insert").on("click",function(t){t.preventDefault();var n,a,o,u,s=i()(this);if(s.hasClass("clicked"))return!0;if(null!==tinymce.activeEditor&&!0!==tinymce.activeEditor.isHidden()&&"content"===tinymce.activeEditor.id){e=tinymce.activeEditor,r=i()(e.getBody());var l=e.selection.getContent()||"";if(r.find("a[data-mce-selected]").length){var p=(n="",a="",o=e.selection.getStart(),(u=e.dom.getParent(o,"a[href]"))||(a=e.selection.getContent({format:"raw"}))&&-1!==a.indexOf("")&&((n=a.match(/href="([^">]+)"/))&&n[1]&&(u=e.$('a[href="'+n[1]+'"]',o)[0]),u&&e.selection.select(u)),u);e.dom.setAttribs(p,{href:s.data("url")}),i()(p).text()!==l&&e.insertContent(l)}else l.length?e.insertContent(''+l+""):e.insertContent(''+s.data("text")+"")}else if(V()){var f=(0,c.select)("core/block-editor"),d=s.data("url"),m=s.data("text"),h=''+m+"",y=function(t,e){for(var r=0,n=0;n"!==t[n];)n++;n++}else r++,n++;for(;n"!==t[n];)n++;n++}return n},g=f.getSelectedBlock();if(g&&g.attributes&&"content"in g.attributes){var b=f.getSelectionStart(),v=f.getSelectionEnd(),k=b?b.offset:null,w=v?v.offset:null,_=function(t,e,r){if(null!==e&&null!==r&&e!==r){var n=y(t,e),a=y(t,r),i=t.substring(n,a);return t.substring(0,n)+''+i+""+t.substring(a)}if(null!==e){var o=y(t,e);return t.substring(0,o)+h+t.substring(o)}return t+h}(g.attributes.content||"",k,w);(0,c.dispatch)("core/block-editor").updateBlock(g.clientId,{attributes:{content:_}})}else{for(var S=f.getBlocks(),P=null,T=S.length-1;T>=0;T--)if("content"in(S[T].attributes||{})){P=S[T];break}if(P){var D=(P.attributes.content||"")+h;(0,c.dispatch)("core/block-editor").updateBlock(P.clientId,{attributes:{content:D}})}}}var I=s.closest(".suggestion-item").find(".suggestion-title"),O=I.html();I.text("Link Inserted"),s.addClass("clicked"),setTimeout(function(){var t,e,r,n;I.html(O),s.removeClass("clicked"),!0===rankMath.postSettings.useFocusKeyword&&(e=s,r=(t=I).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)}),i()("#rank_math_metabox_link_suggestions").find("h2").append(i()("#rank-math-link-suggestions-tooltip").html())}});function Pa(t){return Pa="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},Pa(t)}function Ta(t,e){for(var r=0;r'+(0,p.__)("Make Term Primary","seo-by-rank-math")+"")}),u.each(function(){var t=i()(this),r=t.closest("li");r.addClass("term-checked"),e===t.attr("value")&&(r.addClass("term-marked-primary"),r.find(">label .rank-math-make-primary").prop("checked",!0))}),n.on("click",'input[type="checkbox"]',function(){var e=i()(this).closest("li");if(e.toggleClass("term-checked"),1===a.find("li.term-checked").length||e.hasClass("term-marked-primary")&&!e.hasClass("term-checked")){var r=a.find("li.term-checked:first > label .rank-math-make-primary");0'+(0,p.__)("Make Term Primary","seo-by-rank-math")+"")})})})});function Ea(t){return Ea="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},Ea(t)}function ja(t,e){for(var r=0;rr.length&&(r=i()(''),i()(".facebook-thumbnail",".rank-math-social-preview-image").before(r)),"large"in n.sizes?r.attr("src",n.sizes.large.url):r.attr("src",n.sizes.full.url),t.setFeaturedImage(n)})}}},{key:"removeImage",value:function(){var t=this;i()("#postimagediv").on("click","#remove-post-thumbnail",function(){i()("#rank_math_image_warning").remove(),i()("#rank_math_post_thumbnail").remove(),t.setFeaturedImage("")})}},{key:"gutenbergImage",value:function(){var t,e,r=this;wp.data.subscribe(function(){var n=wp.data.select("core/editor").getEditedPostAttribute("featured_media");r.isValidMediaId(n)&&(t=wp.data.select("core").getMedia(n),(0,o.isUndefined)(t)||t!==e&&(e=t,r.setFeaturedImage({url:t.guid.rendered,alt:t.alt_text})))})}},{key:"setFeaturedImage",value:function(t){var e={src:(0,o.get)(t,"url",""),alt:(0,o.get)(t,"alt","")};(0,u.doAction)("rank_math_updated_featured_image",e)}},{key:"sizeWarning",value:function(t){if(i()("#rank_math_image_warning").remove(),!(200

'+rankMath.featuredImageNotice+"

").insertAfter(e)}}},{key:"getFeaturedImage",value:function(){var t=i()("#postimagediv img");if(!t||t.length){var e={url:t[0].src,alt:t[0].alt};this.setFeaturedImage(e)}}},{key:"isValidMediaId",value:function(t){return"number"==typeof t&&01&&void 0!==arguments[1]&&arguments[1];this.assessor.dataCollector.handleSlugChange(t,e),(0,c.dispatch)("rank-math").updatePermalink(t)}},{key:"updatePermalinkSanitize",value:function(t){t=this.assessor.getResearch("slugify")(t),(0,c.dispatch)("rank-math").updatePermalink(t)}},{key:"getPrimaryKeyword",value:function(){return O(this.assessor.getPrimaryKeyword())}},{key:"getSelectedKeyword",value:function(){var t=this.assessor.getSelectedKeyword();return(0,o.isUndefined)(t)?"":O(t)}},{key:"getCollector",value:function(){return"post"===rankMath.objectType?V()?new ba:new Gn(this):"term"===rankMath.objectType?new Zn:"user"===rankMath.objectType?new ca:void 0}}],e&&Ja(t.prototype,e),r&&Ja(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();i()(function(){window.rankMathEditor=new Xa,window.rankMathEditor.setup(),window.RankMathApp=new rt}),i()(window).on("load",function(){i().when(i().ready).then(function(){(0,u.doAction)("rank_math_loaded")})})}();