@iamproperty/components 3.7.9 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/assets/css/components/accordion.css.map +1 -1
  2. package/assets/css/components/dialog.css +1 -1
  3. package/assets/css/components/dialog.css.map +1 -1
  4. package/assets/css/components/fileupload.css.map +1 -1
  5. package/assets/css/components/forms.css +1 -1
  6. package/assets/css/components/forms.css.map +1 -1
  7. package/assets/css/components/header.css +1 -1
  8. package/assets/css/components/header.css.map +1 -1
  9. package/assets/css/components/lists.css.map +1 -1
  10. package/assets/css/components/nav.css +1 -1
  11. package/assets/css/components/nav.css.map +1 -1
  12. package/assets/css/components/property-searchbar.css +1 -1
  13. package/assets/css/components/property-searchbar.css.map +1 -1
  14. package/assets/css/core.min.css +1 -1
  15. package/assets/css/core.min.css.map +1 -1
  16. package/assets/css/style.min.css +1 -1
  17. package/assets/css/style.min.css.map +1 -1
  18. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  19. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  20. package/assets/js/components/card/card.component.min.js +1 -1
  21. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  22. package/assets/js/components/header/header.component.min.js +2 -2
  23. package/assets/js/components/notification/notification.component.min.js +1 -1
  24. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  25. package/assets/js/components/table/table.component.min.js +12 -12
  26. package/assets/js/components/table/table.component.min.js.map +1 -1
  27. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  28. package/assets/js/dynamic.min.js +3 -3
  29. package/assets/js/dynamic.min.js.map +1 -1
  30. package/assets/js/modules/dialogs.js +15 -5
  31. package/assets/js/modules/table.js +23 -5
  32. package/assets/js/scripts.bundle.js +13 -13
  33. package/assets/js/scripts.bundle.js.map +1 -1
  34. package/assets/js/scripts.bundle.min.js +2 -2
  35. package/assets/js/scripts.bundle.min.js.map +1 -1
  36. package/assets/sass/_functions/variables.scss +4 -2
  37. package/assets/sass/components/dialog.scss +89 -1
  38. package/assets/sass/components/forms.scss +67 -21
  39. package/assets/sass/foundations/buttons.scss +48 -0
  40. package/assets/ts/modules/dialogs.ts +18 -6
  41. package/assets/ts/modules/table.ts +29 -7
  42. package/dist/components.es.js +838 -830
  43. package/dist/components.umd.js +28 -28
  44. package/dist/style.css +1 -1
  45. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * iamKey v3.7.9
2
+ * iamKey v3.8.0
3
3
  * Copyright 2022-2023 iamproperty
