!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 Ne},lockModifiedDate:function(){return pt},refreshResults:function(){return ve},resetDirtyMetadata:function(){return ft},resetRedirection:function(){return Et},resetStore:function(){return dt},saveSchema:function(){return Ue},saveTemplate:function(){return Fe},schemaUpdated:function(){return Oe},setEditingSchemaId:function(){return je},setEditorTab:function(){return Ae},setTemplateTab:function(){return Me},setVersion:function(){return be},toggleFrontendScore:function(){return at},toggleIsDiviPageSettingsBarActive:function(){return ke},toggleIsDiviRankMathModalActive:function(){return we},toggleLoaded:function(){return me},toggleSchemaEditor:function(){return Ie},toggleSchemaTemplates:function(){return Ee},toggleSnippetEditor:function(){return Ht},updateAIScore:function(){return Le},updateAdvancedRobots:function(){return ct},updateAnalysisScore:function(){return ot},updateAppData:function(){return et},updateAppUi:function(){return rt},updateBreadcrumbTitle:function(){return lt},updateCanonicalUrl:function(){return ut},updateDescription:function(){return St},updateEditSchema:function(){return Re},updateEditSchemas:function(){return Ce},updateFacebookDescription:function(){return mt},updateFacebookHasOverlay:function(){return vt},updateFacebookImage:function(){return yt},updateFacebookImageID:function(){return gt},updateFacebookImageOverlay:function(){return bt},updateFacebookTitle:function(){return ht},updateFeaturedImage:function(){return Pt},updateHasRedirect:function(){return Ot},updateHighlightedParagraphs:function(){return _e},updateKeywords:function(){return nt},updatePermalink:function(){return wt},updatePillarContent:function(){return it},updatePostID:function(){return kt},updatePrimaryTermID:function(){return Tt},updateRedirection:function(){return Dt},updateRedirectionItem:function(){return It},updateRobots:function(){return st},updateSchemas:function(){return xe},updateSelectedKeyword:function(){return ye},updateSerpDescription:function(){return Gt},updateSerpSlug:function(){return zt},updateSerpTitle:function(){return Kt},updateSnippetPreviewType:function(){return Bt},updateSocialTab:function(){return ge},updateTitle:function(){return _t},updateTwitterAppCountry:function(){return he},updateTwitterAppDescription:function(){return ie},updateTwitterAppGoogleplayID:function(){return pe},updateTwitterAppGoogleplayName:function(){return fe},updateTwitterAppGoogleplayUrl:function(){return de},updateTwitterAppIpadID:function(){return ce},updateTwitterAppIpadName:function(){return se},updateTwitterAppIpadUrl:function(){return le},updateTwitterAppIphoneID:function(){return ae},updateTwitterAppIphoneName:function(){return oe},updateTwitterAppIphoneUrl:function(){return ue},updateTwitterAuthor:function(){return qt},updateTwitterCardType:function(){return Wt},updateTwitterDescription:function(){return Jt},updateTwitterHasOverlay:function(){return Xt},updateTwitterImage:function(){return Qt},updateTwitterImageID:function(){return Yt},updateTwitterImageOverlay:function(){return Zt},updateTwitterPlayerSize:function(){return ee},updateTwitterPlayerStreamCtype:function(){return ne},updateTwitterPlayerStreamUrl:function(){return re},updateTwitterPlayerUrl:function(){return te},updateTwitterTitle:function(){return $t},updateTwitterUseFacebook:function(){return Vt}});var r={};t.r(r),t.d(r,{appData:function(){return Ve},appUi:function(){return Qe}});var n={};t.r(n),t.d(n,{getAdvancedRobots:function(){return ir},getAnalysisScore:function(){return tr},getAppData:function(){return Xe},getBreadcrumbTitle:function(){return or},getCanonicalUrl:function(){return ar},getDescription:function(){return Er},getDirtyMetadata:function(){return Ze},getEditSchemas:function(){return $r},getEditingSchema:function(){return Jr},getEditorTab:function(){return Yr},getFacebookAuthor:function(){return kr},getFacebookDescription:function(){return br},getFacebookHasOverlay:function(){return Sr},getFacebookImage:function(){return _r},getFacebookImageID:function(){return wr},getFacebookImageOverlay:function(){return Pr},getFacebookTitle:function(){return vr},getFeaturedImage:function(){return Or},getFeaturedImageHtml:function(){return jr},getHighlightedParagraphs:function(){return gr},getKeywords:function(){return er},getPermalink:function(){return Ir},getPillarContent:function(){return rr},getPostID:function(){return Tr},getPreviewSchema:function(){return qr},getPrimaryTermID:function(){return Ar},getRedirectionID:function(){return Mr},getRedirectionItem:function(){return Rr},getRedirectionType:function(){return Cr},getRedirectionUrl:function(){return xr},getRichSnippets:function(){return ur},getRobots:function(){return nr},getSchemas:function(){return Wr},getSelectedKeyword:function(){return pr},getSerpDescription:function(){return Kr},getSerpSlug:function(){return Lr},getSerpTitle:function(){return Fr},getShowScoreFrontend:function(){return cr},getSnippetPreviewType:function(){return Gr},getSocialTab:function(){return fr},getTemplateTab:function(){return Qr},getTitle:function(){return Dr},getTwitterAppCountry:function(){return vn},getTwitterAppDescription:function(){return cn},getTwitterAppGoogleplayID:function(){return mn},getTwitterAppGoogleplayName:function(){return yn},getTwitterAppGoogleplayUrl:function(){return gn},getTwitterAppIpadID:function(){return fn},getTwitterAppIpadName:function(){return dn},getTwitterAppIpadUrl:function(){return hn},getTwitterAppIphoneID:function(){return sn},getTwitterAppIphoneName:function(){return ln},getTwitterAppIphoneUrl:function(){return pn},getTwitterAuthor:function(){return rn},getTwitterCardType:function(){return Zr},getTwitterDescription:function(){return en},getTwitterHasOverlay:function(){return on},getTwitterImage:function(){return an},getTwitterImageID:function(){return nn},getTwitterImageOverlay:function(){return un},getTwitterPlayerSize:function(){return kn},getTwitterPlayerStream:function(){return wn},getTwitterPlayerStreamCtype:function(){return _n},getTwitterPlayerUrl:function(){return bn},getTwitterTitle:function(){return tn},getTwitterUseFacebook:function(){return Xr},hasRedirect:function(){return Ur},hasSchemaUpdated:function(){return Vr},isDiviPageSettingsBarActive:function(){return mr},isDiviRankMathModalActive:function(){return yr},isLoaded:function(){return lr},isModifiedDateLocked:function(){return sr},isPro:function(){return hr},isRefreshing:function(){return dr},isSchemaEditorOpen:function(){return Hr},isSchemaTemplatesOpen:function(){return Br},isSnippetEditorOpen:function(){return zr}});var i=jQuery,a=t.n(i),o=lodash,u=wp.hooks,c=wp.data,s=wp.element,l=rankMathAnalyzer,p=wp.i18n;var f=wp.apiFetch,d=t.n(f),h={"&":"&",""":'"',"'":"'"},m=/&(?:amp|quot|#(0+)?39);/g,y=RegExp(m.source);var g=function(t){return t&&y.test(t)?t.replace(m,(function(t){return h[t]||"'"})):t||""},v=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},b=function(t){return t.replace(/]*>([\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(/]*>([\S\s]*?)<\/script>/gim,e)},_=function(t){return t.replace(/[‘’‛`]/g,"'").replace(/[“”〝〞〟‟„]/g,'"')},S=function(t){return t.replace(//g,"")},P=function(t){return t.replace(/&\S+?;/g,"")};function T(t){return(0,o.isUndefined)(t)||!t?"":(0,o.flow)([b,w,v,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},E=wp.compose,O=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=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(c&&s){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function N(t,e,r,n,i,a,o){try{var u=t[a](o),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,i)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){N(a,n,i,o,u,"next",t)}function u(t){N(a,n,i,o,u,"throw",t)}o(void 0)}))}}function L(t,e){for(var r=0;r'),a()("#misc-publishing-actions").append(this.scoreElem),setTimeout((function(){t.scoreText=' SEO: '+p.__("Not available","rank-math")+"",t.scoreElem.html(t.scoreText),t.scoreText=t.scoreElem.find("strong"),t.fkScoreText=''+p.__("Not available","rank-math")+"",t.fkScoreElem=a()('
'+t.fkScoreText+"
"),t.fkScoreText=t.fkScoreElem.find("span"),a()("#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=a()("#misc-publishing-actions");t.length&&rankMath.showLockModifiedDate&&(t.append('
'),(0,s.createRoot)(document.getElementById("rank-math-lock-modified-date")).render(wp.element.createElement(x,null)))}},{key:"updateScore",value:function(){var t,e=rankMathEditor.resultManager.getScore(rankMathEditor.getPrimaryKeyword()),r=100<(t=e)?"bad-fk dark":80'+(0,p.__)("300 words","rank-math")+"")}}},{key:"contentLengthBoundary",value:function(){return{recommended:{boundary:299,score:8},belowRecommended:{boundary:200,score:5},low:{boundary:50,score:2}}}}])&&V(e.prototype,r),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $(t){return $="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},$(t)}function J(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)}}],r&&J(e.prototype,r),n&&J(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Y=q;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;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 rt(t,e){return(0,u.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function nt(t){return tt.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),et("keywords",t,"rank_math_focus_keyword")}function it(t){return et("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function at(t){return et("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function ot(t){return et("score",t,"rank_math_seo_score")}function ut(t){return et("canonicalUrl",t,"rank_math_canonical_url")}function ct(t){return et("advancedRobots",t,"rank_math_advanced_robots")}function st(t){return et("robots",t,"rank_math_robots",Object.keys(t))}function lt(t){return et("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function pt(t){return et("lockModifiedDate",t,"rank_math_lock_modified_date")}function ft(){return et("dirtyMetadata",{})}function dt(t){return{type:"RESET_STORE",value:t}}function ht(t){return et("facebookTitle",t,"rank_math_facebook_title")}function mt(t){return et("facebookDescription",t,"rank_math_facebook_description")}function yt(t){return et("facebookImage",t,"rank_math_facebook_image")}function gt(t){return et("facebookImageID",t,"rank_math_facebook_image_id")}function vt(t){return et("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function bt(t){return et("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function kt(t){return rankMath.objectID=t,et("postID",t)}function wt(t){return et("permalink",t,"permalink")}function _t(t){return et("title",t,"rank_math_title")}function St(t){return et("description",t,"rank_math_description")}function Pt(t){return et("featuredImage",t)}function Tt(t,e){return et("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function Dt(t,e){return et(t,e)}function It(t){return rt("redirectionItem",t)}function Et(){return rt("redirectionItem",{})}function Ot(t){return rt("hasRedirect",t)}var jt=wp.autop,At="[^<>&/\\[\\]\0- =]+?",Mt=new RegExp("\\["+At+"( [^\\]]+?)?\\]","g"),Ct=new RegExp("\\[/"+At+"\\]","g"),xt=function(t){return t.replace(Mt,"").replace(Ct,"")},Rt=function(t,e){var r=function(t,e){for(var r,n=/]+)?>(.*?)<\/p>/gi,i=[];null!==(r=n.exec(t));)i.push(r);return(0,o.map)(i,(function(t){return e?T(t[1]):t[1]}))}(t=(0,o.flow)([xt,S,jt.autop])(t),e=e||!1);return 0]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),Ut.innerHTML=t,t=Ut.textContent,Ut.textContent=""),t}var Ft=function(t,e){return t=(t=T(t)).replace(/\r?\n|\r/g," "),e?(0,o.truncate)(t,{length:e,separator:" "}):t},Lt=function(t){if((0,o.isEmpty)(t))return"";t=w(t),t=b(t),t=(0,o.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,o.filter)(Rt(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]:Be(rankMath),e=arguments.length>1?arguments[1]:void 0,r=Ge({},t.dirtyMetadata);return!1!==e.metaKey&&(r[e.metaKey]=e.metaValue),"RESET_STORE"===e.type?Ge({},Be(e.value)):"RANK_MATH_APP_DATA"===e.type?"dirtyMetadata"===e.key?Ge(Ge({},t),{},{dirtyMetadata:e.value}):Ge(Ge({},t),{},He(He({},e.key,e.value),"dirtyMetadata",r)):t}function We(t){return We="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},We(t)}function $e(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;e0&&void 0!==arguments[0]?arguments[0]:Ye,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?Je(Je({},t),{},qe({},e.key,e.value)):t}function Xe(t){return t.appData}function Ze(t){return t.appData.dirtyMetadata}function tr(t){return t.appData.score}function er(t){return t.appData.keywords}function rr(t){return t.appData.pillarContent}function nr(t){return t.appData.robots}function ir(t){return t.appData.advancedRobots}function ar(t){return t.appData.canonicalUrl}function or(t){return t.appData.breadcrumbTitle}function ur(t){return"todo"}function cr(t){return t.appData.showScoreFrontend}function sr(t){return t.appData.lockModifiedDate}function lr(t){return t.appUi.isLoaded}function pr(t){return t.appUi.selectedKeyword}function fr(t){return t.appUi.socialTab}function dr(t){return t.appUi.refreshResults}function hr(t){return t.appUi.isPro}function mr(t){return t.appUi.isDiviPageSettingsBarActive}function yr(t){return t.appUi.isDiviRankMathModalActive}function gr(t){return t.appUi.highlightedParagraphs}function vr(t){return t.appData.facebookTitle}function br(t){return t.appData.facebookDescription}function kr(t){return t.appData.facebookAuthor}function wr(t){return t.appData.facebookImageID}function _r(t){return t.appData.facebookImage}function Sr(t){return t.appData.facebookHasOverlay}function Pr(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function Tr(t){return t.appData.postID}function Dr(t){return t.appData.title}function Ir(t){return t.appData.permalink}function Er(t){return t.appData.description}function Or(t){return t.appData.featuredImage}function jr(t){var e=t.appData.featuredImage;return'').concat(e.alt_text,'')}function Ar(t){return t.appData.primaryTerm}function Mr(t){return String(t.appData.redirectionID)}function Cr(t){return t.appData.redirectionType}function xr(t){return t.appData.redirectionUrl}function Rr(t){return t.appUi.redirectionItem}function Ur(t){return t.appUi.hasRedirect}var Nr=wp.url;function Fr(t){return Nt(t.appUi.serpTitle)}function Lr(t){return(0,Nr.safeDecodeURIComponent)(t.appUi.serpSlug)}function Kr(t){return t.appUi.serpDescription}function zr(t){return t.appUi.isSnippetEditorOpen}function Gr(t){return t.appUi.snippetPreviewType}function Hr(t){return t.appUi.isSchemaEditorOpen}function Br(t){return t.appUi.isSchemaTemplatesOpen}function Vr(t){return t.appUi.schemaUpdated}function Wr(t){return t.appData.schemas}function $r(t){return t.appUi.editSchemas}function Jr(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function qr(t){return t.appData.schemas[t.appUi.editingSchemaId]}function Yr(t){return t.appUi.editorTab}function Qr(t){return t.appUi.templateTab}function Xr(t){return t.appData.twitterUseFacebook}function Zr(t){return t.appData.twitterCardType}function tn(t){return t.appData.twitterTitle}function en(t){return t.appData.twitterDescription}function rn(t){return t.appData.twitterAuthor}function nn(t){return t.appData.twitterImageID}function an(t){return t.appData.twitterImage}function on(t){return t.appData.twitterHasOverlay}function un(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function cn(t){return t.appData.twitterAppDescription}function sn(t){return t.appData.twitterAppIphoneID}function ln(t){return t.appData.twitterAppIphoneName}function pn(t){return t.appData.twitterAppIphoneUrl}function fn(t){return t.appData.twitterAppIpadID}function dn(t){return t.appData.twitterAppIpadName}function hn(t){return t.appData.twitterAppIpadUrl}function mn(t){return t.appData.twitterAppGoogleplayID}function yn(t){return t.appData.twitterAppGoogleplayName}function gn(t){return t.appData.twitterAppGoogleplayUrl}function vn(t){return t.appData.twitterAppCountry}function bn(t){return t.appData.twitterPlayerUrl}function kn(t){return t.appData.twitterPlayerSize}function wn(t){return t.appData.twitterPlayerStream}function _n(t){return t.appData.twitterPlayerStreamCtype}(0,c.registerStore)("rank-math",{reducer:(0,c.combineReducers)(r),selectors:n,actions:e});function Sn(t){return Sn="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},Sn(t)}function Pn(t,e){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];("auto-draft"!==this.getStatus()||e)&&this.elemSlug.val(t),a()("#editable-post-name").text(t),a()("#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){tt.setVariable("title",t),tt.setVariable("term",t),tt.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}}],r&&Pn(e.prototype,r),n&&Pn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Dn=Tn;function In(t){return In="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},In(t)}function En(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)}}])&&En(e.prototype,r),n&&En(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Dn),Cn=Mn;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 Rn(t,e){for(var r=0;r'+r.value.substring(i,a)+"",i===a&&(n=''+e+""),r.value=r.value.substring(0,i)+n+r.value.substring(a,r.value.length),r.focus(),r.selectionStart=i+n.length,r.selectionEnd=i+n.length,r.scrollTop=o}else n=''+e+"",r.value+=n,r.focus()}});if("function"==typeof ClipboardJS&&a()(".suggestion-copy").on("click",(function(t){t.preventDefault(),new ClipboardJS(".suggestion-copy");var e=a()(this).parent().next(".suggestion-title"),r=e.html();e.text("Link Copied"),setTimeout((function(){e.html(r)}),1500)})),"object"!==("undefined"==typeof tinymce?"undefined":ii(tinymce)))return!0;var e=null,r=null;a()(".suggestion-insert").on("click",(function(t){t.preventDefault();var n,i,o,u,s=a()(this);if(s.hasClass("clicked"))return!0;if(null!==tinymce.activeEditor&&!0!==tinymce.activeEditor.isHidden()&&"content"===tinymce.activeEditor.id){e=tinymce.activeEditor,r=a()(e.getBody());var l=e.selection.getContent()||"";if(r.find("a[data-mce-selected]").length){var p=(n="",i="",o=e.selection.getStart(),(u=e.dom.getParent(o,"a[href]"))||(i=e.selection.getContent({format:"raw"}))&&-1!==i.indexOf("")&&((n=i.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")}),a()(p).text()!==l&&e.insertContent(l)}else l.length?e.insertContent(''+l+""):e.insertContent(''+s.data("text")+"")}else if(G()){var f=(0,c.select)("core/block-editor").getSelectedBlock().clientId,d=(0,c.select)("core/block-editor").getSelectionStart().offset,h=(0,c.select)("core/block-editor").getSelectionEnd().offset;if(document.getSelection){var m=document.getSelection();if(m.rangeCount){var y=m.getRangeAt(0),g=a()("#block-"+f).text().substring(d,h),v=document.createElement("a");v.href=s.data("url"),v.innerText=""!==g?g:s.data("text"),y.deleteContents(),y.insertNode(v);var b=m.focusNode.innerHTML;(0,c.dispatch)("core/block-editor").updateBlock(f,{attributes:{content:b}})}}}var k=s.closest(".suggestion-item").find(".suggestion-title"),w=k.html();k.text("Link Inserted"),s.addClass("clicked"),setTimeout((function(){var t,e,r,n;k.html(w),s.removeClass("clicked"),!0===rankMath.postSettings.useFocusKeyword&&(e=s,r=(t=k).data("fkcount")||0,n=t.data("fk"),(r+=1)===n.length&&(r=0),t.find(">a").text(n[r]),t.data("fkcount",r),e.data("text",n[r]))}),1500)})),a()("#rank_math_metabox_link_suggestions").find("h2").append(a()("#rank-math-link-suggestions-tooltip").html())}}));function ci(t){return ci="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},ci(t)}function si(t,e){for(var r=0;r'+(0,p.__)("Make Term Primary","rank-math")+"")})),u.each((function(){var t=a()(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=a()(this).closest("li");if(e.toggleClass("term-checked"),1===i.find("li.term-checked").length||e.hasClass("term-marked-primary")&&!e.hasClass("term-checked")){var r=i.find("li.term-checked:first > label .rank-math-make-primary");0'+(0,p.__)("Make Term Primary","rank-math")+"")}))}))}))}));function fi(t){return fi="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},fi(t)}function di(t,e){for(var r=0;rr.length&&(r=a()(''),a()(".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;a()("#postimagediv").on("click","#remove-post-thumbnail",(function(){a()("#rank_math_image_warning").remove(),a()("#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(a()("#rank_math_image_warning").remove(),!(200

'+rankMath.featuredImageNotice+"

").insertAfter(e)}}},{key:"getFeaturedImage",value:function(){var t=a()("#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 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 ni:new Cn(this):"term"===rankMath.objectType?new Kn:"user"===rankMath.objectType?new $n:void 0}}],r&&Ai(e.prototype,r),n&&Ai(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();a()((function(){window.rankMathEditor=new Mi,window.rankMathEditor.setup(),window.RankMathApp=new Y})),a()(window).on("load",(function(){a().when(a().ready).then((function(){(0,u.doAction)("rank_math_loaded")}))}))}();