(()=>{"use strict";var e,t={78238:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=n(o(73609)),a={browse:function(e,t){r.default(".link-types a",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),e.ajaxifyForm(r.default("form.search-form",e.body));var o,n=r.default("form.search-form",e.body).attr("action"),a=r.default(".page-results",e.body).html();function i(){var t=r.default("#id_q",e.body).val();return""!==t?o=r.default.ajax({url:n,data:{q:t,results_only:!0},success:function(t){o=null,r.default(".page-results",e.body).html(t),l()},error:function(){o=null}}):(r.default(".page-results",e.body).html(a),u()),!1}function l(){r.default(".page-results a.choose-page",e.body).on("click",(function(){var t=r.default(this).data();return e.respond("pageChosen",t),e.close(),!1})),r.default(".page-results a.navigate-pages",e.body).on("click",(function(){return r.default(".page-results",e.body).load(this.href,l),!1})),r.default(".page-results a.navigate-parent",e.body).on("click",(function(){return e.loadUrl(this.href),!1}))}function u(){r.default(".page-results a.navigate-pages",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),r.default("a.choose-page",e.body).on("click",(function(){var o=r.default(this).data();return o.parentId=t.parent_page_id,e.respond("pageChosen",o),e.close(),!1}))}r.default("#id_q",e.body).on("input",(function(){o&&o.abort(),clearTimeout(r.default.data(this,"timer"));var e=setTimeout(i,200);r.default(this).data("timer",e)})),u(),r.default("#id_q",e.body).trigger("focus")},anchor_link:function(e){r.default("p.link-types a",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),r.default("form",e.body).on("submit",(function(){return e.postForm(this.action,r.default(this).serialize()),!1}))},email_link:function(e){r.default("p.link-types a",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),r.default("form",e.body).on("submit",(function(){return e.postForm(this.action,r.default(this).serialize()),!1}))},phone_link:function(e){r.default("p.link-types a",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),r.default("form",e.body).on("submit",(function(){return e.postForm(this.action,r.default(this).serialize()),!1}))},external_link:function(e){r.default("p.link-types a",e.body).on("click",(function(){return e.loadUrl(this.href),!1})),r.default("form",e.body).on("submit",(function(){return e.postForm(this.action,r.default(this).serialize()),!1}))},external_link_chosen:function(e,t){e.respond("pageChosen",t.result),e.close()},confirm_external_to_internal:function(e,t){r.default("[data-action-confirm]",e.body).on("click",(function(){return e.respond("pageChosen",t.internal),e.close(),!1})),r.default("[data-action-deny]",e.body).on("click",(function(){return e.respond("pageChosen",t.external),e.close(),!1}))}};window.PAGE_CHOOSER_MODAL_ONLOAD_HANDLERS=a},73609:e=>{e.exports=jQuery}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=t,e=[],n.O=(t,o,r,a)=>{if(!o){var i=1/0;for(d=0;d<e.length;d++){for(var[o,r,a]=e[d],l=!0,u=0;u<o.length;u++)(!1&a||i>=a)&&Object.keys(n.O).every((e=>n.O[e](o[u])))?o.splice(u--,1):(l=!1,a<i&&(i=a));l&&(e.splice(d--,1),t=r())}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,r,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.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),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=726,(()=>{var e={726:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[i,l,u]=o,d=0;for(r in l)n.o(l,r)&&(n.m[r]=l[r]);if(u)var s=u(n);for(t&&t(o);d<i.length;d++)a=i[d],n.o(e,a)&&e[a]&&e[a][0](),e[i[d]]=0;return n.O(s)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})(),n.O(void 0,[876],(()=>n(78238)));var r=n.O(void 0,[876],(()=>n(90971)));r=n.O(r)})();
//# sourceMappingURL=page-chooser-modal.js.map