!function(){"use strict";var t,e={n:function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,{a:o}),o},d:function(t,o){for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},o=jQuery;function n(t){return n="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},n(t)}(t=e.n(o)())((function(){var e=t(".rank-math-tab-nav");function o(o,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3;n=n||"error";var a=t('<div class="notice is-dismissible rank-math-tool-notice"><p></p></div>');a.hide().addClass("notice-"+n).find("p").text(o),e.prev(".notice").remove(),e.before(a),a.slideDown(),t("html,body").animate({scrollTop:a.offset().top-50},"slow"),t(document).trigger("wp-updates-notice-added"),r&&setTimeout((function(){a.fadeOut()}),r)}t(".tools-action").on("click",(function(e){e.preventDefault();var r=t(this);return r.data("confirm")&&!confirm(r.data("confirm"))||(r.attr("disabled","disabled"),t.ajax({url:rankMath.api.root+"rankmath/v1/toolsAction",method:"POST",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",rankMath.restNonce)},data:{action:r.data("action")}}).always((function(){r.removeAttr("disabled")})).fail((function(t){t&&(t.responseJSON&&t.responseJSON.message?o(t.responseJSON.message):o(t.statusText))})).done((function(t){if(t){if("string"==typeof t)return void o(t,"success",!1);if("object"===n(t)&&t.status&&t.message)return void o(t.message,t.status,!1)}o("Something went wrong. Please try again later.")}))),!1}))}))}();