4
- */(function(R){typeof define=="function"&&define.amd?define(R):R()})(function(){"use strict";var R=a=>{a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie");var t=document.querySelector("nav");if(t){let r=function(){e=t.offsetHeight,document.querySelector("body").style.setProperty("--nav-height","".concat(e,"px"))};var e=t.offsetHeight;document.querySelector("body").style.setProperty("--nav-height","".concat(e,"px")),new ResizeObserver(r).observe(t)}else document.querySelector("body").style.setProperty("--nav-height","0px");return null},rt=a=>{var t=function(r){var s=document.querySelector('label[for="'.concat(r.replace("#",""),'"]')),o=document.querySelector(r+" summary"),c=document.querySelector("dialog".concat(r));s instanceof HTMLElement?s.click():o instanceof HTMLElement?o.click():c instanceof HTMLElement&&c.showModal()};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state.type&&e.state.type=="pagination"){var r=document.querySelector("#".concat(e.state.form)),s=document.querySelector("#".concat(e.state.form," [data-pagination]"));s?s.value=e.state.page:r.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),r.dispatchEvent(new Event("submit"))}}),null},st=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},it=(a,t)=>String(a).padStart(t,"0"),ot=a=>a.charAt(0).toUpperCase()+a.slice(1);class nt{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var r=e.target;r&&r!=this;r=r.parentNode)if(r.matches("a")){e.preventDefault(),V(r);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,r)=>{var s=new Image;s.onload=function(){var o=document.createElement("script");o.src="https://www.youtube.com/iframe_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(o,c),document.body.classList.add("youtubeLoaded"),e(!0),o.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),V(n.target.closest("a")))},!1)}},s.onerror=function(){r(!1)},s.src="https://youtube.com/favicon.ico"})}}var V=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),r=t.getAttribute("id");if(typeof r>"u"||r==null){var s=String.fromCharCode(65+Math.floor(Math.random()*26));r=s+Date.now(),t.setAttribute("id",r)}function o(){window.player=new YT.Player(r,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:c,onStateChange:l}})}o();function c(i){i.target.playVideo()}var n=!1;function l(i){if(i.data==YT.PlayerState.PLAYING&&!n){var d=document.getElementById(r);d.classList.add("player-ready"),n=!0}}},ct=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((t,e)=>{var r=t.closest(".dialog__wrapper");r||(t.removeAttribute("open"),t.showModal(),t.focus(),X(t))}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var e=t.target.closest("[data-modal]"),r=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),s=document.querySelector("dialog#".concat(r));X(s),s.showModal(),s.focus(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((y,q)=>{y.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var c=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((y,q)=>{y.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var n=t.target.closest("dialog[open]");if(!n.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||n.classList.contains("dialog--multi")){var l=n.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||n.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){var i=t.target.closest(".dialog__wrapper > button"),d=t.target.closest(".dialog__wrapper > button").parentNode,f="openPopover",u=d.querySelector(":scope > dialog");if(document.querySelector("dialog[open]")&&document.querySelector("dialog[open]")!=u&&document.querySelector("dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((y,q)=>{y.classList.remove("active")}),u.hasAttribute("open"))u.close(),f="closePopover",u.removeAttribute("style"),i.classList.remove("active");else{u.show(),i.classList.add("active");var h=i.getBoundingClientRect(),m=h.top,b=h.left;if(i.closest("iam-table")){var v=i.closest("iam-table").parentNode.getBoundingClientRect();m-=v.top,b-=v.left}u.classList.contains("dialog--fix")&&u.setAttribute("style","position:fixed;top: ".concat(m,"px; left: ").concat(b,"px; margin: 3rem 0 0 0;"))}var L=u.getBoundingClientRect(),A=L.bottom-window.scrollY,p=window.innerHeight-window.scrollY;if(A>p){var x=u.hasAttribute("style")?u.getAttribute("style")+" ":"";u.setAttribute("style",x+"transform: translate(0, calc(-100% - 4rem))")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:f,id:i.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach((y,q)=>{y.classList.remove("active")}))}),null),X=a=>{a.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!a.classList.contains("dialog--multi")&&a.addEventListener("cancel",o=>{o.preventDefault()});var t=a.querySelector(".youtube-embed a");if(t&&V(t),a.classList.contains("dialog--multi")&&!a.querySelector(":scope > .steps")&&lt(a),!a.querySelector(":scope > .mh-lg")&&!a.classList.contains("dialog--multi")){a.innerHTML='<div class="mh-lg">'.concat(a.innerHTML,"</div>");var e=a.querySelector(".mh-lg"),r=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(r){var s=r.previousSibling;e.before(r),s&&r.before(s)}}a.querySelector(":scope > button:first-child")||(a.innerHTML='<button class="dialog__close">Close</button>'.concat(a.innerHTML))},lt=a=>{var t="",e=Array.from(a.querySelectorAll("fieldset[data-title]"));e.forEach((l,i)=>{t+='<button data-title="'.concat(l.getAttribute("data-title"),'" type="button" class="').concat(i==0?"active":"",'" tabindex="-1">').concat(l.getAttribute("data-title"),"</button>");var d=document.createElement("div");d.classList.add("btn--wrapper"),l.appendChild(d),i!=0&&(d.innerHTML+='<button data-title="'.concat(e[i-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),i!=e.length-1&&(d.innerHTML+='<button data-title="'.concat(e[i+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),i==e.length-1&&(d.innerHTML+='<button data-title="'.concat(e[i].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>'))}),a.innerHTML='<div class="steps bg-primary">'.concat(t,"</div>").concat(a.innerHTML);for(var r=Array.from(a.querySelectorAll("fieldset.was-validated")),s=0;s<r.length;s++){var o=r[s],c=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(a.querySelectorAll('[data-title="'.concat(c,'"]'))).forEach((l,i)=>{l.classList.add("active")});break}else Array.from(a.querySelectorAll('[data-title="'.concat(c,'"]'))).forEach((l,i)=>{l.classList.add("valid")})}a.addEventListener("invalid",function(){return function(l){l.preventDefault()}}(),!0);function n(l){var i=a.querySelector("fieldset.active")?a.querySelector("fieldset.active"):a.querySelector("fieldset[data-title]"),d=i.getAttribute("data-title"),f=!0;if(i.classList.add("was-validated"),Array.from(i.querySelectorAll("input")).forEach((v,L)=>{v.checkValidity()||(f=!1)}),f?Array.from(a.querySelectorAll('[data-title="'.concat(d,'"]'))).forEach((v,L)=>{v.classList.add("valid")}):Array.from(a.querySelectorAll('[data-title="'.concat(d,'"]'))).forEach((v,L)=>{v.classList.remove("valid")}),f||!l.hasAttribute("data-next")){var u=a.querySelector('fieldset[data-title="'.concat(l.getAttribute("data-title"),'"]')),h=a.querySelector('.steps button[data-title="'.concat(l.getAttribute("data-title"),'"]'));Array.from(a.querySelectorAll("button")).forEach((v,L)=>{v.classList.remove("active")}),Array.from(a.querySelectorAll("fieldset")).forEach((v,L)=>{v.classList.remove("active")}),h.classList.add("active"),u.classList.add("active")}var m=Array.from(a.querySelectorAll("fieldset")).length,b=Array.from(a.querySelectorAll("fieldset.valid")).length;a.style.setProperty("--progress","".concat(b/(m-1)*100,"%"))}a.addEventListener("keydown",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button")){var i=l.target.closest("button");l.keyCode==13&&(l.preventDefault(),n(i))}if(l&&l.target instanceof HTMLElement&&l.target.closest("input")){var d=l.target.closest("input");d.classList.remove("is-invalid")}}),a.addEventListener("click",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button[data-title]")){var i=l.target.closest("button[data-title]");n(i)}return null})};function dt(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var t=a.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=a.target.closest("summary"),r=a.target.closest("a"),s=a.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),r&&window.dataLayer.push({event:"linkClicked",linkText:r.hasAttribute("title")?r.getAttribute("title")||"":r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||"",href:r.getAttribute("href")||""}),s&&window.dataLayer.push({event:"buttonClicked",buttonText:s.textContent||"",class:s.hasAttribute("class")&&s.getAttribute("class")||""})}})}var ut=a=>{document.addEventListener("load",function(){console.log(Array.from(document.querySelectorAll("input[maxlength]"))),Array.from(document.querySelectorAll("input")).forEach((t,e)=>{t.parentElement,ht(t)})}),a.addEventListener("input",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("input,textarea,select")){var e=t.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}}),a.addEventListener("change",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("select")){var e=t.target.closest("select");if(console.log(e),e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var r=document.getElementById(e.getAttribute("data-input")),s=e.value;Q(r,s)}}if(t&&t.target instanceof HTMLElement&&t.target.closest('dialog [type="radio"]')){var o=t.target.closest("dialog");t.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((c,n)=>{c.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((c,n)=>{c.setAttribute("autofocus",!0)})}}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-type][data-input]:not(select)")){var e=t.target.closest("[data-change-type]"),r=document.getElementById(e.getAttribute("data-input")),s=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",r.getAttribute("type")),Q(r,s),e.hasAttribute("data-alt-class")){var o=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",o)}}})},ht=a=>{var t=a.parentElement,e=a.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var r=a.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),t.insertBefore(r,a.nextSibling)),r.setAttribute("data-count",a.value.length)},Q=(a,t)=>{a.setAttribute("type",t)},ft=a=>{if(Array.from(a.querySelectorAll("details")).forEach((e,r)=>{e.addEventListener("mouseenter",function(s){window.matchMedia("(min-width: 62em)").matches&&e.setAttribute("open","true")},!1),e.addEventListener("mouseleave",function(s){window.matchMedia("(min-width: 62em)").matches&&e.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(e=>{var[r]=e;return r.target.classList.toggle("is-stuck",r.intersectionRatio<1)},{threshold:[1]});t.observe(a)}};function mt(a){var t,e=a.querySelector(".testimonial__images"),r=e.querySelectorAll("img").length;if(r==1)return!1;a.classList.add("testimonial--multi");var s=function(c){var n=a.querySelector(".btn-next"),l=a.querySelector(".btn-prev");n.setAttribute("data-go",c+1),l.setAttribute("data-go",c-1),n.removeAttribute("disabled"),l.removeAttribute("disabled"),c==1?l.setAttribute("disabled",!0):c==r&&n.setAttribute("disabled",!0)};e.addEventListener("scroll",function(o){clearTimeout(t),t=setTimeout(function(){var c=e.scrollWidth,n=e.scrollHeight,l=e.scrollLeft,i=e.scrollTop,d=Math.round(l/c*r)+1;l==0&&i!=0&&(d=Math.round(i/n*r)+1),a.setAttribute("data-show",d),s(d)},300)},!1),a.addEventListener("click",function(o){for(var c=o.target;c&&c!=this;c=c.parentNode)if(c.matches("[data-go]")){var n=parseInt(c.getAttribute("data-go")),l=0,i=0,d=e.scrollWidth,f=e.scrollHeight;d>f?i=Math.floor(d*((n-1)/r)):l=Math.floor(f*((n-1)/r)),e.scroll({top:l,left:i,behavior:"smooth"});break}},!1)}function vt(a){var t,e=a.querySelector(".carousel__inner"),r=a.querySelectorAll(".carousel__item").length;a.getAttribute("data-cols");var s=a.getAttribute("data-sm-cols"),o=a.getAttribute("data-md-cols");a.querySelector(".carousel__controls a").classList.add("active"),e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var n=e.clientWidth,l=e.scrollWidth,i=e.scrollLeft,d=Math.round(i/l*r)+1,f=a.querySelector(".carousel__item:last-child").offsetLeft;Array.from(a.querySelectorAll(".carousel__controls a")).forEach((u,h)=>{u.classList.remove("active")}),a.querySelector(".control-"+d).classList.add("active"),d==1?a.querySelector(".btn-prev").setAttribute("disabled","disabled"):a.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+n>f?a.querySelector(".btn-next").setAttribute("disabled","disabled"):a.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),a.addEventListener("click",function(c){for(var n=c.target;n&&n!=this;n=n.parentNode)if(n.matches(".carousel__controls a")){c.preventDefault(),Array.from(a.querySelectorAll(".carousel__controls a")).forEach((i,d)=>{i.classList.remove("active")}),n.classList.add("active");var l=document.querySelector(n.getAttribute("href"));e.scroll({top:0,left:l.offsetLeft,behavior:"smooth"});break}},!1),a.addEventListener("click",function(c){for(var n=c.target;n&&n!=this;n=n.parentNode)if(n.matches(".btn-next, .btn-prev")){c.preventDefault();var l=n.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:l,behavior:"smooth"});break}},!1),r==1&&a.classList.add("hide-btns"),s>=r&&a.classList.add("hide-sm-btns"),o>=r&&a.classList.add("hide-md-btns")}function bt(a){a.addEventListener("change",function(t){var e=parseInt(a.querySelector("[data-min] select,[data-min] input").value),r=parseInt(a.querySelector("[data-max] select,[data-max] input").value);Array.from(a.querySelectorAll("[data-min] input")).forEach((s,o)=>{s.setAttribute("max",r)}),Array.from(a.querySelectorAll("[data-max] input")).forEach((s,o)=>{s.setAttribute("min",e)}),Array.from(a.querySelectorAll("[data-min] select option")).forEach((s,o)=>{parseInt(s.getAttribute("value"))>r?s.classList.add("d-none"):s.classList.remove("d-none")}),Array.from(a.querySelectorAll("[data-max] select option")).forEach((s,o)=>{parseInt(s.getAttribute("value"))<e?s.classList.add("d-none"):s.classList.remove("d-none")})},!1)}function pt(a){a.addEventListener("change",function(t){if(a.matches("[data-value-if]")){var e=a.getAttribute("data-redirect"),r=a.getAttribute("data-value-if");a.value==r&&(document.location.href=e)}else typeof a.value<"u"&&(document.location.href=a.value)},!1)}function yt(a){var t=a.querySelector(".row"),e=t.cloneNode(!0),r=a.querySelector("[data-add]");a.addEventListener("click",function(s){for(var o=s.target;o&&o!=this;o=o.parentNode){if(o.matches("[data-add]")){var c=e.cloneNode(!0);a.insertBefore(c,o),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length>=r.dataset.maxfiles&&r.setAttribute("disabled","disabled");break}if(o.matches("[data-delete]")){var n=o.closest(".row");n.remove(),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length<r.dataset.maxfiles&&r.removeAttribute("disabled");break}}},!1)}function gt(a){Array.from(a.querySelectorAll("[data-input-range]")).forEach((t,e)=>{bt(t)}),Array.from(a.querySelectorAll("[data-redirect]")).forEach((t,e)=>{pt(t)}),Array.from(a.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{yt(t)}),a.addEventListener("change",function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){var r=e.dataset.filesize;e.files[0].size>r&&(e.value="",alert("File too large"));break}},!1),a.addEventListener("change",function(t){Array.from(a.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,r)=>{var s=e.closest("[data-group]")?e.closest("[data-group]"):a,o=e.dataset.activeif,c=e.dataset.equals,n=s.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]'));n.value==c?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(a.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,r)=>{var s=e.closest("[data-group]")?e.closest("[data-group]"):a,o=e.dataset.activeif,c=e.dataset.equals,n=s.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]'));n.value==c?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class At extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/header.css";'),s=document.createElement("template");s.innerHTML=`
4
+ */(function(R){typeof define=="function"&&define.amd?define(R):R()})(function(){"use strict";var R=a=>{a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie");var t=document.querySelector("nav");if(t){let r=function(){e=t.offsetHeight,document.querySelector("body").style.setProperty("--nav-height","".concat(e,"px"))};var e=t.offsetHeight;document.querySelector("body").style.setProperty("--nav-height","".concat(e,"px")),new ResizeObserver(r).observe(t)}else document.querySelector("body").style.setProperty("--nav-height","0px");return null},st=a=>{var t=function(r){var s=document.querySelector('label[for="'.concat(r.replace("#",""),'"]')),o=document.querySelector(r+" summary"),c=document.querySelector("dialog".concat(r));s instanceof HTMLElement?s.click():o instanceof HTMLElement?o.click():c instanceof HTMLElement&&c.showModal()};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state.type&&e.state.type=="pagination"){var r=document.querySelector("#".concat(e.state.form)),s=document.querySelector("#".concat(e.state.form," [data-pagination]"));s?s.value=e.state.page:r.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),r.dispatchEvent(new Event("submit"))}}),null},it=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},ot=(a,t)=>String(a).padStart(t,"0"),nt=a=>a.charAt(0).toUpperCase()+a.slice(1);class ct{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var r=e.target;r&&r!=this;r=r.parentNode)if(r.matches("a")){e.preventDefault(),Y(r);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,r)=>{var s=new Image;s.onload=function(){var o=document.createElement("script");o.src="https://www.youtube.com/iframe_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(o,c),document.body.classList.add("youtubeLoaded"),e(!0),o.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),Y(n.target.closest("a")))},!1)}},s.onerror=function(){r(!1)},s.src="https://youtube.com/favicon.ico"})}}var Y=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),r=t.getAttribute("id");if(typeof r>"u"||r==null){var s=String.fromCharCode(65+Math.floor(Math.random()*26));r=s+Date.now(),t.setAttribute("id",r)}function o(){window.player=new YT.Player(r,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:c,onStateChange:l}})}o();function c(i){i.target.playVideo()}var n=!1;function l(i){if(i.data==YT.PlayerState.PLAYING&&!n){var d=document.getElementById(r);d.classList.add("player-ready"),n=!0}}},lt=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((t,e)=>{var r=t.closest(".dialog__wrapper");r||(t.removeAttribute("open"),t.showModal(),t.focus(),Q(t))}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var e=t.target.closest("[data-modal]"),r=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),s=document.querySelector("dialog#".concat(r));Q(s),s.showModal(),s.focus(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var o=t.target.closest("dialog[open]");t.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((q,L)=>{q.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var c=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((q,L)=>{q.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var n=t.target.closest("dialog[open]"),l=window.getComputedStyle(n);if(l.display==="contents"&&(n=n.parentNode.closest("dialog[open]")),!n.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||n.classList.contains("dialog--multi")){var i=n.getBoundingClientRect();(t.clientX<i.left||t.clientX>i.right||t.clientY<i.top||t.clientY>i.bottom)&&(t.target.closest('input[type="radio"]')||n.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){var d=t.target.closest(".dialog__wrapper > button"),f=t.target.closest(".dialog__wrapper > button").parentNode,h="openPopover",m=f.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=m&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((q,L)=>{q.classList.remove("active")}),m.hasAttribute("open"))m.close(),h="closePopover",m.removeAttribute("style"),d.classList.remove("active");else{m.show(),d.classList.add("active");var u=d.getBoundingClientRect(),v=u.top,b=u.left;if(d.closest("iam-table")){var p=d.closest("iam-table").parentNode.getBoundingClientRect();v-=p.top,b-=p.left}m.classList.contains("dialog--fix")&&m.setAttribute("style","position:fixed;top: ".concat(v,"px; left: ").concat(b,"px; margin: 3rem 0 0 0;"))}var E=m.getBoundingClientRect(),A=E.bottom-window.scrollY,y=window.innerHeight-window.scrollY;if(A>y){var D=m.hasAttribute("style")?m.getAttribute("style")+" ":"";m.setAttribute("style",D+"transform: translate(0, calc(-100% - 4rem))"),E=m.getBoundingClientRect();var w=E.top-window.scrollY;w<100&&m.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:h,id:d.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach((q,L)=>{q.classList.remove("active")}))}),null),Q=a=>{a.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!a.classList.contains("dialog--multi")&&a.addEventListener("cancel",o=>{o.preventDefault()});var t=a.querySelector(".youtube-embed a");if(t&&Y(t),a.classList.contains("dialog--multi")&&!a.querySelector(":scope > .steps")&&dt(a),!a.querySelector(":scope > .mh-lg")&&!a.classList.contains("dialog--multi")){a.innerHTML='<div class="mh-lg">'.concat(a.innerHTML,"</div>");var e=a.querySelector(".mh-lg"),r=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(r){var s=r.previousSibling;e.before(r),s&&r.before(s)}}a.querySelector(":scope > button:first-child")||a.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},dt=a=>{var t="",e=Array.from(a.querySelectorAll("fieldset[data-title]"));e.forEach((l,i)=>{t+='<button data-title="'.concat(l.getAttribute("data-title"),'" type="button" class="').concat(i==0?"active":"",'" tabindex="-1">').concat(l.getAttribute("data-title"),"</button>");var d=document.createElement("div");d.classList.add("btn--wrapper"),l.appendChild(d),i!=0&&(d.innerHTML+='<button data-title="'.concat(e[i-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),i!=e.length-1&&(d.innerHTML+='<button data-title="'.concat(e[i+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),i==e.length-1&&(d.innerHTML+='<button data-title="'.concat(e[i].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>'))}),a.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var r=Array.from(a.querySelectorAll("fieldset.was-validated")),s=0;s<r.length;s++){var o=r[s],c=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(a.querySelectorAll('[data-title="'.concat(c,'"]'))).forEach((l,i)=>{l.classList.add("active")});break}else Array.from(a.querySelectorAll('[data-title="'.concat(c,'"]'))).forEach((l,i)=>{l.classList.add("valid")})}a.addEventListener("invalid",function(){return function(l){l.preventDefault()}}(),!0);function n(l){var i=a.querySelector("fieldset.active")?a.querySelector("fieldset.active"):a.querySelector("fieldset[data-title]"),d=i.getAttribute("data-title"),f=!0;if(i.classList.add("was-validated"),Array.from(i.querySelectorAll("input")).forEach((b,p)=>{b.checkValidity()||(f=!1)}),f?Array.from(a.querySelectorAll('[data-title="'.concat(d,'"]'))).forEach((b,p)=>{b.classList.add("valid")}):Array.from(a.querySelectorAll('[data-title="'.concat(d,'"]'))).forEach((b,p)=>{b.classList.remove("valid")}),f||!l.hasAttribute("data-next")){var h=a.querySelector('fieldset[data-title="'.concat(l.getAttribute("data-title"),'"]')),m=a.querySelector('.steps button[data-title="'.concat(l.getAttribute("data-title"),'"]'));Array.from(a.querySelectorAll("button")).forEach((b,p)=>{b.classList.remove("active")}),Array.from(a.querySelectorAll("fieldset")).forEach((b,p)=>{b.classList.remove("active")}),m.classList.add("active"),h.classList.add("active")}var u=Array.from(a.querySelectorAll("fieldset")).length,v=Array.from(a.querySelectorAll("fieldset.valid")).length;a.style.setProperty("--progress","".concat(v/(u-1)*100,"%"))}a.addEventListener("keydown",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button")){var i=l.target.closest("button");l.keyCode==13&&(l.preventDefault(),n(i))}if(l&&l.target instanceof HTMLElement&&l.target.closest("input")){var d=l.target.closest("input");d.classList.remove("is-invalid")}}),a.addEventListener("click",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button[data-title]")){var i=l.target.closest("button[data-title]");n(i)}return null})};function ut(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var t=a.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=a.target.closest("summary"),r=a.target.closest("a"),s=a.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),r&&window.dataLayer.push({event:"linkClicked",linkText:r.hasAttribute("title")?r.getAttribute("title")||"":r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||"",href:r.getAttribute("href")||""}),s&&window.dataLayer.push({event:"buttonClicked",buttonText:s.textContent||"",class:s.hasAttribute("class")&&s.getAttribute("class")||""})}})}var ht=a=>{document.addEventListener("load",function(){console.log(Array.from(document.querySelectorAll("input[maxlength]"))),Array.from(document.querySelectorAll("input")).forEach((t,e)=>{t.parentElement,ft(t)})}),a.addEventListener("input",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("input,textarea,select")){var e=t.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}}),a.addEventListener("change",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("select")){var e=t.target.closest("select");if(console.log(e),e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var r=document.getElementById(e.getAttribute("data-input")),s=e.value;J(r,s)}}if(t&&t.target instanceof HTMLElement&&t.target.closest('dialog [type="radio"]')){var o=t.target.closest("dialog");t.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((c,n)=>{c.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((c,n)=>{c.setAttribute("autofocus",!0)})}}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-type][data-input]:not(select)")){var e=t.target.closest("[data-change-type]"),r=document.getElementById(e.getAttribute("data-input")),s=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",r.getAttribute("type")),J(r,s),e.hasAttribute("data-alt-class")){var o=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",o)}}})},ft=a=>{var t=a.parentElement,e=a.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var r=a.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),t.insertBefore(r,a.nextSibling)),r.setAttribute("data-count",a.value.length)},J=(a,t)=>{a.setAttribute("type",t)},mt=a=>{if(Array.from(a.querySelectorAll("details")).forEach((e,r)=>{e.addEventListener("mouseenter",function(s){window.matchMedia("(min-width: 62em)").matches&&e.setAttribute("open","true")},!1),e.addEventListener("mouseleave",function(s){window.matchMedia("(min-width: 62em)").matches&&e.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(e=>{var[r]=e;return r.target.classList.toggle("is-stuck",r.intersectionRatio<1)},{threshold:[1]});t.observe(a)}};function vt(a){var t,e=a.querySelector(".testimonial__images"),r=e.querySelectorAll("img").length;if(r==1)return!1;a.classList.add("testimonial--multi");var s=function(c){var n=a.querySelector(".btn-next"),l=a.querySelector(".btn-prev");n.setAttribute("data-go",c+1),l.setAttribute("data-go",c-1),n.removeAttribute("disabled"),l.removeAttribute("disabled"),c==1?l.setAttribute("disabled",!0):c==r&&n.setAttribute("disabled",!0)};e.addEventListener("scroll",function(o){clearTimeout(t),t=setTimeout(function(){var c=e.scrollWidth,n=e.scrollHeight,l=e.scrollLeft,i=e.scrollTop,d=Math.round(l/c*r)+1;l==0&&i!=0&&(d=Math.round(i/n*r)+1),a.setAttribute("data-show",d),s(d)},300)},!1),a.addEventListener("click",function(o){for(var c=o.target;c&&c!=this;c=c.parentNode)if(c.matches("[data-go]")){var n=parseInt(c.getAttribute("data-go")),l=0,i=0,d=e.scrollWidth,f=e.scrollHeight;d>f?i=Math.floor(d*((n-1)/r)):l=Math.floor(f*((n-1)/r)),e.scroll({top:l,left:i,behavior:"smooth"});break}},!1)}function bt(a){var t,e=a.querySelector(".carousel__inner"),r=a.querySelectorAll(".carousel__item").length;a.getAttribute("data-cols");var s=a.getAttribute("data-sm-cols"),o=a.getAttribute("data-md-cols");a.querySelector(".carousel__controls a").classList.add("active"),e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var n=e.clientWidth,l=e.scrollWidth,i=e.scrollLeft,d=Math.round(i/l*r)+1,f=a.querySelector(".carousel__item:last-child").offsetLeft;Array.from(a.querySelectorAll(".carousel__controls a")).forEach((h,m)=>{h.classList.remove("active")}),a.querySelector(".control-"+d).classList.add("active"),d==1?a.querySelector(".btn-prev").setAttribute("disabled","disabled"):a.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+n>f?a.querySelector(".btn-next").setAttribute("disabled","disabled"):a.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),a.addEventListener("click",function(c){for(var n=c.target;n&&n!=this;n=n.parentNode)if(n.matches(".carousel__controls a")){c.preventDefault(),Array.from(a.querySelectorAll(".carousel__controls a")).forEach((i,d)=>{i.classList.remove("active")}),n.classList.add("active");var l=document.querySelector(n.getAttribute("href"));e.scroll({top:0,left:l.offsetLeft,behavior:"smooth"});break}},!1),a.addEventListener("click",function(c){for(var n=c.target;n&&n!=this;n=n.parentNode)if(n.matches(".btn-next, .btn-prev")){c.preventDefault();var l=n.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:l,behavior:"smooth"});break}},!1),r==1&&a.classList.add("hide-btns"),s>=r&&a.classList.add("hide-sm-btns"),o>=r&&a.classList.add("hide-md-btns")}function pt(a){a.addEventListener("change",function(t){var e=parseInt(a.querySelector("[data-min] select,[data-min] input").value),r=parseInt(a.querySelector("[data-max] select,[data-max] input").value);Array.from(a.querySelectorAll("[data-min] input")).forEach((s,o)=>{s.setAttribute("max",r)}),Array.from(a.querySelectorAll("[data-max] input")).forEach((s,o)=>{s.setAttribute("min",e)}),Array.from(a.querySelectorAll("[data-min] select option")).forEach((s,o)=>{parseInt(s.getAttribute("value"))>r?s.classList.add("d-none"):s.classList.remove("d-none")}),Array.from(a.querySelectorAll("[data-max] select option")).forEach((s,o)=>{parseInt(s.getAttribute("value"))<e?s.classList.add("d-none"):s.classList.remove("d-none")})},!1)}function yt(a){a.addEventListener("change",function(t){if(a.matches("[data-value-if]")){var e=a.getAttribute("data-redirect"),r=a.getAttribute("data-value-if");a.value==r&&(document.location.href=e)}else typeof a.value<"u"&&(document.location.href=a.value)},!1)}function gt(a){var t=a.querySelector(".row"),e=t.cloneNode(!0),r=a.querySelector("[data-add]");a.addEventListener("click",function(s){for(var o=s.target;o&&o!=this;o=o.parentNode){if(o.matches("[data-add]")){var c=e.cloneNode(!0);a.insertBefore(c,o),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length>=r.dataset.maxfiles&&r.setAttribute("disabled","disabled");break}if(o.matches("[data-delete]")){var n=o.closest(".row");n.remove(),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length<r.dataset.maxfiles&&r.removeAttribute("disabled");break}}},!1)}function At(a){Array.from(a.querySelectorAll("[data-input-range]")).forEach((t,e)=>{pt(t)}),Array.from(a.querySelectorAll("[data-redirect]")).forEach((t,e)=>{yt(t)}),Array.from(a.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{gt(t)}),a.addEventListener("change",function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){var r=e.dataset.filesize;e.files[0].size>r&&(e.value="",alert("File too large"));break}},!1),a.addEventListener("change",function(t){Array.from(a.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,r)=>{var s=e.closest("[data-group]")?e.closest("[data-group]"):a,o=e.dataset.activeif,c=e.dataset.equals,n=s.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]'));n.value==c?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(a.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,r)=>{var s=e.closest("[data-group]")?e.closest("[data-group]"):a,o=e.dataset.activeif,c=e.dataset.equals,n=s.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]'));n.value==c?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Lt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/header.css";'),s=document.createElement("template");s.innerHTML=`
5
5
  <style>
6
6
  @import "`.concat(e,`";
7
7
  `).concat(r,`
@@ -21,7 +21,7 @@
21
21
  <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" lazy="" />
22
22
  </picture>
23
23
  </div>
24
- `),this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.shadowRoot.querySelector("picture"),e=this.shadowRoot.querySelector("picture source");this.hasAttribute("image")?e.setAttribute("srcset",this.getAttribute("image")):t.remove()}}function Lt(a){var t=a.querySelectorAll("details"),e=a.querySelectorAll("summary");if(t.forEach(s=>{s.classList.add("accordion-item")}),e.forEach(s=>{s.classList.add("accordion-header"),s.classList.add("accordion-button"),s.classList.add("h4")}),!a.classList.contains("accordion--keep-open")){var r=a.querySelectorAll(":scope > details");r.forEach(s=>{s.addEventListener("click",()=>{r.forEach(o=>{o!==s&&o.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class wt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/accordion.css";'),s=document.createElement("template");s.innerHTML=`
24
+ `),this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.shadowRoot.querySelector("picture"),e=this.shadowRoot.querySelector("picture source");this.hasAttribute("image")?e.setAttribute("srcset",this.getAttribute("image")):t.remove()}}function wt(a){var t=a.querySelectorAll("details"),e=a.querySelectorAll("summary");if(t.forEach(s=>{s.classList.add("accordion-item")}),e.forEach(s=>{s.classList.add("accordion-header"),s.classList.add("accordion-button"),s.classList.add("h4")}),!a.classList.contains("accordion--keep-open")){var r=a.querySelectorAll(":scope > details");r.forEach(s=>{s.addEventListener("click",()=>{r.forEach(o=>{o!==s&&o.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class St extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/accordion.css";'),s=document.createElement("template");s.innerHTML=`
25
25
  <style>
26
26
  @import "`.concat(e,`";
27
27
  `).concat(r,`
@@ -30,7 +30,7 @@
30
30
  <div class="accordion">
31
31
  <slot></slot>
32
32
  </div>
33
- `),this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){Lt(this)}}var St=function(t){var e=t.querySelectorAll(":scope > details");t.querySelectorAll(":scope > details > summary");var r=t.querySelector(":scope > .tabs__links");t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(r=t.shadowRoot.querySelector(".tabs__links")),r||(r=document.createElement("div"),r.classList.add("tabs__links"),t.prepend(r)),e.forEach((s,o)=>{var c=s.querySelector(":scope > summary");c.classList.add("visually-hidden");var n=document.createElement("button");s.hasAttribute("id")&&(n=document.createElement("a"),n.setAttribute("href","#".concat(s.getAttribute("id")))),s.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML="".concat(c.innerText),n.classList.add("link"),n.setAttribute("data-index",o),n.setAttribute("tabindex","-1"),r.appendChild(n)})},qt=function(t){var e=t.querySelectorAll(":scope > details"),r=t.querySelectorAll(":scope > details > summary"),s=t.querySelectorAll(":scope .tabs__links > .link");t.shadowRoot&&(s=t.shadowRoot.querySelectorAll(".tabs__links > .link")),s.forEach(o=>{o.addEventListener("click",c=>{c.preventDefault(),s.forEach(n=>{var l=n==o;n.setAttribute("aria-pressed",l)}),e.forEach((n,l)=>{var i=o.getAttribute("data-index")==l;i?n.setAttribute("open",i):n.removeAttribute("open")}),o.hasAttribute("href")&&history.pushState(void 0,void 0,o.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:o.textContent})})}),r.forEach((o,c)=>{o.addEventListener("focus",n=>{s.forEach(l=>{l.classList.remove("focus")}),s[c].classList.add("focus")}),o.addEventListener("click",n=>{n.preventDefault(),s[c].click()})})},Et=function(t){var e=t.querySelectorAll(":scope > details"),r=t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");t.shadowRoot&&(r=t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&t.querySelector('.tabs__links [href="'.concat(location.hash,'"]'))?(t.querySelector('[href="'.concat(location.hash,'"]')).setAttribute("open",!0),t.querySelector('details[id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("open",!0)):t.querySelector("details[open]")||(e[0].setAttribute("open",!0),r[0].setAttribute("aria-pressed",!0))},xt=function(t){St(t),qt(t),Et(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class Tt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
33
+ `),this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){wt(this)}}var qt=function(t){var e=t.querySelectorAll(":scope > details");t.querySelectorAll(":scope > details > summary");var r=t.querySelector(":scope > .tabs__links");t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(r=t.shadowRoot.querySelector(".tabs__links")),r||(r=document.createElement("div"),r.classList.add("tabs__links"),t.prepend(r)),e.forEach((s,o)=>{var c=s.querySelector(":scope > summary");c.classList.add("visually-hidden");var n=document.createElement("button");s.hasAttribute("id")&&(n=document.createElement("a"),n.setAttribute("href","#".concat(s.getAttribute("id")))),s.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML="".concat(c.innerText),n.classList.add("link"),n.setAttribute("data-index",o),n.setAttribute("tabindex","-1"),r.appendChild(n)})},Et=function(t){var e=t.querySelectorAll(":scope > details"),r=t.querySelectorAll(":scope > details > summary"),s=t.querySelectorAll(":scope .tabs__links > .link");t.shadowRoot&&(s=t.shadowRoot.querySelectorAll(".tabs__links > .link")),s.forEach(o=>{o.addEventListener("click",c=>{c.preventDefault(),s.forEach(n=>{var l=n==o;n.setAttribute("aria-pressed",l)}),e.forEach((n,l)=>{var i=o.getAttribute("data-index")==l;i?n.setAttribute("open",i):n.removeAttribute("open")}),o.hasAttribute("href")&&history.pushState(void 0,void 0,o.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:o.textContent})})}),r.forEach((o,c)=>{o.addEventListener("focus",n=>{s.forEach(l=>{l.classList.remove("focus")}),s[c].classList.add("focus")}),o.addEventListener("click",n=>{n.preventDefault(),s[c].click()})})},xt=function(t){var e=t.querySelectorAll(":scope > details"),r=t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");t.shadowRoot&&(r=t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&t.querySelector('.tabs__links [href="'.concat(location.hash,'"]'))?(t.querySelector('[href="'.concat(location.hash,'"]')).setAttribute("open",!0),t.querySelector('details[id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("open",!0)):t.querySelector("details[open]")||(e[0].setAttribute("open",!0),r[0].setAttribute("aria-pressed",!0))},Tt=function(t){qt(t),Et(t),xt(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class _t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
34
34
  <style>
35
35
  @import "`.concat(e,`";
36
36
 
@@ -44,15 +44,15 @@
44
44
  <div class="tabs__links"></div>
45
45
  <slot></slot>
46
46
  </div>
47
- `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class","tabs ".concat(t)),xt(this)}}var M=function(t,e){if(!t.getAttribute("data-pages"))return!1;t.getAttribute("data-page")||t.setAttribute("data-page",1);var r=t.getAttribute("data-page"),s=t.getAttribute("data-pages"),o=t.getAttribute("data-total"),c=t.getAttribute("data-show"),n=t.getAttribute("data-increment");if(s<=1)return e.innerHTML="",!1;for(var l="",i=1;i<=s;i++)i==r?l+='<li class="page-item active" aria-current="page"><span class="page-link">'.concat(i,"</span></li>"):l+='<li class="page-item"><a href="?page='.concat(i,'" class="page-link" data-page="').concat(i,'">').concat(i,"</a></li>");return e.innerHTML=`<ul class="pagination mb-0 d-none d-sm-flex">
47
+ `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class","tabs ".concat(t)),Tt(this)}}var M=function(t,e){if(!t.getAttribute("data-pages"))return!1;t.getAttribute("data-page")||t.setAttribute("data-page",1);var r=t.getAttribute("data-page"),s=t.getAttribute("data-pages"),o=t.getAttribute("data-total"),c=t.getAttribute("data-show"),n=t.getAttribute("data-increment");if(s<=1)return e.innerHTML="",!1;for(var l="",i=1;i<=s;i++)i==r?l+='<li class="page-item active" aria-current="page"><span class="page-link">'.concat(i,"</span></li>"):l+='<li class="page-item"><a href="?page='.concat(i,'" class="page-link" data-page="').concat(i,'">').concat(i,"</a></li>");return e.innerHTML=`<ul class="pagination mb-0 d-none d-sm-flex">
48
48
  `.concat(r==1?'<li class="page-item disabled"><span class="page-link">Previous</span></li>':'<li class="page-item"><a href="?page='.concat(parseInt(r)-1,'" class="page-link" data-page="').concat(parseInt(r)-1,'">Previous</a></li>'),`
49
49
  `).concat(l,`
50
50
  `).concat(r==s?'<li class="page-item disabled"><span class="page-link">Next</span></li>':'<li class="page-item"><a href="?page='.concat(parseInt(r)+1,'" class="page-link" data-page="').concat(parseInt(r)+1,'">Next</a></li>'),`
51
51
  </ul>`),e.innerHTML+=`<div class="d-sm-none text-center">
52
52
  <span class="d-block pb-2">You've viewed `.concat(c," of ").concat(o,` results</span>
53
53
  <a href="?show=`).concat(parseInt(c)+parseInt(n),'" class="btn btn-primary w-100 m-0" data-show="').concat(parseInt(c)+parseInt(n),`">Load more results</a>
54
- </div>`),!0},_t=function(a,t,e,r){function s(o){return o instanceof e?o:new e(function(c){c(o)})}return new(e||(e=Promise))(function(o,c){function n(d){try{i(r.next(d))}catch(f){c(f)}}function l(d){try{i(r.throw(d))}catch(f){c(f)}}function i(d){d.done?o(d.value):s(d.value).then(n,l)}i((r=r.apply(a,t||[])).next())})},J=a=>{var t=Array.from(a.querySelectorAll("thead th")),e=Array.from(a.querySelectorAll("tbody tr"));e.forEach((r,s)=>{var o=Array.from(r.querySelectorAll("th, td")),c=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","error"];o.forEach((n,l)=>{var i=t[l];if(typeof i<"u"){var d=document.createElement("div");d.innerHTML=i.innerHTML;var f=d.textContent||d.innerText||"";n.setAttribute("data-label",f),i.hasAttribute("data-td-class")&&n.setAttribute("class",i.getAttribute("data-td-class")),i.hasAttribute("data-format")&&(n.setAttribute("data-format",i.getAttribute("data-format")),n.innerHTML=Y(i.getAttribute("data-format"),n.textContent.trim())),c.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},Mt=a=>{var t=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((e,r)=>{var s=window.getComputedStyle(document.querySelector("html")),o=e.querySelector(":scope > *:last-child > *:first-child");if(o){o.classList.add("text-nowrap");var c=o.offsetWidth/parseFloat(s.fontSize);c+=1.7,t=t>c?t:c}}),t},Ht=a=>{if(a.closest(".table--fullwidth")||a.querySelectorAll("thead tr th").length<4)return!1;Array.from(a.querySelectorAll("tbody tr")).forEach((t,e)=>{var r=t.querySelector(":scope > :is(td,th):first-child"),s=r.textContent;if(s!="")r.innerHTML='<span class="td__content">'.concat(s,'</span><button type="button" class="d-none">').concat(s,"</button>");else{var o=t.querySelector(":scope > :is(td,th):nth-child(2)"),c=o.textContent;o.innerHTML='<span class="td__content">'.concat(c,'</span><button type="button" class="d-none">').concat(c,"</button>")}})},Ct=a=>{a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("tr > :is(td,th):first-child button")){var e=t.target.closest("tr > :is(td,th):first-child button"),r=e.parentNode.closest("tr");r.getAttribute("data-view")=="full"?r.setAttribute("data-view","default"):r.setAttribute("data-view","full"),e.blur()}})},K=(a,t)=>{var e=t.querySelector("[data-search]");if(!e)return!1;var r=e.getAttribute("id"),s=e.getAttribute("data-search").split(","),o=e.parentNode,c={};s.forEach((n,l)=>{Array.from(a.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((i,d)=>{i.querySelector(".td__content")?c[i.querySelector(".td__content").textContent]=i.querySelector(".td__content").textContent:c[i.textContent]=i.textContent})}),e.setAttribute("list","".concat(r,"_list")),e.setAttribute("autocomplete","off"),o.querySelector("datalist")||(o.innerHTML+='<datalist id="'.concat(r,'_list"></datalist>')),o.querySelector("datalist").innerHTML="".concat(Object.keys(c).map(n=>'<option value="'.concat(n,'"></option>')).join(""))},kt=(a,t,e,r,s)=>{var o,c=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t.hasAttribute("data-ajax")){if(!d){var f=t.querySelector("[data-pagination]");f.value=1,r.setAttribute("data-page",1)}et(a,t,e,r)}else t.hasAttribute("data-submit")?t.submit():(z(a,t,r),M(r,e),D(a,t));if(t.hasAttribute("data-ajax-post")){var u=new FormData(t),h=new URLSearchParams(u).toString(),m=new XMLHttpRequest;m.open("GET","".concat(window.location.href,"?ajax=true&").concat(h)),m.send()}};t.addEventListener("keyup",i=>{clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest("[data-search]")&&(o=setTimeout(function(){c()},500))}),t.addEventListener("change",i=>{clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest("[data-sort]")&&(t.hasAttribute("data-submit")||Z(a,t,s),c()),i&&i.target instanceof HTMLElement&&i.target.closest("[data-search]")&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter][data-no-ajax]")?(z(a,t,r),M(r,e),D(a,t)):(i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter]")&&i.target.closest("form .dialog__wrapper > dialog")||i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter]")&&!i.target.closest("form dialog"))&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-show]")&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-mimic]")&&c()}),t.addEventListener("click",i=>{if(clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest('dialog button:not([type="button"])')){var d=i.target.closest('dialog button:not([type="button"])'),f=d.closest("dialog");f.close()}i&&i.target instanceof HTMLElement&&i.target.closest(".dialog__close")&&(i.preventDefault(),i.stopPropagation()),i&&i.target instanceof HTMLElement&&i.target.closest("[data-clear]")&&(t.reset(),t.hasAttribute("data-submit")||Z(a,t,s),c())}),t.addEventListener("submit",i=>{clearTimeout(o),t.hasAttribute("data-submit")||i.preventDefault(),c()}),t.addEventListener("force",i=>{c()}),t.addEventListener("paginate",i=>{c(!0)});var n=[],l=[];Array.from(t.querySelectorAll("[data-mimic]")).forEach((i,d)=>{var f=i.getAttribute("data-mimic");Array.from(document.querySelectorAll('[name="'.concat(f,'"]'))).forEach((u,h)=>{var m=u.closest("form");n.includes(m)||n.push(m),l.includes(f)||l.push(f)})}),n.forEach((i,d)=>{var f=function(){var h=[],m=new FormData(i);for(var[b,v]of m)document.querySelector('[data-mimic="'.concat(b,'"]'))&&!h.includes(b)?(h.push(b),document.querySelector('[data-mimic="'.concat(b,'"]')).value=v):document.querySelector('[data-mimic="'.concat(b,'"]'))&&(document.querySelector('[data-mimic="'.concat(b,'"]')).value+=","+v);for(var L of h){var A=new Event("force");t.dispatchEvent(A)}for(var p of l)if(!m.has(p)&&i.querySelector('[name="'.concat(p,'"]'))){document.querySelector('[data-mimic="'.concat(p,'"]')).value="";var x=new Event("force");t.dispatchEvent(x)}};i.addEventListener("force",u=>{f()}),i.addEventListener("change",u=>{f()})})},Z=(a,t,e)=>{if(t.getAttribute("data-ajax"))return!1;var r=a.querySelector("tbody"),s=t.querySelector("[data-sort]"),o=s.querySelector("option:nth-child(".concat(s.selectedIndex+1,")")),c=o.getAttribute("data-sort"),n=o.getAttribute("data-order"),l=o.getAttribute("data-format");if(!c)return r.innerHTML=e.innerHTML,J(a),!1;var i=[];["asc","desc","descending"].includes(n)||(i=n.split(","));var d=[];Array.from(r.querySelectorAll("tr")).forEach((u,h)=>{var m=u.querySelector('td[data-label="'+c+'"], th[data-label="'+c+'"]').textContent.trim();u.querySelector('[data-label="'+c+'"] .td__content')&&(m=u.querySelector('[data-label="'+c+'"] .td__content').textContent.trim()),i.length&&i.includes(m)&&(m=i.indexOf(m)),st(m)&&(m=it(m,10)),l&&l=="date"&&(m=new Date(m));var b={index:m,row:u};d.push(b)}),d.sort((u,h)=>u.index>h.index?1:-1),(n=="descending"||n=="desc")&&(d=d.reverse());var f="";d.forEach((u,h)=>{f+=u.row.outerHTML}),r.innerHTML=f},z=(a,t,e)=>{a.classList.remove("table--filtered");var r=tt(t),s=[],o=0,c=t.querySelector("[data-pagination]")?parseInt(t.querySelector("[data-pagination]").value):1,n=t.querySelector("[data-show]")?parseInt(t.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((h,m)=>{h.classList.remove("filtered"),h.classList.remove("filtered--matched"),h.classList.remove("filtered--show"),h.removeAttribute("data-filtered-by")}),t.querySelector("[data-search]")){var l=t.querySelector("[data-search]"),i=t.querySelector("[data-search]").getAttribute("data-search").split(",");i.forEach((h,m)=>{s.push({column:"".concat(h.trim()),value:"".concat(l.value)})})}Array.from(t.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML=""}),Object.keys(r).length&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML+="(".concat(Object.keys(r).length,")")}),a.classList.add("table--filtered");var d=function(m,b){Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((v,L)=>{var A=!1;b.forEach((p,x)=>{var y=v.querySelector('[data-label="'.concat(m,'"]'));if(p&&p=="$today")p=Y("date",new Date);else if(p&&p=="$yesterday"){var q=new Date;q.setDate(q.getDate()-1),p=Y("date",q)}else if(p&&(p=="$thisWeek"||p=="$lastWeek")){var S=new Date,g=new Date(S.setDate(S.getDate()-(S.getDay()-1))),H=new Date(S.setDate(S.getDate()-S.getDay()+7)),w=new Date(y.textContent.toLowerCase());if(S.setHours(0,0,0,0),g.setHours(0,0,0,0),H.setHours(0,0,0,0),w.setHours(0,0,0,0),p=="$thisWeek")A=w>=g&&w<=H;else{var T=new Date(g.setDate(g.getDate()-7)),_=new Date(H.setDate(H.getDate()-7));T.setHours(0,0,0,0),_.setHours(0,0,0,0),A=w>=T&&w<=_}}else if(p&&p=="$thisMonth"){var N=new Date,B=N.getFullYear(),I=N.getMonth(),C=new Date(B,I,1),U=new Date(B,I+1,0),k=new Date(y.textContent.toLowerCase());C.setHours(0,0,0,0),U.setHours(0,0,0,0),k.setHours(0,0,0,0),A=k>=C&&k<=U}else if(p&&p=="$lastMonth"){var E=new Date,P=E.getFullYear(),j=E.getMonth(),O=new Date(P,j-1,1),F=new Date(P,j,0),G=new Date(y.textContent.toLowerCase());O.setHours(0,0,0,0),F.setHours(0,0,0,0),G.setHours(0,0,0,0),A=G>=O&&G<=F}y&&y.textContent.toLowerCase().includes(p.toLowerCase())&&(A=!0)}),A||(v.classList.add("filtered"),v.setAttribute("data-filtered-by",m))})};for(var[f,u]of Object.entries(r))d(f,u);Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((h,m)=>{var b=!(s.length>0&&s[0].value.length>=3);s.forEach((v,L)=>{var A=h.querySelector('[data-label="'.concat(v.column,'"]'));A&&v.value.length>=3&&A.textContent.toLowerCase().includes(v.value.toLowerCase())&&(b=!0)}),b||h.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((h,m)=>{o++,h.classList.add("filtered--matched");var b=Math.ceil(o/n);b==parseInt(c)&&h.classList.add("filtered--show")}),e&&(e.setAttribute("data-page",c),e.setAttribute("data-pages",Math.ceil(o/n)),e.setAttribute("data-total",o),e.setAttribute("data-show",n))},D=(a,t,e)=>{var r=Array.from(t.querySelectorAll("[data-query]"));r.forEach((s,o)=>{var c=s.getAttribute("data-query"),n;if(c=="total")e.hasAttribute("data-total")?n=e.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!c.includes(" == ")&&c.includes(" & ")){var l=c.split(" & "),i="";l.forEach(u=>{i+=':not([data-filtered-by="'.concat(u,'"])')}),n=Array.from(a.querySelectorAll("tbody tr".concat(i))).length}else if(!c.includes(" == "))n=Array.from(a.querySelectorAll('tbody tr:not([data-filtered-by="'.concat(c,'"])'))).length;else if(c.includes(" && ")){var d=c.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(u){var h=!0;for(var[m,b]of Object.entries(d)){var v=b.split(" == ");(!u.querySelector('td[data-label="'.concat(v[0],'"]'))||u.querySelector('td[data-label="'.concat(v[0],'"]')).textContent!="".concat(v[1]))&&(h=!1)}return h}).length}else{var f=c.split(" == ");n=Array.from(a.querySelectorAll('tbody tr.filtered--matched td[data-label="'.concat(f[0],'"], tbody tr[data-filtered-by="').concat(f[0],'"] td[data-label="').concat(f[0],'"]'))).filter(function(u){return u.textContent===f[1]}).length}s.hasAttribute("data-total")?s.setAttribute("data-total",n):s.innerHTML=n})},Rt=function(t,e,r,s){r.addEventListener("click",o=>{if(o&&o.target instanceof HTMLElement&&o.target.closest("[data-page]")){o.preventDefault();var c=e.querySelector("[data-pagination]"),n=o.target.closest("[data-page]").getAttribute("data-page");if(c.value=n,s.setAttribute("data-page",n),e.dispatchEvent(new Event("paginate")),t.hasAttribute("data-show-history")){var l=new URL(location);l.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",l)}var i=-250,d=t.getBoundingClientRect().top+window.pageYOffset+i;window.scrollTo({top:d,behavior:"smooth"})}if(o&&o.target instanceof HTMLElement&&o.target.closest("[data-show]")){o.preventDefault();var f=e.querySelector("[data-show]"),u=o.target.closest("[data-show]").getAttribute("data-show");f.value=u,s.setAttribute("data-show",u),e.dispatchEvent(new Event("submit"))}})},Dt=(a,t)=>{if(!a)return!1;a.addEventListener("click",e=>{Nt(t)})},Nt=function(t){for(var e=[],r=t.getElementsByTagName("tr"),s=0;s<r.length;s++){for(var o=r[s].querySelectorAll("td,th"),c=[],n=0;n<o.length;n++)c.push('"'.concat(o[n].textContent,'"'));e.push(c.join(","))}e=e.join(`
55
- `);var l=new Blob([e],{type:"text/csv"}),i=document.createElement("a");i.download="export.csv";var d=window.URL.createObjectURL(l);i.href=d,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)},W=function(t,e,r,s){if(J(t),Ht(t),D(t,e,s),s&&s.classList.contains("table--cta")){let c=function(){Array.from(t.querySelectorAll("tr")).forEach((n,l)=>{var i=n.offsetHeight;n.style.setProperty("--row-height","".concat(i,"px"))})};var o=Mt(t);s.style.setProperty("--cta-width","".concat(o,"rem")),new ResizeObserver(c).observe(t)}},tt=function(t){var e=new Object,r=Array.from(t.querySelectorAll("[data-filter]"));return r.forEach((s,o)=>{if(!(s.type=="radio"&&!s.checked)&&!(s.type=="checkbox"&&!s.checked)&&s&&s.value){var c=s.getAttribute("data-filter");e[c]||(e[c]=new Array),e[c].push(s.value)}}),e},et=function(t,e,r,s){return _t(this,void 0,void 0,function*(){var o=(h,m,b)=>m.split(/[\.\[\]\'\"]/).filter(v=>v).reduce((v,L)=>v?v[L]:b,h),c=new FormData(e),n=new URLSearchParams(c).toString(),l=t.querySelectorAll("thead tr th"),i=t.querySelector("tbody"),d=e.getAttribute("data-ajax");s.classList.add("table--loading");var f=tt(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML=""}),Object.keys(f).length&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML+="(".concat(Object.keys(f).length,")")}),window.controller||(window.controller=[]),window.controller[d]&&window.controller[d].abort(),window.controller[d]=new AbortController;var{signal:u}=controller[d];try{yield fetch(d+"?"+n,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(h=>h.json()).then(h=>{var m=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",b=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",v=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",L=o(h,b,1),A=o(h,v,1),p=o(h,m),x=s.hasAttribute("data-empty-msg")?s.getAttribute("data-empty-msg"):"No results found";p?(i.innerHTML="",p.forEach((y,q)=>{var S=document.createElement("tr");l.forEach((g,H)=>{var w="",T=document.createElement("td");if(T.setAttribute("data-label",g.innerText),g.getAttribute("data-output")){var _=g.getAttribute("data-output");w=_.replace(new RegExp(/{(.*?)}/,"gm"),function(I){return o(y,I.replace("{","").replace("}",""))})}if(g.hasAttribute("data-output-array")){var _=g.getAttribute("data-output"),N=o(y,_.replace("{","").replace("}",""));w="",N.forEach((C,U)=>{var k=g.getAttribute("data-output-array"),E="";if(g.hasAttribute("data-output-array-property")&&g.hasAttribute("data-output-array-transform")){var P=o(C,g.getAttribute("data-output-array-property")),j=JSON.parse(g.getAttribute("data-output-array-transform")),O=j[P];E=k.replace("{".concat(g.getAttribute("data-output-array-property"),"}"),O)}E=E.replace(new RegExp(/{(.*?)}/,"gm"),function(F){return o(C,F.replace("{","").replace("}",""))}),w+=E})}if(g.hasAttribute("data-transform")){var B=JSON.parse(g.getAttribute("data-transform"));w=B[w],!w&&g.hasAttribute("data-default")&&(w=g.getAttribute("data-default"))}T.innerHTML=w,S.appendChild(T)}),i.appendChild(S)}),K(t,e),s.setAttribute("data-total",parseInt(L)),s.setAttribute("data-page",parseInt(A)),s.setAttribute("data-pages",Math.ceil(s.getAttribute("data-total")/s.getAttribute("data-show"))),W(t,e,r,s),M(s,r),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((y,q)=>{var S=o(h,y.getAttribute("data-ajax-query"),"");y.hasAttribute("data-total")?y.setAttribute("data-total",S):y.innerHTML=S}),parseInt(L)==0&&(i.innerHTML='<tr><td colspan="100%"><span>'.concat(x,"</span></td></tr>")),s.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:d,formData:n})):i.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>'})}catch(h){console.log(h)}})},Y=(a,t)=>{switch(a){case"datetime":return new Date(t).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(t).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(t).toLocaleDateString("en-gb",{year:"2-digit",month:"long",day:"numeric"});case"capitalise":return t=ot(t)}};class Bt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
54
+ </div>`),!0},Mt=function(a,t,e,r){function s(o){return o instanceof e?o:new e(function(c){c(o)})}return new(e||(e=Promise))(function(o,c){function n(d){try{i(r.next(d))}catch(f){c(f)}}function l(d){try{i(r.throw(d))}catch(f){c(f)}}function i(d){d.done?o(d.value):s(d.value).then(n,l)}i((r=r.apply(a,t||[])).next())})},K=a=>{var t=Array.from(a.querySelectorAll("thead th")),e=Array.from(a.querySelectorAll("tbody tr"));e.forEach((r,s)=>{var o=Array.from(r.querySelectorAll("th, td")),c=["0","low","medium","high","unknown","n/a","pending","verified","due","overdue","incomplete","complete","completed","approval required","upcoming","requires approval","to do","on track","not started","warning","error"];o.forEach((n,l)=>{var i=t[l];if(typeof i<"u"){var d=document.createElement("div");d.innerHTML=i.innerHTML;var f=d.textContent||d.innerText||"";n.setAttribute("data-label",f),i.hasAttribute("data-td-class")&&n.setAttribute("class",i.getAttribute("data-td-class")),i.hasAttribute("data-format")&&(n.setAttribute("data-format",i.getAttribute("data-format")),n.innerHTML=$(i.getAttribute("data-format"),n.textContent.trim())),c.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},Ct=a=>{var t=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((e,r)=>{var s=window.getComputedStyle(document.querySelector("html")),o=e.querySelector(":scope > *:last-child > *:first-child");if(o){o.classList.add("text-nowrap");var c=o.offsetWidth/parseFloat(s.fontSize);c+=1.7,t=t>c?t:c}}),t},Ht=a=>{if(a.closest(".table--fullwidth")||a.querySelectorAll("thead tr th").length<4)return!1;Array.from(a.querySelectorAll("tbody tr")).forEach((t,e)=>{var r=t.querySelector(":scope > :is(td,th):first-child"),s=r.textContent;if(s!="")r.innerHTML='<span class="td__content">'.concat(s,'</span><button type="button" class="d-none">').concat(s,"</button>");else{var o=t.querySelector(":scope > :is(td,th):nth-child(2)"),c=o.textContent;o.innerHTML='<span class="td__content">'.concat(c,'</span><button type="button" class="d-none">').concat(c,"</button>")}})},kt=a=>{a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("tr > :is(td,th):first-child button")){var e=t.target.closest("tr > :is(td,th):first-child button"),r=e.parentNode.closest("tr");r.getAttribute("data-view")=="full"?r.setAttribute("data-view","default"):r.setAttribute("data-view","full"),e.blur()}})},Z=(a,t)=>{var e=t.querySelector("[data-search]");if(!e)return!1;var r=e.getAttribute("id"),s=e.getAttribute("data-search").split(","),o=e.parentNode,c={};s.forEach((n,l)=>{Array.from(a.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((i,d)=>{i.querySelector(".td__content")?c[i.querySelector(".td__content").textContent]=i.querySelector(".td__content").textContent:c[i.textContent]=i.textContent})}),e.setAttribute("list","".concat(r,"_list")),e.setAttribute("autocomplete","off"),o.querySelector("datalist")||(o.innerHTML+='<datalist id="'.concat(r,'_list"></datalist>')),o.querySelector("datalist").innerHTML="".concat(Object.keys(c).map(n=>'<option value="'.concat(n,'"></option>')).join(""))},Rt=(a,t,e,r,s)=>{var o,c=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t.hasAttribute("data-ajax")){if(!d){var f=t.querySelector("[data-pagination]");f.value=1,r.setAttribute("data-page",1)}at(a,t,e,r)}else t.hasAttribute("data-submit")?t.submit():(z(a,t,r),M(r,e),N(a,t));if(t.hasAttribute("data-ajax-post")){var h=new FormData(t),m=new URLSearchParams(h).toString(),u=new XMLHttpRequest;u.open("GET","".concat(window.location.href,"?ajax=true&").concat(m)),u.send()}};t.addEventListener("keyup",i=>{clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest("[data-search]")&&(o=setTimeout(function(){c()},500))}),t.addEventListener("change",i=>{clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest("[data-sort]")&&(t.hasAttribute("data-submit")||W(a,t,s),c()),i&&i.target instanceof HTMLElement&&i.target.closest("[data-search]")&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter][data-no-ajax]")?(z(a,t,r),M(r,e),N(a,t)):(i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter]")&&i.target.closest("form .dialog__wrapper > dialog")||i&&i.target instanceof HTMLElement&&i.target.closest("[data-filter]")&&!i.target.closest("form dialog"))&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-show]")&&c(),i&&i.target instanceof HTMLElement&&i.target.closest("[data-mimic]")&&c()}),t.addEventListener("click",i=>{if(clearTimeout(o),i&&i.target instanceof HTMLElement&&i.target.closest('dialog button:not([type="button"])')){var d=i.target.closest('dialog button:not([type="button"])'),f=d.closest("dialog");f.close()}i&&i.target instanceof HTMLElement&&i.target.closest(".dialog__close")&&(i.preventDefault(),i.stopPropagation()),i&&i.target instanceof HTMLElement&&i.target.closest("[data-clear]")&&(t.reset(),t.hasAttribute("data-submit")||W(a,t,s),c())}),t.addEventListener("submit",i=>{clearTimeout(o),t.hasAttribute("data-submit")||i.preventDefault(),c()}),t.addEventListener("force",i=>{c()}),t.addEventListener("paginate",i=>{c(!0)});var n=[],l=[];Array.from(t.querySelectorAll("[data-mimic]")).forEach((i,d)=>{var f=i.getAttribute("data-mimic");Array.from(document.querySelectorAll('[name="'.concat(f,'"]'))).forEach((h,m)=>{var u=h.closest("form");n.includes(u)||n.push(u),l.includes(f)||l.push(f)})}),n.forEach((i,d)=>{var f=function(){var m=[],u=new FormData(i);for(var[v,b]of u)document.querySelector('[data-mimic="'.concat(v,'"]'))&&!m.includes(v)?(m.push(v),document.querySelector('[data-mimic="'.concat(v,'"]')).value=b):document.querySelector('[data-mimic="'.concat(v,'"]'))&&(document.querySelector('[data-mimic="'.concat(v,'"]')).value+=","+b);for(var p of m){var E=new Event("force");t.dispatchEvent(E)}for(var A of l)if(!u.has(A)&&i.querySelector('[name="'.concat(A,'"]'))){document.querySelector('[data-mimic="'.concat(A,'"]')).value="";var y=new Event("force");t.dispatchEvent(y)}};i.addEventListener("force",h=>{f()}),i.addEventListener("change",h=>{f()})})},W=(a,t,e)=>{if(t.getAttribute("data-ajax"))return!1;var r=a.querySelector("tbody"),s=t.querySelector("[data-sort]"),o=s.querySelector("option:nth-child(".concat(s.selectedIndex+1,")")),c=o.getAttribute("data-sort"),n=o.getAttribute("data-order"),l=o.getAttribute("data-format");if(!c)return r.innerHTML=e.innerHTML,K(a),!1;var i=[];["asc","desc","descending"].includes(n)||(i=n.split(","));var d=[];Array.from(r.querySelectorAll("tr")).forEach((h,m)=>{var u=h.querySelector('td[data-label="'+c+'"], th[data-label="'+c+'"]').textContent.trim();h.querySelector('[data-label="'+c+'"] .td__content')&&(u=h.querySelector('[data-label="'+c+'"] .td__content').textContent.trim()),i.length&&i.includes(u)&&(u=i.indexOf(u)),it(u)&&(u=ot(u,10)),l&&l=="date"&&(u=new Date(u));var v={index:u,row:h};d.push(v)}),d.sort((h,m)=>h.index>m.index?1:-1),(n=="descending"||n=="desc")&&(d=d.reverse());var f="";d.forEach((h,m)=>{f+=h.row.outerHTML}),r.innerHTML=f},z=(a,t,e)=>{a.classList.remove("table--filtered");var r=et(t),s=[],o=0,c=t.querySelector("[data-pagination]")?parseInt(t.querySelector("[data-pagination]").value):1,n=t.querySelector("[data-show]")?parseInt(t.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((u,v)=>{u.classList.remove("filtered"),u.classList.remove("filtered--matched"),u.classList.remove("filtered--show"),u.removeAttribute("data-filtered-by")}),t.querySelector("[data-search]")){var l=t.querySelector("[data-search]"),i=t.querySelector("[data-search]").getAttribute("data-search").split(",");i.forEach((u,v)=>{s.push({column:"".concat(u.trim()),value:"".concat(l.value)})})}Array.from(t.querySelectorAll("[data-filter-count]")).forEach((u,v)=>{u.innerHTML="",u.parentNode.classList.remove("hover")});var d=0;Object.values(r).forEach((u,v)=>{typeof u=="object"&&Object.values(u).length?d+=Object.values(u).length:d++}),d&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach((u,v)=>{u.innerHTML+="(".concat(d,")"),u.parentNode.classList.add("hover")}),a.classList.add("table--filtered");var f=function(v,b){Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((p,E)=>{var A=!1;b.forEach((y,D)=>{var w=p.querySelector('[data-label="'.concat(v,'"]'));if(y&&y=="$today")y=$("date",new Date);else if(y&&y=="$yesterday"){var q=new Date;q.setDate(q.getDate()-1),y=$("date",q)}else if(y&&(y=="$thisWeek"||y=="$lastWeek")){var L=new Date,g=new Date(L.setDate(L.getDate()-(L.getDay()-1))),C=new Date(L.setDate(L.getDate()-L.getDay()+7)),S=new Date(w.textContent.toLowerCase());if(L.setHours(0,0,0,0),g.setHours(0,0,0,0),C.setHours(0,0,0,0),S.setHours(0,0,0,0),y=="$thisWeek")A=S>=g&&S<=C;else{var T=new Date(g.setDate(g.getDate()-7)),_=new Date(C.setDate(C.getDate()-7));T.setHours(0,0,0,0),_.setHours(0,0,0,0),A=S>=T&&S<=_}}else if(y&&y=="$thisMonth"){var B=new Date,I=B.getFullYear(),j=B.getMonth(),H=new Date(I,j,1),G=new Date(I,j+1,0),k=new Date(w.textContent.toLowerCase());H.setHours(0,0,0,0),G.setHours(0,0,0,0),k.setHours(0,0,0,0),A=k>=H&&k<=G}else if(y&&y=="$lastMonth"){var x=new Date,P=x.getFullYear(),O=x.getMonth(),F=new Date(P,O-1,1),V=new Date(P,O,0),X=new Date(w.textContent.toLowerCase());F.setHours(0,0,0,0),V.setHours(0,0,0,0),X.setHours(0,0,0,0),A=X>=F&&X<=V}w&&w.textContent.toLowerCase().includes(y.toLowerCase())&&(A=!0)}),A||(p.classList.add("filtered"),p.setAttribute("data-filtered-by",v))})};for(var[h,m]of Object.entries(r))f(h,m);Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((u,v)=>{var b=!(s.length>0&&s[0].value.length>=3);s.forEach((p,E)=>{var A=u.querySelector('[data-label="'.concat(p.column,'"]'));A&&p.value.length>=3&&A.textContent.toLowerCase().includes(p.value.toLowerCase())&&(b=!0)}),b||u.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((u,v)=>{o++,u.classList.add("filtered--matched");var b=Math.ceil(o/n);b==parseInt(c)&&u.classList.add("filtered--show")}),e&&(e.setAttribute("data-page",c),e.setAttribute("data-pages",Math.ceil(o/n)),e.setAttribute("data-total",o),e.setAttribute("data-show",n))},N=(a,t,e)=>{var r=Array.from(t.querySelectorAll("[data-query]"));r.forEach((s,o)=>{var c=s.getAttribute("data-query"),n;if(c=="total")e.hasAttribute("data-total")?n=e.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!c.includes(" == ")&&c.includes(" & ")){var l=c.split(" & "),i="";l.forEach(h=>{i+=':not([data-filtered-by="'.concat(h,'"])')}),n=Array.from(a.querySelectorAll("tbody tr".concat(i))).length}else if(!c.includes(" == "))n=Array.from(a.querySelectorAll('tbody tr:not([data-filtered-by="'.concat(c,'"])'))).length;else if(c.includes(" && ")){var d=c.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(h){var m=!0;for(var[u,v]of Object.entries(d)){var b=v.split(" == ");(!h.querySelector('td[data-label="'.concat(b[0],'"]'))||h.querySelector('td[data-label="'.concat(b[0],'"]')).textContent!="".concat(b[1]))&&(m=!1)}return m}).length}else{var f=c.split(" == ");n=Array.from(a.querySelectorAll('tbody tr.filtered--matched td[data-label="'.concat(f[0],'"], tbody tr[data-filtered-by="').concat(f[0],'"] td[data-label="').concat(f[0],'"]'))).filter(function(h){return h.textContent===f[1]}).length}s.hasAttribute("data-total")?s.setAttribute("data-total",n):s.innerHTML=n})},Nt=function(t,e,r,s){r.addEventListener("click",o=>{if(o&&o.target instanceof HTMLElement&&o.target.closest("[data-page]")){o.preventDefault();var c=e.querySelector("[data-pagination]"),n=o.target.closest("[data-page]").getAttribute("data-page");if(c.value=n,s.setAttribute("data-page",n),e.dispatchEvent(new Event("paginate")),t.hasAttribute("data-show-history")){var l=new URL(location);l.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",l)}var i=-250,d=t.getBoundingClientRect().top+window.pageYOffset+i;window.scrollTo({top:d,behavior:"smooth"})}if(o&&o.target instanceof HTMLElement&&o.target.closest("[data-show]")){o.preventDefault();var f=e.querySelector("[data-show]"),h=o.target.closest("[data-show]").getAttribute("data-show");f.value=h,s.setAttribute("data-show",h),e.dispatchEvent(new Event("submit"))}})},Dt=(a,t)=>{if(!a)return!1;a.addEventListener("click",e=>{Bt(t)})},Bt=function(t){for(var e=[],r=t.getElementsByTagName("tr"),s=0;s<r.length;s++){for(var o=r[s].querySelectorAll("td,th"),c=[],n=0;n<o.length;n++)c.push('"'.concat(o[n].textContent,'"'));e.push(c.join(","))}e=e.join(`
55
+ `);var l=new Blob([e],{type:"text/csv"}),i=document.createElement("a");i.download="export.csv";var d=window.URL.createObjectURL(l);i.href=d,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)},tt=function(t,e,r,s){if(K(t),Ht(t),N(t,e,s),s&&s.classList.contains("table--cta")){let c=function(){Array.from(t.querySelectorAll("tr")).forEach((n,l)=>{var i=n.offsetHeight;n.style.setProperty("--row-height","".concat(i,"px"))})};var o=Ct(t);s.style.setProperty("--cta-width","".concat(o,"rem")),new ResizeObserver(c).observe(t)}},et=function(t){var e=new Object,r=Array.from(t.querySelectorAll("[data-filter]"));return r.forEach((s,o)=>{if(!(s.type=="radio"&&!s.checked)&&!(s.type=="checkbox"&&!s.checked)&&s&&s.value){var c=s.getAttribute("data-filter");e[c]||(e[c]=new Array),e[c].push(s.value)}}),e},at=function(t,e,r,s){return Mt(this,void 0,void 0,function*(){var o=(u,v,b)=>v.split(/[\.\[\]\'\"]/).filter(p=>p).reduce((p,E)=>p?p[E]:b,u),c=new FormData(e),n=new URLSearchParams(c).toString(),l=t.querySelectorAll("thead tr th"),i=t.querySelector("tbody"),d=e.getAttribute("data-ajax");s.classList.add("table--loading");var f=et(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,v)=>{u.innerHTML="",u.parentNode.classList.remove("hover")});var h=0;Object.values(f).forEach((u,v)=>{typeof u=="object"&&Object.values(u).length?h+=Object.values(u).length:h++}),h&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,v)=>{u.innerHTML+="(".concat(h,")"),u.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[d]&&window.controller[d].abort(),window.controller[d]=new AbortController;var{signal:m}=controller[d];try{yield fetch(d+"?"+n,{signal:m,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(u=>u.json()).then(u=>{var v=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",b=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",p=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",E=o(u,b,1),A=o(u,p,1),y=o(u,v),D=s.hasAttribute("data-empty-msg")?s.getAttribute("data-empty-msg"):"No results found";y?(i.innerHTML="",y.forEach((w,q)=>{var L=document.createElement("tr");l.forEach((g,C)=>{var S="",T=document.createElement("td");if(T.setAttribute("data-label",g.innerText),g.getAttribute("data-output")){var _=g.getAttribute("data-output");S=_.replace(new RegExp(/{(.*?)}/,"gm"),function(j){return o(w,j.replace("{","").replace("}",""))})}if(g.hasAttribute("data-output-array")){var _=g.getAttribute("data-output"),B=o(w,_.replace("{","").replace("}",""));S="",B.forEach((H,G)=>{var k=g.getAttribute("data-output-array"),x="";if(g.hasAttribute("data-output-array-property")&&g.hasAttribute("data-output-array-transform")){var P=o(H,g.getAttribute("data-output-array-property")),O=JSON.parse(g.getAttribute("data-output-array-transform")),F=O[P];x=k.replace("{".concat(g.getAttribute("data-output-array-property"),"}"),F)}x=x.replace(new RegExp(/{(.*?)}/,"gm"),function(V){return o(H,V.replace("{","").replace("}",""))}),S+=x})}if(g.hasAttribute("data-transform")){var I=JSON.parse(g.getAttribute("data-transform"));S=I[S],!S&&g.hasAttribute("data-default")&&(S=g.getAttribute("data-default"))}T.innerHTML=S,L.appendChild(T)}),i.appendChild(L)}),Z(t,e),s.setAttribute("data-total",parseInt(E)),s.setAttribute("data-page",parseInt(A)),s.setAttribute("data-pages",Math.ceil(s.getAttribute("data-total")/s.getAttribute("data-show"))),tt(t,e,r,s),M(s,r),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((w,q)=>{var L=o(u,w.getAttribute("data-ajax-query"),"");w.hasAttribute("data-total")?w.setAttribute("data-total",L):w.innerHTML=L}),parseInt(E)==0&&(i.innerHTML='<tr><td colspan="100%"><span>'.concat(D,"</span></td></tr>")),s.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:d,formData:n})):i.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>'})}catch(u){console.log(u)}})},$=(a,t)=>{switch(a){case"datetime":return new Date(t).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(t).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(t).toLocaleDateString("en-gb",{year:"2-digit",month:"long",day:"numeric"});case"capitalise":return t=nt(t)}};class It extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
56
56
  <style>
