(()=>{"use strict";var e,o={70533:function(e,o,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};o.__esModule=!0;var r=a(t(73609));window.ModalWorkflow=function(e){var o={},t=e.responses||{},a=e.onError||function(){};r.default("body > .modal").remove();var n=r.default('<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">\n  <div class="modal-dialog">\n    <div class="modal-content">\n      <button type="button" class="button close button--icon text-replace" data-dismiss="modal"><svg class="icon icon-cross" aria-hidden="true" focusable="false"><use href="#icon-cross"></use></svg>'+wagtailConfig.STRINGS.CLOSE+'</button>\n      <div class="modal-body"></div>\n    </div>\x3c!-- /.modal-content --\x3e\n  </div>\x3c!-- /.modal-dialog --\x3e\n</div>');return r.default("body").append(n),n.modal("hide"),o.body=n.find(".modal-body"),o.loadUrl=function(e,t){r.default.get(e,t,o.loadResponseText,"text").fail(a)},o.postForm=function(e,t){r.default.post(e,t,o.loadResponseText,"text").fail(a)},o.ajaxifyForm=function(e){r.default(e).each((function(){var e=this.action;"get"===this.method.toLowerCase()?r.default(this).on("submit",(function(){return o.loadUrl(e,r.default(this).serialize()),!1})):r.default(this).on("submit",(function(){return o.postForm(e,r.default(this).serialize()),!1}))}))},o.loadResponseText=function(e){var t=JSON.parse(e);o.loadBody(t)},o.loadBody=function(t){t.html&&(o.body.html(t.html),n.modal("show")),e.onload&&t.step&&t.step in e.onload&&e.onload[t.step](o,t)},o.respond=function(e){if(e in t){var a=Array.prototype.slice.call(arguments,1);t[e].apply(o,a)}},o.close=function(){n.modal("hide")},o.loadUrl(e.url,e.urlParams),o}},73609:e=>{e.exports=jQuery}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=(o,t,r,n)=>{if(!t){var l=1/0;for(s=0;s<e.length;s++){for(var[t,r,n]=e[s],i=!0,d=0;d<t.length;d++)(!1&n||l>=n)&&Object.keys(a.O).every((e=>a.O[e](t[d])))?t.splice(d--,1):(i=!1,n<l&&(l=n));i&&(e.splice(s--,1),o=r())}return o}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[t,r,n]},a.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return a.d(o,{a:o}),o},a.d=(e,o)=>{for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.j=922,(()=>{var e={922:0};a.O.j=o=>0===e[o];var o=(o,t)=>{var r,n,[l,i,d]=t,s=0;for(r in i)a.o(i,r)&&(a.m[r]=i[r]);if(d)var u=d(a);for(o&&o(t);s<l.length;s++)n=l[s],a.o(e,n)&&e[n]&&e[n][0](),e[l[s]]=0;return a.O(u)},t=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})(),a.O(void 0,[876],(()=>a(70533)));var r=a.O(void 0,[876],(()=>a(90971)));r=a.O(r)})();
//# sourceMappingURL=modal-workflow.js.map