(()=>{"use strict";var e={n:n=>{var t=n&&n.__esModule?()=>n.default:()=>n;return e.d(t,{a:t}),t},d:(n,t)=>{for(var i in t)e.o(t,i)&&!e.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.wp.domReady;var t=e.n(n);const i=window.jQuery;var o=e.n(i);const d=advancedAds.i18n;t()(()=>{!function(){const e=window.inlineEditPost.edit;window.inlineEditPost.edit=function(n){e.apply(this,arguments),"object"==typeof n&&function(e){!function(e,n){const t=o()(`#edit-${e}`);if(t.find(".advads-quick-edit").prop("disabled",!1),t.find('[name="debugmode"]').prop("checked",n.debug_mode),n.expiry.expires){t.find('[name="enable_expiry"]').prop("checked",!0);const e=t.find(".expiry-inputs").show();for(const t in n.expiry.expiry_date)e.find(`[name="${t}"]`).val(n.expiry.expiry_date[t])}const i=t.find('[name="ignore_privacy"]');i.length&&i.prop("checked",n.ignore_privacy);const d=t.find('[name="ad_label"]');d.length&&d.val(n.ad_label),wp.hooks.doAction("advanced-ads-quick-edit-fields-init",e,n)}(e,window[`ad_json_${e}`])}(parseInt(this.getId(n),10))},o()(document).on("change",'.advads-bulk-edit [name="expiry_date"]',function(){const e=o()(this);e.closest("fieldset").find(".expiry-inputs").css("display","on"===e.val()?"block":"none")}),o()(document).on("click",'[name="enable_expiry"]',function(){const e=o()(this);e.closest("fieldset").find(".expiry-inputs").css("display",e.prop("checked")?"block":"none")}),o()(function(){o()('.inline-edit-group select option[value="private"]').remove()})}(),function(){if(!document.body.classList.contains("post-type-advanced_ads"))return;const e=new URLSearchParams(window.location.search);if(e.has("s")&&""!==e.get("s").trim()){const e=document.querySelector("p.search-box"),n=document.querySelector(".subtitle");n&&n.classList.add("hidden");const t=document.createElement("span");t.className="advads-search-results-label",t.textContent=d.searchResultsLabel,e.insertAdjacentElement("afterbegin",t)}}()})})();