57
57
  @import "`.concat(e,`";
58
58
 
@@ -74,7 +74,7 @@
74
74
  </div>
75
75
  </div>
76
76
  <div class="table__pagination"></div>
77
- `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",15),this.setAttribute("data-pages",Math.ceil(this.getAttribute("data-total")/this.getAttribute("data-show")));var e=this.classList.toString();e=e.replace("table--cta",""),e=e.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=" ".concat(e),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector(".table__pagination");var r=this.classList.contains("table--cta");r||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector("#".concat(this.getAttribute("data-filterby"))):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),K(this.table,this.form),this.form.querySelector("[data-page]")||(this.form.innerHTML+='<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||(this.form.innerHTML+='<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Ct(this.table),kt(this.table,this.form,this.pagination,this,this.savedTableBody),Rt(this.table,this.form,this.pagination,this),Dt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax")?et(this.table,this.form,this.pagination,this):(W(this.table,this.form,this.pagination,this),z(this.table,this.form,this),M(this,this.pagination),D(this.table,this.form)),this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",s=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-pages","data-page","data-show"]}attributeChangedCallback(t,e,r){}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class It extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),s='@import "'.concat(e,'/css/components/card.css";'),o=document.createElement("template");o.innerHTML=`
77
+ `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",15),this.setAttribute("data-pages",Math.ceil(this.getAttribute("data-total")/this.getAttribute("data-show")));var e=this.classList.toString();e=e.replace("table--cta",""),e=e.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=" ".concat(e),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector(".table__pagination");var r=this.classList.contains("table--cta");r||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector("#".concat(this.getAttribute("data-filterby"))):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),Z(this.table,this.form),this.form.querySelector("[data-page]")||(this.form.innerHTML+='<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||(this.form.innerHTML+='<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),kt(this.table),Rt(this.table,this.form,this.pagination,this,this.savedTableBody),Nt(this.table,this.form,this.pagination,this),Dt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax")?at(this.table,this.form,this.pagination,this):(tt(this.table,this.form,this.pagination,this),z(this.table,this.form,this),M(this,this.pagination),N(this.table,this.form)),this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",s=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))})}static get observedAttributes(){return["data-total","data-pages","data-page","data-show"]}attributeChangedCallback(t,e,r){}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class jt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),s='@import "'.concat(e,'/css/components/card.css";'),o=document.createElement("template");o.innerHTML=`
78
78
  <style>
