(()=>{class e extends window.wagtailStreamField.blocks.StructBlockDefinition{render(e,t,a,d){const l=super.render(e,t,a,d),i=document.getElementById(`${t}-alt_text`),n=document.getElementById(`${t}-decorative`),c=()=>{n.checked?i.setAttribute("disabled",!0):i.removeAttribute("disabled")};c(),n.addEventListener("change",c);const r=l.childBlocks.image.widget;let s=a?.image?.default_alt_text||"";return r.addEventListener("chosen",({detail:e})=>{i.value===s&&(i.value=e.default_alt_text),s=e.default_alt_text}),l}}window.telepath.register("wagtail.images.blocks.ImageBlock",e)})();