(()=>{"use strict";var e,t={3309:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=o(n(5311));window.createSnippetChooser=function(e){var t=(0,r.default)("#"+e+"-chooser"),n=t.find(".title"),o=(0,r.default)("#"+e),a=t.find(".edit-link"),i=t.data("chooserUrl"),l=null;o.val()&&(l={id:o.val(),edit_link:a.attr("href"),string:n.text()});var u={getState:function(){return l},getValue:function(){return l&&l.id},setState:function(e){e?(o.val(e.id),n.text(e.string),t.removeClass("blank"),a.attr("href",e.edit_link)):(o.val(""),t.addClass("blank")),l=e},getTextLabel:function(e){if(!l)return null;var t=l.string;return e&&e.maxLength&&t.length>e.maxLength?t.substring(0,e.maxLength-1)+"…":t},focus:function(){(0,r.default)(".action-choose",t).focus()},openChooserModal:function(){var e="";wagtailConfig.ACTIVE_CONTENT_LOCALE&&(e="?locale="+wagtailConfig.ACTIVE_CONTENT_LOCALE),ModalWorkflow({url:i+e,onload:SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS,responses:{snippetChosen:function(e){u.setState(e)}}})},clear:function(){u.setState(null)}};return(0,r.default)(".action-choose",t).on("click",(function(){u.openChooserModal()})),(0,r.default)(".action-clear",t).on("click",(function(){u.clear()})),u}},5311:e=>{e.exports=jQuery}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var i=1/0;for(s=0;s<e.length;s++){for(var[n,r,a]=e[s],l=!0,u=0;u<n.length;u++)(!1&a||i>=a)&&Object.keys(o.O).every((e=>o.O[e](n[u])))?n.splice(u--,1):(l=!1,a<i&&(i=a));if(l){e.splice(s--,1);var f=r();void 0!==f&&(t=f)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},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=9602,(()=>{var e={9602:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[i,l,u]=n,f=0;if(i.some((t=>0!==e[t]))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(u)var s=u(o)}for(t&&t(n);f<i.length;f++)a=i[f],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(s)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[2751],(()=>o(3309)));r=o.O(r)})();