79
79
  @import "`.concat(r,`";
80
80
  `).concat(s,`
@@ -89,7 +89,7 @@
89
89
  </div>
90
90
  `).concat(this.hasAttribute("data-cta")?'<div class="card__footer"><span class="link">'.concat(this.getAttribute("data-cta"),"</span></div>"):"",`
91
91
  </div>
92
- `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label"),e=this.shadowRoot.querySelector(".card");if(t.setAttribute("tabindex","-1"),t.matches("label[for]")){var r=document.getElementById(t.getAttribute("for")).checked;r?e.classList.add("checked"):e.classList.remove("checked")}e.addEventListener("click",s=>{if(t.matches("label[for]")){s.stopPropagation(),s.preventDefault();var o=document.getElementById(t.getAttribute("for")),c=o.getAttribute("name"),n=o.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(c,'"][type="radio"]:not([id="').concat(n,'"])')));l.forEach((d,f)=>{var u=document.querySelector('[for="'.concat(d.getAttribute("id"),'"] iam-card'));u.dispatchEvent(new Event("inactive"))}),t.click();var i=o.checked;i?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",s=>{e.classList.remove("checked")}),e.addEventListener("keydown",s=>{switch(s.keyCode){case 32:case 13:if(t.matches("label[for]")){s.stopPropagation(),s.preventDefault();var o=document.getElementById(t.getAttribute("for")),c=o.getAttribute("name"),n=o.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(c,'"]:not([id="').concat(n,'"])')));l.forEach((d,f)=>{var u=document.querySelector('[for="'.concat(d.getAttribute("id"),'"] iam-card'));u.dispatchEvent(new Event("inactive"))}),t.click();var i=o.checked;i?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(t,e,r){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total").innerHTML=r;break}case"class":{var s=this.classList.toString();this.querySelector('[class*="fa-"]')&&(s+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(s));break}}}}function Pt(a,t){function e(r,s){var o=!1,c=s.getAttribute("name");c.includes("[]")&&(c=c.replace("[]","[".concat(s.value,"]")));var n=r.querySelector('[data-name="'.concat(c,'"]'));n&&s.getAttribute("type")=="checkbox"&&(o=!0);var l=s.getAttribute("data-filter-text");if(n||(n=document.createElement("button"),r.appendChild(n)),n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",c),n.innerHTML=l.replace("$value",s.value),(!s.value||o)&&n.remove(),s.parentNode.closest("[data-filter-text]")){var i=s.parentNode.closest("[data-filter-text]"),d=!0;if(c="",i.querySelectorAll("input").forEach((h,m)=>{var b=h.getAttribute("name");if(c+="".concat(m!=0?",":"").concat(b),r.querySelector('[data-name="'.concat(b,'"]'))&&r.querySelector('[data-name="'.concat(b,'"]')).remove(),h.value){var v=document.createElement("button");v.setAttribute("type","button"),v.classList.add("filter"),v.setAttribute("data-name",b),v.innerHTML=l.replace("$value",h.value),r.appendChild(v)}else d=!1}),r.querySelector('[data-name="'.concat(c,'"]'))&&r.querySelector('[data-name="'.concat(c,'"]')).remove(),d){var f=i.getAttribute("data-filter-text");i.querySelectorAll("input").forEach((h,m)=>{var b=h.getAttribute("name");r.querySelector('[data-name="'.concat(b,'"]'))&&r.querySelector('[data-name="'.concat(b,'"]')).remove(),f=f.replace("$".concat(m+1),h.value)});var u=document.createElement("button");u.setAttribute("type","button"),u.classList.add("filter"),u.setAttribute("data-name",c),u.innerHTML=f,r.appendChild(u)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((r,s)=>{e(t,r)}),a.addEventListener("change",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest("input[data-filter-text]")){var s=r.target.closest("input[data-filter-text]");e(t,s)}},!1),t.addEventListener("click",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest(".filter")){for(var s=r.target.closest(".filter"),o=s.getAttribute("data-name").split(","),c=0;c<o.length;c++){var n=o[c],l='[name="'.concat(n,'"]');if(n.match(/\[(.*)\]/)){n.replace(/\[(.*)\]/,"[]");var i=n.replace(/.*\[(.*)\]/,"$1");l='[value="'.concat(i,'"]')}for(var d=a.querySelectorAll(l),f=0;f<d.length;f++){var u=d[f];if(u.getAttribute("type")!="radio"&&u.getAttribute("type")!="checkbox")u.value="";else{u.checked=!1;var r=new Event("force");u.closest("form").dispatchEvent(r)}}}s.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class jt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/applied-filters.css";'),s=this.classList.toString(),o=document.createElement("template");o.innerHTML=`
92
+ `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label"),e=this.shadowRoot.querySelector(".card");if(t.setAttribute("tabindex","-1"),t.matches("label[for]")){var r=document.getElementById(t.getAttribute("for")).checked;r?e.classList.add("checked"):e.classList.remove("checked")}e.addEventListener("click",s=>{if(t.matches("label[for]")){s.stopPropagation(),s.preventDefault();var o=document.getElementById(t.getAttribute("for")),c=o.getAttribute("name"),n=o.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(c,'"][type="radio"]:not([id="').concat(n,'"])')));l.forEach((d,f)=>{var h=document.querySelector('[for="'.concat(d.getAttribute("id"),'"] iam-card'));h.dispatchEvent(new Event("inactive"))}),t.click();var i=o.checked;i?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",s=>{e.classList.remove("checked")}),e.addEventListener("keydown",s=>{switch(s.keyCode){case 32:case 13:if(t.matches("label[for]")){s.stopPropagation(),s.preventDefault();var o=document.getElementById(t.getAttribute("for")),c=o.getAttribute("name"),n=o.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(c,'"]:not([id="').concat(n,'"])')));l.forEach((d,f)=>{var h=document.querySelector('[for="'.concat(d.getAttribute("id"),'"] iam-card'));h.dispatchEvent(new Event("inactive"))}),t.click();var i=o.checked;i?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(t,e,r){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total").innerHTML=r;break}case"class":{var s=this.classList.toString();this.querySelector('[class*="fa-"]')&&(s+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(s));break}}}}function Pt(a,t){function e(r,s){var o=!1,c=s.getAttribute("name");c.includes("[]")&&(c=c.replace("[]","[".concat(s.value,"]")));var n=r.querySelector('[data-name="'.concat(c,'"]'));n&&s.getAttribute("type")=="checkbox"&&(o=!0);var l=s.getAttribute("data-filter-text");if(n||(n=document.createElement("button"),r.appendChild(n)),n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",c),n.innerHTML=l.replace("$value",s.value),(!s.value||o)&&n.remove(),s.parentNode.closest("[data-filter-text]")){var i=s.parentNode.closest("[data-filter-text]"),d=!0;if(c="",i.querySelectorAll("input").forEach((m,u)=>{var v=m.getAttribute("name");if(c+="".concat(u!=0?",":"").concat(v),r.querySelector('[data-name="'.concat(v,'"]'))&&r.querySelector('[data-name="'.concat(v,'"]')).remove(),m.value){var b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",v),b.innerHTML=l.replace("$value",m.value),r.appendChild(b)}else d=!1}),r.querySelector('[data-name="'.concat(c,'"]'))&&r.querySelector('[data-name="'.concat(c,'"]')).remove(),d){var f=i.getAttribute("data-filter-text");i.querySelectorAll("input").forEach((m,u)=>{var v=m.getAttribute("name");r.querySelector('[data-name="'.concat(v,'"]'))&&r.querySelector('[data-name="'.concat(v,'"]')).remove(),f=f.replace("$".concat(u+1),m.value)});var h=document.createElement("button");h.setAttribute("type","button"),h.classList.add("filter"),h.setAttribute("data-name",c),h.innerHTML=f,r.appendChild(h)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((r,s)=>{e(t,r)}),a.addEventListener("change",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest("input[data-filter-text]")){var s=r.target.closest("input[data-filter-text]");e(t,s)}},!1),t.addEventListener("click",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest(".filter")){for(var s=r.target.closest(".filter"),o=s.getAttribute("data-name").split(","),c=0;c<o.length;c++){var n=o[c],l='[name="'.concat(n,'"]');if(n.match(/\[(.*)\]/)){n.replace(/\[(.*)\]/,"[]");var i=n.replace(/.*\[(.*)\]/,"$1");l='[value="'.concat(i,'"]')}for(var d=a.querySelectorAll(l),f=0;f<d.length;f++){var h=d[f];if(h.getAttribute("type")!="radio"&&h.getAttribute("type")!="checkbox")h.value="";else{h.checked=!1;var r=new Event("force");h.closest("form").dispatchEvent(r)}}}s.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class Ot extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/applied-filters.css";'),s=this.classList.toString(),o=document.createElement("template");o.innerHTML=`
93
93
  <style>
