File: /home/petsclubcc/LinkersIT.com/wp-content/plugins/seo-by-rank-math/assets/admin/js/classic.js
!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})}},e={};t.r(e),t.d(e,{deleteSchema:function(){return Be},lockModifiedDate:function(){return ht},refreshResults:function(){return Se},resetDirtyMetadata:function(){return yt},resetRedirection:function(){return Mt},resetStore:function(){return gt},saveSchema:function(){return ze},saveTemplate:function(){return He},schemaUpdated:function(){return Re},setEditingSchemaId:function(){return Ue},setEditorTab:function(){return xe},setTemplateTab:function(){return Ne},setVersion:function(){return Pe},toggleFrontendScore:function(){return st},toggleIsDiviPageSettingsBarActive:function(){return Te},toggleIsDiviRankMathModalActive:function(){return De},toggleLoaded:function(){return ke},toggleSchemaEditor:function(){return Me},toggleSchemaTemplates:function(){return Ce},toggleSnippetEditor:function(){return Jt},updateAIScore:function(){return Ge},updateAdvancedRobots:function(){return ft},updateAnalysisScore:function(){return lt},updateAppData:function(){return it},updateAppUi:function(){return ot},updateBreadcrumbTitle:function(){return mt},updateCanonicalUrl:function(){return pt},updateDescription:function(){return It},updateEditSchema:function(){return Le},updateEditSchemas:function(){return Fe},updateFacebookDescription:function(){return vt},updateFacebookHasOverlay:function(){return _t},updateFacebookImage:function(){return kt},updateFacebookImageID:function(){return wt},updateFacebookImageOverlay:function(){return St},updateFacebookTitle:function(){return bt},updateFeaturedImage:function(){return Ot},updateHasRedirect:function(){return Ct},updateHighlightedParagraphs:function(){return Ie},updateKeywords:function(){return ut},updatePermalink:function(){return Tt},updatePillarContent:function(){return ct},updatePostID:function(){return Pt},updatePrimaryTermID:function(){return Et},updateRedirection:function(){return jt},updateRedirectionItem:function(){return At},updateRobots:function(){return dt},updateSchemas:function(){return Ke},updateSelectedKeyword:function(){return we},updateSerpDescription:function(){return $t},updateSerpSlug:function(){return Wt},updateSerpTitle:function(){return Vt},updateSnippetPreviewType:function(){return qt},updateSocialTab:function(){return _e},updateTitle:function(){return Dt},updateTwitterAppCountry:function(){return ve},updateTwitterAppDescription:function(){return se},updateTwitterAppGoogleplayID:function(){return ye},updateTwitterAppGoogleplayName:function(){return ge},updateTwitterAppGoogleplayUrl:function(){return be},updateTwitterAppIpadID:function(){return de},updateTwitterAppIpadName:function(){return me},updateTwitterAppIpadUrl:function(){return he},updateTwitterAppIphoneID:function(){return le},updateTwitterAppIphoneName:function(){return pe},updateTwitterAppIphoneUrl:function(){return fe},updateTwitterAuthor:function(){return te},updateTwitterCardType:function(){return Xt},updateTwitterDescription:function(){return Zt},updateTwitterHasOverlay:function(){return ne},updateTwitterImage:function(){return re},updateTwitterImageID:function(){return ee},updateTwitterImageOverlay:function(){return ae},updateTwitterPlayerSize:function(){return oe},updateTwitterPlayerStreamCtype:function(){return ce},updateTwitterPlayerStreamUrl:function(){return ue},updateTwitterPlayerUrl:function(){return ie},updateTwitterTitle:function(){return Yt},updateTwitterUseFacebook:function(){return Qt}});var r={};t.r(r),t.d(r,{appData:function(){return Qe},appUi:function(){return rr}});var n={};t.r(n),t.d(n,{getAdvancedRobots:function(){return sr},getAnalysisScore:function(){return ir},getAppData:function(){return nr},getBreadcrumbTitle:function(){return pr},getCanonicalUrl:function(){return lr},getDescription:function(){return Cr},getDirtyMetadata:function(){return ar},getEditSchemas:function(){return Yr},getEditingSchema:function(){return Zr},getEditorTab:function(){return en},getFacebookAuthor:function(){return Tr},getFacebookDescription:function(){return Pr},getFacebookHasOverlay:function(){return Or},getFacebookImage:function(){return Ir},getFacebookImageID:function(){return Dr},getFacebookImageOverlay:function(){return Er},getFacebookTitle:function(){return Sr},getFeaturedImage:function(){return Rr},getFeaturedImageHtml:function(){return Ur},getHighlightedParagraphs:function(){return _r},getKeywords:function(){return or},getPermalink:function(){return Mr},getPillarContent:function(){return ur},getPostID:function(){return jr},getPreviewSchema:function(){return tn},getPrimaryTermID:function(){return xr},getRedirectionID:function(){return Nr},getRedirectionItem:function(){return Lr},getRedirectionType:function(){return Fr},getRedirectionUrl:function(){return Kr},getRichSnippets:function(){return fr},getRobots:function(){return cr},getSchemas:function(){return Xr},getSelectedKeyword:function(){return yr},getSerpDescription:function(){return Vr},getSerpSlug:function(){return Gr},getSerpTitle:function(){return Hr},getShowScoreFrontend:function(){return dr},getSnippetPreviewType:function(){return $r},getSocialTab:function(){return gr},getTemplateTab:function(){return rn},getTitle:function(){return Ar},getTwitterAppCountry:function(){return Sn},getTwitterAppDescription:function(){return dn},getTwitterAppGoogleplayID:function(){return kn},getTwitterAppGoogleplayName:function(){return wn},getTwitterAppGoogleplayUrl:function(){return _n},getTwitterAppIpadID:function(){return gn},getTwitterAppIpadName:function(){return bn},getTwitterAppIpadUrl:function(){return vn},getTwitterAppIphoneID:function(){return mn},getTwitterAppIphoneName:function(){return hn},getTwitterAppIphoneUrl:function(){return yn},getTwitterAuthor:function(){return cn},getTwitterCardType:function(){return an},getTwitterDescription:function(){return un},getTwitterHasOverlay:function(){return pn},getTwitterImage:function(){return ln},getTwitterImageID:function(){return sn},getTwitterImageOverlay:function(){return fn},getTwitterPlayerSize:function(){return Tn},getTwitterPlayerStream:function(){return Dn},getTwitterPlayerStreamCtype:function(){return In},getTwitterPlayerUrl:function(){return Pn},getTwitterTitle:function(){return on},getTwitterUseFacebook:function(){return nn},hasRedirect:function(){return zr},hasSchemaUpdated:function(){return Qr},isDiviPageSettingsBarActive:function(){return kr},isDiviRankMathModalActive:function(){return wr},isLoaded:function(){return hr},isModifiedDateLocked:function(){return mr},isPro:function(){return vr},isRefreshing:function(){return br},isSchemaEditorOpen:function(){return Jr},isSchemaTemplatesOpen:function(){return qr},isSnippetEditorOpen:function(){return Wr}});var a=jQuery,i=t.n(a),o=lodash,u=wp.hooks,c=wp.data,s=wp.element,l=rankMathAnalyzer,p=wp.i18n;var f=wp.apiFetch,d=t.n(f),m={"&":"&",""":'"',"'":"'"},h=/&(?:amp|quot|#(0+)?39);/g,y=RegExp(h.source);var g=function(t){return t&&y.test(t)?t.replace(h,function(t){return m[t]||"'"}):t||""},b=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},v=function(t){return t.replace(/<style[^>]*>([\S\s]*?)<\/style>/gim,"")},k=function(t){return t.replace(/ | /gi," ").replace(/\s{2,}/g," ").replace(/\s\./g,".").replace(/^\s+|\s+$/g,"")},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,e)},_=function(t){return t.replace(/[‘’‛`]/g,"'").replace(/[“”〝〞〟‟„]/g,'"')},S=function(t){return t.replace(/<!--[\s\S]*?-->/g,"")},P=function(t){return t.replace(/&\S+?;/g,"")};function T(t){return(0,o.isUndefined)(t)||!t?"":(0,o.flow)([v,w,b,S,P,k,_])(t)}var D={};(0,o.isUndefined)(rankMath.assessor)||(0,o.forEach)(rankMath.assessor.diacritics,function(t,e){return D[e]=new RegExp(t,"g")});var I=function(t){if((0,o.isUndefined)(t))return t;for(var e in D)t=t.replace(D[e],e);return t},O=wp.compose,E=wp.components;function j(t){return j="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},j(t)}function A(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 M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach(function(e){C(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function C(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=j(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==j(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var R=(0,O.compose)((0,c.withSelect)(function(t){return{lock:t("rank-math").isModifiedDateLocked()}}),(0,c.withDispatch)(function(t){return{onChange:function(e){t("rank-math").lockModifiedDate(e);var r=wp.data.select("core/editor");if(!(0,o.isUndefined)(r)&&!(0,o.isUndefined)(r.getEditedPostAttribute("meta"))){var n=M(M({},r.getEditedPostAttribute("meta")),{},{rank_math_lock_modified_date:e});t("core/editor").editPost({meta:n})}}}}))(function(t){var e=t.lock,r=t.onChange;return wp.element.createElement("div",null,wp.element.createElement(E.ToggleControl,{label:(0,p.__)("Lock Modified Date","rank-math"),checked:e,onChange:function(t){return r(t)},__nextHasNoMarginBottom:!0}))});function U(t){return U="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},U(t)}function x(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",a=r.toStringTag||"@@toStringTag";function i(r,n,a,i){var c=n&&n.prototype instanceof u?n:u,s=Object.create(c.prototype);return N(s,"_invoke",function(r,n,a){var i,u,c,s=0,l=a||[],p=!1,f={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return i=e,u=0,c=t,f.n=r,o}};function d(r,n){for(u=r,c=n,e=0;!p&&s&&!a&&e<l.length;e++){var a,i=l[e],d=f.p,m=i[2];r>3?(a=m===n)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=d&&((a=r<2&&d<i[1])?(u=0,f.v=n,f.n=i[1]):d<m&&(a=r<3||i[0]>n||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]())):(N(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,N(t,a,"GeneratorFunction")),t.prototype=Object.create(p),t}return c.prototype=s,N(p,"constructor",s),N(s,"constructor",c),c.displayName="GeneratorFunction",N(s,a,"GeneratorFunction"),N(p),N(p,a,"Generator"),N(p,n,function(){return this}),N(p,"toString",function(){return"[object Generator]"}),(x=function(){return{w:i,m:f}})()}function N(t,e,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}N=function(t,e,r,n){function i(e,r){N(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))},N(t,e,r,n)}function F(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 K(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(t){F(i,n,a,o,u,"next",t)}function u(t){F(i,n,a,o,u,"throw",t)}o(void 0)})}}function L(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,z(n.key),n)}}function z(t){var e=function(t,e){if("object"!=U(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==U(e)?e:e+""}var B=function(){return t=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 l.Analyzer({i18n:p,analyses:rankMath.assessor.researchesTests}),this.dataCollector=e,this.promises=[],this.hooks(),this.registerRefresh(),this.saveEvent()},e=[{key:"hooks",value:function(){this.updateKeywordResult=this.updateKeywordResult.bind(this),this.sanitizeData=this.sanitizeData.bind(this),this.addScoreElem=this.addScoreElem.bind(this),this.addLockModifiedDate=this.addLockModifiedDate.bind(this),(0,u.addAction)("rankMath_analysis_keywordUsage_updated","rank-math",this.updateKeywordResult),(0,u.addFilter)("rank_math_sanitize_meta_value","rank-math",this.sanitizeData),(0,u.addFilter)("rank_math_sanitize_data","rank-math",this.sanitizeData),(0,u.addAction)("rank_math_loaded","rank-math",this.addLockModifiedDate,11),(0,u.addAction)("rank_math_loaded","rank-math",this.addScoreElem,11)}},{key:"addScoreElem",value:function(){var t=this;rankMath.showScore&&rankMath.canUser.analysis&&rankMath.canUser.general&&(this.scoreElem=i()('<div class="misc-pub-section rank-math-seo-score"></div>'),i()("#misc-publishing-actions").append(this.scoreElem),setTimeout(function(){t.scoreText='<span class="score-text"><span class="score-icon"><i class="rm-icon-rank-math"></i></span> SEO: <strong>'+p.__("Not available","rank-math")+"</strong></span>",t.scoreElem.html(t.scoreText),t.scoreText=t.scoreElem.find("strong"),t.fkScoreText='<span class="score-text">'+p.__("Not available","rank-math")+"</span>",t.fkScoreElem=i()('<div class="rank-math-seo-score below-focus-keyword">'+t.fkScoreText+"</div>"),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('<div class="misc-pub-section rank-math-lock-modified-date" id="rank-math-lock-modified-date"></div>'),(0,s.createRoot)(document.getElementById("rank-math-lock-modified-date")).render(wp.element.createElement(R,null)))}},{key:"updateScore",value:function(){var t,e=rankMathEditor.resultManager.getScore(rankMathEditor.getPrimaryKeyword()),r=100<(t=e)?"bad-fk dark":80<t?"good-fk":50<t?"ok-fk":"bad-fk";this.scoreElem.removeClass("loading bad-fk ok-fk good-fk"),this.fkScoreElem.removeClass("loading bad-fk ok-fk good-fk"),this.scoreElem.addClass(r),this.fkScoreElem.addClass(r),this.scoreText.html(e+" / 100"),this.fkScoreText.html(e+" / 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)([v,w,b,S])(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(g((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(I(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(I(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 I(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 I(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()("<input>",{type:"hidden",name:e,value:r}))}i()(window).off("beforeunload"),window.onbeforeunload=null,t.dataCollector.form[0].submit()};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):(d()({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=K(x().m(function e(r){var n,a,i;return x().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(),d()({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=K(x().m(function e(r){var n;return x().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:d()({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&&L(t.prototype,e),r&&L(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}(),H=B,G=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))},V=function(){return!(0,o.isNull)(document.getElementById("site-editor"))&&(0,o.endsWith)(wp.data.select("core/editor").getCurrentPostId(),"//home")};function W(t){return W="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},W(t)}function $(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,J(n.key),n)}}function J(t){var e=function(t,e){if("object"!=W(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==W(e)?e:e+""}var q=function(){return t=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||V())&&((0,u.addFilter)("rankMath_analysis_contentLength","rank-math",this.contentLength),(0,u.addFilter)("rankMath_analysis_contentLength_boundaries","rank-math",this.contentLengthBoundary))},(e=[{key:"contentLength",value:function(t){return{hasScore:t.hasScore,failed:(0,p.__)("Content is %1$d words long. Consider using at least 300 words.","rank-math"),tooltipText:(0,p.__)("Minimum recommended content length should be 300 words.","rank-math"),emptyContent:(0,p.sprintf)((0,p.__)("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,p.__)("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}}}}])&&$(t.prototype,e),r&&$(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();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 X(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,Y(n.key),n)}}function Y(t){var e=function(t,e){if("object"!=Q(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Q(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Q(e)?e:e+""}var Z=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.methods=[],this.init=this.init.bind(this),this.refresh=this.refresh.bind(this),(0,u.addAction)("rank_math_loaded","rank-math",this.init)},e=[{key:"init",value:function(){this.methods.length&&rankMathEditor.refresh("content")}},{key:"registerPlugin",value:function(){console.warn("RankMathApp.registerPlugin is deprecated.")}},{key:"refresh",value:function(t){console.warn("RankMathApp.refresh is deprecated, use rankMathEditor.refresh()"),this.methods.push(t)}},{key:"reloadPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"content";console.warn("RankMathApp.reloadPlugin is deprecated, use rankMathEditor.refresh()"),this.refresh(e)}}],e&&X(t.prototype,e),r&&X(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}(),tt=Z;function et(t){return et="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},et(t)}function rt(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,nt(n.key),n)}}function nt(t){var e=function(t,e){if("object"!=et(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==et(e)?e:e+""}var at=new(function(){return t=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=nt(r="map"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{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&&void 0!==tinymce.editors.rank_math_description_editor?tinymce.editors.rank_math_description_editor.getContent():i()("#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={},i().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)}}])&&rt(t.prototype,e),r&&rt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}());function it(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,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 ot(t,e){return(0,u.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function ut(t){return at.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),it("keywords",t,"rank_math_focus_keyword")}function ct(t){return it("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function st(t){return it("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function lt(t){return it("score",t,"rank_math_seo_score")}function pt(t){return it("canonicalUrl",t,"rank_math_canonical_url")}function ft(t){return it("advancedRobots",t,"rank_math_advanced_robots")}function dt(t){return it("robots",t,"rank_math_robots",Object.keys(t))}function mt(t){return it("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function ht(t){return it("lockModifiedDate",t,"rank_math_lock_modified_date")}function yt(){return it("dirtyMetadata",{})}function gt(t){return{type:"RESET_STORE",value:t}}function bt(t){return it("facebookTitle",t,"rank_math_facebook_title")}function vt(t){return it("facebookDescription",t,"rank_math_facebook_description")}function kt(t){return it("facebookImage",t,"rank_math_facebook_image")}function wt(t){return it("facebookImageID",t,"rank_math_facebook_image_id")}function _t(t){return it("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function St(t){return it("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function Pt(t){return rankMath.objectID=t,it("postID",t)}function Tt(t){return it("permalink",t,"permalink")}function Dt(t){return it("title",t,"rank_math_title")}function It(t){return it("description",t,"rank_math_description")}function Ot(t){return it("featuredImage",t)}function Et(t,e){return it("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function jt(t,e){return it(t,e)}function At(t){return ot("redirectionItem",t)}function Mt(){return ot("redirectionItem",{})}function Ct(t){return ot("hasRedirect",t)}var Rt=wp.autop,Ut="[^<>&/\\[\\]\0- =]+?",xt=new RegExp("\\["+Ut+"( [^\\]]+?)?\\]","g"),Nt=new RegExp("\\[/"+Ut+"\\]","g"),Ft=function(t){return t.replace(xt,"").replace(Nt,"")},Kt=function(t,e){var r=function(t,e){for(var r,n=/<p(?:[^>]+)?>(.*?)<\/p>/gi,a=[];null!==(r=n.exec(t));)a.push(r);return(0,o.map)(a,function(t){return e?T(t[1]):t[1]})}(t=(0,o.flow)([Ft,S,Rt.autop])(t),e=e||!1);return 0<r.length?r:[e?T(t):t]},Lt=document.createElement("div");function zt(t){return t&&"string"==typeof t&&(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),Lt.innerHTML=t,t=Lt.textContent,Lt.textContent=""),t}var Bt=function(t,e){return t=(t=T(t)).replace(/\r?\n|\r/g," "),e?(0,o.truncate)(t,{length:e,separator:" "}):t},Ht=function(t){if((0,o.isEmpty)(t))return"";t=w(t),t=v(t),t=(0,o.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,o.filter)(Kt(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(0<n.length)return Bt(n[0],160)}return Bt(e[0],160)},Gt=function(t){return!(0,o.isUndefined)(t)&&!(0,o.isEmpty)(t)&&T(t)};function Vt(t){return t=at.swap(""!==t?t:rankMath.assessor.serpData.titleTemplate),rankMathEditor.refresh("title"),ot("serpTitle",zt(t))}function Wt(t){return t=""!==t?t:rankMathEditor.assessor.dataCollector.getSlug(),rankMathEditor.refresh("permalink"),ot("serpSlug",t)}function $t(t){return t=at.swap(function(t){var e=rankMathEditor.assessor.dataCollector.getData(),r=e.excerpt,n=Ht(e.content),a=(0,o.isUndefined)(r)||(0,o.isEmpty)(r)?n:(0,o.unescape)(r);if(at.setVariable("excerpt",a),at.setVariable("seo_description",a),""!==(t=zt((0,u.applyFilters)("rankMath/description",t))))return T(t);var i=(0,o.unescape)(rankMath.assessor.serpData.descriptionTemplate);return"term"===rankMath.objectType?Gt(i)||Gt(r)||n:Gt(r)||Gt(i)||n}(t)),rankMathEditor.refresh("description"),ot("serpDescription",t)}function Jt(t){return ot("isSnippetEditorOpen",t)}function qt(t){return ot("snippetPreviewType",t)}function Qt(t){return it("twitterUseFacebook",t,"rank_math_twitter_use_facebook",!0===t?"on":"off")}function Xt(t){return it("twitterCardType",t,"rank_math_twitter_card_type")}function Yt(t){return it("twitterTitle",t,"rank_math_twitter_title")}function Zt(t){return it("twitterDescription",t,"rank_math_twitter_description")}function te(t){return it("twitterAuthor",t,"rank_math_twitter_author")}function ee(t){return it("twitterImageID",t,"rank_math_twitter_image_id")}function re(t){return it("twitterImage",t,"rank_math_twitter_image")}function ne(t){return it("twitterHasOverlay",t,"rank_math_twitter_enable_image_overlay",!0===t?"on":"off")}function ae(t){return it("twitterImageOverlay",t,"rank_math_twitter_image_overlay")}function ie(t){return it("twitterPlayerUrl",t,"rank_math_twitter_player_url")}function oe(t){return it("twitterPlayerSize",t,"rank_math_twitter_player_size")}function ue(t){return it("twitterPlayerStream",t,"rank_math_twitter_player_stream")}function ce(t){return it("twitterPlayerStreamCtype",t,"rank_math_twitter_player_stream_ctype")}function se(t){return it("twitterAppDescription",t,"rank_math_twitter_app_description")}function le(t){return it("twitterAppIphoneID",t,"rank_math_twitter_app_iphone_id")}function pe(t){return it("twitterAppIphoneName",t,"rank_math_twitter_app_iphone_name")}function fe(t){return it("twitterAppIphoneUrl",t,"rank_math_twitter_app_iphone_url")}function de(t){return it("twitterAppIpadID",t,"rank_math_twitter_app_ipad_id")}function me(t){return it("twitterAppIpadName",t,"rank_math_twitter_app_ipad_name")}function he(t){return it("twitterAppIpadUrl",t,"rank_math_twitter_app_ipad_url")}function ye(t){return it("twitterAppGoogleplayID",t,"rank_math_twitter_app_googleplay_id")}function ge(t){return it("twitterAppGoogleplayName",t,"rank_math_twitter_app_googleplay_name")}function be(t){return it("twitterAppGoogleplayUrl",t,"rank_math_twitter_app_googleplay_url")}function ve(t){return it("twitterAppCountry",t,"rank_math_twitter_app_country")}function ke(t){return ot("isLoaded",t)}function we(t){return ot("selectedKeyword",t)}function _e(t){return ot("socialTab",t)}function Se(){return ot("refreshResults",Date.now())}function Pe(){return ot("isPro",!0)}function Te(t){return ot("isDiviPageSettingsBarActive",t)}function De(t){return ot("isDiviRankMathModalActive",t)}function Ie(t){return ot("highlightedParagraphs",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 Ee(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 je(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ee(Object(r),!0).forEach(function(e){Ae(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ae(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Oe(t)||!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:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Me(t){return ot("isSchemaEditorOpen",t)}function Ce(t){return ot("isSchemaTemplatesOpen",t)}function Re(t){return ot("schemaUpdated",t)}function Ue(t){return ot("editingSchemaId",t)}function xe(t){return ot("editorTab",t)}function Ne(t){return ot("templateTab",t)}function Fe(t){return ot("editSchemas",t)}function Ke(t){return it("schemas",t)}function Le(t,e){var r=je({},(0,c.select)("rank-math").getEditSchemas());return r[t]=e,ot("editSchemas",r)}function ze(t,e){var r=je({},(0,c.select)("rank-math").getSchemas());return r[t]=e,it("schemas",r)}function Be(t){var e=je({},(0,c.select)("rank-math").getSchemas());return delete e[t],(0,u.doAction)("rank_math_schema_trash",t),it("schemas",e,"rank_math_delete_"+t,"")}function He(t,e,r){return d()({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,o.get)(rankMath,"isTemplateScreen",!1)&&(document.title=(0,p.__)("Edit Schema","rank-math"),window.history.pushState(null,"",r.link.replace(/&/g,"&")))},2e3),rankMath.schemaTemplates.push({schema:t,title:t.metadata.title,type:t["@type"]})}),e({loading:!0}),{type:"DONT_WANT_TO_DO_SOMETHING"}}function Ge(t){return it("contentAIScore",t,"rank_math_contentai_score",t)}function Ve(t){return Ve="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},Ve(t)}function We(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 $e(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?We(Object(r),!0).forEach(function(e){Je(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Je(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Ve(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ve(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qe=function(t){var e=t.assessor.serpData,r=t.assessor.hasRedirection;return{postID:null,title:e.title?e.title:e.titleTemplate,description:e.description,keywords:e.focusKeywords?e.focusKeywords:"",pillarContent:e.pillarContent,featuredImage:"",permalink:!1,primaryTerm:e.primaryTerm,robots:e.robots,advancedRobots:e.advancedRobots,canonicalUrl:e.canonicalUrl,breadcrumbTitle:e.breadcrumbTitle,showScoreFrontend:e.showScoreFrontend,lockModifiedDate:e.lockModifiedDate,redirectionID:r?(0,o.get)(t.assessor,"redirection.id",""):"",redirectionType:r?(0,o.get)(t.assessor,"redirection.header_code",""):"",redirectionUrl:r?(0,o.get)(t.assessor,"redirection.url_to",""):"",facebookTitle:e.facebookTitle,facebookImage:e.facebookImage,facebookImageID:e.facebookImageID,facebookAuthor:e.facebookAuthor,facebookDescription:e.facebookDescription,facebookHasOverlay:e.facebookHasOverlay,facebookImageOverlay:e.facebookImageOverlay,twitterTitle:e.twitterTitle,twitterImage:e.twitterImage,twitterAuthor:e.twitterAuthor,twitterImageID:e.twitterImageID,twitterCardType:e.twitterCardType,twitterUseFacebook:e.twitterUseFacebook,twitterDescription:e.twitterDescription,twitterHasOverlay:e.twitterHasOverlay,twitterImageOverlay:e.twitterImageOverlay,twitterPlayerUrl:e.twitterPlayerUrl,twitterPlayerSize:e.twitterPlayerSize,twitterPlayerStream:e.twitterPlayerStream,twitterPlayerStreamCtype:e.twitterPlayerStreamCtype,twitterAppDescription:e.twitterAppDescription,twitterAppIphoneName:e.twitterAppIphoneName,twitterAppIphoneID:e.twitterAppIphoneID,twitterAppIphoneUrl:e.twitterAppIphoneUrl,twitterAppIpadName:e.twitterAppIpadName,twitterAppIpadID:e.twitterAppIpadID,twitterAppIpadUrl:e.twitterAppIpadUrl,twitterAppGoogleplayName:e.twitterAppGoogleplayName,twitterAppGoogleplayID:e.twitterAppGoogleplayID,twitterAppGoogleplayUrl:e.twitterAppGoogleplayUrl,twitterAppCountry:e.twitterAppCountry,schemas:(0,o.get)(t,"schemas",{}),score:0,dirtyMetadata:{}}};function Qe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qe(rankMath),e=arguments.length>1?arguments[1]:void 0,r=$e({},t.dirtyMetadata);return!1!==e.metaKey&&(r[e.metaKey]=e.metaValue),"RESET_STORE"===e.type?$e({},qe(e.value)):"RANK_MATH_APP_DATA"===e.type?"dirtyMetadata"===e.key?$e($e({},t),{},{dirtyMetadata:e.value}):$e($e({},t),{},Je(Je({},e.key,e.value),"dirtyMetadata",r)):t}function Xe(t){return Xe="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},Xe(t)}function Ye(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 Ze(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ye(Object(r),!0).forEach(function(e){tr(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ye(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function tr(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=Xe(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var er={isLoaded:!1,isPro:!1,selectedKeyword:{tag:"",index:0,data:{value:""}},hasRedirect:rankMath.assessor.hasRedirection&&!(0,o.isEmpty)((0,o.get)(rankMath.assessor,"redirection.id",""))&&!(0,o.isEmpty)((0,o.get)(rankMath.assessor,"redirection.url_to","")),serpTitle:"",serpSlug:"",serpDescription:(0,o.get)(rankMath.assessor,"serpData.description",""),isSnippetEditorOpen:!1,snippetPreviewType:"",refreshResults:"",redirectionItem:{},socialTab:"facebook",highlightedParagraphs:[],editorTab:"",templateTab:"",editSchemas:{},editingSchemaId:"",isSchemaEditorOpen:!1,isSchemaTemplatesOpen:!1,schemaUpdated:!1,isDiviRankMathModalActive:!1,isDiviPageSettingsBarActive:!1};function rr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:er,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?Ze(Ze({},t),{},tr({},e.key,e.value)):t}function nr(t){return t.appData}function ar(t){return t.appData.dirtyMetadata}function ir(t){return t.appData.score}function or(t){return t.appData.keywords}function ur(t){return t.appData.pillarContent}function cr(t){return t.appData.robots}function sr(t){return t.appData.advancedRobots}function lr(t){return t.appData.canonicalUrl}function pr(t){return t.appData.breadcrumbTitle}function fr(t){return"todo"}function dr(t){return t.appData.showScoreFrontend}function mr(t){return t.appData.lockModifiedDate}function hr(t){return t.appUi.isLoaded}function yr(t){return t.appUi.selectedKeyword}function gr(t){return t.appUi.socialTab}function br(t){return t.appUi.refreshResults}function vr(t){return t.appUi.isPro}function kr(t){return t.appUi.isDiviPageSettingsBarActive}function wr(t){return t.appUi.isDiviRankMathModalActive}function _r(t){return t.appUi.highlightedParagraphs}function Sr(t){return t.appData.facebookTitle}function Pr(t){return t.appData.facebookDescription}function Tr(t){return t.appData.facebookAuthor}function Dr(t){return t.appData.facebookImageID}function Ir(t){return t.appData.facebookImage}function Or(t){return t.appData.facebookHasOverlay}function Er(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function jr(t){return t.appData.postID}function Ar(t){return t.appData.title}function Mr(t){return t.appData.permalink}function Cr(t){return t.appData.description}function Rr(t){return t.appData.featuredImage}function Ur(t){var e=t.appData.featuredImage;return'<img src="'.concat(e.source_url,'" alt="').concat(e.alt_text,'" >')}function xr(t){return t.appData.primaryTerm}function Nr(t){return String(t.appData.redirectionID)}function Fr(t){return t.appData.redirectionType}function Kr(t){return t.appData.redirectionUrl}function Lr(t){return t.appUi.redirectionItem}function zr(t){return t.appUi.hasRedirect}var Br=wp.url;function Hr(t){return zt(t.appUi.serpTitle)}function Gr(t){return(0,Br.safeDecodeURIComponent)(t.appUi.serpSlug)}function Vr(t){return t.appUi.serpDescription}function Wr(t){return t.appUi.isSnippetEditorOpen}function $r(t){return t.appUi.snippetPreviewType}function Jr(t){return t.appUi.isSchemaEditorOpen}function qr(t){return t.appUi.isSchemaTemplatesOpen}function Qr(t){return t.appUi.schemaUpdated}function Xr(t){return t.appData.schemas}function Yr(t){return t.appUi.editSchemas}function Zr(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function tn(t){return t.appData.schemas[t.appUi.editingSchemaId]}function en(t){return t.appUi.editorTab}function rn(t){return t.appUi.templateTab}function nn(t){return t.appData.twitterUseFacebook}function an(t){return t.appData.twitterCardType}function on(t){return t.appData.twitterTitle}function un(t){return t.appData.twitterDescription}function cn(t){return t.appData.twitterAuthor}function sn(t){return t.appData.twitterImageID}function ln(t){return t.appData.twitterImage}function pn(t){return t.appData.twitterHasOverlay}function fn(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function dn(t){return t.appData.twitterAppDescription}function mn(t){return t.appData.twitterAppIphoneID}function hn(t){return t.appData.twitterAppIphoneName}function yn(t){return t.appData.twitterAppIphoneUrl}function gn(t){return t.appData.twitterAppIpadID}function bn(t){return t.appData.twitterAppIpadName}function vn(t){return t.appData.twitterAppIpadUrl}function kn(t){return t.appData.twitterAppGoogleplayID}function wn(t){return t.appData.twitterAppGoogleplayName}function _n(t){return t.appData.twitterAppGoogleplayUrl}function Sn(t){return t.appData.twitterAppCountry}function Pn(t){return t.appData.twitterPlayerUrl}function Tn(t){return t.appData.twitterPlayerSize}function Dn(t){return t.appData.twitterPlayerStream}function In(t){return t.appData.twitterPlayerStreamCtype}(0,c.registerStore)("rank-math",{reducer:(0,c.combineReducers)(r),selectors:n,actions:e});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,jn(n.key),n)}}function jn(t){var e=function(t,e){if("object"!=On(t)||!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)}(t,"string");return"symbol"==On(e)?e:e+""}var An=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.updateBtn=i()("#publish"),this.form=i()("#post"),this._data={id:!1,slug:!1,permalink:!1,content:!1,title:!1,excerpt:!1,featuredImage:!1,description:""},this.refresh=this.refresh.bind(this),(0,u.addAction)("rank_math_loaded","rank-math",this.refresh),this.setup(),this.init()},e=[{key:"init",value:function(){var t=this;this.elemTitle.on("input",(0,o.debounce)(function(){t.handleTitleChange(t.elemTitle.val())},500)).trigger("input"),this.elemDescription.on("input",(0,o.debounce)(function(){t.handleExcerptChange(t.elemDescription.val())},500)).trigger("input"),this.elemSlug.on("input",(0,o.debounce)(function(){rankMathEditor.updatePermalink(t.elemSlug.val())},500))}},{key:"collectData",value:function(){this._data={id:this.getPostID(),slug:this.getSlug(),permalink:this.getPermalink(),content:this.getContent(),title:this.getTitle(),excerpt:this.getExcerpt(),featuredImage:this.getFeaturedImage()}}},{key:"getPostID",value:function(){return rankMath.objectID}},{key:"getTitle",value:function(){return this.elemTitle.val()}},{key:"getExcerpt",value:function(){var t=this.elemDescription.val();return at.setVariable("excerpt",t),at.setVariable("excerpt_only",t),at.setVariable("wc_shortdesc",t),at.setVariable("seo_description",t),t}},{key:"getPermalink",value:function(){return this.getSlug()?rankMath.permalinkFormat.replace(/%(postname|pagename|term|author)%/,this.getSlug()):""}},{key:"getSlug",value:function(){return this.elemSlug.val()}},{key:"getFeaturedImage",value:function(){return this.featuredImage}},{key:"refresh",value:function(){this.collectData(),(0,c.dispatch)("rank-math").toggleLoaded(!0),rankMathEditor.refresh("init")}},{key:"handleSlugChange",value:function(t){var e=arguments.length>1&&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){at.setVariable("title",t),at.setVariable("term",t),at.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&&En(t.prototype,e),r&&En(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}(),Mn=An;function Cn(t){return Cn="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},Cn(t)}function Rn(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,Un(n.key),n)}}function Un(t){var e=function(t,e){if("object"!=Cn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Cn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Cn(e)?e:e+""}function xn(t,e,r){return e=Fn(e),function(t,e){if(e&&("object"==Cn(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)}(t,Nn()?Reflect.construct(e,r||[],Fn(t).constructor):e.apply(t,r))}function Nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nn=function(){return!!t})()}function Fn(t){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fn(t)}function Kn(t,e){return Kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kn(t,e)}var Ln=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),xn(this,e,arguments)}return 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&&Kn(t,e)}(e,t),r=e,(n=[{key:"setup",value:function(){this.elemSlug=i()("#post_name"),this.elemTitle=i()("#title"),this.elemDescription=i()("#excerpt"),this.elemContent=i()("#content"),this.saveDraft=i()("#save-post"),this.postStatus=i()("#original_post_status"),this.assessThumbnail=this.assessThumbnail.bind(this),(0,u.addAction)("rank_math_updated_featured_image","rank-math",this.assessThumbnail),this.events()}},{key:"getContent",value:function(){if(null!==this.elemContent&&0!==this.elemContent.length)return this.isTinymce()&&tinymce.activeEditor&&!(0,o.isNull)(tinymce.get("content"))?tinymce.get("content").getContent():this.elemContent.val()}},{key:"getSlug",value:function(){var t=""===this.elemSlug.val()&&i()("#editable-post-name-full").length?i()("#editable-post-name-full").text():this.elemSlug.val();return(0,o.isUndefined)(t)?"":t}},{key:"events",value:function(){var t=this;this.elemContent.on("input change",(0,o.debounce)(function(){t.handleContentChange()},500)).trigger("change");var e=function(){t.isTinymce()&&(tinymce.activeEditor&&!(0,o.isUndefined)(tinymce.editors.content)&&tinymce.editors.content.on("keyup change",(0,o.debounce)(function(){t.handleContentChange()},500)),tinymce.editors&&!(0,o.isUndefined)(tinymce.editors.excerpt)&&tinymce.editors.excerpt.on("keyup change",(0,o.debounce)(function(){tinymce.editors.excerpt.save(),t.handleExcerptChange()},500)))};"undefined"!=typeof tinymce&&tinymce.on("AddEditor",e),i()(window).on("load",e),i()(document).on("ajaxComplete",function(e,r,n){var a="/admin-ajax.php";if(a===n.url.substr(-15)){var o="";"string"==typeof n.data&&-1!==n.data.indexOf("action=sample-permalink")&&(o=""===r.responseText?t.elemTitle.val():i()("<div>"+r.responseText+"</div>").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)}}])&&Rn(r.prototype,n),a&&Rn(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(Mn),zn=Ln;function Bn(t){return Bn="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},Bn(t)}function Hn(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,Gn(n.key),n)}}function Gn(t){var e=function(t,e){if("object"!=Bn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Bn(e)?e:e+""}function Vn(t,e,r){return e=$n(e),function(t,e){if(e&&("object"==Bn(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)}(t,Wn()?Reflect.construct(e,r||[],$n(t).constructor):e.apply(t,r))}function Wn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wn=function(){return!!t})()}function $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$n(t)}function Jn(t,e){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jn(t,e)}var qn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Vn(this,e,arguments)}return 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&&Jn(t,e)}(e,t),r=e,(n=[{key:"setup",value:function(){this.updateBtn=i()('.edit-tag-actions input[type="submit"]'),this.form=i()("#edittag"),this.elemSlug=i()("#slug"),this.elemTitle=i()("#name"),this.elemDescription=i()("#rank_math_description_editor"),this.events()}},{key:"getContent",value:function(){return null===this.elemDescription||0===this.elemDescription.length?"":this.isTinymce()&&tinymce.activeEditor&&"rank_math_description_editor"===tinymce.activeEditor.id?tinymce.activeEditor.getContent():this.elemDescription.val()}},{key:"events",value:function(){var t=this;i()(window).on("load",function(){t.isTinymce()&&tinymce.activeEditor&&!(0,o.isUndefined)(tinymce.editors.rank_math_description_editor)&&tinymce.editors.rank_math_description_editor.on("keyup change",(0,o.debounce)(function(){t.handleContentChange()},500))})}}])&&Hn(r.prototype,n),a&&Hn(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(Mn),Qn=qn;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 Yn(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,Zn(n.key),n)}}function Zn(t){var e=function(t,e){if("object"!=Xn(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xn(e)?e:e+""}function ta(t,e,r){return e=ra(e),function(t,e){if(e&&("object"==Xn(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)}(t,ea()?Reflect.construct(e,r||[],ra(t).constructor):e.apply(t,r))}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ea=function(){return!!t})()}function ra(t){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ra(t)}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},na(t,e)}var aa=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ta(this,e,arguments)}return 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&&na(t,e)}(e,t),r=e,(n=[{key:"setup",value:function(){this.updateBtn=i()("#submit"),this.form=i()("#your-profile"),this.elemSlug=i()("#user_login"),this.elemTitle=i()("#display_name"),this.elemDescription=i()("#description")}},{key:"getContent",value:function(){return this.elemDescription.val()}}])&&Yn(r.prototype,n),a&&Yn(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(Mn),ia=aa,oa=wp.plugins,ua=wp.editor;function ca(t){return ca="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},ca(t)}function sa(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 la(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sa(Object(r),!0).forEach(function(e){fa(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sa(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function pa(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,da(n.key),n)}}function fa(t,e,r){return(e=da(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function da(t){var e=function(t,e){if("object"!=ca(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ca(e)?e:e+""}var ma=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fa(this,"initialize",!1),fa(this,"isSavingRedirection",!1),fa(this,"isSavingSchemas",!1),fa(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(),this.lockModifiedDate()},(e=[{key:"lockModifiedDate",value:function(){rankMath.showLockModifiedDate&&(0,oa.registerPlugin)("rank-math-lock-last-modified",{render:function(){return wp.element.createElement(ua.PluginPostStatusInfo,null,wp.element.createElement(R,null))}})}},{key:"collectGutenbergData",value:function(){return G()?(this._coreEditorSelect||(this._coreEditorSelect=(0,c.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(V())return rankMath.homeUrl;if("auto-draft"===this.getPostAttribute("status"))return"";var t=this.getPostAttribute("generated_slug");return"auto-draft"!==t&&"en"===rankMath.locale||(t=""),(0,Br.safeDecodeURIComponent)(this._coreEditorSelect.getPermalink())}},{key:"getSlug",value:function(){var t=this.getPostAttribute("generated_slug");return"auto-draft"===t&&(t=""),(0,Br.safeDecodeURIComponent)(this.getPostAttribute("slug")||t)}},{key:"getFeaturedImage",value:function(){var t=this.getPostAttribute("featured_media");if(this.isValidMediaId(t)){var e=(0,c.select)("core").getEntityRecord("postType","attachment",t);if(!(0,o.isUndefined)(e))return e}}},{key:"isValidMediaId",value:function(t){return"number"==typeof t&&0<t}},{key:"getPostAttribute",value:function(t){return G()?(this._coreEditorSelect||(this._coreEditorSelect=(0,c.select)("core/editor")),this._coreEditorSelect.getEditedPostAttribute(t)):""}},{key:"subscribeToGutenberg",value:function(){this.subscriber=(0,o.debounce)(this.refresh,500),(0,c.subscribe)(this.subscriber),(0,c.subscribe)(this.isSavingPost)}},{key:"refresh",value:function(){var t=la({},this._data);this._data=this.collectGutenbergData(),this.handleEditorChange(t)}},{key:"isSavingPost",value:function(){var t=(0,c.select)("core/editor");if(!t.isAutosavingPost()&&t.isSavingPost()){var e=(0,c.select)("rank-math").getDirtyMetadata();(0,o.isEmpty)(e)||(d()({method:"POST",path:"rankmath/v1/updateMeta",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,meta:e,content:(0,u.applyFilters)("rank_math_content",this.getPostAttribute("content"))}}).then(function(t){(0,u.doAction)("rank_math_metadata_updated",t)}),(0,c.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,c.select)("rank-math").getSchemas();if(!(0,o.isEmpty)(e)&&(0,c.select)("rank-math").hasSchemaUpdated()){this.isSavingSchemas=!0;var r=(0,c.select)("rank-math").getEditSchemas();d()({method:"POST",path:"rankmath/v1/updateSchemas",data:{objectID:this.getPostID(),objectType:rankMath.objectType,schemas:e}}).then(function(n){var a=la({},e),i=la({},r);(0,o.isEmpty)(n)||(0,o.map)(n,function(t,e){a["schema-"+t]=la({},a[e]),i["schema-"+t]=la({},i[e]),delete a[e],delete i[e]}),(0,c.dispatch)("rank-math").updateSchemas(a),(0,c.dispatch)("rank-math").updateEditSchemas(i),setTimeout(function(){(0,c.dispatch)("rank-math").schemaUpdated(!1),(0,u.doAction)("rank_math_schema_changed"),t.isSavingSchemas=!1},2e3)})}}}},{key:"saveRedirection",value:function(){var t=this;if(!this.isSavingRedirection){var e=(0,c.select)("rank-math").getRedirectionItem();if(!(0,o.isEmpty)(e)){this.isSavingRedirection=!0,e.objectID=this.getPostID(),e.redirectionSources=this.getPermalink();var r=(0,c.dispatch)("rank-math"),n=(0,c.dispatch)("core/notices");r.resetRedirection(),d()({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,o.get)(rankMath,["assessor","autoCreateRedirection"],!1)&&!(0,c.select)("core/editor").isEditedPostNew()&&!1!==this.oldSlug){var t=this.getSlug();if(this.oldSlug!==t){var e=(0,c.dispatch)("core/notices");this.oldSlug=t,e.createSuccessNotice((0,p.__)("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(t.id)return this.initialize?void(0,o.forEach)(r,function(r,n){e._data[n]!==t[n]&&e[r](e._data[n])}):(this.initialize=!0,(0,o.forEach)(r,function(t,r){e[t](e._data[r])}),void rankMathEditor.refresh("init"));(0,c.dispatch)("rank-math").refreshResults()}},{key:"handleIDChange",value:function(t){V()&&(t=0),(0,c.dispatch)("rank-math").updatePostID(t),(0,c.dispatch)("rank-math").toggleLoaded(!0),(0,u.doAction)("rank_math_id_changed")}},{key:"handleSlugChange",value:function(){""!==this.getSlug()&&!1===this.oldSlug&&(this.oldSlug=this.getSlug()),rankMathEditor.refresh("permalink")}},{key:"handleTitleChange",value:function(t){at.setVariable("title",t),at.setVariable("term",t),at.setVariable("author",t),(0,c.dispatch)("rank-math").updateSerpTitle((0,c.select)("rank-math").getTitle()),rankMathEditor.refresh("title")}},{key:"handleExcerptChange",value:function(t){at.setVariable("excerpt",t),at.setVariable("excerpt_only",t),at.setVariable("wc_shortdesc",t),at.setVariable("seo_description",t),(0,c.dispatch)("rank-math").updateSerpDescription((0,c.select)("rank-math").getDescription())}},{key:"handleFeaturedImageChange",value:function(t){(0,c.dispatch)("rank-math").updateFeaturedImage(t),rankMathEditor.refresh("featuredImage")}},{key:"handleContentChange",value:function(){(0,c.dispatch)("rank-math").updateSerpDescription((0,c.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"getData",value:function(){return(0,u.applyFilters)("rank_math_dataCollector_data",this._data)}}])&&pa(t.prototype,e),r&&pa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}(),ha=ma;function ya(t){return ya="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},ya(t)}function ga(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,va(n.key),n)}}function ba(t,e,r){return e&&ga(t.prototype,e),r&&ga(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function va(t){var e=function(t,e){if("object"!=ya(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=ya(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ya(e)?e:e+""}var ka=ba(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){i().fn.extend({insertLink:function(t,e){var r=this[0],n="";if(r.selectionStart||"0"===r.selectionStart){var a=r.selectionStart,i=r.selectionEnd,o=r.scrollTop;n='<a href="'+t+'">'+r.value.substring(a,i)+"</a>",a===i&&(n='<a href="'+t+'">'+e+"</a>"),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='<a href="'+t+'">'+e+"</a>",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":ya(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("</a>")&&((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('<a href="'+s.data("url")+'">'+l+"</a>"):e.insertContent('<a href="'+s.data("url")+'">'+s.data("text")+"</a>")}else if(G()){var f=(0,c.select)("core/block-editor"),d=s.data("url"),m=s.data("text"),h='<a href="'+d+'">'+m+"</a>",y=function(t,e){for(var r=0,n=0;n<t.length&&r<e;)if("<"===t[n]){for(;n<t.length&&">"!==t[n];)n++;n++}else r++,n++;for(;n<t.length&&"<"===t[n];){for(;n<t.length&&">"!==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)+'<a href="'+d+'">'+i+"</a>"+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 wa(t){return wa="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},wa(t)}function _a(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,Pa(n.key),n)}}function Sa(t,e,r){return e&&_a(t.prototype,e),r&&_a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pa(t){var e=function(t,e){if("object"!=wa(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=wa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wa(e)?e:e+""}var Ta=Sa(function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"post"===rankMath.objectType&&!1!==rankMath.assessor.primaryTaxonomy&&i()("[data-primary-term]").each(function(){var t=i()(this),e=t.val(),r=t.data("primary-term"),n=i()("#"+r+"div"),a=i()("#"+r+"checklist"),o=a.find("li"),u=a.find('input[type="checkbox"]:checked');o.addClass("rank-math-primary-term-li"),o.find("input").each(function(){var t=i()(this);t.parent().append('<span class="rank-math-tooltip"><input class="rank-math-make-primary" value="'+t.val()+'" type="radio" name="rank_math_primary_'+r+'"><span>'+(0,p.__)("Make Term Primary","rank-math")+"</span></span>")}),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<r.length?r.trigger("click"):(o.removeClass("term-marked-primary"),o.find('input[type="radio"]').prop("checked",!1),t.val(""))}}),n.on("click",".rank-math-make-primary",function(){var e=i()(this),n=e.closest("li");o.removeClass("term-marked-primary"),n.addClass("term-marked-primary"),t.val(e.val()),wp.data.dispatch("rank-math").updatePrimaryTermID(e.val(),r)}),a.on("wpListAddEnd",function(){a.find("li:not(.rank-math-primary-term-li)").addClass("rank-math-primary-term-li term-checked").find("input").each(function(){var t=i()(this);t.parent().append('<span class="rank-math-tooltip"><input class="rank-math-make-primary" value="'+t.val()+'" type="radio" name="rank_math_primary_'+r+'"><span>'+(0,p.__)("Make Term Primary","rank-math")+"</span></span>")})})})});function Da(t){return Da="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},Da(t)}function Ia(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,Oa(n.key),n)}}function Oa(t){var e=function(t,e){if("object"!=Da(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Da(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Da(e)?e:e+""}var Ea=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.image_src="",this.image_alt="",this.getFeaturedImage(),this.setImage(),this.removeImage(),G()&&this.gutenbergImage()},(e=[{key:"setImage",value:function(){var t=this;if(!(0,o.isUndefined)(wp.media)){var e=wp.media.featuredImage.frame();e.on("select",function(){var r=i()("#rank_math_post_thumbnail"),n=e.state().get("selection").first().toJSON();t.sizeWarning(n),1>r.length&&(r=i()('<img id="rank_math_post_thumbnail" />'),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<t.width&&200<t.height)){var e=i()("#postimagediv").find(".hndle");i()('<div id="rank_math_image_warning" class="notice notice-error notice-alt"><p>'+rankMath.featuredImageNotice+"</p></div>").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&&0<t}}])&&Ia(t.prototype,e),r&&Ia(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}(),ja=(0,E.createSlotFill)("RankMathAfterEditor"),Aa=ja.Fill,Ma=ja.Slot,Ca=function(t){var e=t.children,r=t.className;return wp.element.createElement(Aa,null,wp.element.createElement(E.PanelRow,{className:r},e))};Ca.Slot=Ma;var Ra=Ca,Ua=(0,E.createSlotFill)("RankMathAdvancedTab"),xa=Ua.Fill,Na=Ua.Slot,Fa=function(t){var e=t.children,r=t.className;return wp.element.createElement(xa,null,wp.element.createElement(E.PanelRow,{className:r},e))};Fa.Slot=Na;var Ka=Fa,La=(0,E.createSlotFill)("RankMathAfterFocusKeyword"),za=La.Fill,Ba=La.Slot,Ha=function(t){var e=t.children,r=t.className;return wp.element.createElement(za,null,wp.element.createElement("div",{className:r},e))};Ha.Slot=Ba;var Ga=Ha;function Va(t){return Va="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},Va(t)}function Wa(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,$a(n.key),n)}}function $a(t){var e=function(t,e){if("object"!=Va(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=Va(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Va(e)?e:e+""}var Ja=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"setup",value:function(){this.registerSlots=this.registerSlots.bind(this),(0,u.addAction)("rank_math_loaded","rank-math",this.registerSlots,0),this.resultManager=new l.ResultManager,this.assessor=new H(this.getCollector()),new q,this.registerComponents=this.registerComponents.bind(this),(0,u.addAction)("rank_math_loaded","rank-math",this.registerComponents,11)}},{key:"registerSlots",value:function(){this.RankMathAfterEditor=Ra,this.RankMathAfterFocusKeyword=Ga,this.RankMathAdvancedTab=Ka,this.slots={AfterEditor:Ra,AfterFocusKeyword:Ga,AdvancedTab:Ka}}},{key:"registerComponents",value:function(){this.components={},this.components.linkSuggestions=new ka,this.components.primaryTerm=new Ta,this.components.featuredImage=new Ea,rankMathAdmin.variableInserter(!1),setTimeout(function(){(0,s.createRoot)(document.getElementById("rank-math-metabox-wrapper")).render((0,s.createElement)((0,u.applyFilters)("rank_math_app",{})))},1e3)}},{key:"refresh",value:function(t){this.assessor.refresh(t)}},{key:"updatePermalink",value:function(t){var e=arguments.length>1&&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 I(this.assessor.getPrimaryKeyword())}},{key:"getSelectedKeyword",value:function(){var t=this.assessor.getSelectedKeyword();return(0,o.isUndefined)(t)?"":I(t)}},{key:"getCollector",value:function(){return"post"===rankMath.objectType?G()?new ha:new zn(this):"term"===rankMath.objectType?new Qn:"user"===rankMath.objectType?new ia:void 0}}],e&&Wa(t.prototype,e),r&&Wa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,r}();i()(function(){window.rankMathEditor=new Ja,window.rankMathEditor.setup(),window.RankMathApp=new tt}),i()(window).on("load",function(){i().when(i().ready).then(function(){(0,u.doAction)("rank_math_loaded")})})}();