function urlMatch(e){var e=new RegExp("^"+e.replace(/\*/g,".*").replace(/\/+$/g,"").replace(/\?/g,"\\?").replace("//www.","//(www.)?")+"$"),t=window.location.protocol+"//"+window.location.hostname.replace(/^www./,"")+window.location.pathname,n=window.location.protocol+"//www."+window.location.hostname.replace(/^www./,"")+window.location.pathname,r=new URL(window.location.href),a=new URLSearchParams(r.search),a=(a.delete("test-preview"),a.delete("test-variant"),r.search=a.toString(),r.toString());return e.test(t)||e.test(t.replace(/\/+$/,""))||e.test(n)||e.test(n.replace(/\/+$/,""))||e.test(a.replace(/\/+$/,""))||e.test(a.replace("//www.","//").replace(/\/+$/,""))}function mdEvtAttr(e){for(;e;){if(e.hasAttribute&&e.hasAttribute("mida-event")&&!e.hasAttribute("mida-event-processed"))return e.getAttribute("mida-event");e=e.parentElement}return null}function addMidaEventListener(e){const t=e.getAttribute("mida-event");t&&""!==t.trim()&&!e.hasAttribute("mida-event-processed")&&(e.addEventListener("click",function(){window.mida.track(t)}),e.setAttribute("mida-event-processed","true"))}function addMidaEventListeners(){document.querySelectorAll("[mida-event]:not([mida-event-processed])").forEach(addMidaEventListener)}window.processEvent=e=>{var n;window.submittedList=[];try{if((n=JSON.parse(e))&&n.length)for(let e=0;e{e.forEach(e=>{"childList"===e.type&&e.addedNodes.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(e.hasAttribute("mida-event")&&addMidaEventListener(e),e.querySelectorAll("[mida-event]:not([mida-event-processed])").forEach(addMidaEventListener))})})});midaEventObserver.observe(document.body,{childList:!0,subtree:!0}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",addMidaEventListeners):addMidaEventListeners();