94
94
  @import "`.concat(e,`";
95
95
  `).concat(r,`
@@ -97,7 +97,7 @@
97
97
  </style>
98
98
  <div class="applied-filters `).concat(s,`"></div>
99
99
  <slot></slot>
100
- `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){Pt(this,this.shadowRoot.querySelector(".applied-filters"))}}class Ot extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
100
+ `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){Pt(this,this.shadowRoot.querySelector(".applied-filters"))}}class Ft extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
101
101
  <style>
102
102
  @import "`.concat(e,`";
103
103
 
@@ -105,7 +105,7 @@
105
105
  </style>
106
106
  <div class="pagination__wrapper d-none">
107
107
  </div>
108
- `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",15),this.setAttribute("data-pages",Math.ceil(this.getAttribute("data-total")/this.getAttribute("data-show"))),M(this,this.shadowRoot.querySelector(".pagination__wrapper")),this.shadowRoot.querySelector(".pagination__wrapper").classList.remove("d-none")}}function Ft(a,t){Vt(a,t)}function Vt(a,t){var e;t.addEventListener("keyup",r=>{clearTimeout(e),e=setTimeout(function(){at(a,t.value)},500)}),t.addEventListener("change",r=>{clearTimeout(e),at(a,t.value)})}var at=function(t,e){Array.from(t.querySelectorAll(":scope > li")).forEach((r,s)=>{var o=r.textContent.toLowerCase();r.classList.add("d-none"),o.includes(e.toLowerCase())&&r.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:e})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class zt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
108
+ `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",this.querySelectorAll("table tbody tr").length),this.hasAttribute("data-page")||this.setAttribute("data-page",t.has("page")?t.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",t.has("show")?t.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",15),this.setAttribute("data-pages",Math.ceil(this.getAttribute("data-total")/this.getAttribute("data-show"))),M(this,this.shadowRoot.querySelector(".pagination__wrapper")),this.shadowRoot.querySelector(".pagination__wrapper").classList.remove("d-none")}}function Vt(a,t){Yt(a,t)}function Yt(a,t){var e;t.addEventListener("keyup",r=>{clearTimeout(e),e=setTimeout(function(){rt(a,t.value)},500)}),t.addEventListener("change",r=>{clearTimeout(e),rt(a,t.value)})}var rt=function(t,e){Array.from(t.querySelectorAll(":scope > li")).forEach((r,s)=>{var o=r.textContent.toLowerCase();r.classList.add("d-none"),o.includes(e.toLowerCase())&&r.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:e})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class zt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r=document.createElement("template");r.innerHTML=`
109
109
  <style>
