(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.jQuery;var n=t.n(e);function o(t){t||(t=n()('[id*="ghostkit_reusable_widget"].widget')),t.each((function(){const t=n()(this),e=t.find(".gkt-reusable-block-edit-button"),o=t.find(".gkt-reusable-block-select");if(!e.length||!o.length)return;const d=e.attr("data-admin-url"),i=o.val();i?(e.find("a").attr("href",`${d}post.php?post=${i}&action=edit`),e.show()):e.hide()}))}o(),n()(document).on("widget-added widget-updated",((t,e)=>{o(e)})),n()(document).on("change",".gkt-reusable-block-select",(function(){o(n()(this).closest('[id*="ghostkit_reusable_widget"].widget'))}))})();