!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.r(t);var r,i=n(0);(r=n.n(i).a)((function(){r("#bulk-action-selector-top, #bulk-action-selector-bottom").on("change",(function(){var e=r(this),t=e.closest(".tablenav").find(".redirection-category-filter"),n=e.closest(".tablenav").find(".category-filter-submit");"bulk_add_redirection_category"===e.val()?(t.data("oldval",t.val()).val("none").insertAfter(e),n.addClass("hidden")):(t.insertBefore(n),t.data("oldval")&&(t.val(t.data("oldval")),t.data("oldval","")),n.removeClass("hidden"))})),r(".add-redirection-category-button").on("click",(function(){var e=r(this),t=e.siblings(".add-redirection-category-input");e.addClass("disabled"),t.prop("disabled",!0),r.ajax({url:ajaxurl,type:"POST",dataType:"xml",data:{action:"add-rank_math_redirection_category","_ajax_nonce-add-rank_math_redirection_category":rankMath.add_redirection_category_nonce,newrank_math_redirection_category:t.val(),newrank_math_redirection_category_parent:-1}}).always((function(n){t.val(""),e.removeClass("disabled"),t.prop("disabled",!1);var i=n.getElementsByTagName("response_data")[0].innerHTML.slice(9,-3);r(i).appendTo(e.siblings(".cmb2-checkbox-list")).find("input").prop("name","redirection_category[]")}))})),r(".add-redirection-category-input").on("keydown",(function(e){if(13===e.keyCode)return e.preventDefault(),e.stopPropagation(),r(this).siblings(".add-redirection-category-button").trigger("click"),!1})),r("#rank-math-contextual-help-link").on("click",(function(e){e.preventDefault(),r("#contextual-help-link").trigger("click")})),r("#csv-panel-export-redirections").on("submit",(function(){var e=r(this);e.find('button[type="submit"]').prop("disabled",!0).siblings(".input-loading").css("visibility","visible"),setTimeout((function(){e.find('button[type="submit"]').prop("disabled",!1).siblings(".input-loading").css("visibility","hidden")}),5e3)})),r("#panel-import").on("submit",(function(){return confirm(rankMath.confirmRedirectionsCsvImport)})),r("#csv-import-redirections-cancel").on("click",(function(){return confirm(rankMath.confirmRedirectionsCsvCancel)})),r("#csv-import-redirections-progress-details").length&&setTimeout((function e(){r.ajax({url:ajaxurl,type:"GET",dataType:"html",data:{action:"csv_import_redirections_progress",_ajax_nonce:rankMath.csvProgressNonce}}).done((function(t){r("#csv-import-redirections-progress-details").html(t),r(t).find("#csv-import-progress-value").length?setTimeout(e,3e3):r("#csv-import-cancel").addClass("disabled").prop("disabled",!0).siblings(".input-loading").hide()}))}),3e3),"#import-export-box"===window.location.hash&&r(".rank-math-redirections-form.rank-math-importexport-form").show()}))}]);