110
110
  @import "`.concat(e,`";
111
111
  `).concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",`
@@ -132,7 +132,7 @@
132
132
  <div class="list__wrapper">
133
133
  <slot></slot>
134
134
  </div>
135
- `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString();this.shadowRoot.querySelector(".list__wrapper").setAttribute("class","list__wrapper ".concat(t)),this.querySelector("i.fa-search")||(this.innerHTML+='<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>'),Ft(this.querySelector("ul"),this.shadowRoot.querySelector("#search"))}}function Yt(a){if(a.hasAttribute("data-type")&&a.getAttribute("data-type")=="toast"){var t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),a.closest(".notification__holder")||t.appendChild(a)}if(a.setAttribute("role","alert"),a.addEventListener("click",function(s){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(s.preventDefault(),$(a))},!1),a.hasAttribute("data-timeout")){var e=a.getAttribute("data-timeout"),r=new $t(function(){$(a)},e);a.addEventListener("mouseenter",s=>{r.pause()}),a.addEventListener("mouseleave",s=>{r.resume()})}}function $t(a,t){var e,r,s=t;this.pause=function(){window.clearTimeout(e),s-=new Date-r},this.resume=function(){r=new Date,window.clearTimeout(e),e=window.setTimeout(a,s)},this.resume()}var $=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class Ut extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/notification.css";'),s=this.querySelectorAll("a,button");Array.from(s).forEach((c,n)=>{c.setAttribute("slot","btns"),c.classList.add("link")}),(s.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");var o=document.createElement("template");o.innerHTML=`
135
+ `),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString();this.shadowRoot.querySelector(".list__wrapper").setAttribute("class","list__wrapper ".concat(t)),this.querySelector("i.fa-search")||(this.innerHTML+='<i class="fa fa-light fa-search" aria-hidden="true" slot="icon"></i>'),Vt(this.querySelector("ul"),this.shadowRoot.querySelector("#search"))}}function $t(a){if(a.hasAttribute("data-type")&&a.getAttribute("data-type")=="toast"){var t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),a.closest(".notification__holder")||t.appendChild(a)}if(a.setAttribute("role","alert"),a.addEventListener("click",function(s){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(s.preventDefault(),U(a))},!1),a.hasAttribute("data-timeout")){var e=a.getAttribute("data-timeout"),r=new Ut(function(){U(a)},e);a.addEventListener("mouseenter",s=>{r.pause()}),a.addEventListener("mouseleave",s=>{r.resume()})}}function Ut(a,t){var e,r,s=t;this.pause=function(){window.clearTimeout(e),s-=new Date-r},this.resume=function(){r=new Date,window.clearTimeout(e),e=window.setTimeout(a,s)},this.resume()}var U=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class Gt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/notification.css";'),s=this.querySelectorAll("a,button");Array.from(s).forEach((c,n)=>{c.setAttribute("slot","btns"),c.classList.add("link")}),(s.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");var o=document.createElement("template");o.innerHTML=`
136
136
  <style>
