/home/edulekha/www/wp-content/plugins/seo-by-rank-math/assets/admin/js/divi.js
!function(){var t={4184:function(t,e){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)){if(r.length){var o=a.apply(null,r);o&&t.push(o)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&t.push(u);else t.push(r.toString())}}return t.join(" ")}t.exports?(a.default=a,t.exports=a):void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r)}()}},e={};function r(n){var a=e[n];if(void 0!==a)return a.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){"use strict";var t={};r.r(t),r.d(t,{deleteSchema:function(){return ie},refreshResults:function(){return $t},resetDirtyMetadata:function(){return $},resetRedirection:function(){return rt},saveSchema:function(){return ae},saveTemplate:function(){return oe},schemaUpdated:function(){return Jt},setEditingSchemaId:function(){return Xt},setEditorTab:function(){return Zt},setTemplateTab:function(){return te},setVersion:function(){return Ht},toggleFrontendScore:function(){return j},toggleIsDiviPageSettingsBarActive:function(){return Kt},toggleIsDiviRankMathModalActive:function(){return Gt},toggleLoaded:function(){return Lt},toggleSchemaEditor:function(){return Wt},toggleSchemaTemplates:function(){return Yt},toggleSnippetEditor:function(){return ft},toggleTrendsCta:function(){return dt},updateAIScore:function(){return ce},updateAdvancedRobots:function(){return F},updateAnalysisScore:function(){return B},updateAppData:function(){return M},updateAppUi:function(){return x},updateBreadcrumbTitle:function(){return N},updateCanonicalUrl:function(){return U},updateDescription:function(){return J},updateEditSchema:function(){return ne},updateEditSchemas:function(){return ee},updateFacebookDescription:function(){return K},updateFacebookHasOverlay:function(){return V},updateFacebookImage:function(){return G},updateFacebookImageID:function(){return z},updateFacebookImageOverlay:function(){return q},updateFacebookTitle:function(){return H},updateFeaturedImage:function(){return X},updateHasRedirect:function(){return nt},updateKeywords:function(){return C},updateKeywordsData:function(){return ue},updatePermalink:function(){return W},updatePillarContent:function(){return R},updatePostID:function(){return Q},updatePrimaryTermID:function(){return Z},updateRedirection:function(){return tt},updateRedirectionItem:function(){return et},updateRobots:function(){return L},updateSchemas:function(){return re},updateSelectedKeyword:function(){return Nt},updateSerpDescription:function(){return pt},updateSerpSlug:function(){return lt},updateSerpTitle:function(){return st},updateSnippetPreviewType:function(){return ht},updateTitle:function(){return Y},updateTwitterAppCountry:function(){return Ft},updateTwitterAppDescription:function(){return Et},updateTwitterAppGoogleplayID:function(){return jt},updateTwitterAppGoogleplayName:function(){return Bt},updateTwitterAppGoogleplayUrl:function(){return Ut},updateTwitterAppIpadID:function(){return xt},updateTwitterAppIpadName:function(){return Ct},updateTwitterAppIpadUrl:function(){return Rt},updateTwitterAppIphoneID:function(){return Ot},updateTwitterAppIphoneName:function(){return At},updateTwitterAppIphoneUrl:function(){return Mt},updateTwitterAuthor:function(){return bt},updateTwitterCardType:function(){return gt},updateTwitterDescription:function(){return vt},updateTwitterHasOverlay:function(){return _t},updateTwitterImage:function(){return kt},updateTwitterImageID:function(){return wt},updateTwitterImageOverlay:function(){return St},updateTwitterPlayerSize:function(){return Dt},updateTwitterPlayerStreamCtype:function(){return Pt},updateTwitterPlayerStreamUrl:function(){return It},updateTwitterPlayerUrl:function(){return Tt},updateTwitterTitle:function(){return yt},updateTwitterUseFacebook:function(){return mt}});var e={};r.r(e),r.d(e,{appData:function(){return me},appUi:function(){return we}});var n={};r.r(n),r.d(n,{getAdvancedRobots:function(){return Pe},getAnalysisScore:function(){return Se},getAppData:function(){return ke},getBreadcrumbTitle:function(){return Oe},getCanonicalUrl:function(){return Ee},getContentAIScore:function(){return Gr},getDescription:function(){return Qe},getDirtyMetadata:function(){return _e},getEditSchemas:function(){return dr},getEditingSchema:function(){return mr},getEditorTab:function(){return yr},getFacebookAuthor:function(){return Ne},getFacebookDescription:function(){return Le},getFacebookHasOverlay:function(){return Ke},getFacebookImage:function(){return He},getFacebookImageID:function(){return $e},getFacebookImageOverlay:function(){return Ge},getFacebookTitle:function(){return Fe},getFeaturedImage:function(){return We},getFeaturedImageHtml:function(){return Ye},getKeywords:function(){return Te},getKeywordsData:function(){return Kr},getPermalink:function(){return qe},getPillarContent:function(){return De},getPostID:function(){return ze},getPreviewSchema:function(){return gr},getPrimaryTermID:function(){return Je},getRedirectionID:function(){return Xe},getRedirectionItem:function(){return er},getRedirectionType:function(){return Ze},getRedirectionUrl:function(){return tr},getRichSnippets:function(){return Ae},getRobots:function(){return Ie},getSchemas:function(){return hr},getSelectedKeyword:function(){return Ce},getSerpDescription:function(){return or},getSerpSlug:function(){return ir},getSerpTitle:function(){return ar},getShowScoreFrontend:function(){return Me},getSnippetPreviewType:function(){return cr},getTemplateTab:function(){return vr},getTitle:function(){return Ve},getTwitterAppCountry:function(){return Fr},getTwitterAppDescription:function(){return Er},getTwitterAppGoogleplayID:function(){return jr},getTwitterAppGoogleplayName:function(){return Br},getTwitterAppGoogleplayUrl:function(){return Ur},getTwitterAppIpadID:function(){return xr},getTwitterAppIpadName:function(){return Cr},getTwitterAppIpadUrl:function(){return Rr},getTwitterAppIphoneID:function(){return Or},getTwitterAppIphoneName:function(){return Ar},getTwitterAppIphoneUrl:function(){return Mr},getTwitterAuthor:function(){return Sr},getTwitterCardType:function(){return wr},getTwitterDescription:function(){return _r},getTwitterHasOverlay:function(){return Ir},getTwitterImage:function(){return Dr},getTwitterImageID:function(){return Tr},getTwitterImageOverlay:function(){return Pr},getTwitterPlayerSize:function(){return Nr},getTwitterPlayerStream:function(){return $r},getTwitterPlayerStreamCtype:function(){return Hr},getTwitterPlayerUrl:function(){return Lr},getTwitterTitle:function(){return kr},getTwitterUseFacebook:function(){return br},hasRedirect:function(){return rr},hasSchemaUpdated:function(){return fr},isDiviPageSettingsBarActive:function(){return Be},isDiviRankMathModalActive:function(){return Ue},isLoaded:function(){return xe},isPro:function(){return je},isRefreshing:function(){return Re},isSchemaEditorOpen:function(){return lr},isSchemaTemplatesOpen:function(){return pr},isSnippetEditorOpen:function(){return ur},isTrendsCtaOpen:function(){return sr}});var a=wp.apiFetch,i=r.n(a),o=wp.data,u=wp.mediaUtils,c=wp.element,s=wp.hooks,l=wp.components,p=(0,l.createSlotFill)("RankMathAfterEditor"),f=p.Fill,h=p.Slot,d=function(t){var e=t.children,r=t.className;return wp.element.createElement(f,null,wp.element.createElement(l.PanelRow,{className:r},e))};d.Slot=h;var m=d,g=(0,l.createSlotFill)("RankMathAdvancedTab"),y=g.Fill,v=g.Slot,b=function(t){var e=t.children,r=t.className;return wp.element.createElement(y,null,wp.element.createElement(l.PanelRow,{className:r},e))};b.Slot=v;var w=b,k=(0,l.createSlotFill)("RankMathAfterFocusKeyword"),_=k.Fill,S=k.Slot,T=function(t){var e=t.children,r=t.className;return wp.element.createElement(_,null,wp.element.createElement("div",{className:r},e))};T.Slot=S;var D=T,I=rankMathAnalyzer,P=jQuery,E=r.n(P);function O(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,n.key,n)}}var A=new(function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=null,(r="map")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"swap",value:function(t,e){var r=this;if(!(t=t||""))return"";var n=new RegExp(/%(([a-z0-9_-]+)\(([^)]*)\)|[^\s]+)%/,"giu");return t.replace(" %page%","").replace("%sep% %sep%","%sep%").replace(n,(function(t){return r.replace(e,t)})).trim()}},{key:"replace",value:function(t,e){var r=e.toLowerCase().slice(1,-1);return["term_description","user_description"].includes(r)?"undefined"!=typeof tinymce&&tinymce.activeEditor&&"rank_math_description_editor"===tinymce.activeEditor.id?tinymce.activeEditor.getContent():E()("#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={},E().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)}}])&&O(e.prototype,r),n&&O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());function M(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,s.applyFilters)("rank_math_sanitize_data",e,t,r),null!==n&&(n=(0,s.applyFilters)("rank_math_sanitize_meta_value",n,t,r)),n=null===n?e:n,(0,s.doAction)("rank_math_data_changed",t,e,r),{type:"RANK_MATH_APP_DATA",key:t,value:e,metaKey:r,metaValue:n}}function x(t,e){return(0,s.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function C(t){return A.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),M("keywords",t,"rank_math_focus_keyword")}function R(t){return M("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function j(t){return M("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function B(t){return M("score",t,"rank_math_seo_score")}function U(t){return M("canonicalUrl",t,"rank_math_canonical_url")}function F(t){return M("advancedRobots",t,"rank_math_advanced_robots")}function L(t){return M("robots",t,"rank_math_robots",Object.keys(t))}function N(t){return M("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function $(){return M("dirtyMetadata",{})}function H(t){return M("facebookTitle",t,"rank_math_facebook_title")}function K(t){return M("facebookDescription",t,"rank_math_facebook_description")}function G(t){return M("facebookImage",t,"rank_math_facebook_image")}function z(t){return M("facebookImageID",t,"rank_math_facebook_image_id")}function V(t){return M("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function q(t){return M("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function Q(t){return rankMath.objectID=t,M("postID",t)}function W(t){return M("permalink",t,"permalink")}function Y(t){return M("title",t,"rank_math_title")}function J(t){return M("description",t,"rank_math_description")}function X(t){return M("featuredImage",t)}function Z(t,e){return M("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function tt(t,e){return M(t,e)}function et(t){return x("redirectionItem",t)}function rt(){return x("redirectionItem",{})}function nt(t){return x("hasRedirect",t)}var at=lodash,it=document.createElement("div");function ot(t){return t&&"string"==typeof t&&(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),it.innerHTML=t,t=it.textContent,it.textContent=""),t}var ut=function(t,e){return t=(t=I.Helpers.cleanText(t)).replace(/\r?\n|\r/g," "),e?(0,at.truncate)(t,{length:e,separator:" "}):t};function ct(t){var e=rankMathEditor.assessor.dataCollector.getData(),r=e.excerpt,n=function(t){if((0,at.isEmpty)(t))return"";t=I.Helpers.stripScript(t),t=I.Helpers.stripStyle(t),t=(0,at.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,at.filter)(I.Helpers.matchParagraphs(t,!0,!0),(function(t){return""!==t.trim()}));if(!e.length)return"";var r=rankMathEditor.getPrimaryKeyword();if(""!==r){var n=(0,at.filter)(e,(function(t){return(0,at.includes)(t.toLowerCase(),r.toLowerCase())}));if(0<n.length)return ut(n[0],160)}return ut(e[0],160)}(e.content),a=(0,at.isUndefined)(r)||(0,at.isEmpty)(r)?n:(0,at.unescape)(r);if(A.setVariable("excerpt",a),A.setVariable("seo_description",a),""!==(t=ot((0,s.applyFilters)("rankMath/description",t))))return I.Helpers.cleanText(t);if(!(0,at.isUndefined)(r)&&!(0,at.isEmpty)(r))return I.Helpers.cleanText(r);var i=(0,at.unescape)(rankMath.assessor.serpData.descriptionTemplate);return(0,at.isUndefined)(i)||""===i?n:I.Helpers.cleanText(i)}function st(t){return t=A.swap(""!==t?t:rankMath.assessor.serpData.titleTemplate),rankMathEditor.refresh("title"),x("serpTitle",t)}function lt(t){return t=""!==t?t:rankMathEditor.assessor.dataCollector.getSlug(),rankMathEditor.refresh("permalink"),x("serpSlug",t)}function pt(t){return t=A.swap(ct(t)),rankMathEditor.refresh("description"),x("serpDescription",t)}function ft(t){return x("isSnippetEditorOpen",t)}function ht(t){return x("snippetPreviewType",t)}function dt(t){return x("isTrendsCtaOpen",t)}function mt(t){return M("twitterUseFacebook",t,"rank_math_twitter_use_facebook",!0===t?"on":"off")}function gt(t){return M("twitterCardType",t,"rank_math_twitter_card_type")}function yt(t){return M("twitterTitle",t,"rank_math_twitter_title")}function vt(t){return M("twitterDescription",t,"rank_math_twitter_description")}function bt(t){return M("twitterAuthor",t,"rank_math_twitter_author")}function wt(t){return M("twitterImageID",t,"rank_math_twitter_image_id")}function kt(t){return M("twitterImage",t,"rank_math_twitter_image")}function _t(t){return M("twitterHasOverlay",t,"rank_math_twitter_enable_image_overlay",!0===t?"on":"off")}function St(t){return M("twitterImageOverlay",t,"rank_math_twitter_image_overlay")}function Tt(t){return M("twitterPlayerUrl",t,"rank_math_twitter_player_url")}function Dt(t){return M("twitterPlayerSize",t,"rank_math_twitter_player_size")}function It(t){return M("twitterPlayerStream",t,"rank_math_twitter_player_stream")}function Pt(t){return M("twitterPlayerStreamCtype",t,"rank_math_twitter_player_stream_ctype")}function Et(t){return M("twitterAppDescription",t,"rank_math_twitter_app_description")}function Ot(t){return M("twitterAppIphoneID",t,"rank_math_twitter_app_iphone_id")}function At(t){return M("twitterAppIphoneName",t,"rank_math_twitter_app_iphone_name")}function Mt(t){return M("twitterAppIphoneUrl",t,"rank_math_twitter_app_iphone_url")}function xt(t){return M("twitterAppIpadID",t,"rank_math_twitter_app_ipad_id")}function Ct(t){return M("twitterAppIpadName",t,"rank_math_twitter_app_ipad_name")}function Rt(t){return M("twitterAppIpadUrl",t,"rank_math_twitter_app_ipad_url")}function jt(t){return M("twitterAppGoogleplayID",t,"rank_math_twitter_app_googleplay_id")}function Bt(t){return M("twitterAppGoogleplayName",t,"rank_math_twitter_app_googleplay_name")}function Ut(t){return M("twitterAppGoogleplayUrl",t,"rank_math_twitter_app_googleplay_url")}function Ft(t){return M("twitterAppCountry",t,"rank_math_twitter_app_country")}function Lt(t){return x("isLoaded",t)}function Nt(t){return x("selectedKeyword",t)}function $t(){return x("refreshResults",Date.now())}function Ht(){return x("isPro",!0)}function Kt(t){return x("isDiviPageSettingsBarActive",t)}function Gt(t){return x("isDiviRankMathModalActive",t)}var zt=wp.i18n;function Vt(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 qt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vt(Object(r),!0).forEach((function(e){Qt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wt(t){return x("isSchemaEditorOpen",t)}function Yt(t){return x("isSchemaTemplatesOpen",t)}function Jt(t){return x("schemaUpdated",t)}function Xt(t){return x("editingSchemaId",t)}function Zt(t){return x("editorTab",t)}function te(t){return x("templateTab",t)}function ee(t){return x("editSchemas",t)}function re(t){return M("schemas",t)}function ne(t,e){var r=qt({},(0,o.select)("rank-math").getEditSchemas());return r[t]=e,x("editSchemas",r)}function ae(t,e){var r=qt({},(0,o.select)("rank-math").getSchemas());return r[t]=e,M("schemas",r)}function ie(t){var e=qt({},(0,o.select)("rank-math").getSchemas());return delete e[t],(0,s.doAction)("rank_math_schema_trash",t),M("schemas",e,"rank_math_delete_"+t,"")}function oe(t,e,r){return i()({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,at.get)(rankMath,"isTemplateScreen",!1)&&(document.title=(0,zt.__)("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 ue(t){return x("keywordsData",t)}function ce(t){return M("contentAIScore",t,"rank_math_contentai_score")}function se(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 le(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?se(Object(r),!0).forEach((function(e){pe(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fe=rankMath.assessor.serpData,he=rankMath.assessor.hasRedirection,de={postID:null,title:fe.title?fe.title:fe.titleTemplate,description:fe.description,keywords:fe.focusKeywords,pillarContent:fe.pillarContent,featuredImage:"",permalink:!1,primaryTerm:fe.primaryTerm,robots:fe.robots,advancedRobots:fe.advancedRobots,canonicalUrl:fe.canonicalUrl,breadcrumbTitle:fe.breadcrumbTitle,showScoreFrontend:fe.showScoreFrontend,redirectionID:he?(0,at.get)(rankMath.assessor,"redirection.id",""):"",redirectionType:he?(0,at.get)(rankMath.assessor,"redirection.header_code",""):"",redirectionUrl:he?(0,at.get)(rankMath.assessor,"redirection.url_to",""):"",facebookTitle:fe.facebookTitle,facebookImage:fe.facebookImage,facebookImageID:fe.facebookImageID,facebookAuthor:fe.facebookAuthor,facebookDescription:fe.facebookDescription,facebookHasOverlay:fe.facebookHasOverlay,facebookImageOverlay:fe.facebookImageOverlay,twitterTitle:fe.twitterTitle,twitterImage:fe.twitterImage,twitterAuthor:fe.twitterAuthor,twitterImageID:fe.twitterImageID,twitterCardType:fe.twitterCardType,twitterUseFacebook:fe.twitterUseFacebook,twitterDescription:fe.twitterDescription,twitterHasOverlay:fe.twitterHasOverlay,twitterImageOverlay:fe.twitterImageOverlay,twitterPlayerUrl:fe.twitterPlayerUrl,twitterPlayerSize:fe.twitterPlayerSize,twitterPlayerStream:fe.twitterPlayerStream,twitterPlayerStreamCtype:fe.twitterPlayerStreamCtype,twitterAppDescription:fe.twitterAppDescription,twitterAppIphoneName:fe.twitterAppIphoneName,twitterAppIphoneID:fe.twitterAppIphoneID,twitterAppIphoneUrl:fe.twitterAppIphoneUrl,twitterAppIpadName:fe.twitterAppIpadName,twitterAppIpadID:fe.twitterAppIpadID,twitterAppIpadUrl:fe.twitterAppIpadUrl,twitterAppGoogleplayName:fe.twitterAppGoogleplayName,twitterAppGoogleplayID:fe.twitterAppGoogleplayID,twitterAppGoogleplayUrl:fe.twitterAppGoogleplayUrl,twitterAppCountry:fe.twitterAppCountry,schemas:(0,at.get)(rankMath,"schemas",{}),score:0,contentAIScore:{},dirtyMetadata:{}};function me(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,r=arguments.length>1?arguments[1]:void 0,n=le({},e.dirtyMetadata);return!1!==r.metaKey&&(n[r.metaKey]=r.metaValue),"RANK_MATH_APP_DATA"===r.type?"dirtyMetadata"===r.key?le(le({},e),{},{dirtyMetadata:r.value}):le(le({},e),{},(pe(t={},r.key,r.value),pe(t,"dirtyMetadata",n),t)):e}function ge(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 ye(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(r),!0).forEach((function(e){ve(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ve(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var be={isLoaded:!1,isPro:!1,selectedKeyword:{tag:"",index:0,data:{value:""}},hasRedirect:rankMath.assessor.hasRedirection&&!(0,at.isEmpty)((0,at.get)(rankMath.assessor,"redirection.id",""))&&!(0,at.isEmpty)((0,at.get)(rankMath.assessor,"redirection.url_to","")),serpTitle:"",serpSlug:"",serpDescription:"",isSnippetEditorOpen:!1,snippetPreviewType:"",refreshResults:"",redirectionItem:{},isTrendsCtaOpen:!1,editorTab:"",templateTab:"",editSchemas:{},editingSchemaId:"",isSchemaEditorOpen:!1,isSchemaTemplatesOpen:!1,schemaUpdated:!1,isDiviRankMathModalActive:!1,isDiviPageSettingsBarActive:!1,keywordsData:(0,at.get)(rankMath,"ca_data",[])};function we(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:be,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?ye(ye({},t),{},ve({},e.key,e.value)):t}function ke(t){return t.appData}function _e(t){return t.appData.dirtyMetadata}function Se(t){return t.appData.score}function Te(t){return t.appData.keywords}function De(t){return t.appData.pillarContent}function Ie(t){return t.appData.robots}function Pe(t){return t.appData.advancedRobots}function Ee(t){return t.appData.canonicalUrl}function Oe(t){return t.appData.breadcrumbTitle}function Ae(t){return"todo"}function Me(t){return t.appData.showScoreFrontend}function xe(t){return t.appUi.isLoaded}function Ce(t){return t.appUi.selectedKeyword}function Re(t){return t.appUi.refreshResults}function je(t){return t.appUi.isPro}function Be(t){return t.appUi.isDiviPageSettingsBarActive}function Ue(t){return t.appUi.isDiviRankMathModalActive}function Fe(t){return t.appData.facebookTitle}function Le(t){return t.appData.facebookDescription}function Ne(t){return t.appData.facebookAuthor}function $e(t){return t.appData.facebookImageID}function He(t){return t.appData.facebookImage}function Ke(t){return t.appData.facebookHasOverlay}function Ge(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function ze(t){return t.appData.postID}function Ve(t){return t.appData.title}function qe(t){return t.appData.permalink}function Qe(t){return t.appData.description}function We(t){return t.appData.featuredImage}function Ye(t){var e=t.appData.featuredImage;return'<img src="'.concat(e.source_url,'" alt="').concat(e.alt_text,'" >')}function Je(t){return t.appData.primaryTerm}function Xe(t){return t.appData.redirectionID}function Ze(t){return t.appData.redirectionType}function tr(t){return t.appData.redirectionUrl}function er(t){return t.appUi.redirectionItem}function rr(t){return t.appUi.hasRedirect}var nr=wp.url;function ar(t){return ot(t.appUi.serpTitle)}function ir(t){return(0,nr.safeDecodeURIComponent)(t.appUi.serpSlug)}function or(t){return t.appUi.serpDescription}function ur(t){return t.appUi.isSnippetEditorOpen}function cr(t){return t.appUi.snippetPreviewType}function sr(t){return t.appUi.isTrendsCtaOpen}function lr(t){return t.appUi.isSchemaEditorOpen}function pr(t){return t.appUi.isSchemaTemplatesOpen}function fr(t){return t.appUi.schemaUpdated}function hr(t){return t.appData.schemas}function dr(t){return t.appUi.editSchemas}function mr(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function gr(t){return t.appData.schemas[t.appUi.editingSchemaId]}function yr(t){return t.appUi.editorTab}function vr(t){return t.appUi.templateTab}function br(t){return t.appData.twitterUseFacebook}function wr(t){return t.appData.twitterCardType}function kr(t){return t.appData.twitterTitle}function _r(t){return t.appData.twitterDescription}function Sr(t){return t.appData.twitterAuthor}function Tr(t){return t.appData.twitterImageID}function Dr(t){return t.appData.twitterImage}function Ir(t){return t.appData.twitterHasOverlay}function Pr(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function Er(t){return t.appData.twitterAppDescription}function Or(t){return t.appData.twitterAppIphoneID}function Ar(t){return t.appData.twitterAppIphoneName}function Mr(t){return t.appData.twitterAppIphoneUrl}function xr(t){return t.appData.twitterAppIpadID}function Cr(t){return t.appData.twitterAppIpadName}function Rr(t){return t.appData.twitterAppIpadUrl}function jr(t){return t.appData.twitterAppGoogleplayID}function Br(t){return t.appData.twitterAppGoogleplayName}function Ur(t){return t.appData.twitterAppGoogleplayUrl}function Fr(t){return t.appData.twitterAppCountry}function Lr(t){return t.appData.twitterPlayerUrl}function Nr(t){return t.appData.twitterPlayerSize}function $r(t){return t.appData.twitterPlayerStream}function Hr(t){return t.appData.twitterPlayerStreamCtype}function Kr(t){return t.appUi.keywordsData}function Gr(t){return t.appData.contentAIScore}var zr=(0,o.registerStore)("rank-math",{reducer:(0,o.combineReducers)(e),selectors:n,actions:t});function Vr(){return zr}var qr={"&":"&",""":'"',"'":"'"},Qr=/&(?:amp|quot|#(0+)?39);/g,Wr=RegExp(Qr.source);var Yr=function(t){return t&&Wr.test(t)?t.replace(Qr,(function(t){return qr[t]||"'"})):t||""};function Jr(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,n.key,n)}}var Xr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.analyzer=new I.Analyzer({i18n:zt,analyses:rankMath.assessor.researchesTests}),this.dataCollector=e,this.registerRefresh(),this.updateKeywordResult=this.updateKeywordResult.bind(this),this.sanitizeData=this.sanitizeData.bind(this),(0,s.addAction)("rankMath_analysis_keywordUsage_updated","rank-math",this.updateKeywordResult),(0,s.addFilter)("rank_math_sanitize_meta_value","rank-math",this.sanitizeData),(0,s.addFilter)("rank_math_sanitize_data","rank-math",this.sanitizeData)}var e,r,n;return e=t,r=[{key:"updateKeywordResult",value:function(t,e){rankMathEditor.resultManager.update(t,{keywordNotUsed:e}),t===this.getSelectedKeyword().toLowerCase()&&(0,o.dispatch)("rank-math").refreshResults()}},{key:"sanitizeData",value:function(t,e){return"schemas"===e||(0,at.isObject)(t)||(0,at.isEmpty)(t)?t:I.Helpers.sanitizeAppData(t)}},{key:"getPaper",value:function(t,e){var r=Vr().getState(),n=this.dataCollector.getData(),a=new I.Paper("",{locale:rankMath.localeFull});return a.setTitle(r.appUi.serpTitle),a.setPermalink(n.slug),a.setDescription(r.appUi.serpDescription),a.setUrl(n.permalink),a.setText(Yr((0,s.applyFilters)("rank_math_content",n.content))),a.setKeyword(t),a.setKeywords(e),a.setSchema(r.appData.schemas),(0,at.isUndefined)(n.featuredImage)||(a.setThumbnail(n.featuredImage.source_url),a.setThumbnailAltText(I.Helpers.removeDiacritics(n.featuredImage.alt_text))),(0,at.isEmpty)(r.appData.contentAIScore)&&(0,at.isEmpty)(rankMath.ca_keyword)||a.setContentAI(!0),a}},{key:"registerRefresh",value:function(){var t=this;this.refresh=(0,at.debounce)((function(e){var r=Vr().getState();if(!1!==r.appUi.isLoaded){var n=r.appData.keywords.split(","),a=[];(0,s.doAction)("rank_math_"+e+"_refresh"),n.map((function(e,r){var i=t.getPaper(I.Helpers.removeDiacritics(e),n),u=0===r?rankMath.assessor.researchesTests:t.filterTests(t.getSecondaryKeywordTests());a.push(t.analyzer.analyzeSome(u,i).then((function(t){rankMathEditor.resultManager.update(i.getKeyword(),t,0===r),0===r&&(0,o.dispatch)("rank-math").updateAnalysisScore(rankMathEditor.resultManager.getScore(i.getKeyword()))}))),Promise.all(a).then((function(){(0,o.dispatch)("rank-math").refreshResults()}))}))}}),500)}},{key:"getSecondaryKeywordTests",value:function(){return["keywordInContent","lengthContent","keywordInSubheadings","keywordDensity","lengthPermalink","linksHasExternals","linksNotAllExternals","linksHasInternal","titleSentiment","titleHasPowerWords","titleHasNumber","contentHasTOC","contentHasShortParagraphs","contentHasAssets"]}},{key:"getPrimaryKeyword",value:function(){var t=Vr().getState().appData.keywords;return I.Helpers.removeDiacritics(t.split(",")[0])}},{key:"getSelectedKeyword",value:function(){var t=Vr().getState(),e=""!==t.appUi.selectedKeyword.data.value?t.appUi.selectedKeyword.data.value:t.appData.keywords.split(",")[0];return I.Helpers.removeDiacritics(e)}},{key:"getResearch",value:function(t){return this.analyzer.researcher.getResearch(t)}},{key:"filterTests",value:function(t){return(0,at.intersection)(t,rankMath.assessor.researchesTests)}}],r&&Jr(e.prototype,r),n&&Jr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Zr=Xr;function tn(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,n.key,n)}}var en=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),rankMath.is_front_page&&((0,s.addFilter)("rankMath_analysis_contentLength","rank-math",this.contentLength),(0,s.addFilter)("rankMath_analysis_contentLength_boundaries","rank-math",this.contentLengthBoundary))}var e,r,n;return e=t,(r=[{key:"contentLength",value:function(t){return{hasScore:t.hasScore,failed:(0,zt.__)("Content is %1$d words long. Consider using at least 300 words.","rank-math"),tooltipText:(0,zt.__)("Minimum recommended content length should be 300 words.","rank-math"),emptyContent:(0,zt.sprintf)((0,zt.__)("Content should be %1$s long.","rank-math"),'<a href="https://s.rankmath.com/100contentlength" target="_blank">'+(0,zt.__)("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}}}}])&&tn(e.prototype,r),n&&tn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),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,n.key,n)}}var nn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n;return e=t,(r=[{key:"setup",value:function(t){Vr(),this.resultManager=new I.ResultManager,this.assessor=new Zr(t),new en,(0,s.doAction)("rank_math_loaded")}},{key:"refresh",value:function(t){this.assessor.refresh(t)}},{key:"getPrimaryKeyword",value:function(){return this.assessor.getPrimaryKeyword()}},{key:"getSelectedKeyword",value:function(){return this.assessor.getSelectedKeyword()}},{key:"updatePermalink",value:function(t){throw"Implement the function"}},{key:"updatePermalinkSanitize",value:function(t){throw"Implement the function"}}])&&rn(e.prototype,r),n&&rn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function on(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 un(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?on(Object(r),!0).forEach((function(e){fn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cn(){cn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return D()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var u=w(o,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,o),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function p(){}function f(){}function h(){}var d={};u(d,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,a)&&(d=g);var y=h.prototype=p.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(a,i,o,u){var c=s(t[a],t,i);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==an(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,o,u)}),(function(t){n("throw",t,o,u)})):e.resolve(p).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,u)}))}u(c.arg)}var a;this._invoke=function(t,r){function i(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:D}}function D(){return{value:void 0,done:!0}}return f.prototype=h,u(y,"constructor",h),u(h,"constructor",f),f.displayName=u(h,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),u(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new b(c(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},v(y),u(y,o,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},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 a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function sn(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 ln(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){sn(i,n,a,o,u,"next",t)}function u(t){sn(i,n,a,o,u,"throw",t)}o(void 0)}))}}function pn(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,n.key,n)}}function fn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fn(this,"initialize",!1),this.etSettingsData={title:"",excerpt:"",featuredImage:""},this._featuredImage=null,this._data={id:!1,slug:!1,permalink:!1,content:!1,title:!1,excerpt:!1,featuredImage:!1},this.refresh=this.refresh.bind(this),this.savePost=this.savePost.bind(this),this.saveRedirection=this.saveRedirection.bind(this),this.saveSchemas=this.saveSchemas.bind(this),this.subscribeToDivi()}var e,r,n,a,u,c;return e=t,r=[{key:"collectPostData",value:function(){return{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 parseInt((0,at.get)(ETBuilderBackendDynamic,"postId",0))}},{key:"getTitle",value:function(){return this.etSettingsData.title}},{key:"setTitle",value:function(t){this.etSettingsData.title=t}},{key:"getContent",value:function(){var t=[];return this.getContentArea().find(".et_pb_section").each((function(){t.push(E()(this).html())})),t.join("")}},{key:"getContentArea",value:function(){if(this._etAppFrameElem||(this._etAppFrameElem=(0,at.get)(ET_Builder,"Frames.app.frameElement",document.querySelector("iframe#et-fb-app-frame"))),!this._etAppFrameElem)return E()("<div />");var t=this._etAppFrameElem.contentWindow.document,e=E()((0,at.isNull)(t.querySelector("#theme-builder-area--post_content"))?t.querySelector("body"):t.querySelector("#theme-builder-area--post_content"));return e.length<1?E()("<div />"):e}},{key:"getExcerpt",value:function(){return this.etSettingsData.excerpt}},{key:"setExcerpt",value:function(t){this.etSettingsData.excerpt=t}},{key:"getPermalink",value:function(){return rankMath.is_front_page?rankMath.homeUrl+"/":this.getSlug()?rankMath.permalinkFormat.replace(/%(postname|pagename)%/,this.getSlug()).trimRight("/"):""}},{key:"getSlug",value:function(){return(0,nr.safeDecodeURIComponent)((0,o.select)("rank-math").getPermalink())}},{key:"getFeaturedImage",value:function(){if(this._featuredImage)return this._featuredImage;this.setFeaturedImage()}},{key:"setFeaturedImage",value:(c=ln(cn().mark((function t(e){return cn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==e){t.next=4;break}return t.next=3,this.fetchFeaturedImageId();case 3:e=t.sent;case 4:if(!this.isValidMediaId(e)||!e){t.next=10;break}return t.next=7,this.fetchWpMedia(e);case 7:this._featuredImage=t.sent,t.next=11;break;case 10:this._featuredImage=!1;case 11:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"fetchFeaturedImageId",value:(u=ln(cn().mark((function t(){var e;return cn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=null,t.next=3,i()({path:"/rankmath/v1/getFeaturedImageId",method:"POST",data:{postId:(0,at.get)(ETBuilderBackendDynamic,"postId",0)}}).then((function(t){return e=!!t.success&&t.featImgId}));case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"fetchWpMedia",value:(a=ln(cn().mark((function t(e){var r;return cn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={},t.next=3,i()({path:"/wp/v2/media/".concat(e),method:"GET"}).then((function(t){return r=t}));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(t){return a.apply(this,arguments)})},{key:"isValidMediaId",value:function(t){return"number"==typeof t&&0<t}},{key:"subscribeToDivi",value:function(){var t=this;this.setTitle((0,at.get)(ETBuilderBackendDynamic,"postTitle","")),this.setExcerpt((0,at.get)(ETBuilderBackendDynamic,"postMeta.post_excerpt","")),this.setFeaturedImage((0,at.get)(ETBuilderBackendDynamic,"currentPage.thumbnailId",0)),(0,o.dispatch)("rank-math").updatePermalink(rankMath.postName),this.subscriber=(0,at.debounce)(this.refresh,500),(0,o.subscribe)(this.subscriber),E()(".et-fb-page-settings-bar").find(".et-fb-button--save-draft, .et-fb-button--publish").on("click",(function(){setTimeout((function(){t.savePost(),t.saveRedirection(),t.saveSchemas()}),500)})),(0,s.addFilter)("et.builder.store.setting.update","rank-math",(function(e,r){if(e)switch(r){case"et_pb_post_settings_title":t.setTitle(e),t.subscriber();break;case"et_pb_post_settings_excerpt":t.setExcerpt(e),t.subscriber();break;case"et_pb_post_settings_image":t.setFeaturedImage(parseInt(e)),t.subscriber()}return e})),window.addEventListener("message",(function(e){"et_fb_section_content_change"===e.data.etBuilderEvent&&t.subscriber()}))}},{key:"refresh",value:function(){var t=un({},this._data);this._data=this.collectPostData(),this.handleEditorChange(t),!(0,at.isEqual)(t,this._data)&&t.id&&(0,o.dispatch)("rank-math").refreshResults()}},{key:"savePost",value:function(){var t=(0,o.select)("rank-math").getDirtyMetadata();(0,at.isEmpty)(t)||(i()({method:"POST",path:"/rankmath/v1/updateMeta",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,meta:t}}).then((function(t){(0,at.isString)(t.slug)&&(0,o.dispatch)("rank-math").updatePermalink(t.slug),(0,s.doAction)("rank_math_metadata_updated",t)})),(0,o.dispatch)("rank-math").resetDirtyMetadata())}},{key:"saveRedirection",value:function(){var t=(0,o.select)("rank-math").getRedirectionItem();(0,at.isEmpty)(t)||(t.objectID=this.getPostID(),t.redirectionSources=this.getPermalink(),i()({method:"POST",path:"/rankmath/v1/updateRedirection",data:t}).then((function(t){"delete"===t.action?(0,o.dispatch)("rank-math").updateRedirection("redirectionID",0):"new"===t.action&&(0,o.dispatch)("rank-math").updateRedirection("redirectionID",t.id)})),(0,o.dispatch)("rank-math").resetRedirection())}},{key:"saveSchemas",value:function(){var t=(0,o.select)("rank-math").getSchemas();if(!(0,at.isEmpty)(t)&&!(0,at.isEqual)(t,(0,at.get)(rankMath,"schemas",{}))){var e=(0,o.select)("rank-math").getEditSchemas();i()({method:"POST",path:"/rankmath/v1/updateSchemas",data:{objectID:rankMath.objectID,objectType:rankMath.objectType,schemas:t}}).then((function(r){if((0,at.isEmpty)(r))(0,o.dispatch)("rank-math").updateSchemas(t);else{var n=un({},t),a=un({},e);(0,at.map)(r,(function(t,e){n["schema-"+t]=un({},n[e]),a["schema-"+t]=un({},a[e]),delete n[e],delete a[e]})),(0,o.dispatch)("rank-math").updateSchemas(n),(0,o.dispatch)("rank-math").updateEditSchemas(a)}}))}}},{key:"handleEditorChange",value:function(t){var e=this,r={id:"handleIDChange",slug:"handleSlugChange",title:"handleTitleChange",excerpt:"handleExcerptChange",content:"handleContentChange",featuredImage:"handleFeaturedImageChange"};if((0,at.isInteger)(t.id))return this.initialize?void(0,at.forEach)(r,(function(r,n){e._data[n]!==t[n]&&e[r](e._data[n])})):(this.initialize=!0,(0,at.forEach)(r,(function(t,r){e[t](e._data[r])})),void rankMathEditor.refresh("init"));(0,o.dispatch)("rank-math").refreshResults()}},{key:"handleIDChange",value:function(t){(0,o.dispatch)("rank-math").updatePostID(t),(0,o.dispatch)("rank-math").toggleLoaded(!0)}},{key:"handleSlugChange",value:function(){rankMathEditor.refresh("permalink")}},{key:"handleTitleChange",value:function(t){A.setVariable("title",t),(0,o.dispatch)("rank-math").updateSerpTitle((0,o.select)("rank-math").getTitle()),rankMathEditor.refresh("title")}},{key:"handleExcerptChange",value:function(t){A.setVariable("excerpt",t),A.setVariable("excerpt_only",t),A.setVariable("wc_shortdesc",t),A.setVariable("seo_description",t),(0,o.dispatch)("rank-math").updateSerpDescription((0,o.select)("rank-math").getDescription())}},{key:"handleFeaturedImageChange",value:function(t){(0,o.dispatch)("rank-math").updateFeaturedImage(t),rankMathEditor.refresh("featuredImage")}},{key:"handleContentChange",value:function(){(0,o.dispatch)("rank-math").updateSerpDescription((0,o.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"getData",value:function(){return this._data}}],r&&pn(e.prototype,r),n&&pn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),dn=hn,mn=r(4184),gn=r.n(mn),yn=function(){return wp.element.createElement("span",{className:"rank-math-rm-modal-toggle-button-icon",style:{display:"block",fill:"rgb(255, 255, 255)",width:"0px",height:"0px",marginTop:"-10px",marginLeft:"-1px"}},wp.element.createElement("svg",{viewBox:"0 0 462.03 462.03",xmlns:"http://www.w3.org/2000/svg",width:"20"},wp.element.createElement("g",null,wp.element.createElement("path",{d:"m462 234.84-76.17 3.43 13.43 21-127 81.18-126-52.93-146.26 60.97 10.14 24.34 136.1-56.71 128.57 54 138.69-88.61 13.43 21z"}),wp.element.createElement("path",{d:"m54.1 312.78 92.18-38.41 4.49 1.89v-54.58h-96.67zm210.9-223.57v235.05l7.26 3 89.43-57.05v-181zm-105.44 190.79 96.67 40.62v-165.19h-96.67z"}))))},vn=function(){return wp.element.createElement("button",{type:"button","data-tip":"Rank Math SEO",onClick:function(){(0,o.dispatch)("rank-math").toggleIsDiviRankMathModalActive(!(0,o.select)("rank-math").isDiviRankMathModalActive())},className:gn()("rank-math-rm-modal-toggle-button","et_fb_ignore_iframe","et-fb-button","et-fb-button--elevate","et-fb-button--primary","et-fb-button--round","et-fb-button--Tooltip"),style:{width:"40px",height:"40px"}},wp.element.createElement(yn,null))},bn=function(){return wp.element.createElement("div",{className:"rank-math-rm-settings-bar"},wp.element.createElement(vn,null))};function wn(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return kn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kn(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw i}}}}function kn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var _n={init:function(){this.cacheProps(),this.toggleBodyClasses(),this.initSettingsBar(),this.addEventListeners()},cacheProps:function(){this.$document=E()(document),this.$body=E()("body"),this.rmModalHiddingTimer=null,this.rmPrevModalActiveState=!1,this.rmSettingsBarMediaQuery=window.matchMedia("(min-width: 768px)"),this.rmSettingsBarRootSelector="#rank-math-rm-settings-bar-root",this.$rmSettingsBarRoot=E()(this.rmSettingsBarRootSelector).detach(),this.$etPageSettingsBar=E()(".et-fb-page-settings-bar"),this.$etPageSettingsBarToggleButton=this.$etPageSettingsBar.find(".et-fb-page-settings-bar__toggle-button"),this.$etPageSettingsBarColumn=this.$etPageSettingsBar.find(".et-fb-page-settings-bar__column"),this.etSettingsBarObserver=new MutationObserver(this.onEtSettingsBarClassAttrChange.bind(this))},toggleBodyClasses:function(){var t=this.isEtSettingsBarActive();this.$body.toggleClass("rank-math-et-settings-bar-is-active",t),this.$body.toggleClass("rank-math-et-settings-bar-is-inactive",!t)},initSettingsBar:function(){var t=this.getEtSettingsBarPosition();this.onRmSettingsBarMediaQueryChange(),(0,c.render)((0,c.createElement)(bn),this.$rmSettingsBarRoot[0]),this.removePositionalClassNames(this.$body,"rank-math-et-settings-bar-is"),this.$body.addClass("rank-math-et-settings-bar-is-".concat(t)),this.attachRmSettingsBar(t)},addEventListeners:function(){this.$document.on("click",this.onDocumentClick.bind(this)),this.rmSettingsBarMediaQuery.addListener(this.onRmSettingsBarMediaQueryChange.bind(this)),this.etSettingsBarObserver.observe(this.$etPageSettingsBar[0],{attributeFilter:["class"]})},onDocumentClick:function(t){this.hideModalOnOutsideClick(t.target)},onRmSettingsBarMediaQueryChange:function(){this.detachRmSettingsBar(),this.attachRmSettingsBar(this.getEtSettingsBarPosition())},onEtSettingsBarClassAttrChange:function(){var t=this.isEtSettingsBarActive(),e=this.getEtSettingsBarPosition();this.removePositionalClassNames(this.$body,"rank-math-et-settings-bar-is"),this.$body.addClass("rank-math-et-settings-bar-is-".concat(e)),(0,o.dispatch)("rank-math").toggleIsDiviPageSettingsBarActive(t),this.toggleBodyClasses(),this.detachRmSettingsBar(),this.isEtSettingsBarDragged()?(this.rmPrevModalActiveState=(0,o.select)("rank-math").isDiviRankMathModalActive(),this.rmPrevModalActiveState&&(this.rmModalHiddingTimer=setTimeout((function(){(0,o.dispatch)("rank-math").toggleIsDiviRankMathModalActive(!1)}),200))):(clearTimeout(this.rmModalHiddingTimer),this.attachRmSettingsBar(e),(0,o.dispatch)("rank-math").toggleIsDiviRankMathModalActive(this.rmPrevModalActiveState||(0,o.select)("rank-math").isDiviRankMathModalActive()),this.rmPrevModalActiveState=!1)},attachRmSettingsBar:function(t){this.isRmSettingsBarAttached()||(this.toggleRmSettingsBarClassNames(t),this.isEtSettingsBarActive()?this.rmSettingsBarMediaQuery.matches?this.$etPageSettingsBarColumn.filter(".et-fb-page-settings-bar__column--main").append(this.$rmSettingsBarRoot):this.$etPageSettingsBarColumn.filter(".et-fb-page-settings-bar__column--left").prepend(this.$rmSettingsBarRoot):this.$etPageSettingsBarToggleButton.after(this.$rmSettingsBarRoot))},detachRmSettingsBar:function(){this.isRmSettingsBarAttached()&&(this.$rmSettingsBarRoot=this.$etPageSettingsBar.find(this.rmSettingsBarRootSelector).detach())},toggleRmSettingsBarClassNames:function(t){this.removePositionalClassNames(this.$rmSettingsBarRoot),this.$rmSettingsBarRoot.addClass("rank-math-rm-settings-bar-root-".concat(t)),this.$rmSettingsBarRoot.toggleClass(["rank-math-rm-settings-bar-root-is-mobile","rank-math-rm-settings-bar-root-is-mobile-".concat(t)].join(" "),!this.rmSettingsBarMediaQuery.matches),this.$rmSettingsBarRoot.toggleClass(["rank-math-rm-settings-bar-root-is-desktop","rank-math-rm-settings-bar-root-is-desktop-".concat(t)].join(" "),this.rmSettingsBarMediaQuery.matches)},isRmSettingsBarAttached:function(){return E().contains(document.documentElement,this.$rmSettingsBarRoot[0])},isEtSettingsBarActive:function(){return this.$etPageSettingsBar.hasClass("et-fb-page-settings-bar--active")},isEtSettingsBarDragged:function(){return this.$etPageSettingsBar.hasClass("et-fb-page-settings-bar--dragged")&&!this.isEtSettingsBarActive()},removePositionalClassNames:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=["".concat(e,"-left"),"".concat(e,"-right"),"".concat(e,"-top"),"".concat(e,"-top-left"),"".concat(e,"-top-right"),"".concat(e,"-bottom"),"".concat(e,"-bottom-left"),"".concat(e,"-bottom-right")].join("|"),n=new RegExp("(".concat(r,")$"),"gim");t.removeClass((function(t,e){var r,a=[],i=wn(e.split(" "));try{for(i.s();!(r=i.n()).done;){var o=r.value;n.test(o)&&a.push(o)}}catch(t){i.e(t)}finally{i.f()}return a}))},getEtSettingsBarPosition:function(){var t=this.$etPageSettingsBar;return t.hasClass("et-fb-page-settings-bar--horizontal")&&!t.hasClass("et-fb-page-settings-bar--top")?"bottom":t.hasClass("et-fb-page-settings-bar--top")&&!t.hasClass("et-fb-page-settings-bar--corner")?"top":t.hasClass("et-fb-page-settings-bar--bottom-corner")?t.hasClass("et-fb-page-settings-bar--left-corner")?"bottom-left":"bottom-right":t.hasClass("et-fb-page-settings-bar--top-corner")?t.hasClass("et-fb-page-settings-bar--left-corner")?"top-left":"top-right":t.hasClass("et-fb-page-settings-bar--vertical--right")?"right":t.hasClass("et-fb-page-settings-bar--vertical--left")?"left":""},hideModalOnOutsideClick:function(t){if((0,o.select)("rank-math").isDiviRankMathModalActive()){var e=".rank-math-rm-modal";E()(t).parents(e)||t.closest(".components-modal__screen-overlay.rank-math-modal-overlay")||t.closest(".rank-math-rm-modal-toggle-button")||t.contains(document.querySelector(e))||(0,o.dispatch)("rank-math").toggleIsDiviRankMathModalActive(!1)}}},Sn=(0,o.withSelect)((function(t){return{primaryTermId:t("rank-math").getPrimaryTermID()}}))((function(t){var e=t.taxonomySlug,r=t.primaryTermId,n=t.options;if(n.length<2||!e)return null;return wp.element.createElement(l.SelectControl,{className:"rank-math-primary-term-select",label:(0,zt.__)("Select Primary Term","rank-math"),value:r,options:n,onChange:function(t){(0,o.dispatch)("rank-math").updatePrimaryTermID(parseInt(t),e)}})}));function Tn(t){return Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(t)}function Dn(){Dn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var a=e&&e.prototype instanceof p?e:p,i=Object.create(a.prototype),o=new S(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return D()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var u=w(o,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,o),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function p(){}function f(){}function h(){}var d={};u(d,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,a)&&(d=g);var y=h.prototype=p.prototype=Object.create(d);function v(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(a,i,o,u){var c=s(t[a],t,i);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==Tn(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,o,u)}),(function(t){n("throw",t,o,u)})):e.resolve(p).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,u)}))}u(c.arg)}var a;this._invoke=function(t,r){function i(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:D}}function D(){return{value:void 0,done:!0}}return f.prototype=h,u(y,"constructor",h),u(h,"constructor",f),f.displayName=u(h,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,u(t,o,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},v(b.prototype),u(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new b(c(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},v(y),u(y,o,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},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 a=n.arg;_(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function In(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 Pn(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){In(i,n,a,o,u,"next",t)}function u(t){In(i,n,a,o,u,"throw",t)}o(void 0)}))}}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,n.key,n)}}function On(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var An=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),E()(document).on("click",".et-fb-button--toggle-setting",(function(){clearTimeout(e.initRecursionTimer),e.attemptsRun=0,e.init.call(e)}))}var e,r,n,a,o;return e=t,r=[{key:"init",value:(o=Pn(Dn().mark((function t(){return Dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==this.hasPostPrimaryTaxonomySupport){t.next=3;break}return t.next=3,this.cacheTaxonomyData();case 3:if(this.hasPostPrimaryTaxonomySupport){t.next=5;break}return t.abrupt("return");case 5:if(this.attemptsRun++,!(this.attemptsRun>this.maxAttempts)){t.next=8;break}return t.abrupt("return");case 8:this.cacheDom()?(this.renderContainer(),this.renderComponent(),this.bindEvents()):this.initRecursionTimer=setTimeout(this.init.bind(this),this.attemptInterval);case 10:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"cacheTaxonomyData",value:(a=Pn(Dn().mark((function t(){var e,r,n=this;return Dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,at.get)(rankMath,"assessor.primaryTaxonomy.name")||"",r=(0,at.get)(ETBuilderBackendDynamic,"getTaxonomies",{}),this.primaryTaxonomyTerms=r[e]||[],t.next=4,i()({path:"/wp/v2/taxonomies"}).then((function(t){n.primaryTaxonomy=Object.keys(r).includes(e)&&t[e]?t[e]:{}}));case 4:this.hasPostPrimaryTaxonomySupport=!E().isEmptyObject(this.primaryTaxonomy),this.primaryTaxonomyValue=(0,at.get)(ETBuilderBackendDynamic,"pageSettingsValues.et_pb_post_settings_".concat(this.primaryTaxonomy.rest_base),"");case 6:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"cacheDom",value:function(){return this.$diviSettingsModal=E()(document).find(".et-fb-modal__page-settings"),!!this.$diviSettingsModal.length&&(this.$diviTermSettingInputs=this.$diviSettingsModal.find(".et-fb-option--".concat(this.primaryTaxonomy.rest_base)),this.$diviTermSettingArea=this.$diviTermSettingInputs.parents(".et-fb-form__group"),this.$diviTermSettingArea.length||(this.$diviTermSettingArea=this.workaroundForFalseDiviTaxonomySelector()),this.$PrimaryTermSelectContainer=E()('<div id="rank-math-primary-term-input" />'),!0)}},{key:"workaroundForFalseDiviTaxonomySelector",value:function(){var t=this.primaryTaxonomy.name.toLowerCase();return this.$diviSettingsModal.find(".et-fb-form__label-text").filter((function(e,r){return E()(r).text().toLowerCase()===t})).parents(".et-fb-form__group")}},{key:"renderContainer",value:function(){this.$diviTermSettingArea.after(this.$PrimaryTermSelectContainer)}},{key:"renderComponent",value:function(t){var e={taxonomySlug:this.primaryTaxonomy.slug,options:this.formatActiveTerms(t)};(0,c.render)((0,c.createElement)(Sn,e),this.$PrimaryTermSelectContainer[0])}},{key:"bindEvents",value:function(){var t=this;(0,s.addFilter)("et.builder.store.setting.update","rank-math",(function(e,r){return"et_pb_post_settings_".concat(t.primaryTaxonomy.rest_base)===r&&t.renderComponent(e),e}))}},{key:"formatActiveTerms",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.primaryTaxonomyValue;return this.primaryTaxonomyTerms.length&&e.trim()?e.split(",").map((function(e){var r=(0,at.find)(t.primaryTaxonomyTerms,["term_id",parseInt(e)])||{};return{label:r.name,value:r.term_id}})):[]}}],r&&En(e.prototype,r),n&&En(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();On(An,"initRecursionTimer",void 0),On(An,"attemptsRun",0),On(An,"maxAttempts",10),On(An,"attemptInterval",1e3);var Mn=["className","children"];function xn(){return xn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xn.apply(this,arguments)}function Cn(t,e){if(null==t)return{};var r,n,a=function(t,e){if(null==t)return{};var r,n,a={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}var Rn=function(t){var e=t.className,r=t.children,n=Cn(t,Mn),a=gn()("rank-math-rm-modal-button",e);return wp.element.createElement("button",xn({type:"button",className:a},n),r)},jn=function(){return wp.element.createElement("div",{className:"et-fb-icon et-fb-icon--close",style:{fill:"rgb(255, 255, 255)",width:"28px",minWidth:"28px",height:"28px",margin:"-6px"}},wp.element.createElement("svg",{viewBox:"0 0 28 28",preserveAspectRatio:"xMidYMid meet",shapeRendering:"geometricPrecision"},wp.element.createElement("g",null,wp.element.createElement("path",{d:"M15.59 14l4.08-4.082a1.124 1.124 0 0 0-1.587-1.588L14 12.411 9.918 8.329A1.124 1.124 0 0 0 8.33 9.92L12.411 14l-4.082 4.082a1.124 1.124 0 0 0 1.59 1.589L14 15.589l4.082 4.082a1.124 1.124 0 0 0 1.589-1.59L15.589 14h.001z",fillRule:"evenodd"}))))},Bn=function(){var t=gn()("rank-math-rm-modal-header-discard-button");return wp.element.createElement(Rn,{className:t,onClick:function(){(0,o.dispatch)("rank-math").toggleIsDiviRankMathModalActive(!1)}},wp.element.createElement(jn,null))},Un=function(){var t=gn()("rank-math-rm-modal-header");return wp.element.createElement("header",{className:t},wp.element.createElement("div",{className:"rank-math-rm-modal-header"},wp.element.createElement("div",{className:"rank-math-rm-modal-header-title"},"Rank Math SEO"),wp.element.createElement("ul",{className:"rank-math-rm-modal-header-options"},wp.element.createElement("li",{className:"rank-math-rm-modal-header-option"},wp.element.createElement(Bn,null)))))},Fn=function(t){var e=t.children,r=gn()("rank-math-rm-modal-content","rank-math-sidebar-panel");return wp.element.createElement("div",{className:r},e)},Ln=(0,o.withSelect)((function(t){return{rmUiActive:(0,t("rank-math").isDiviRankMathModalActive)()}}))((function(t){var e=t.rmUiActive,r=gn()("rank-math-rm-modal",{"rank-math-rm-modal-is-hidden":!e}),n=gn()("rank-math-rm-modal-inner");return wp.element.createElement("div",{className:r},wp.element.createElement("div",{className:n},wp.element.createElement(Un,null),wp.element.createElement(Fn,null,(0,s.applyFilters)("rank_math_app",{})())))})),Nn=(0,l.withFilters)("rankMath.diviAppModal")(Ln),$n=function(){return wp.element.createElement(l.SlotFillProvider,null,wp.element.createElement("div",{className:"rank-math-rm-app"},wp.element.createElement(Nn,null)))};function Hn(t){return Hn="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},Hn(t)}function Kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gn(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,n.key,n)}}function zn(){return zn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=Vn(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(arguments.length<3?t:r):a.value}},zn.apply(this,arguments)}function Vn(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yn(t)););return t}function qn(t,e){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qn(t,e)}function Qn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Yn(t);if(e){var a=Yn(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Wn(this,r)}}function Wn(t,e){if(e&&("object"===Hn(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)}function Yn(t){return Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yn(t)}var Jn=function(){return u.MediaUpload},Xn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)}(u,t);var e,r,n,a=Qn(u);function u(){return Kn(this,u),a.apply(this,arguments)}return e=u,(r=[{key:"setup",value:function(t){i().use(i().createRootURLMiddleware(rankMath.api.root)),i().use(i().createNonceMiddleware(rankMath.restNonce)),this.registerSlots=this.registerSlots.bind(this),(0,s.addAction)("rank_math_loaded","rank-math",this.registerSlots,0),(0,s.addFilter)("editor.MediaUpload","rank-math/replace-media-upload",Jn),zn(Yn(u.prototype),"setup",this).call(this,t)}},{key:"registerSlots",value:function(){this.RankMathAfterEditor=m,this.RankMathAfterFocusKeyword=D,this.RankMathAdvancedTab=w,this.slots={AfterEditor:m,AfterFocusKeyword:D,AdvancedTab:w}}},{key:"updatePermalink",value:function(t){(0,o.dispatch)("rank-math").updatePermalink(t)}},{key:"updatePermalinkSanitize",value:function(t){t=this.assessor.getResearch("slugify")(t),(0,o.dispatch)("rank-math").updatePermalink(t)}}])&&Gn(e.prototype,r),n&&Gn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(nn);window.addEventListener("message",(function(t){"et_builder_api_ready"===t.data.etBuilderEvent&&(window.rankMathEditor=new Xn,window.rankMathGutenberg=window.rankMathEditor,window.rankMathEditor.setup(new dn),_n.init(),new An,(0,c.render)((0,c.createElement)($n),document.getElementById("rank-math-rm-app-root")),(0,o.dispatch)("rank-math").refreshResults())}))}()}();