(()=>{"use strict";const e=jQuery;Drupal.behaviors.gutenbergAdmin={attach(l){const c=e(once("view-reusable-blocks-item-click",".view-reusable-blocks .views-view-responsive-grid__item, .view-reusable-blocks .views-col",l));e(c).find('input[type="checkbox"]').click(e=>{e.stopPropagation()}),e(c).click(l=>{e(l.currentTarget).find('input[type="checkbox"]').click()}),l===document&&(e('input[name*="allowed_blocks_"]:not([value*="/all"])').click(l=>{const c=e(l.currentTarget).val().split("/")[0],t=e(l.currentTarget).is(":checked");t||e(`input[name="allowed_blocks_${c}[${c}/all]"]`).not(":disabled").prop("checked",t)}),e('input[name*="allowed_blocks_core"][value*="/all"]').click(l=>{const c=e(l.currentTarget).val().split("/")[0],t=e(l.currentTarget).is(":checked");e(`input[name*="allowed_blocks_${c}[${c}"]`).not(":disabled").prop("checked",t)}),e('#edit-allowed-custom-blocks-details input[name*="allowed_blocks_"][value*="/all"]').click(l=>{const c=e(l.currentTarget).val().split("/")[0],t=e(l.currentTarget).is(":checked");e(`input[name*="allowed_blocks_${c}[${c}"]`).not(":disabled").prop("checked",t)}),e("details.more-settings",l).on("toggle",function(){this.open&&this.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}))}}})();