137
137
  @import "`.concat(e,`";
138
138
  `).concat(r,`
@@ -144,5 +144,5 @@
144
144
  <div class="notification__inner"><div class="notification__text"><slot></slot></div>`).concat(s.length?'<div class="notification__btns"><slot name="btns"></slot></div>':"",`</div>
145
145
  `).concat(this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>':"",`
146
146
  </div>
147
- `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){var t=this.shadowRoot.querySelector("[data-dismiss-button]"),e=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";this.hasAttribute("data-type")?this.classList.add("bg-".concat(e)):this.classList.add("colour-".concat(e));var r=this;if(!this.querySelector("i"))switch(e){case"danger":this.innerHTML+='<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"warning":this.innerHTML+='<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"success":this.innerHTML+='<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>';break;default:this.innerHTML+='<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>'}Yt(r),t&&t.addEventListener("click",function(s){$(r)},!1)}}document.addEventListener("DOMContentLoaded",function(){dt(),R(document.body),rt(),ct(document.body),ut(document.body),window.customElements.get("iam-header")||window.customElements.define("iam-header",At),window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",wt),window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",Tt),window.customElements.get("iam-table")||window.customElements.define("iam-table",Bt),window.customElements.get("iam-card")||window.customElements.define("iam-card",It),window.customElements.get("iam-filterlist")||window.customElements.define("iam-filterlist",zt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",Ot),window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",jt),window.customElements.get("iam-notification")||window.customElements.define("iam-notification",Ut),Array.from(document.querySelectorAll(".nav")).forEach(a=>{ft(a)}),Array.from(document.querySelectorAll(".testimonial")).forEach(a=>{mt(a)}),Array.from(document.querySelectorAll(".carousel")).forEach(a=>{vt(a)}),Array.from(document.querySelectorAll("form")).forEach(a=>{gt(a)}),Array.from(document.querySelectorAll(".youtube-embed")).forEach(a=>{new nt(a)}),window.addEventListener("hashchange",function(){var a=location.hash.replace("#",""),t=document.querySelector('label[for="'.concat(a,'"]'));t instanceof HTMLElement&&t.click()},!1)})});
147
+ `),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){var t=this.shadowRoot.querySelector("[data-dismiss-button]"),e=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";this.hasAttribute("data-type")?this.classList.add("bg-".concat(e)):this.classList.add("colour-".concat(e));var r=this;if(!this.querySelector("i"))switch(e){case"danger":this.innerHTML+='<i class="fa-solid fa-circle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"warning":this.innerHTML+='<i class="fa-solid fa-triangle-exclamation" aria-hidden="true" slot="icon"></i>';break;case"success":this.innerHTML+='<i class="fa-solid fa-check-circle" aria-hidden="true" slot="icon"></i>';break;default:this.innerHTML+='<i class="fa-solid fa-circle-info" aria-hidden="true" slot="icon"></i>'}$t(r),t&&t.addEventListener("click",function(s){U(r)},!1)}}document.addEventListener("DOMContentLoaded",function(){ut(),R(document.body),st(),lt(document.body),ht(document.body),window.customElements.get("iam-header")||window.customElements.define("iam-header",Lt),window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",St),window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",_t),window.customElements.get("iam-table")||window.customElements.define("iam-table",It),window.customElements.get("iam-card")||window.customElements.define("iam-card",jt),window.customElements.get("iam-filterlist")||window.customElements.define("iam-filterlist",zt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",Ft),window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",Ot),window.customElements.get("iam-notification")||window.customElements.define("iam-notification",Gt),Array.from(document.querySelectorAll(".nav")).forEach(a=>{mt(a)}),Array.from(document.querySelectorAll(".testimonial")).forEach(a=>{vt(a)}),Array.from(document.querySelectorAll(".carousel")).forEach(a=>{bt(a)}),Array.from(document.querySelectorAll("form")).forEach(a=>{At(a)}),Array.from(document.querySelectorAll(".youtube-embed")).forEach(a=>{new ct(a)}),window.addEventListener("hashchange",function(){var a=location.hash.replace("#",""),t=document.querySelector('label[for="'.concat(a,'"]'));t instanceof HTMLElement&&t.click()},!1)})});
148
148
  //# sourceMappingURL=scripts.bundle.js.map