(()=>{"use strict";var e,t={9221:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var n=o(r(5311));window.createImageChooser=function(e){var t=(0,n.default)("#"+e+"-chooser"),r=t.find(".preview-image img"),o=(0,n.default)("#"+e),i=t.find(".edit-link"),a=t.data("chooserUrl"),l=null;o.val()&&(l={id:o.val(),edit_link:i.attr("href"),title:r.attr("alt"),preview:{url:r.attr("src"),width:r.attr("width"),height:r.attr("height")}});var u={getState:function(){return l},getValue:function(){return l&&l.id},setState:function(e){e?(o.val(e.id),r.attr({src:e.preview.url,width:e.preview.width,height:e.preview.height,alt:e.title,title:e.title}),t.removeClass("blank"),i.attr("href",e.edit_link)):(o.val(""),t.addClass("blank")),l=e},getTextLabel:function(e){if(!l)return null;var t=l.title;return e&&e.maxLength&&t.length>e.maxLength?t.substring(0,e.maxLength-1)+"…":t},focus:function(){(0,n.default)(".action-choose",t).focus()},openChooserModal:function(){ModalWorkflow({url:a,onload:IMAGE_CHOOSER_MODAL_ONLOAD_HANDLERS,responses:{imageChosen:function(e){u.setState(e)}}})},clear:function(){u.setState(null)}};return(0,n.default)(".action-choose",t).on("click",(function(){u.openChooserModal()})),(0,n.default)(".action-clear",t).on("click",(function(){u.clear()})),u}},5311:e=>{e.exports=jQuery}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,r,n,i)=>{if(!r){var a=1/0;for(f=0;f<e.length;f++){for(var[r,n,i]=e[f],l=!0,u=0;u<r.length;u++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](r[u])))?r.splice(u--,1):(l=!1,i<a&&(a=i));if(l){e.splice(f--,1);var c=n();void 0!==c&&(t=c)}}return t}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[r,n,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=2912,(()=>{var e={2912:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[a,l,u]=r,c=0;if(a.some((t=>0!==e[t]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(u)var f=u(o)}for(t&&t(r);c<a.length;c++)i=a[c],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var n=o.O(void 0,[2751],(()=>o(9221)));n=o.O(n)})();