1!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const t=(t,e=document)=>e.querySelector(t),e=(t,e=document)=>[].slice.call(e.querySelectorAll(t));var s="is-loading";class i{constructor(s){this.handle=s,this.content=t(`[data-ajax-content="${s}"]`),this.content&&(this.triggers=e(`[data-ajax-target=${s}]`),this.forms=this.triggers.filter((t=>t.matches("form"))),this.submits=this.forms.map((e=>t('[type="submit"]',e))).filter((t=>t)),this.content.setAttribute("aria-live","polite"),this.createXHR(),this.bindEvents())}createXHR(){this.xhrOptions={},this.xhr=new XMLHttpRequest,this.xhr.onload=()=>{if(this.xhr.status>=200&&this.xhr.status<300){if(this.xhrOptions.updateUrl){let[t]=this.xhrOptions.url.split("?");this.xhrOptions.data&&(t+="?",t+=new URLSearchParams(this.xhrOptions.data).toString()),window.history.replaceState({},document.title,decodeURIComponent(t))}this.content.innerHTML=this.xhr.response,e("script",this.content).filter((t=>"application/json"!==t.type)).forEach((t=>{const e=document.createElement("script");e.append(document.createTextNode(t.innerHTML)),document.head.append(e),t.remove()}))}else this.content.innerHTML="Er is iets fout gegaan";this.stopLoading()}}bindEvents(){this.triggers.forEach((t=>{const e=(t.dataset.ajaxTriggers||(t.matches("form")?"submit, change":"click")).split(",").map((t=>t.trim()));e.forEach((e=>{t.addEventListener(e,(s=>{["click","submit"].includes(e)&&s.preventDefault(),this.fetchResults(t)}))}))})),this.content.addEventListener("click",(t=>{const e=t.target.closest("a, button"),s=null==e?void 0:e.closest("[data-ajax-target]");(null==s?void 0:s.dataset.ajaxLink)||(null==s?void 0:s.closest("[data-ajax-content]"))!==this.content||(t.preventDefault(),this.fetchResults(e))}))}fetchResults(t,e={}){const s=t.closest("[data-ajax-target]"),i={scrollIntoView:!!(null==s?void 0:s.dataset.ajaxScrollintoview),updateUrl:!!this.content.dataset.ajaxUpdateurl,url:t.dataset.ajaxUrl||t.getAttribute("action")||t.getAttribute("href")||window.location.href.split("?")[0]};this.xhr.abort(),this.xhrOptions=Object.assign(Object.assign({},i),e),this.xhrOptions.data=this.forms.length?new FormData(this.forms[0]):null;for(let t=1;t<this.forms.length;t++){const e=new FormData(this.forms[t]);for(const t of e.entries())this.xhrOptions.data.append(...t)}this.startLoading(),this.xhr.open("POST",this.xhrOptions.url),this.xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this.xhr.send(this.xhrOptions.data)}startLoading(){this.submits.forEach((t=>{t.disabled=!0})),this.content.classList.add(s)}stopLoading(){this.submits.forEach((t=>{t.disabled=!1})),this.xhrOptions.scrollIntoView&&this.content.scrollIntoView(),this.content.classList.remove(s)}}e("[data-ajax-content]").forEach((t=>{new i(t.dataset.ajaxContent)}))}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.