@iamproperty/components 5.6.1-beta9 → 5.7.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 (92) hide show
  1. package/assets/css/components/address-lookup.css +1 -1
  2. package/assets/css/components/address-lookup.css.map +1 -1
  3. package/assets/css/components/carousel.css +1 -1
  4. package/assets/css/components/carousel.css.map +1 -1
  5. package/assets/css/components/fileupload.css +1 -1
  6. package/assets/css/components/fileupload.css.map +1 -1
  7. package/assets/css/components/pagination.css +1 -1
  8. package/assets/css/components/pagination.css.map +1 -1
  9. package/assets/css/components/tabs.css +1 -1
  10. package/assets/css/components/tabs.css.map +1 -1
  11. package/assets/css/core.min.css +1 -1
  12. package/assets/css/core.min.css.map +1 -1
  13. package/assets/css/style.min.css +1 -1
  14. package/assets/css/style.min.css.map +1 -1
  15. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  16. package/assets/js/components/actionbar/actionbar.component.min.js +3 -3
  17. package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
  18. package/assets/js/components/address-lookup/address-lookup.component.js +21 -10
  19. package/assets/js/components/address-lookup/address-lookup.component.min.js +6 -5
  20. package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
  21. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  22. package/assets/js/components/card/card.component.js +39 -20
  23. package/assets/js/components/card/card.component.min.js +19 -19
  24. package/assets/js/components/card/card.component.min.js.map +1 -1
  25. package/assets/js/components/carousel/carousel.component.js +14 -1
  26. package/assets/js/components/carousel/carousel.component.min.js +5 -5
  27. package/assets/js/components/carousel/carousel.component.min.js.map +1 -1
  28. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  29. package/assets/js/components/fileupload/fileupload.component.js +16 -0
  30. package/assets/js/components/fileupload/fileupload.component.min.js +7 -5
  31. package/assets/js/components/fileupload/fileupload.component.min.js.map +1 -1
  32. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  33. package/assets/js/components/header/header.component.min.js +1 -1
  34. package/assets/js/components/inline-edit/inline-edit.component.js +2 -2
  35. package/assets/js/components/inline-edit/inline-edit.component.min.js +3 -3
  36. package/assets/js/components/inline-edit/inline-edit.component.min.js.map +1 -1
  37. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  38. package/assets/js/components/multiselect/multiselect.component.min.js +1 -1
  39. package/assets/js/components/nav/nav.component.min.js +1 -1
  40. package/assets/js/components/notification/notification.component.min.js +1 -1
  41. package/assets/js/components/pagination/pagination.component.min.js +3 -3
  42. package/assets/js/components/search/search.component.min.js +1 -1
  43. package/assets/js/components/search/search.component.min.js.map +1 -1
  44. package/assets/js/components/slider/slider.component.min.js +1 -1
  45. package/assets/js/components/table/table.component.js +16 -1
  46. package/assets/js/components/table/table.component.min.js +4 -4
  47. package/assets/js/components/table/table.component.min.js.map +1 -1
  48. package/assets/js/components/tabs/tabs.component.js +3 -1
  49. package/assets/js/components/tabs/tabs.component.min.js +8 -6
  50. package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
  51. package/assets/js/dynamic.min.js +4 -4
  52. package/assets/js/dynamic.min.js.map +1 -1
  53. package/assets/js/modules/carousel.js +30 -8
  54. package/assets/js/modules/dialogs.js +6 -0
  55. package/assets/js/modules/fileupload.js +44 -12
  56. package/assets/js/modules/helpers.js +30 -0
  57. package/assets/js/modules/inputs.js +1 -1
  58. package/assets/js/modules/table.js +6 -1
  59. package/assets/js/modules/tabs.js +84 -1
  60. package/assets/js/scripts.bundle.js +34 -32
  61. package/assets/js/scripts.bundle.js.map +1 -1
  62. package/assets/js/scripts.bundle.min.js +2 -2
  63. package/assets/js/scripts.bundle.min.js.map +1 -1
  64. package/assets/sass/_components.scss +14 -0
  65. package/assets/sass/components/address-lookup.scss +4 -0
  66. package/assets/sass/components/carousel.scss +31 -7
  67. package/assets/sass/components/fileupload.scss +0 -10
  68. package/assets/sass/components/pagination.scss +11 -16
  69. package/assets/sass/components/tabs.scss +38 -3
  70. package/assets/sass/elements/admin-panel.scss +44 -6
  71. package/assets/sass/elements/dialog.scss +1 -1
  72. package/assets/sass/elements/forms.scss +3 -2
  73. package/assets/ts/components/address-lookup/address-lookup.component.ts +25 -11
  74. package/assets/ts/components/card/card.component.ts +49 -23
  75. package/assets/ts/components/carousel/carousel.component.ts +17 -1
  76. package/assets/ts/components/fileupload/fileupload.component.ts +26 -0
  77. package/assets/ts/components/inline-edit/inline-edit.component.ts +2 -2
  78. package/assets/ts/components/table/table.component.ts +24 -1
  79. package/assets/ts/components/tabs/tabs.component.ts +3 -1
  80. package/assets/ts/modules/carousel.ts +40 -9
  81. package/assets/ts/modules/dialogs.ts +8 -0
  82. package/assets/ts/modules/fileupload.ts +64 -20
  83. package/assets/ts/modules/helpers.ts +29 -0
  84. package/assets/ts/modules/inputs.ts +1 -1
  85. package/assets/ts/modules/table.ts +8 -2
  86. package/assets/ts/modules/tabs.ts +116 -1
  87. package/dist/components.es.js +199 -193
  88. package/dist/components.umd.js +78 -68
  89. package/dist/style.css +1 -1
  90. package/package.json +1 -1
  91. package/src/components/Card/Card.vue +1 -1
  92. package/src/components/Carousel/Carousel.vue +5 -1
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * iamKey v5.6.1-beta9
2
+ * iamKey v5.7.0
3
3
  * Copyright 2022-2024 iamproperty
4
- */(function(j){typeof define=="function"&&define.amd?define(j):j()})(function(){"use strict";var j=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),ct=r=>{var t=function(a){var i=document.querySelector('label[for="'.concat(a.replace("#",""),'"]')),c=document.querySelector(a+" summary"),o=document.querySelector("dialog".concat(a)),n=document.querySelector("detail".concat(a));i instanceof HTMLElement?i.click():c instanceof HTMLElement?c.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&e.state.type=="pagination"){var a=document.querySelector("#".concat(e.state.form)),i=document.querySelector("#".concat(e.state.form," [data-pagination]"));i?i.value=e.state.page:a.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),a.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var a=e.target;Array.from(a.querySelectorAll("[data-password-type]")).forEach((i,c)=>{i.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault())}}),document.addEventListener("keydown",e=>{e.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach((e,a)=>{var i=e.closest("label");i.setAttribute("data-percent",e.getAttribute("value"))}),null},dt=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},lt=(r,t)=>String(r).padStart(t,"0"),ut=r=>r.charAt(0).toUpperCase()+r.slice(1),T=(r,t,e)=>t.split(/[\.\[\]\'\"]/).filter(a=>a).reduce((a,i)=>a?a[i]:e,r);class ht{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches("a")){e.preventDefault(),U(a);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,a)=>{var i=new Image;i.onload=function(){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(c,o),document.body.classList.add("youtubeLoaded"),e(!0),c.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),U(n.target.closest("a")))},!1)}},i.onerror=function(){a(!1)},i.src="https://youtube.com/favicon.ico"})}}var U=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),a=t.getAttribute("id");if(typeof a>"u"||a==null){var i=String.fromCharCode(65+Math.floor(Math.random()*26));a=i+Date.now(),t.setAttribute("id",a)}function c(){window.player=new YT.Player(a,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:o,onStateChange:d}})}c();function o(s){s.target.playVideo()}var n=!1;function d(s){if(s.data==YT.PlayerState.PLAYING&&!n){var l=document.getElementById(a);l.classList.add("player-ready"),n=!0}}},ft=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((t,e)=>{var a=t.closest(".dialog__wrapper");a||(t.removeAttribute("open"),t.showModal(),t.focus(),J(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var e=t.target.closest("[data-modal]"),a=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),i=document.querySelector("dialog#".concat(a));J(i),i.showModal(),i.focus();var c=i.offsetWidth;i.setAttribute("style","max-width: ".concat(c,"px;")),Array.from(i.querySelectorAll("[data-duplicate]")).forEach((y,C)=>{var S=y.getAttribute("data-duplicate"),k=document.getElementById(S);if(y.checked!=k.checked){y.checked=k.checked;var E=new Event("change");y.dispatchEvent(E)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:a})}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,C)=>{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 n=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((y,C)=>{y.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:n.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var d=t.target.closest("dialog[open]"),s=window.getComputedStyle(d);if(s.display==="contents"&&(d=d.parentNode.closest("dialog[open]")),!d.classList.contains("dialog--transactional")&&!d.classList.contains("dialog--acknowledgement")){var l=d.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest("dialog *")||d.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var u=t.target.closest(".dialog__wrapper > button"),b=u.parentNode,f="openPopover",h=b.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=h&&u.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((y,C)=>{y.removeAttribute("aria-expanded")}),h.hasAttribute("open"))h.close(),f="closePopover",h.removeAttribute("style"),u.removeAttribute("aria-expanded");else{h.show(),u.setAttribute("aria-expanded",!0);var m=u.getBoundingClientRect(),p=m.top,v=m.left;if(u.closest("iam-table")){var w=u.closest("iam-table").parentNode.getBoundingClientRect();p-=w.top,v-=w.left}h.classList.contains("dialog--fix")&&h.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(v,"px; margin: 3rem 0 0 0;"))}var g=h.getBoundingClientRect(),A=g.bottom-window.scrollY,L=window.innerHeight-window.scrollY;if(A>L){var q=h.hasAttribute("style")?h.getAttribute("style")+" ":"";h.setAttribute("style",q+"transform: translate(0, calc(-100% - 4rem))"),g=h.getBoundingClientRect();var x=g.top-window.scrollY;x<100&&h.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:f,id:u.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,C)=>{y.removeAttribute("aria-expanded")}))}),null),J=r=>{var t=r.querySelector(".youtube-embed a");if(t&&U(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&&bt(r),!r.querySelector(":scope .mh-lg")&&!r.classList.contains("dialog--multi")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var e=r.querySelector(".mh-lg"),a=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var i=a.previousSibling;e.before(a),i&&a.before(i)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},bt=r=>{var t="",e=Array.from(r.querySelectorAll("fieldset[data-title]")),a=r.querySelector("form");e.forEach((s,l)=>{t+='<button data-title="'.concat(s.getAttribute("data-title"),'" type="button" class="').concat(l==0?"active":"",'" tabindex="-1">').concat(s.getAttribute("data-title"),"</button>");var u=document.createElement("div");if(u.classList.add("btn--wrapper"),s.appendChild(u),l!=0&&(u.innerHTML+='<button data-title="'.concat(e[l-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),l!=e.length-1&&(u.innerHTML+='<button data-title="'.concat(e[l+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),l==e.length-1)if(a&&a.querySelector(':scope > button[type="submit"]')){var b=a.querySelector(':scope > button[type="submit"]');b.classList.add("mb-0"),u.insertAdjacentElement("beforeend",b)}else u.innerHTML+='<button data-title="'.concat(e[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),r.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var i=Array.from(r.querySelectorAll("fieldset.was-validated")),c=0;c<i.length;c++){var o=i[c],n=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("valid")})}r.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function d(s){var l=r.querySelector("fieldset.active")?r.querySelector("fieldset.active"):r.querySelector("fieldset[data-title]"),u=l.getAttribute("data-title"),b=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((v,w)=>{v.checkValidity()||(b=!1)}),b?Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((v,w)=>{v.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((v,w)=>{v.classList.remove("valid")}),b||!s.hasAttribute("data-next")){var f=r.querySelector('fieldset[data-title="'.concat(s.getAttribute("data-title"),'"]')),h=r.querySelector('.steps button[data-title="'.concat(s.getAttribute("data-title"),'"]'));Array.from(r.querySelectorAll("button")).forEach((v,w)=>{v.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((v,w)=>{v.classList.remove("active")}),h.classList.add("active"),f.classList.add("active")}var m=Array.from(r.querySelectorAll("fieldset")).length,p=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(p/(m-1)*100,"%"))}r.addEventListener("keydown",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest("button")){var l=s.target.closest("button");s.keyCode==13&&l.getAttribute("type")!="submit"&&(s.preventDefault(),d(l))}if(s&&s.target instanceof HTMLElement&&s.target.closest("input")){var u=s.target.closest("input");u.classList.remove("is-invalid"),s.keyCode==13&&s.preventDefault()}}),r.addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest('button[type="submit"]')){var l=s.target.closest("form");l.classList.add("was-validated")}else if(s&&s.target instanceof HTMLElement&&s.target.closest("button[data-title]")){var u=s.target.closest("button[data-title]");d(u)}return null})};function mt(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var t=r.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=r.target.closest("summary"),a=r.target.closest("a"),i=r.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),a&&window.dataLayer.push({event:"linkClicked",linkText:a.hasAttribute("title")?a.getAttribute("title")||"":a.textContent||"",class:a.hasAttribute("class")&&a.getAttribute("class")||"",href:a.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}function vt(r){var t=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",t).then(function(e){for(var a=[],i=new DataView(e),c=0;c<i.byteLength;c+=4){var o=i.getUint32(c),n=o.toString(16),d="00000000",s=(d+n).slice(-d.length);a.push(s)}return a.join("")})}var pt=(r,t)=>{vt(r).then(function(e){var a=new XMLHttpRequest;a.addEventListener("load",function(){var i=this.responseText.split(`
5
- `),c=e.slice(5).toUpperCase(),o=!1;for(var n in i)if(i[n].substring(0,35)==c){o=!0;break}var d=new CustomEvent("hibpCheck",{detail:o});t.dispatchEvent(d)}),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()})},gt=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((a,i)=>{a.parentElement,yt(a)}),Array.from(document.querySelectorAll("label input")).forEach((a,i)=>{!a.closest("label").querySelector(".optional-text")&&!a.hasAttribute("required")&&(a.parentNode.tagName.toLowerCase()=="span"?a.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):a.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))}),document.querySelector('input[type="date"]')){let a=function(i){var c=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),n=String(i.getDate()).padStart(2,"0");return"".concat(c,"-").concat(o,"-").concat(n)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((i,c)=>{var o=e;if(i.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(i.getAttribute("data-start"))),i.setAttribute("min",a(o))),i.hasAttribute("data-period")){var n=parseInt(i.getAttribute("data-period")),d=new Date;d.setDate(o.getDate()+n),i.setAttribute("max",a(d))}if(i.hasAttribute("data-allowed-days")){var s=JSON.parse("[".concat(i.getAttribute("data-allowed-days"),"]"));i.addEventListener("input",function(l){var u=new Date(this.value).getUTCDay();s.includes(u)?i.setCustomValidity(""):i.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&t(),document.onreadystatechange=()=>{document.readyState==="complete"&&t()},r.addEventListener("input",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){var a=e.target.closest("input,textarea,select");a.parentElement,a.hasAttribute("type")&&a.getAttribute("type")=="color"&&(a.nextElementSibling.value=a.value),a.hasAttribute("maxlength")&&a.nextElementSibling&&a.nextElementSibling.setAttribute("data-count",a.value.length),a.hasAttribute("data-strength-checker")&&At(a)}}),r.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){var a=e.target.closest("select");if(a.hasAttribute("data-change-type")&&a.hasAttribute("data-input")){var i=document.getElementById(a.getAttribute("data-input")),c=a.value;Q(i,c)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){var o=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((n,d)=>{n.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((n,d)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){var a=e.target.closest("[data-change-type]"),i=document.getElementById(a.getAttribute("data-input")),c=a.getAttribute("data-change-type");if(a.setAttribute("data-change-type",i.getAttribute("type")),Q(i,c),a.hasAttribute("data-alt-class")){var o=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",o)}}})},yt=r=>{var t=r.parentElement,e=r.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var a=r.nextElementSibling;(!a||a&&a.classList.contains("invalid-feedback"))&&(a=document.createElement("span"),t.insertBefore(a,r.nextSibling)),a.setAttribute("data-count",r.value.length)},Q=(r,t)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",t)},At=function r(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",a=document.getElementById(t.getAttribute("data-strength-checker")),i=t.value,c=t.hasAttribute("minlength")?t.getAttribute("minlength"):12,o=1,n=["Very weak","Weak","Average","Strong","Very strong"],d="";if(i.match(/(?=.*[0-9])/)&&(o+=1),i.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(o+=1),i.match(/(?=.*[a-z])/)&&(o+=1),i.match(/(?=.*[A-Z])/)&&(o+=1),i.length<c&&(o=1,d="(must be at least ".concat(c," characters.)")),o>=3&&e=="no"){let s=function(l,u){l.detail?r(u,"danger"):r(u,"success"),u.removeEventListener("hibpCheck",s)};pt(i,t),t.addEventListener("hibpCheck",function(l){s(l,t)})}else o>=3&&e=="danger"&&(o=3,d="(this password is very common)");a&&(o<=3?a.classList.add("invalid-feedback"):a.classList.remove("invalid-feedback"),a.setAttribute("data-strength",o),a.innerHTML="Password strength: ".concat(n[o-1]," ").concat(d))},wt=r=>{if(Array.from(r.querySelectorAll("details")).forEach((e,a)=>{e.addEventListener("mouseenter",function(i){window.matchMedia("(min-width: 62em)").matches&&e.setAttribute("open","true")},!1),e.addEventListener("mouseleave",function(i){window.matchMedia("(min-width: 62em)").matches&&e.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(e=>{var[a]=e;return a.target.classList.toggle("is-stuck",a.intersectionRatio<1)},{threshold:[1]});t.observe(r)}};function Lt(r){var t,e=r.querySelector(".testimonial__images"),a=e.querySelectorAll("img").length;if(a==1)return!1;r.classList.add("testimonial--multi");var i=function(o){var n=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");n.setAttribute("data-go",o+1),d.setAttribute("data-go",o-1),n.removeAttribute("disabled"),d.removeAttribute("disabled"),o==1?d.setAttribute("disabled",!0):o==a&&n.setAttribute("disabled",!0)};e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=e.scrollWidth,n=e.scrollHeight,d=e.scrollLeft,s=e.scrollTop,l=Math.round(d/o*a)+1;d==0&&s!=0&&(l=Math.round(s/n*a)+1),r.setAttribute("data-show",l),i(l)},300)},!1),r.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches("[data-go]")){var n=parseInt(o.getAttribute("data-go")),d=0,s=0,l=e.scrollWidth,u=e.scrollHeight;l>u?s=Math.floor(l*((n-1)/a)):d=Math.floor(u*((n-1)/a)),e.scroll({top:d,left:s,behavior:"smooth"});break}},!1)}function St(r,t){var e,a=r.querySelector(".carousel__inner"),i=r.querySelector(".carousel__controls"),c=t.querySelectorAll(".col").length;a.addEventListener("scroll",function(o){clearTimeout(e),e=setTimeout(function(){var n=a.clientWidth,d=a.scrollWidth,s=a.scrollLeft,l=Math.round(s/d*c)+1,u=t.querySelector(".col:last-child").offsetLeft+50;a.scrollLeft+n>=u&&(l=c),Array.from(r.querySelectorAll(".carousel__controls button")).forEach((b,f)=>{b.removeAttribute("aria-current")}),r.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?r.querySelector(".btn-prev").setAttribute("disabled","disabled"):r.querySelector(".btn-prev").removeAttribute("disabled"),l==c?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),i.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){o.preventDefault(),Array.from(i.querySelectorAll("button")).forEach((s,l)=>{s.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);var d=t.querySelector("*:nth-child(".concat(n.getAttribute("data-slide"),")"));a.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),r.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches(".btn-next, .btn-prev")){o.preventDefault();var d=n.classList.contains("btn-prev")?a.scrollLeft-a.clientWidth:a.scrollLeft+a.clientWidth;a.scroll({top:0,left:d,behavior:"smooth"});break}},!1)}function Et(r){r.addEventListener("change",function(t){var e=parseInt(r.querySelector("[data-min] select,[data-min] input").value),a=parseInt(r.querySelector("[data-max] select,[data-max] input").value);Array.from(r.querySelectorAll("[data-min] input")).forEach((i,c)=>{i.setAttribute("max",a)}),Array.from(r.querySelectorAll("[data-max] input")).forEach((i,c)=>{i.setAttribute("min",e)}),Array.from(r.querySelectorAll("[data-min] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))>a?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(r.querySelectorAll("[data-max] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function qt(r){r.addEventListener("change",function(t){if(r.matches("[data-value-if]")){var e=r.getAttribute("data-redirect"),a=r.getAttribute("data-value-if");r.value==a&&(document.location.href=e)}else typeof r.value<"u"&&(document.location.href=r.value)},!1)}function xt(r){var t=r.querySelector(".row"),e=t.cloneNode(!0),a=r.querySelector("[data-add]");r.addEventListener("click",function(i){for(var c=i.target;c&&c!=this;c=c.parentNode){if(c.matches("[data-add]")){var o=e.cloneNode(!0);r.insertBefore(o,c),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(c.matches("[data-delete]")){var n=c.closest(".row");n.remove(),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function kt(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,e)=>{Et(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,e)=>{qt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{xt(t)}),r.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 a=e.dataset.filesize;e.files[0].size>a&&(e.value="",alert("File too large"));break}},!1),r.addEventListener("change",function(t){Array.from(r.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(r.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});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"),a='@import "'.concat(t,'/css/components/header.css";'),i=document.createElement("template");i.innerHTML=`
4
+ */(function(I){typeof define=="function"&&define.amd?define(I):I()})(function(){"use strict";var I=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),ct=r=>{var t=function(a){var i=document.querySelector('label[for="'.concat(a.replace("#",""),'"]')),c=document.querySelector(a+" summary"),o=document.querySelector("dialog".concat(a)),n=document.querySelector("detail".concat(a));i instanceof HTMLElement?i.click():c instanceof HTMLElement?c.click():o instanceof HTMLElement?o.showModal():n instanceof HTMLElement&&n.addAttribute("open")};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&e.state.type=="pagination"){var a=document.querySelector("#".concat(e.state.form)),i=document.querySelector("#".concat(e.state.form," [data-pagination]"));i?i.value=e.state.page:a.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),a.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var a=e.target;Array.from(a.querySelectorAll("[data-password-type]")).forEach((i,c)=>{i.setAttribute("type","password")}),(a.querySelector(":invalid")||a.querySelector('.pwd-checker[data-strength="1"]')||a.querySelector('.pwd-checker[data-strength="2"]'))&&(a.classList.add("was-validated"),e.preventDefault()),a.querySelector("iam-multiselect[data-is-required][data-error]")&&(a.classList.add("was-validated"),e.preventDefault())}}),document.addEventListener("keydown",e=>{e.key==="Escape"&&document.querySelector(".dialog--transactional[open], .dialog--acknowledgement[open]")&&(e.preventDefault(),e.stopPropagation())}),Array.from(document.querySelectorAll("label progress")).forEach((e,a)=>{var i=e.closest("label");i.setAttribute("data-percent",e.getAttribute("value"))}),null},dt=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},lt=(r,t)=>String(r).padStart(t,"0"),ut=r=>r.charAt(0).toUpperCase()+r.slice(1),C=(r,t,e)=>t.split(/[\.\[\]\'\"]/).filter(a=>a).reduce((a,i)=>a?a[i]:e,r),ht=(r,t,e,a)=>{var i=Math.tan(.375*Math.PI),c=window.innerWidth||document.body.clientWidth,o=Math.max(1,Math.floor(.01*c)),n=e-r,d=a-t,s=Math.abs(n/d),l=Math.abs(d/n);if(Math.abs(n)>o||Math.abs(d)>o){if(l<=i)return n<0?"left":"right";if(s<=i)return d<0?"top":"bottom"}else return"tap"};class ft{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches("a")){e.preventDefault(),U(a);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,a)=>{var i=new Image;i.onload=function(){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(c,o),document.body.classList.add("youtubeLoaded"),e(!0),c.onload=()=>{t.addEventListener("click",function(n){console.log("click"),n&&n.target instanceof HTMLElement&&n.target.closest("a")&&(n.preventDefault(),U(n.target.closest("a")))},!1)}},i.onerror=function(){a(!1)},i.src="https://youtube.com/favicon.ico"})}}var U=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),a=t.getAttribute("id");if(typeof a>"u"||a==null){var i=String.fromCharCode(65+Math.floor(Math.random()*26));a=i+Date.now(),t.setAttribute("id",a)}function c(){window.player=new YT.Player(a,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:o,onStateChange:d}})}c();function o(s){s.target.playVideo()}var n=!1;function d(s){if(s.data==YT.PlayerState.PLAYING&&!n){var l=document.getElementById(a);l.classList.add("player-ready"),n=!0}}},bt=r=>(Array.from(r.querySelectorAll("dialog[open]")).forEach((t,e)=>{var a=t.closest(".dialog__wrapper");a||(t.removeAttribute("open"),t.showModal(),t.focus(),X(t))}),r.addEventListener("click",t=>{if(t.target.tagName=="IAM-ACTIONBAR")return!1;if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-modal]")){var e=t.target.closest("[data-modal]"),a=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),i=document.querySelector("dialog#".concat(a));X(i),i.showModal(),i.focus();var c=i.offsetWidth;i.setAttribute("style","max-width: ".concat(c,"px;")),Array.from(i.querySelectorAll("[data-duplicate]")).forEach((L,S)=>{var T=L.getAttribute("data-duplicate"),E=document.getElementById(T);if(L.checked!=E.checked){L.checked=E.checked;var M=new Event("change");L.dispatchEvent(M)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:a})}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((L,S)=>{L.classList.remove("active")});var n=new CustomEvent("dialog-closed",{bubbles:!0,cancelable:!0,detail:{modalId:o.id}});t.target.dispatchEvent(n),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 d=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((L,S)=>{L.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:d.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var s=t.target.closest("dialog[open]"),l=window.getComputedStyle(s);if(l.display==="contents"&&(s=s.parentNode.closest("dialog[open]")),!s.classList.contains("dialog--transactional")&&!s.classList.contains("dialog--acknowledgement")){var h=s.getBoundingClientRect();(t.clientX<h.left||t.clientX>h.right||t.clientY<h.top||t.clientY>h.bottom)&&(t.target.closest("dialog *")||s.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var b=t.target.closest(".dialog__wrapper > button"),v=b.parentNode,u="openPopover",f=v.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=f&&b.closest("dialog[open]")!=document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((L,S)=>{L.removeAttribute("aria-expanded")}),f.hasAttribute("open"))f.close(),u="closePopover",f.removeAttribute("style"),b.removeAttribute("aria-expanded");else{f.show(),b.setAttribute("aria-expanded",!0);var m=b.getBoundingClientRect(),p=m.top,y=m.left;if(b.closest("iam-table")){var g=b.closest("iam-table").parentNode.getBoundingClientRect();p-=g.top,y-=g.left}f.classList.contains("dialog--fix")&&f.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(y,"px; margin: 3rem 0 0 0;"))}var A=f.getBoundingClientRect(),q=A.bottom-window.scrollY,x=window.innerHeight-window.scrollY;if(q>x){var k=f.hasAttribute("style")?f.getAttribute("style")+" ":"";f.setAttribute("style",k+"transform: translate(0, calc(-100% - 4rem))"),A=f.getBoundingClientRect();var w=A.top-window.scrollY;w<100&&f.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:u,id:b.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((L,S)=>{L.removeAttribute("aria-expanded")}))}),null),X=r=>{var t=r.querySelector(".youtube-embed a");if(t&&U(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&&vt(r),!r.querySelector(":scope .mh-lg")&&!r.classList.contains("dialog--multi")){r.innerHTML='<div class="mh-lg">'.concat(r.innerHTML,"</div>");var e=r.querySelector(".mh-lg"),a=r.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){var i=a.previousSibling;e.before(a),i&&a.before(i)}}r.querySelector(":scope > button:first-child")||r.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},vt=r=>{var t="",e=Array.from(r.querySelectorAll("fieldset[data-title]")),a=r.querySelector("form");e.forEach((s,l)=>{t+='<button data-title="'.concat(s.getAttribute("data-title"),'" type="button" class="').concat(l==0?"active":"",'" tabindex="-1">').concat(s.getAttribute("data-title"),"</button>");var h=document.createElement("div");if(h.classList.add("btn--wrapper"),s.appendChild(h),l!=0&&(h.innerHTML+='<button data-title="'.concat(e[l-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),l!=e.length-1&&(h.innerHTML+='<button data-title="'.concat(e[l+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),l==e.length-1)if(a&&a.querySelector(':scope > button[type="submit"]')){var b=a.querySelector(':scope > button[type="submit"]');b.classList.add("mb-0"),h.insertAdjacentElement("beforeend",b)}else h.innerHTML+='<button data-title="'.concat(e[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),r.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var i=Array.from(r.querySelectorAll("fieldset.was-validated")),c=0;c<i.length;c++){var o=i[c],n=o.getAttribute("data-title");if(o.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(n,'"]'))).forEach((s,l)=>{s.classList.add("valid")})}r.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function d(s){var l=r.querySelector("fieldset.active")?r.querySelector("fieldset.active"):r.querySelector("fieldset[data-title]"),h=l.getAttribute("data-title"),b=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((p,y)=>{p.checkValidity()||(b=!1)}),b?Array.from(r.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((p,y)=>{p.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((p,y)=>{p.classList.remove("valid")}),b||!s.hasAttribute("data-next")){var v=r.querySelector('fieldset[data-title="'.concat(s.getAttribute("data-title"),'"]')),u=r.querySelector('.steps button[data-title="'.concat(s.getAttribute("data-title"),'"]'));Array.from(r.querySelectorAll("button")).forEach((p,y)=>{p.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((p,y)=>{p.classList.remove("active")}),u.classList.add("active"),v.classList.add("active")}var f=Array.from(r.querySelectorAll("fieldset")).length,m=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(m/(f-1)*100,"%"))}r.addEventListener("keydown",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest("button")){var l=s.target.closest("button");s.keyCode==13&&l.getAttribute("type")!="submit"&&(s.preventDefault(),d(l))}if(s&&s.target instanceof HTMLElement&&s.target.closest("input")){var h=s.target.closest("input");h.classList.remove("is-invalid"),s.keyCode==13&&s.preventDefault()}}),r.addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest('button[type="submit"]')){var l=s.target.closest("form");l.classList.add("was-validated")}else if(s&&s.target instanceof HTMLElement&&s.target.closest("button[data-title]")){var h=s.target.closest("button[data-title]");d(h)}return null})};function mt(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",r=>{var t=r.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=r.target.closest("summary"),a=r.target.closest("a"),i=r.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),a&&window.dataLayer.push({event:"linkClicked",linkText:a.hasAttribute("title")?a.getAttribute("title")||"":a.textContent||"",class:a.hasAttribute("class")&&a.getAttribute("class")||"",href:a.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}function pt(r){var t=new TextEncoder("utf-8").encode(r);return crypto.subtle.digest("SHA-1",t).then(function(e){for(var a=[],i=new DataView(e),c=0;c<i.byteLength;c+=4){var o=i.getUint32(c),n=o.toString(16),d="00000000",s=(d+n).slice(-d.length);a.push(s)}return a.join("")})}var gt=(r,t)=>{pt(r).then(function(e){var a=new XMLHttpRequest;a.addEventListener("load",function(){var i=this.responseText.split(`
5
+ `),c=e.slice(5).toUpperCase(),o=!1;for(var n in i)if(i[n].substring(0,35)==c){o=!0;break}var d=new CustomEvent("hibpCheck",{detail:o});t.dispatchEvent(d)}),a.open("GET","https://api.pwnedpasswords.com/range/"+e.substr(0,5)),a.send()})},yt=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength],textarea[maxlength]")).forEach((a,i)=>{a.parentElement,At(a)}),Array.from(document.querySelectorAll("label input")).forEach((a,i)=>{!a.closest("label").querySelector(".optional-text")&&!a.hasAttribute("required")&&(a.parentNode.tagName.toLowerCase()=="span"?a.parentElement.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'):a.insertAdjacentHTML("beforebegin",'<span class="optional-text"></span>'))}),document.querySelector('input[type="date"]')){let a=function(i){var c=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),n=String(i.getDate()).padStart(2,"0");return"".concat(c,"-").concat(o,"-").concat(n)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((i,c)=>{var o=e;if(i.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(i.getAttribute("data-start"))),i.setAttribute("min",a(o))),i.hasAttribute("data-period")){var n=parseInt(i.getAttribute("data-period")),d=new Date;d.setDate(o.getDate()+n),i.setAttribute("max",a(d))}if(i.hasAttribute("data-allowed-days")){var s=JSON.parse("[".concat(i.getAttribute("data-allowed-days"),"]"));i.addEventListener("input",function(l){var h=new Date(this.value).getUTCDay();s.includes(h)?i.setCustomValidity(""):i.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&t(),document.onreadystatechange=()=>{document.readyState==="complete"&&t()},r.addEventListener("input",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){var a=e.target.closest("input,textarea,select");a.parentElement,a.hasAttribute("type")&&a.getAttribute("type")=="color"&&(a.nextElementSibling.value=a.value),a.hasAttribute("maxlength")&&a.nextElementSibling&&a.nextElementSibling.setAttribute("data-count",a.value.length),a.hasAttribute("data-strength-checker")&&wt(a)}}),r.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){var a=e.target.closest("select");if(a.hasAttribute("data-change-type")&&a.hasAttribute("data-input")){var i=document.getElementById(a.getAttribute("data-input")),c=a.value;J(i,c)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){var o=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach((n,d)=>{n.removeAttribute("autofocus")}),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach((n,d)=>{n.setAttribute("autofocus",!0)})}}),r.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){var a=e.target.closest("[data-change-type]"),i=document.getElementById(a.getAttribute("data-input")),c=a.getAttribute("data-change-type");if(a.setAttribute("data-change-type",i.getAttribute("type")),J(i,c),a.hasAttribute("data-alt-class")){var o=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",o)}}})},At=r=>{var t=r.parentElement,e=r.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var a=r.nextElementSibling;(!a||a&&a.classList.contains("invalid-feedback"))&&(a=document.createElement("span"),t.insertBefore(a,r.nextSibling)),a.setAttribute("data-count",r.value.length)},J=(r,t)=>{r.hasAttribute("type")&&r.getAttribute("type")=="password"&&r.setAttribute("data-password-type",!0),r.setAttribute("type",t)},wt=function r(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"no",a=document.getElementById(t.getAttribute("data-strength-checker")),i=t.value,c=t.hasAttribute("minlength")?t.getAttribute("minlength"):12,o=1,n=["Very weak","Weak","Average","Strong","Very strong"],d="";if(i.match(/(?=.*[0-9])/)&&(o+=1),i.match(/(?=.*[!,%,&,#,$,^,*,?,_,~,<,>,])/)&&(o+=1),i.match(/(?=.*[a-z])/)&&(o+=1),i.match(/(?=.*[A-Z])/)&&(o+=1),i.length<c&&(o=1,d="(must be at least ".concat(c," characters.)")),o>=3&&e=="no"){let s=function(l,h){l.detail?r(h,"danger"):r(h,"success"),h.removeEventListener("hibpCheck",s)};gt(i,t),t.addEventListener("hibpCheck",function(l){s(l,t)})}else o>=3&&e=="danger"&&(o=3,d="(this password is very common)");a&&(o<=3?a.classList.add("invalid-feedback"):a.classList.remove("invalid-feedback"),a.setAttribute("data-strength",o),a.innerHTML="Password strength: ".concat(n[o-1]," ").concat(d))},Lt=r=>{if(Array.from(r.querySelectorAll("details")).forEach((e,a)=>{e.addEventListener("mouseenter",function(i){window.matchMedia("(min-width: 62em)").matches&&e.setAttribute("open","true")},!1),e.addEventListener("mouseleave",function(i){window.matchMedia("(min-width: 62em)").matches&&e.removeAttribute("open")},!1)}),"IntersectionObserver"in window){var t=new IntersectionObserver(e=>{var[a]=e;return a.target.classList.toggle("is-stuck",a.intersectionRatio<1)},{threshold:[1]});t.observe(r)}};function St(r){var t,e=r.querySelector(".testimonial__images"),a=e.querySelectorAll("img").length;if(a==1)return!1;r.classList.add("testimonial--multi");var i=function(o){var n=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");n.setAttribute("data-go",o+1),d.setAttribute("data-go",o-1),n.removeAttribute("disabled"),d.removeAttribute("disabled"),o==1?d.setAttribute("disabled",!0):o==a&&n.setAttribute("disabled",!0)};e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=e.scrollWidth,n=e.scrollHeight,d=e.scrollLeft,s=e.scrollTop,l=Math.round(d/o*a)+1;d==0&&s!=0&&(l=Math.round(s/n*a)+1),r.setAttribute("data-show",l),i(l)},300)},!1),r.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches("[data-go]")){var n=parseInt(o.getAttribute("data-go")),d=0,s=0,l=e.scrollWidth,h=e.scrollHeight;l>h?s=Math.floor(l*((n-1)/a)):d=Math.floor(h*((n-1)/a)),e.scroll({top:d,left:s,behavior:"smooth"});break}},!1)}function Et(r,t){var e,a=r.querySelector(".carousel__inner"),i=r.querySelector(".carousel__controls"),c=t.querySelectorAll(":scope > .col").length;a.addEventListener("scroll",function(o){clearTimeout(e),e=setTimeout(function(){var n=a.clientWidth,d=a.scrollWidth,s=a.scrollLeft,l=Math.round(s/d*c)+1,h=t.querySelector(":scope > .col").scrollWidth,b=t.querySelector(":scope > .col:last-child").offsetLeft,v=a.scrollLeft+n+a.getBoundingClientRect().left>=b+60,u=Math.round(n/h),f=Math.ceil(c/u)*u-c;f>0&&v&&(l=Math.floor(c/u)*u+1),Array.from(r.querySelectorAll(".carousel__controls button")).forEach((m,p)=>{m.removeAttribute("aria-current")}),r.querySelector(".control-"+l).setAttribute("aria-current",!0),l==1?r.querySelector(".btn-prev").setAttribute("disabled","disabled"):r.querySelector(".btn-prev").removeAttribute("disabled"),l>c-u?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),i.addEventListener("click",function(o){for(var n=o.target;n&&n!=this;n=n.parentNode)if(typeof n.matches=="function"&&n.matches("button")){o.preventDefault(),Array.from(i.querySelectorAll("button")).forEach((s,l)=>{s.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);var d=t.querySelector(":scope > *:nth-child(".concat(n.getAttribute("data-slide"),")"));a.scroll({top:0,left:d.offsetLeft-a.getBoundingClientRect().left,behavior:"smooth"});break}},!1),r.addEventListener("click",function(o){var n=a.clientWidth;a.scrollWidth;for(var d=t.querySelector(":scope > .col").scrollWidth,s=Math.round(n/d),l=t.querySelector(":scope > .col:last-child").offsetLeft,h=a.scrollLeft+n+a.getBoundingClientRect().left>=l+60,b=Math.ceil(c/s)*s-c,v=s-b,u=h&&b>0?v*d:a.clientWidth,f=o.target;f&&f!=this;f=f.parentNode)if(typeof f.matches=="function"&&f.matches(".btn-next, .btn-prev")){o.preventDefault();var m=f.classList.contains("btn-prev")?a.scrollLeft-u:a.scrollLeft+a.clientWidth;a.scroll({top:0,left:m,behavior:"smooth"});break}},!1)}function qt(r){r.addEventListener("change",function(t){var e=parseInt(r.querySelector("[data-min] select,[data-min] input").value),a=parseInt(r.querySelector("[data-max] select,[data-max] input").value);Array.from(r.querySelectorAll("[data-min] input")).forEach((i,c)=>{i.setAttribute("max",a)}),Array.from(r.querySelectorAll("[data-max] input")).forEach((i,c)=>{i.setAttribute("min",e)}),Array.from(r.querySelectorAll("[data-min] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))>a?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(r.querySelectorAll("[data-max] select option")).forEach((i,c)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function xt(r){r.addEventListener("change",function(t){if(r.matches("[data-value-if]")){var e=r.getAttribute("data-redirect"),a=r.getAttribute("data-value-if");r.value==a&&(document.location.href=e)}else typeof r.value<"u"&&(document.location.href=r.value)},!1)}function kt(r){var t=r.querySelector(".row"),e=t.cloneNode(!0),a=r.querySelector("[data-add]");r.addEventListener("click",function(i){for(var c=i.target;c&&c!=this;c=c.parentNode){if(c.matches("[data-add]")){var o=e.cloneNode(!0);r.insertBefore(o,c),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(c.matches("[data-delete]")){var n=c.closest(".row");n.remove(),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function Tt(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,e)=>{qt(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,e)=>{xt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{kt(t)}),r.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 a=e.dataset.filesize;e.files[0].size>a&&(e.value="",alert("File too large"));break}},!1),r.addEventListener("change",function(t){Array.from(r.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(r.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,a)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):r,c=e.dataset.activeif,o=e.dataset.equals,n=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));n.value==o?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class Ct 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"),a='@import "'.concat(t,'/css/components/header.css";'),i=document.createElement("template");i.innerHTML=`
6
6
  <style>
7
7
  @import "`.concat(e,`";
8
8
  `).concat(a,`
@@ -16,7 +16,7 @@
16
16
  <slot></slot>
17
17
  </div>
18
18
  </div>
19
- `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){this.classList.add("bg-primary");var t=this.shadowRoot.querySelector("picture"),e=this.shadowRoot.querySelector("picture img");this.hasAttribute("image")?e.setAttribute("src",this.getAttribute("image")):t.remove()}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class Ct 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"),a=document.createElement("template");a.innerHTML=`
19
+ `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){this.classList.add("bg-primary");var t=this.shadowRoot.querySelector("picture"),e=this.shadowRoot.querySelector("picture img");this.hasAttribute("image")?e.setAttribute("src",this.getAttribute("image")):t.remove()}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class Mt 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"),a=document.createElement("template");a.innerHTML=`
20
20
  <style>
21
21
  @import "`.concat(e,`";
22
22
 
@@ -31,7 +31,7 @@
31
31
  }
32
32
  </style>
33
33
  <slot></slot>
34
- `),this.shadowRoot.appendChild(a.content.cloneNode(!0))}connectedCallback(){if(!this.classList.contains("accordion--keep-open")){var t=this.querySelectorAll(":scope > details");t.forEach(e=>{e.addEventListener("toggle",()=>{t.forEach(a=>{a!==e&&e.hasAttribute("open")&&a.removeAttribute("open")})})})}}}var Mt=function(t){t.querySelectorAll(":scope > details");var e=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");var a=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(a=t.shadowRoot.querySelector(".tabs__links")),!a){a=document.createElement("div"),a.classList.add("tabs__links");var i=document.createElement("div");i.classList.add("tabs__links__wrapper"),i.prepend(a),t.prepend(i)}var c=0;e.forEach((o,n)=>{var d=document.createElement("button");if(o.matches("details")){var s=o.querySelector(":scope > summary"),l=s.classList.contains("disabled");s.classList.add("visually-hidden"),o.hasAttribute("id")&&d.setAttribute("data-id","".concat(o.getAttribute("id"))),o.hasAttribute("open")&&d.setAttribute("aria-pressed",!0),d.innerHTML="".concat(s.innerText),d.classList.add("link"),d.setAttribute("data-index",c),o.setAttribute("tabindex","-1"),l&&d.classList.add("disabled"),c++}else o.matches("a")&&(d=o);d.classList.add("link"),a.appendChild(d)})},Ht=function(t){var e=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > details > summary"),i=t.querySelectorAll(":scope .tabs__links > button");t.shadowRoot&&(i=t.shadowRoot.querySelectorAll(".tabs__links > button")),i.forEach(c=>{c.addEventListener("click",o=>{if(o.preventDefault(),c.classList.contains("disabled"))return!1;i.forEach(n=>{var d=n==c;n.setAttribute("aria-pressed",d)}),e.forEach((n,d)=>{var s=c.getAttribute("data-index")==d;s?n.setAttribute("open",s):n.removeAttribute("open")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:c.textContent})})}),a.forEach((c,o)=>{c.addEventListener("click",n=>{n.preventDefault(),i[o].click()})})},_t=function(t){if(!t.querySelector(":scope > details"))return!1;var e=t.querySelectorAll(":scope > details"),a=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector('.tabs__links [data-id="'.concat(location.hash.replace("#",""),'"]'))?(t.shadowRoot.querySelector('[data-id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("aria-pressed",!0),t.querySelector('details[id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("open",!0)):t.querySelector("details[open]")||(e[0].setAttribute("open",!0),a[0].setAttribute("aria-pressed",!0))},Rt=function(t){Mt(t),Ht(t),_t(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class Dt 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"),a='@import "'.concat(t,'/css/components/tabs.css";'),i=document.createElement("template");i.innerHTML=`
34
+ `),this.shadowRoot.appendChild(a.content.cloneNode(!0))}connectedCallback(){if(!this.classList.contains("accordion--keep-open")){var t=this.querySelectorAll(":scope > details");t.forEach(e=>{e.addEventListener("toggle",()=>{t.forEach(a=>{a!==e&&e.hasAttribute("open")&&a.removeAttribute("open")})})})}}}var Ht=function(t){t.querySelectorAll(":scope > details");var e=t.querySelectorAll(":scope > details, :scope > a");t.querySelectorAll(":scope > details > summary");var a=t.querySelector(":scope > .tabs__links");if(t.shadowRoot&&t.shadowRoot.querySelector(".tabs__links")&&(a=t.shadowRoot.querySelector(".tabs__links")),!a){a=document.createElement("div"),a.classList.add("tabs__links");var i=document.createElement("div");i.classList.add("tabs__links__wrapper"),i.prepend(a),t.prepend(i)}var c=0;e.forEach((o,n)=>{var d=document.createElement("button");if(o.matches("details")){var s=o.querySelector(":scope > summary"),l=s.classList.contains("disabled");s.classList.add("visually-hidden"),o.hasAttribute("id")&&d.setAttribute("data-id","".concat(o.getAttribute("id"))),o.hasAttribute("open")&&d.setAttribute("aria-pressed",!0),d.innerHTML="".concat(s.innerText),d.classList.add("link"),d.setAttribute("data-index",c),o.setAttribute("tabindex","-1"),l&&d.classList.add("disabled"),c++}else o.matches("a")&&(d=o);d.classList.add("link"),a.appendChild(d)})},_t=function(t){var e=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > details > summary"),i=t.querySelector(":scope .tabs__links"),c=t.querySelectorAll(":scope .tabs__links > button"),o=t.querySelector(":scope .tabs__next"),n,d=!1,s=!1;if(t.shadowRoot&&(c=t.shadowRoot.querySelectorAll(".tabs__links > button"),i=t.shadowRoot.querySelector(".tabs__links"),o=t.shadowRoot.querySelector(":scope .tabs__next")),i.addEventListener("scroll",function(u){if(s)return s=!1,!1;clearTimeout(n);var f=c[0];n=setTimeout(function(){var m=Math.abs(f.getBoundingClientRect().left);c.forEach(p=>{Math.abs(p.getBoundingClientRect().left)<m&&(m=Math.abs(p.getBoundingClientRect().left),f=p)}),d=!0,f.click(),f.focus()},100)},!1),c.forEach(u=>{u.addEventListener("click",f=>{if(f.preventDefault(),s=!0,u.classList.contains("disabled"))return!1;c.forEach(m=>{var p=m==u;m.setAttribute("aria-pressed",p)}),d||i.scroll({top:0,left:u.offsetLeft,behavior:"smooth"}),d=!1,e.forEach((m,p)=>{var y=u.getAttribute("data-index")==p;y?m.setAttribute("open",y):m.removeAttribute("open")}),u.matches(":last-child")?o.setAttribute("disabled","disabled"):o.removeAttribute("disabled"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:u.textContent})})}),a.forEach((u,f)=>{u.addEventListener("click",m=>{m.preventDefault(),c[f].click()})}),o.addEventListener("click",u=>{u.preventDefault();var f=i.querySelector('[aria-pressed="true"]'),m=f.nextSibling;m&&m.click()}),t.classList.contains("tabs--guided")){var l=0,h=0,b=0,v=0;e.forEach(u=>{u.addEventListener("touchstart",f=>{f.stopPropagation(),l=f.changedTouches[0].screenX,h=f.changedTouches[0].screenY}),u.addEventListener("touchend",f=>{f.stopPropagation(),b=f.changedTouches[0].screenX,v=f.changedTouches[0].screenY;var m=ht(l,h,b,v),p=i.querySelector('[aria-pressed="true"]');switch(m){case"left":var y=p.nextSibling;y&&y.click();break;case"right":var g=p.previousSibling;g&&g.click();break}})})}},Rt=function(t){if(!t.querySelector(":scope > details"))return!1;var e=t.querySelectorAll(":scope > details"),a=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector('.tabs__links [data-id="'.concat(location.hash.replace("#",""),'"]'))?(t.shadowRoot.querySelector('[data-id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("aria-pressed",!0),t.querySelector('details[id="'.concat(location.hash.replace("#",""),'"]')).setAttribute("open",!0)):t.querySelector("details[open]")||(e[0].setAttribute("open",!0),a[0].setAttribute("aria-pressed",!0))},Dt=function(t){Ht(t),_t(t),Rt(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class Nt 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"),a='@import "'.concat(t,'/css/components/tabs.css";'),i=document.createElement("template");i.innerHTML=`
35
35
  <style>
36
36
  @import "`.concat(e,`";
37
37
  `).concat(a,`
@@ -42,14 +42,16 @@
42
42
 
43
43
  `).concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",`
44
44
  </style>
45
- <div class="tabs">
45
+ <link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
46
+ <div class="tabs" part="tabs">
46
47
  <div class="tabs__links__wrapper">
47
48
  <div class="tabs__links"></div>
48
49
  </div>
49
50
  <slot></slot>
51
+ <button part="next-button" class="btn btn-secondary btn-sm btn-compact fa-regular fa-chevron-right tabs__next">Next</button>
50
52
  </div>
51
- `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class","tabs ".concat(t)),Rt(this)}}var Nt=function(r,t,e,a){function i(c){return c instanceof e?c:new e(function(o){o(c)})}return new(e||(e=Promise))(function(c,o){function n(l){try{s(a.next(l))}catch(u){o(u)}}function d(l){try{s(a.throw(l))}catch(u){o(u)}}function s(l){l.done?c(l.value):i(l.value).then(n,d)}s((a=a.apply(r,t||[])).next())})},Z=r=>{var t=Array.from(r.querySelectorAll("thead th")),e=Array.from(r.querySelectorAll("tbody tr"));e.forEach((a,i)=>{var c=Array.from(a.querySelectorAll("th, td")),o=["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"];c.forEach((n,d)=>{var s=t[d];if(typeof s<"u"){var l=document.createElement("div");l.innerHTML=s.innerHTML;var u=l.textContent||l.innerText||"";n.setAttribute("data-label",u),s.hasAttribute("data-td-class")&&n.setAttribute("class",s.getAttribute("data-td-class")),s.hasAttribute("data-format")&&(n.setAttribute("data-format",s.getAttribute("data-format")),n.innerHTML=$(s.getAttribute("data-format"),n.textContent.trim())),o.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},jt=r=>{var t=0;return Array.from(r.querySelectorAll("tbody tr")).forEach((e,a)=>{var i=window.getComputedStyle(document.querySelector("html")),c=e.querySelector(":scope > *:last-child > *:first-child");if(c){c.classList.add("text-nowrap");var o=c.offsetWidth/parseFloat(i.fontSize);o+=1.7,t=t>o?t:o}}),t},It=(r,t)=>{if(t.classList.contains("table--fullwidth")&&!t.hasAttribute("data-expandable")||r.querySelectorAll("thead tr th").length<4&&!t.hasAttribute("data-expandable"))return!1;Array.from(r.querySelectorAll("thead tr")).forEach((e,a)=>{r.querySelectorAll("thead tr th.expand-button-heading").length||e.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(r.querySelectorAll("tbody tr")).forEach((e,a)=>{var i=e.getAttribute("data-view")==="full"?"aria-expanded":"";e.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button '.concat(i,">Expand</button></td>"))})},Bt=r=>{r.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-expand-button]")){var e=t.target.closest("[data-expand-button]"),a=e.closest("tr");e.toggleAttribute("aria-expanded"),a.getAttribute("data-view")=="full"?a.setAttribute("data-view","default"):a.setAttribute("data-view","full"),e.blur()}})},K=(r,t)=>{var e=t.querySelector("input[data-search]");if(!e)return!1;var a=e.getAttribute("id"),i=e.getAttribute("data-search").split(","),c=e.parentNode,o={};i.forEach((n,d)=>{Array.from(r.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((s,l)=>{s.querySelector(".td__content")?o[s.querySelector(".td__content").textContent]=s.querySelector(".td__content").textContent:o[s.textContent]=s.textContent})}),e.setAttribute("list","".concat(a,"_list")),e.setAttribute("autocomplete","off"),c.querySelector("datalist")||(c.innerHTML+='<datalist id="'.concat(a,'_list"></datalist>')),c.querySelector("datalist").innerHTML="".concat(Object.keys(o).map(n=>'<option value="'.concat(n,'"></option>')).join(""))},Pt=(r,t,e,a,i)=>{var c,o=function(l){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(console.log("submit"),t.classList.contains("processing"))return!1;if(Array.from(t.querySelectorAll("iam-applied-filters")).forEach((p,v)=>{var w=new Event("tags-set");p.dispatchEvent(w)}),l.type=="submit"&&(t.classList.add("processing"),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((p,v)=>{var w=p.getAttribute("data-duplicate"),g=document.getElementById(w),A=document.querySelector('[for="'.concat(w,'"] iam-card'));if(g.checked!=p.checked)if(A){var L=new Event("click");A.dispatchEvent(L)}else g.checked=p.checked}),t.classList.remove("processing")),t.hasAttribute("data-ajax")){if(!u){var b=t.querySelector("[data-pagination]");b.value=1,a.setAttribute("data-page",1)}et(r,t,e,a)}else t.hasAttribute("data-submit")?t.submit():(Y(r,t,a),I(r,t));if(t.hasAttribute("data-ajax-post")){var f=new FormData(t),h=new URLSearchParams(f).toString(),m=new XMLHttpRequest;m.open("GET","".concat(window.location.href,"?ajax=true&").concat(h)),m.send()}};t.querySelector("iam-actionbar[data-search]")&&t.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",s=>{t.querySelector("input[data-search]")?t.querySelector("input[data-search]").value=s.detail.search:t.insertAdjacentHTML("beforeend",'<input type="hidden" name="search" data-search="'.concat(t.querySelector("iam-actionbar[data-search]").getAttribute("data-search"),'" value="').concat(s.detail.search,'"/>')),clearTimeout(c),o(s)}),t.addEventListener("keyup",s=>{clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&(c=setTimeout(function(){o(s)},500))}),t.addEventListener("change",s=>{if(clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest("[data-sort]")&&(t.hasAttribute("data-submit")||V(r,t,i),o(s)),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter][data-no-ajax]")?(Y(r,t,a),I(r,t)):(s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&s.target.closest("form .dialog__wrapper > dialog")||s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&!s.target.closest("form dialog"))&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-show]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-mimic]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.hasAttribute("id")){var l=s.target.getAttribute("id");document.querySelector('[data-duplicate="'.concat(l,'"]'))&&(document.querySelector('[data-duplicate="'.concat(l,'"]')).checked=s.target.checked)}}),t.addEventListener("click",s=>{if(clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest('dialog button:not([type="button"])')){var l=s.target.closest('dialog button:not([type="button"])'),u=l.closest("dialog");u.close()}if(s&&s.target instanceof HTMLElement&&s.target.closest(".dialog__close")&&(s.preventDefault(),s.stopPropagation()),s&&s.target instanceof HTMLElement&&s.target.closest("[data-clear]")){t.classList.add("processing"),Array.from(t.querySelectorAll(".applied-filters")).forEach((A,L)=>{A.innerHTML=""});for(var b=t.elements,f=0;f<b.length;f++){var h=b[f].type.toLowerCase()?b[f].type.toLowerCase():"text";switch(h){case"text":case"password":case"textarea":b[f].value="";break;case"radio":case"checkbox":if(b[f].checked){var m=b[f],p=m.getAttribute("id"),v=document.querySelector('[for="'.concat(p,'"'));if(v.querySelector("iam-card")){var w=v.querySelector("iam-card"),g=new Event("click");w.dispatchEvent(g)}m.checked=!1}break;case"select-one":case"select-multi":b[f].selectedIndex=-1;break}}t.classList.remove("processing"),t.hasAttribute("data-submit")||V(r,t,i),o(s)}}),t.addEventListener("submit",s=>{clearTimeout(c),t.hasAttribute("data-submit")||s.preventDefault(),o(s)}),t.addEventListener("force",s=>{o(s)}),t.addEventListener("paginate",s=>{o(s,!0)});var n=[],d=[];Array.from(t.querySelectorAll("[data-mimic]")).forEach((s,l)=>{var u=s.getAttribute("data-mimic");Array.from(document.querySelectorAll('[name="'.concat(u,'"]'))).forEach((b,f)=>{var h=b.closest("form");n.includes(h)||n.push(h),d.includes(u)||d.push(u)})}),n.forEach((s,l)=>{var u=function(){var f=[],h=new FormData(s);for(var[m,p]of h)document.querySelector('[data-mimic="'.concat(m,'"]'))&&!f.includes(m)?(f.push(m),document.querySelector('[data-mimic="'.concat(m,'"]')).value=p):document.querySelector('[data-mimic="'.concat(m,'"]'))&&(document.querySelector('[data-mimic="'.concat(m,'"]')).value+=","+p);for(var v of f){var w=new Event("force");t.dispatchEvent(w)}for(var g of d)if(!h.has(g)&&s.querySelector('[name="'.concat(g,'"]'))){document.querySelector('[data-mimic="'.concat(g,'"]')).value="";var A=new Event("force");t.dispatchEvent(A)}};s.addEventListener("force",b=>{u()}),s.addEventListener("change",b=>{u()})})},V=(r,t,e)=>{if(t.getAttribute("data-ajax"))return!1;var a=r.querySelector("tbody"),i=t.querySelector('input[type="radio"][data-sort]:checked');if(t.querySelector("select[data-sort]")){var c=t.querySelector("select[data-sort]");i=t.querySelector("select[data-sort] option:nth-child(".concat(c.selectedIndex+1,")"))}var o=i.getAttribute("data-sort"),n=i.getAttribute("data-order"),d=i.getAttribute("data-format");if(!o)return a.innerHTML=e.innerHTML,Z(r),!1;var s=[];["asc","desc","descending"].includes(n)||(s=n.split(","));var l=[];Array.from(a.querySelectorAll("tr")).forEach((b,f)=>{var h=b.querySelector('td[data-label="'+o+'"], th[data-label="'+o+'"]').textContent.trim();b.querySelector('[data-label="'+o+'"] .td__content')&&(h=b.querySelector('[data-label="'+o+'"] .td__content').textContent.trim()),s.length&&s.includes(h)&&(h=s.indexOf(h)),dt(h)&&(h=lt(h,10)),d&&d=="date"&&(h=new Date(h));var m={index:h,row:b};l.push(m)}),l.sort((b,f)=>b.index>f.index?1:-1),(n=="descending"||n=="desc")&&(l=l.reverse());var u="";l.forEach((b,f)=>{u+=b.row.outerHTML}),a.innerHTML=u},Y=(r,t,e)=>{r.classList.remove("table--filtered");var a=tt(t),i=[],c=0,o=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(r.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("input[data-search]")){var d=t.querySelector("input[data-search]"),s=t.querySelector("input[data-search]").getAttribute("data-search").split(",");s.forEach((h,m)=>{i.push({column:"".concat(h.trim()),value:"".concat(d.value)})})}Array.from(t.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});var l=0;Object.values(a).forEach((h,m)=>{typeof h=="object"&&Object.values(h).length?l+=Object.values(h).length:l++}),l&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach((h,m)=>{h.innerHTML+="(".concat(l,")"),h.parentNode.classList.add("hover")}),r.classList.add("table--filtered");var u=function(m,p){Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).forEach((v,w)=>{var g=!1;p.forEach((A,L)=>{var q=v.querySelector('[data-label="'.concat(m,'"]'));if(A.includes("-date-from")){var x=new Date(A.replace("-date-from","")),y=new Date(q.textContent.toLowerCase());x.setHours(0,0,0,0),y.setHours(0,0,0,0),y<x?(v.classList.add("less-than-from-date"),g=!1):!v.classList.contains("less-than-from-date")&&!v.classList.contains("greater-than-to-date")&&(g=!0)}else if(A.includes("-date-to")){var C=new Date(A.replace("-date-to","")),S=new Date(q.textContent.toLowerCase());C.setHours(0,0,0,0),S.setHours(0,0,0,0),S>C?(v.classList.add("greater-than-to-date"),g=!1):!v.classList.contains("less-than-from-date")&&!v.classList.contains("greater-than-to-date")&&(g=!0)}if(A&&A=="$today")A=$("date",new Date);else if(A&&A=="$yesterday"){var k=new Date;k.setDate(k.getDate()-1),A=$("date",k)}else if(A&&(A=="$thisWeek"||A=="$lastWeek")){var E=new Date,_=new Date(E.setDate(E.getDate()-(E.getDay()-1))),R=new Date(E.setDate(E.getDate()-E.getDay()+7)),M=new Date(q.textContent.toLowerCase());if(E.setHours(0,0,0,0),_.setHours(0,0,0,0),R.setHours(0,0,0,0),M.setHours(0,0,0,0),A=="$thisWeek")g=M>=_&&M<=R;else{var D=new Date(_.setDate(_.getDate()-7)),G=new Date(R.setDate(R.getDate()-7));D.setHours(0,0,0,0),G.setHours(0,0,0,0),g=M>=D&&M<=G}}else if(A&&A=="$thisMonth"){var B=new Date,H=B.getFullYear(),P=B.getMonth(),O=new Date(H,P,1),F=new Date(H,P+1,0),N=new Date(q.textContent.toLowerCase());O.setHours(0,0,0,0),F.setHours(0,0,0,0),N.setHours(0,0,0,0),g=N>=O&&N<=F}else if(A&&A=="$lastMonth"){var rt=new Date,st=rt.getFullYear(),it=rt.getMonth(),ot=new Date(st,it-1,1),nt=new Date(st,it,0),X=new Date(q.textContent.toLowerCase());ot.setHours(0,0,0,0),nt.setHours(0,0,0,0),X.setHours(0,0,0,0),g=X>=ot&&X<=nt}q&&q.textContent.toLowerCase().includes(A.replace("-"," ").toLowerCase())&&(g=!0)}),g||(v.classList.add("filtered"),v.setAttribute("data-filtered-by",m))})};for(var[b,f]of Object.entries(a))u(b,f);Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).forEach((h,m)=>{var p=!(i.length>0&&i[0].value.length>=3);i.forEach((v,w)=>{var g=h.querySelector('[data-label="'.concat(v.column,'"]'));g&&v.value.length>=3&&g.textContent.toLowerCase().includes(v.value.toLowerCase())&&(p=!0)}),p||h.classList.add("filtered")}),Array.from(r.querySelectorAll("tbody tr:not(.filtered")).forEach((h,m)=>{c++,h.classList.add("filtered--matched");var p=Math.ceil(c/n);p==parseInt(o)&&h.classList.add("filtered--show")}),e&&(e.setAttribute("data-total",c),e.setAttribute("data-show",n),e.setAttribute("data-page",o))},I=(r,t,e)=>{var a=Array.from(t.querySelectorAll("[data-query]"));a.forEach((i,c)=>{var o=i.getAttribute("data-query"),n=0;if(o=="total")e.hasAttribute("data-total")?n=e.getAttribute("data-total"):n=(r.classList.contains("table--filtered"),r.querySelectorAll("tbody tr").length);else if(!o.includes(" == ")&&o.includes(" & ")){var d=o.split(" & "),s="";d.forEach(b=>{s+=':not([data-filtered-by="'.concat(b,'"])')}),n=Array.from(r.querySelectorAll("tbody tr".concat(s))).length}else if(!o.includes(" == "))n=Array.from(r.querySelectorAll('tbody tr:not([data-filtered-by="'.concat(o,'"])'))).length;else if(o.includes(" && ")){var l=o.split(" && ");n=Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).filter(function(b){var f=!0;for(var[h,m]of Object.entries(l)){var p=m.split(" == ");(!b.querySelector('td[data-label="'.concat(p[0],'"]'))||b.querySelector('td[data-label="'.concat(p[0],'"]')).textContent!="".concat(p[1]))&&(f=!1)}return f}).length}else{var u=o.split(" == ");n=Array.from(r.querySelectorAll('tbody tr.filtered--matched td[data-label="'.concat(u[0],'"], tbody tr[data-filtered-by="').concat(u[0],'"] td[data-label="').concat(u[0],'"]'))).filter(function(b){return b.textContent===u[1]}).length}i.hasAttribute("data-total")?i.setAttribute("data-total",n):i.innerHTML=n})},Ot=function(t,e,a,i){a.addEventListener("update-page",c=>{var o=e.querySelector("[data-pagination]"),n=c.detail.page;if(o.value=n,e.dispatchEvent(new Event("paginate")),i.setAttribute("data-page",n),t.hasAttribute("data-show-history")){var d=new URL(location);d.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",d)}if(!i.hasAttribute("data-no-scroll")){var s=-250,l=t.getBoundingClientRect().top+window.pageYOffset+s;window.scrollTo({top:l,behavior:"smooth"})}}),a.addEventListener("update-show",c=>{var o=e.querySelector("[data-show]"),n=c.detail.show;o.value=n,i.setAttribute("data-show",n),e.dispatchEvent(new Event("submit"))})},Ft=(r,t)=>{if(!r)return!1;r.addEventListener("click",e=>{Ut(t)})},Ut=function(t){for(var e=[],a=t.getElementsByTagName("tr"),i=0;i<a.length;i++){for(var c=a[i].querySelectorAll("td,th"),o=[],n=0;n<c.length;n++)o.push('"'.concat(c[n].textContent,'"'));e.push(o.join(","))}e=e.join(`
52
- `);var d=new Blob([e],{type:"text/csv"}),s=document.createElement("a");s.download="export.csv";var l=window.URL.createObjectURL(d);s.href=l,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},W=function(t,e,a,i){if(Z(t),It(t,i),I(t,e,i),i&&i.classList.contains("table--cta")){let o=function(){Array.from(t.querySelectorAll("tr")).forEach((n,d)=>{var s=n.offsetHeight;n.style.setProperty("--row-height","".concat(s,"px"))})};var c=jt(t);i.style.setProperty("--cta-width","".concat(c,"rem")),new ResizeObserver(o).observe(t)}},tt=function(t){var e=new Object,a=Array.from(t.querySelectorAll("[data-filter]"));return a.forEach((i,c)=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){var o=i.getAttribute("data-filter"),n=i.value;i.hasAttribute("data-date-from")&&(n+="-date-from"),i.hasAttribute("data-date-to")&&(n+="-date-to"),e[o]||(e[o]=new Array),e[o].push(n)}}),e},et=function(t,e,a,i){return Nt(this,void 0,void 0,function*(){var c=new FormData(e),o=new URLSearchParams(c).toString(),n=t.querySelectorAll("thead tr th:not(.expand-button-heading)"),d=t.querySelector("tbody"),s=e.getAttribute("data-ajax");i.classList.add("table--loading");var l=tt(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((f,h)=>{f.innerHTML="",f.parentNode.classList.remove("hover")});var u=0;Object.values(l).forEach((f,h)=>{typeof f=="object"&&Object.values(f).length?u+=Object.values(f).length:u++}),u&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((f,h)=>{f.innerHTML+="(".concat(u,")"),f.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[s]&&window.controller[s].abort(),window.controller[s]=new AbortController;var{signal:b}=controller[s];a.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(s+"?"+o,{signal:b,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(f=>f.json()).then(f=>{var h=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",m=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",v=T(f,m,15),w=T(f,p,1),g=T(f,h),A=i.hasAttribute("data-empty-msg")?i.getAttribute("data-empty-msg"):"No results found";g?(d.innerHTML="",g.forEach((L,q)=>{var x=document.createElement("tr");n.forEach((y,C)=>{var S="",k=document.createElement("td");if(k.setAttribute("data-label",y.innerText),y.getAttribute("data-output")){var E=y.getAttribute("data-output");S=E.replace(new RegExp(/{(.*?)}/,"gm"),function(M){return T(L,M.replace("{","").replace("}",""))})}if(y.hasAttribute("data-output-array")){var E=y.getAttribute("data-output"),_=T(L,E.replace("{","").replace("}",""));S="",_.forEach((D,G)=>{var B=y.getAttribute("data-output-array"),H="";if(y.hasAttribute("data-output-array-property")&&y.hasAttribute("data-output-array-transform")){var P=T(D,y.getAttribute("data-output-array-property")),O=JSON.parse(y.getAttribute("data-output-array-transform")),F=O[P];H=B.replace("{".concat(y.getAttribute("data-output-array-property"),"}"),F)}H=H.replace(new RegExp(/{(.*?)}/,"gm"),function(N){return T(D,N.replace("{","").replace("}",""))}),S+=H})}if(y.hasAttribute("data-transform")){var R=JSON.parse(y.getAttribute("data-transform"));S=R[S],!S&&y.hasAttribute("data-default")&&(S=y.getAttribute("data-default"))}k.innerHTML=S,x.appendChild(k)}),d.appendChild(x)}),K(t,e),i.setAttribute("data-total",parseInt(v)),i.setAttribute("data-page",parseInt(w)),W(t,e,a,i),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((L,q)=>{var x=T(f,L.getAttribute("data-ajax-query"),"");L.hasAttribute("data-total")?L.setAttribute("data-total",x):L.innerHTML=x}),parseInt(v)==0&&(d.innerHTML='<tr><td colspan="100%"><span>'.concat(A,"</span></td></tr>")),i.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:s,formData:o})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',a.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(f){console.log(f)}})},$=(r,t)=>{switch(r){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",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return t=ut(t)}};class Yt 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"),a='@import "'.concat(t,'/css/components/table.css";'),i='@import "'.concat(t,'/css/components/table.global.css";'),c=document.createElement("template");c.innerHTML=`
53
+ `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class","tabs ".concat(t)),Dt(this)}}var It=function(r,t,e,a){function i(c){return c instanceof e?c:new e(function(o){o(c)})}return new(e||(e=Promise))(function(c,o){function n(l){try{s(a.next(l))}catch(h){o(h)}}function d(l){try{s(a.throw(l))}catch(h){o(h)}}function s(l){l.done?c(l.value):i(l.value).then(n,d)}s((a=a.apply(r,t||[])).next())})},Q=r=>{var t=Array.from(r.querySelectorAll("thead th")),e=Array.from(r.querySelectorAll("tbody tr"));e.forEach((a,i)=>{var c=Array.from(a.querySelectorAll("th, td")),o=["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"];c.forEach((n,d)=>{var s=t[d];if(typeof s<"u"){var l=document.createElement("div");l.innerHTML=s.innerHTML;var h=l.textContent||l.innerText||"";n.setAttribute("data-label",h),s.hasAttribute("data-td-class")&&n.setAttribute("class",s.getAttribute("data-td-class")),s.hasAttribute("data-format")&&(n.setAttribute("data-format",s.getAttribute("data-format")),n.innerHTML=$(s.getAttribute("data-format"),n.textContent.trim())),o.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},jt=r=>{var t=0;return Array.from(r.querySelectorAll("tbody tr")).forEach((e,a)=>{var i=window.getComputedStyle(document.querySelector("html")),c=e.querySelector(":scope > *:last-child > *:first-child");if(c){c.classList.add("text-nowrap");var o=c.offsetWidth/parseFloat(i.fontSize);o+=1.7,t=t>o?t:o}}),t},Bt=(r,t)=>{if(t.classList.contains("table--fullwidth")&&!t.hasAttribute("data-expandable")||r.querySelectorAll("thead tr th").length<4&&!t.hasAttribute("data-expandable"))return!1;Array.from(r.querySelectorAll("thead tr")).forEach((e,a)=>{r.querySelectorAll("thead tr th.expand-button-heading").length||e.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(r.querySelectorAll("tbody tr")).forEach((e,a)=>{var i=e.getAttribute("data-view")==="full"?"aria-expanded":"";e.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button '.concat(i,">Expand</button></td>"))})},Pt=r=>{r.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-expand-button]")){var e=t.target.closest("[data-expand-button]"),a=e.closest("tr");e.toggleAttribute("aria-expanded"),a.getAttribute("data-view")=="full"?a.setAttribute("data-view","default"):a.setAttribute("data-view","full"),e.blur()}})},Z=(r,t)=>{var e=t.querySelector("input[data-search]");if(!e)return!1;var a=e.getAttribute("id"),i=e.getAttribute("data-search").split(","),c=e.parentNode,o={};i.forEach((n,d)=>{Array.from(r.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((s,l)=>{s.querySelector(".td__content")?o[s.querySelector(".td__content").textContent]=s.querySelector(".td__content").textContent:o[s.textContent]=s.textContent})}),e.setAttribute("list","".concat(a,"_list")),e.setAttribute("autocomplete","off"),c.querySelector("datalist")||(c.innerHTML+='<datalist id="'.concat(a,'_list"></datalist>')),c.querySelector("datalist").innerHTML="".concat(Object.keys(o).map(n=>'<option value="'.concat(n,'"></option>')).join(""))},Ot=(r,t,e,a,i)=>{var c,o=function(l){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(a.hasAttribute("data-no-submit")||t.classList.contains("processing"))return!1;if(Array.from(t.querySelectorAll("iam-applied-filters")).forEach((m,p)=>{var y=new Event("tags-set");m.dispatchEvent(y)}),l.type=="submit"&&(t.classList.add("processing"),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((m,p)=>{var y=m.getAttribute("data-duplicate"),g=document.getElementById(y),A=document.querySelector('[for="'.concat(y,'"] iam-card'));if(g.checked!=m.checked)if(A){var q=new Event("click");A.dispatchEvent(q)}else g.checked=m.checked}),t.classList.remove("processing")),t.hasAttribute("data-ajax")){if(!h){var b=t.querySelector("[data-pagination]");b.value=1,a.setAttribute("data-page",1)}et(r,t,e,a)}else t.hasAttribute("data-submit")?t.submit():(Y(r,t,a),j(r,t));if(t.hasAttribute("data-ajax-post")){var v=new FormData(t),u=new URLSearchParams(v).toString(),f=new XMLHttpRequest;f.open("GET","".concat(window.location.href,"?ajax=true&").concat(u)),f.send()}};t.querySelector("iam-actionbar[data-search]")&&t.querySelector("iam-actionbar[data-search]").addEventListener("search-submit",s=>{t.querySelector("input[data-search]")?t.querySelector("input[data-search]").value=s.detail.search:t.insertAdjacentHTML("beforeend",'<input type="hidden" name="search" data-search="'.concat(t.querySelector("iam-actionbar[data-search]").getAttribute("data-search"),'" value="').concat(s.detail.search,'"/>')),clearTimeout(c),o(s)}),t.addEventListener("keyup",s=>{clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&(c=setTimeout(function(){o(s)},500))}),t.addEventListener("change",s=>{if(clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest("[data-sort]")&&(t.hasAttribute("data-submit")||K(r,t,i),o(s)),s&&s.target instanceof HTMLElement&&s.target.closest("input[data-search]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter][data-no-ajax]")?(Y(r,t,a),j(r,t)):(s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&s.target.closest("form .dialog__wrapper > dialog")||s&&s.target instanceof HTMLElement&&s.target.closest("[data-filter]")&&!s.target.closest("form dialog"))&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-show]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.closest("[data-mimic]")&&o(s),s&&s.target instanceof HTMLElement&&s.target.hasAttribute("id")){var l=s.target.getAttribute("id");document.querySelector('[data-duplicate="'.concat(l,'"]'))&&(document.querySelector('[data-duplicate="'.concat(l,'"]')).checked=s.target.checked)}}),t.addEventListener("click",s=>{if(clearTimeout(c),s&&s.target instanceof HTMLElement&&s.target.closest('dialog button:not([type="button"])')){var l=s.target.closest('dialog button:not([type="button"])'),h=l.closest("dialog");h.close()}if(s&&s.target instanceof HTMLElement&&s.target.closest(".dialog__close")&&(s.preventDefault(),s.stopPropagation()),s&&s.target instanceof HTMLElement&&s.target.closest("[data-clear]")){t.classList.add("processing"),Array.from(t.querySelectorAll(".applied-filters")).forEach((A,q)=>{A.innerHTML=""});for(var b=t.elements,v=0;v<b.length;v++){var u=b[v].type.toLowerCase()?b[v].type.toLowerCase():"text";switch(u){case"text":case"password":case"textarea":b[v].value="";break;case"radio":case"checkbox":if(b[v].checked){var f=b[v],m=f.getAttribute("id"),p=document.querySelector('[for="'.concat(m,'"'));if(p.querySelector("iam-card")){var y=p.querySelector("iam-card"),g=new Event("click");y.dispatchEvent(g)}f.checked=!1}break;case"select-one":case"select-multi":b[v].selectedIndex=-1;break}}t.classList.remove("processing"),t.hasAttribute("data-submit")||K(r,t,i),o(s)}}),t.addEventListener("submit",s=>{clearTimeout(c),t.hasAttribute("data-submit")||s.preventDefault(),o(s)}),t.addEventListener("force",s=>{o(s)}),t.addEventListener("paginate",s=>{o(s,!0)});var n=[],d=[];Array.from(t.querySelectorAll("[data-mimic]")).forEach((s,l)=>{var h=s.getAttribute("data-mimic");Array.from(document.querySelectorAll('[name="'.concat(h,'"]'))).forEach((b,v)=>{var u=b.closest("form");n.includes(u)||n.push(u),d.includes(h)||d.push(h)})}),n.forEach((s,l)=>{var h=function(){var v=[],u=new FormData(s);for(var[f,m]of u)document.querySelector('[data-mimic="'.concat(f,'"]'))&&!v.includes(f)?(v.push(f),document.querySelector('[data-mimic="'.concat(f,'"]')).value=m):document.querySelector('[data-mimic="'.concat(f,'"]'))&&(document.querySelector('[data-mimic="'.concat(f,'"]')).value+=","+m);for(var p of v){var y=new Event("force");t.dispatchEvent(y)}for(var g of d)if(!u.has(g)&&s.querySelector('[name="'.concat(g,'"]'))){document.querySelector('[data-mimic="'.concat(g,'"]')).value="";var A=new Event("force");t.dispatchEvent(A)}};s.addEventListener("force",b=>{h()}),s.addEventListener("change",b=>{h()})})},K=(r,t,e)=>{if(t.getAttribute("data-ajax"))return!1;var a=r.querySelector("tbody"),i=t.querySelector('input[type="radio"][data-sort]:checked');if(t.querySelector("select[data-sort]")){var c=t.querySelector("select[data-sort]");i=t.querySelector("select[data-sort] option:nth-child(".concat(c.selectedIndex+1,")"))}var o=i.getAttribute("data-sort"),n=i.getAttribute("data-order"),d=i.getAttribute("data-format");if(!o)return a.innerHTML=e.innerHTML,Q(r),!1;var s=[];["asc","desc","descending"].includes(n)||(s=n.split(","));var l=[];Array.from(a.querySelectorAll("tr")).forEach((b,v)=>{var u=b.querySelector('td[data-label="'+o+'"], th[data-label="'+o+'"]').textContent.trim();b.querySelector('[data-label="'+o+'"] .td__content')&&(u=b.querySelector('[data-label="'+o+'"] .td__content').textContent.trim()),s.length&&s.includes(u)&&(u=s.indexOf(u)),dt(u)&&(u=lt(u,10)),d&&d=="date"&&(u=new Date(u));var f={index:u,row:b};l.push(f)}),l.sort((b,v)=>b.index>v.index?1:-1),(n=="descending"||n=="desc")&&(l=l.reverse());var h="";l.forEach((b,v)=>{h+=b.row.outerHTML}),a.innerHTML=h},Y=(r,t,e)=>{r.classList.remove("table--filtered");var a=tt(t),i=[],c=0,o=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(r.querySelectorAll("tbody tr")).forEach((u,f)=>{u.classList.remove("filtered"),u.classList.remove("filtered--matched"),u.classList.remove("filtered--show"),u.removeAttribute("data-filtered-by")}),t.querySelector("input[data-search]")){var d=t.querySelector("input[data-search]"),s=t.querySelector("input[data-search]").getAttribute("data-search").split(",");s.forEach((u,f)=>{i.push({column:"".concat(u.trim()),value:"".concat(d.value)})})}Array.from(t.querySelectorAll("[data-filter-count]")).forEach((u,f)=>{u.innerHTML="",u.parentNode.classList.remove("hover")});var l=0;Object.values(a).forEach((u,f)=>{typeof u=="object"&&Object.values(u).length?l+=Object.values(u).length:l++}),l&&Array.from(t.querySelectorAll("[data-filter-count]")).forEach((u,f)=>{u.innerHTML+="(".concat(l,")"),u.parentNode.classList.add("hover")}),r.classList.add("table--filtered");var h=function(f,m){Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).forEach((p,y)=>{var g=!1;m.forEach((A,q)=>{var x=p.querySelector('[data-label="'.concat(f,'"]'));if(A.includes("-date-from")){var k=new Date(A.replace("-date-from","")),w=new Date(x.textContent.toLowerCase());k.setHours(0,0,0,0),w.setHours(0,0,0,0),w<k?(p.classList.add("less-than-from-date"),g=!1):!p.classList.contains("less-than-from-date")&&!p.classList.contains("greater-than-to-date")&&(g=!0)}else if(A.includes("-date-to")){var L=new Date(A.replace("-date-to","")),S=new Date(x.textContent.toLowerCase());L.setHours(0,0,0,0),S.setHours(0,0,0,0),S>L?(p.classList.add("greater-than-to-date"),g=!1):!p.classList.contains("less-than-from-date")&&!p.classList.contains("greater-than-to-date")&&(g=!0)}if(A&&A=="$today")A=$("date",new Date);else if(A&&A=="$yesterday"){var T=new Date;T.setDate(T.getDate()-1),A=$("date",T)}else if(A&&(A=="$thisWeek"||A=="$lastWeek")){var E=new Date,M=new Date(E.setDate(E.getDate()-(E.getDay()-1))),R=new Date(E.setDate(E.getDate()-E.getDay()+7)),H=new Date(x.textContent.toLowerCase());if(E.setHours(0,0,0,0),M.setHours(0,0,0,0),R.setHours(0,0,0,0),H.setHours(0,0,0,0),A=="$thisWeek")g=H>=M&&H<=R;else{var D=new Date(M.setDate(M.getDate()-7)),G=new Date(R.setDate(R.getDate()-7));D.setHours(0,0,0,0),G.setHours(0,0,0,0),g=H>=D&&H<=G}}else if(A&&A=="$thisMonth"){var B=new Date,_=B.getFullYear(),P=B.getMonth(),O=new Date(_,P,1),F=new Date(_,P+1,0),N=new Date(x.textContent.toLowerCase());O.setHours(0,0,0,0),F.setHours(0,0,0,0),N.setHours(0,0,0,0),g=N>=O&&N<=F}else if(A&&A=="$lastMonth"){var rt=new Date,st=rt.getFullYear(),it=rt.getMonth(),ot=new Date(st,it-1,1),nt=new Date(st,it,0),W=new Date(x.textContent.toLowerCase());ot.setHours(0,0,0,0),nt.setHours(0,0,0,0),W.setHours(0,0,0,0),g=W>=ot&&W<=nt}x&&x.textContent.toLowerCase().includes(A.replace("-"," ").toLowerCase())&&(g=!0)}),g||(p.classList.add("filtered"),p.setAttribute("data-filtered-by",f))})};for(var[b,v]of Object.entries(a))h(b,v);Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).forEach((u,f)=>{var m=!(i.length>0&&i[0].value.length>=3);i.forEach((p,y)=>{var g=u.querySelector('[data-label="'.concat(p.column,'"]'));g&&p.value.length>=3&&g.textContent.toLowerCase().includes(p.value.toLowerCase())&&(m=!0)}),m||u.classList.add("filtered")}),Array.from(r.querySelectorAll("tbody tr:not(.filtered")).forEach((u,f)=>{c++,u.classList.add("filtered--matched");var m=Math.ceil(c/n);m==parseInt(o)&&u.classList.add("filtered--show")}),e&&(e.setAttribute("data-total",c),e.setAttribute("data-show",n),e.setAttribute("data-page",o))},j=(r,t,e)=>{var a=Array.from(t.querySelectorAll("[data-query]"));a.forEach((i,c)=>{var o=i.getAttribute("data-query"),n=0;if(o=="total")e.hasAttribute("data-total")?n=e.getAttribute("data-total"):n=(r.classList.contains("table--filtered"),r.querySelectorAll("tbody tr").length);else if(!o.includes(" == ")&&o.includes(" & ")){var d=o.split(" & "),s="";d.forEach(b=>{s+=':not([data-filtered-by="'.concat(b,'"])')}),n=Array.from(r.querySelectorAll("tbody tr".concat(s))).length}else if(!o.includes(" == "))n=Array.from(r.querySelectorAll('tbody tr:not([data-filtered-by="'.concat(o,'"])'))).length;else if(o.includes(" && ")){var l=o.split(" && ");n=Array.from(r.querySelectorAll("tbody tr:not(.filtered)")).filter(function(b){var v=!0;for(var[u,f]of Object.entries(l)){var m=f.split(" == ");(!b.querySelector('td[data-label="'.concat(m[0],'"]'))||b.querySelector('td[data-label="'.concat(m[0],'"]')).textContent!="".concat(m[1]))&&(v=!1)}return v}).length}else{var h=o.split(" == ");n=Array.from(r.querySelectorAll('tbody tr.filtered--matched td[data-label="'.concat(h[0],'"], tbody tr[data-filtered-by="').concat(h[0],'"] td[data-label="').concat(h[0],'"]'))).filter(function(b){return b.textContent===h[1]}).length}i.hasAttribute("data-total")?i.setAttribute("data-total",n):i.innerHTML=n})},Ft=function(t,e,a,i){if(i.hasAttribute("data-no-submit"))return!1;a.addEventListener("update-page",c=>{var o=e.querySelector("[data-pagination]"),n=c.detail.page;if(o.value=n,e.dispatchEvent(new Event("paginate")),i.setAttribute("data-page",n),t.hasAttribute("data-show-history")){var d=new URL(location);d.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",d)}if(!i.hasAttribute("data-no-scroll")){var s=-250,l=t.getBoundingClientRect().top+window.pageYOffset+s;window.scrollTo({top:l,behavior:"smooth"})}}),a.addEventListener("update-show",c=>{var o=e.querySelector("[data-show]"),n=c.detail.show;o.value=n,i.setAttribute("data-show",n),e.dispatchEvent(new Event("submit"))})},Ut=(r,t)=>{if(!r)return!1;r.addEventListener("click",e=>{Yt(t)})},Yt=function(t){for(var e=[],a=t.getElementsByTagName("tr"),i=0;i<a.length;i++){for(var c=a[i].querySelectorAll("td,th"),o=[],n=0;n<c.length;n++)o.push('"'.concat(c[n].textContent,'"'));e.push(o.join(","))}e=e.join(`
54
+ `);var d=new Blob([e],{type:"text/csv"}),s=document.createElement("a");s.download="export.csv";var l=window.URL.createObjectURL(d);s.href=l,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)},V=function(t,e,a,i){if(Q(t),Bt(t,i),j(t,e,i),i&&i.classList.contains("table--cta")){let o=function(){Array.from(t.querySelectorAll("tr")).forEach((n,d)=>{var s=n.offsetHeight;n.style.setProperty("--row-height","".concat(s,"px"))})};var c=jt(t);i.style.setProperty("--cta-width","".concat(c,"rem")),new ResizeObserver(o).observe(t)}},tt=function(t){var e=new Object,a=Array.from(t.querySelectorAll("[data-filter]"));return a.forEach((i,c)=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){var o=i.getAttribute("data-filter"),n=i.value;i.hasAttribute("data-date-from")&&(n+="-date-from"),i.hasAttribute("data-date-to")&&(n+="-date-to"),e[o]||(e[o]=new Array),e[o].push(n)}}),e},et=function(t,e,a,i){return It(this,void 0,void 0,function*(){var c=new FormData(e),o=new URLSearchParams(c).toString(),n=t.querySelectorAll("thead tr th:not(.expand-button-heading)"),d=t.querySelector("tbody"),s=e.getAttribute("data-ajax");i.classList.add("table--loading");var l=tt(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((v,u)=>{v.innerHTML="",v.parentNode.classList.remove("hover")});var h=0;Object.values(l).forEach((v,u)=>{typeof v=="object"&&Object.values(v).length?h+=Object.values(v).length:h++}),h&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((v,u)=>{v.innerHTML+="(".concat(h,")"),v.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[s]&&window.controller[s].abort(),window.controller[s]=new AbortController;var{signal:b}=controller[s];a.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(s+"?"+o,{signal:b,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(v=>v.json()).then(v=>{var u=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",f=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",m=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",p=C(v,f,15),y=C(v,m,1),g=C(v,u),A=i.hasAttribute("data-empty-msg")?i.getAttribute("data-empty-msg"):"No results found";g?(d.innerHTML="",g.forEach((q,x)=>{var k=document.createElement("tr");n.forEach((w,L)=>{var S="",T=document.createElement("td");if(T.setAttribute("data-label",w.innerText),w.getAttribute("data-output")){var E=w.getAttribute("data-output");S=E.replace(new RegExp(/{(.*?)}/,"gm"),function(H){return C(q,H.replace("{","").replace("}",""))})}if(w.hasAttribute("data-output-array")){var E=w.getAttribute("data-output"),M=C(q,E.replace("{","").replace("}",""));S="",M.forEach((D,G)=>{var B=w.getAttribute("data-output-array"),_="";if(w.hasAttribute("data-output-array-property")&&w.hasAttribute("data-output-array-transform")){var P=C(D,w.getAttribute("data-output-array-property")),O=JSON.parse(w.getAttribute("data-output-array-transform")),F=O[P];_=B.replace("{".concat(w.getAttribute("data-output-array-property"),"}"),F)}_=_.replace(new RegExp(/{(.*?)}/,"gm"),function(N){return C(D,N.replace("{","").replace("}",""))}),S+=_})}if(w.hasAttribute("data-transform")){var R=JSON.parse(w.getAttribute("data-transform"));S=R[S],!S&&w.hasAttribute("data-default")&&(S=w.getAttribute("data-default"))}T.innerHTML=S,k.appendChild(T)}),d.appendChild(k)}),Z(t,e),i.setAttribute("data-total",parseInt(p)),i.setAttribute("data-page",parseInt(y)),V(t,e,a,i),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((q,x)=>{var k=C(v,q.getAttribute("data-ajax-query"),"");q.hasAttribute("data-total")?q.setAttribute("data-total",k):q.innerHTML=k}),parseInt(p)==0&&(d.innerHTML='<tr><td colspan="100%"><span>'.concat(A,"</span></td></tr>")),i.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:s,formData:o})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',a.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(v){console.log(v)}})},$=(r,t)=>{switch(r){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",{day:"numeric",month:"long",year:"2-digit"});case"capitalise":return t=ut(t)}};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"),a='@import "'.concat(t,'/css/components/table.css";'),i='@import "'.concat(t,'/css/components/table.global.css";'),c=document.createElement("template");c.innerHTML=`
53
55
  <style>
54
56
  @import "`.concat(e,`";
55
57
  `).concat(a,`
@@ -73,7 +75,7 @@
73
75
  </div>
74
76
  </div>
75
77
  <iam-pagination class="pagination--table" `).concat(this.hasAttribute("data-page")?'data-page="'.concat(this.getAttribute("data-page"),'"'):"",` ></iam-pagination>
76
- `),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(i,"</style>"))}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",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.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true");var a=this.classList.contains("table--cta");if(a||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-pagination]")||this.form.insertAdjacentHTML("beforeend",'<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||this.form.insertAdjacentHTML("beforeend",'<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Bt(this.table),Pt(this.table,this.form,this.pagination,this,this.savedTableBody),Ot(this.table,this.form,this.pagination,this),Ft(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))et(this.table,this.form,this.pagination,this);else{let o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,d=Math.floor(Math.random()*Date.now()*(n+1));return d};if(this.querySelector("iam-actionbar[data-selectall]")||document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"))){var i=this.querySelector("iam-actionbar[data-selectall]")?this.querySelector("iam-actionbar[data-selectall]"):document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"));Array.from(this.table.querySelectorAll("thead tr")).forEach((n,d)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{var s="row".concat(o(d));n.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(s,'"/><label for="').concat(s,'"><span class="visually-hidden">Select row</span></label></td>'))}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){var d=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,s=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;i.setAttribute("data-selected",d==s?"all":s)}}),i.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!0})})}var c=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{if(n.querySelector(":scope > td > .dialog__wrapper")){var s=n.querySelector(":scope > td > .dialog__wrapper").parentNode;s.classList.add("td--fixed"),c=Array.from(s.parentNode.children).indexOf(s)}}),c!=-1&&(this.table.querySelector("thead tr th:nth-child(".concat(c+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(c+1,")"))).forEach((n,d)=>{n.classList.add("td--fixed")})),W(this.table,this.form,this.pagination,this),Y(this.table,this.form,this),I(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",o=>{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-page","data-show"]}attributeChangedCallback(t,e,a){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),t){case"data-total":{e!=a&&this.pagination.setAttribute("data-total",a);break}case"data-show":{e!=a&&this.pagination.setAttribute("data-show",a);break}case"data-page":{e!=a&&this.pagination.setAttribute("data-page",a);break}}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class $t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)')&&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",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),i='@import "'.concat(e,'/css/components/card.css";'),c='@import "'.concat(e,'/css/components/card.global.css";'),o=document.createElement("template");o.innerHTML=`
78
+ `),this.shadowRoot.appendChild(c.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(i,"</style>"))}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",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.querySelector(".actionbar__sticky")&&this.shadowRoot.querySelector(".table__wrapper").classList.add("has-actionbar"),this.table=this.querySelector("table"),this.savedTableBody=this.table.querySelector("tbody").cloneNode(!0),this.pagination=this.shadowRoot.querySelector("iam-pagination"),this.pagination.setAttribute("data-total",this.getAttribute("data-total")),this.pagination.setAttribute("data-page",this.getAttribute("data-page")),this.pagination.setAttribute("data-show",this.getAttribute("data-show")),this.pagination.setAttribute("data-increment",this.getAttribute("data-show")),this.hasAttribute("data-page-jump")&&this.pagination.setAttribute("data-page-jump","true"),this.hasAttribute("data-per-page")&&this.pagination.setAttribute("data-per-page","true"),this.hasAttribute("data-item-count")&&this.pagination.setAttribute("data-item-count","true"),this.hasAttribute("data-loading")&&this.pagination.setAttribute("data-loading","true"),this.classList.contains("table--fullwidth")&&this.pagination.setAttribute("data-minimal","true");var a=this.classList.contains("table--cta");if(a||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-pagination]")||this.form.insertAdjacentHTML("beforeend",'<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||this.form.insertAdjacentHTML("beforeend",'<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),Pt(this.table),Ot(this.table,this.form,this.pagination,this,this.savedTableBody),Ft(this.table,this.form,this.pagination,this),Ut(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))et(this.table,this.form,this.pagination,this);else{let o=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,d=Math.floor(Math.random()*Date.now()*(n+1));return d};if(this.querySelector("iam-actionbar[data-selectall]")||document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"))){var i=this.querySelector("iam-actionbar[data-selectall]")?this.querySelector("iam-actionbar[data-selectall]"):document.querySelector("iam-actionbar[data-for='".concat(this.getAttribute("id"),"']"));Array.from(this.table.querySelectorAll("thead tr")).forEach((n,d)=>{n.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{var s="row".concat(o(d));n.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(s,'"/><label for="').concat(s,'"><span class="visually-hidden">Select row</span></label></td>'))}),this.table.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest(".selectrow input")){var d=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,s=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;i.setAttribute("data-selected",d==s?"all":s)}}),i.addEventListener("selected",n=>{n.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!1}):n.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((d,s)=>{d.checked=!0})})}var c=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((n,d)=>{if(n.querySelector(":scope > td > .dialog__wrapper")){var s=n.querySelector(":scope > td > .dialog__wrapper").parentNode;s.classList.add("td--fixed"),c=Array.from(s.parentNode.children).indexOf(s)}}),c!=-1&&(this.table.querySelector("thead tr th:nth-child(".concat(c+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(c+1,")"))).forEach((n,d)=>{n.classList.add("td--fixed")})),V(this.table,this.form,this.pagination,this),this.hasAttribute("data-no-submit")||Y(this.table,this.form,this),j(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",o=>{this.table.querySelector("dialog[open]")&&(this.table.querySelector("dialog[open]").close(),this.table.querySelector(".dialog__wrapper > button.active").classList.remove("active"))}),this.pagination.addEventListener("update-show",o=>{var n=o.detail.show,d=new CustomEvent("update-show",{detail:{show:n}});this.dispatchEvent(d)}),this.pagination.addEventListener("update-page",o=>{var n=o.detail.page,d=new CustomEvent("update-page",{detail:{page:n}});this.dispatchEvent(d)})}static get observedAttributes(){return["data-total","data-page","data-show"]}attributeChangedCallback(t,e,a){if(this.hasAttribute("data-no-submit"))return!1;switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),t){case"data-total":{e!=a&&this.pagination.setAttribute("data-total",a);break}case"data-show":{e!=a&&this.pagination.setAttribute("data-show",a);break}case"data-page":{e!=a&&this.pagination.setAttribute("data-page",a);break}}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class zt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)')&&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",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),i='@import "'.concat(e,'/css/components/card.css";'),c='@import "'.concat(e,'/css/components/card.global.css";'),o=document.createElement("template");o.innerHTML=`
77
79
  <style>
78
80
  @import "`.concat(a,`";
79
81
  `).concat(i,`
@@ -81,23 +83,23 @@
81
83
  </style>
82
84
  <link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">
83
85
  <div class="card `).concat(t,`" tabindex="0" part="card">
84
- `).concat(this.hasAttribute("data-image")||this.hasAttribute("data-record")?'<div class="card__head">'.concat(this.hasAttribute("data-image")?'<img src="'.concat(this.getAttribute("data-image"),'" alt="" loading="lazy" />'):"",' <div class="card__badges"><slot name="badges"></slot></div></div>'):"",`
85
- <div class="card__body" part="body">
86
- `).concat(!this.hasAttribute("data-image")&&this.querySelector('[slot="badges"]')&&this.querySelector('[slot="checkbox"]')?'<div class="card__badges card__badges--inline"><slot name="badges"></slot></div>':"",`
87
- `).concat(!this.hasAttribute("data-image")&&!this.hasAttribute("data-record")&&this.querySelector('[slot="badges"]')?'<div class="card__badges"><slot name="badges"></slot></div>':"",`
88
- `).concat(this.hasAttribute("data-illustration")?'<div class="card__illustration"><img src="'.concat(this.getAttribute("data-illustration"),'" alt="" loading="lazy" /></div>'):"",`
89
- <slot></slot>
90
- `).concat(this.hasAttribute("data-total")?'<div class="card__total">'.concat(this.getAttribute("data-total"),"</div>"):"",`
91
- </div>
92
- `).concat(this.hasAttribute("data-add-link")?'<button class="btn btn-compact btn-secondary fa-plus">Add property</button>':"",`
93
- <slot name="checkbox"></slot>
94
- <div class="card__footer" part="footer">
95
- <slot name="footer"></slot>
96
- <slot name="btns"></slot>
97
- `).concat(this.hasAttribute("data-cta")?'<span class="link d-inline-block pt-0 mb-0">'.concat(this.getAttribute("data-cta"),"</span>"):"",`
98
- </div>
86
+ `).concat(this.createCardConent(),`
87
+ </div>
88
+ `),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("cardGlobal")||document.head.insertAdjacentHTML("beforeend",'<style id="cardGlobal">'.concat(c,"</style>"))}createCardConent(){return"".concat(this.hasAttribute("data-image")||this.hasAttribute("data-record")?'<div class="card__head">'.concat(this.hasAttribute("data-image")?'<img src="'.concat(this.getAttribute("data-image"),'" alt="" loading="lazy" />'):"",' <div class="card__badges"><slot name="badges"></slot></div></div>'):"",`
89
+ <div class="card__body" part="body">
90
+ `).concat(!this.hasAttribute("data-image")&&this.querySelector('[slot="badges"]')&&this.querySelector('[slot="checkbox"]')?'<div class="card__badges card__badges--inline"><slot name="badges"></slot></div>':"",`
91
+ `).concat(!this.hasAttribute("data-image")&&!this.hasAttribute("data-record")&&this.querySelector('[slot="badges"]')?'<div class="card__badges"><slot name="badges"></slot></div>':"",`
92
+ `).concat(this.hasAttribute("data-illustration")?'<div class="card__illustration"><img src="'.concat(this.getAttribute("data-illustration"),'" alt="" loading="lazy" /></div>'):"",`
93
+ <slot></slot>
94
+ `).concat(this.hasAttribute("data-total")?'<div class="card__total">'.concat(this.getAttribute("data-total"),"</div>"):"",`
99
95
  </div>
100
- `),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("cardGlobal")||document.head.insertAdjacentHTML("beforeend",'<style id="cardGlobal">'.concat(c,"</style>"))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label, router-link"),e=this.shadowRoot.querySelector(".card"),a=this.shadowRoot.querySelector(".btn-compact");if(this.hasAttribute("data-record")&&this.getAttribute("data-record"),t&&t.setAttribute("tabindex","-1"),t.matches("label[for]")){var i=document.getElementById(t.getAttribute("for")).checked;i?e.classList.add("checked"):e.classList.remove("checked")}if(this.addEventListener("click",o=>{var n=new Event("click");e.dispatchEvent(n)}),e.addEventListener("click",o=>{if(t.matches("label[for]")){o.stopPropagation(),o.preventDefault();var n=document.getElementById(t.getAttribute("for")),d=n.getAttribute("name"),s=n.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(d,'"][type="radio"]:not([id="').concat(s,'"])')));l.forEach((b,f)=>{var h=document.querySelector('[for="'.concat(b.getAttribute("id"),'"] iam-card'));h.dispatchEvent(new Event("inactive"))}),t.click();var u=n.checked;u?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",o=>{e.classList.remove("checked")}),e.addEventListener("keydown",o=>{switch(o.keyCode){case 32:case 13:if(t.matches("label[for]")){o.stopPropagation(),o.preventDefault();var n=document.getElementById(t.getAttribute("for")),d=n.getAttribute("name"),s=n.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(d,'"]:not([id="').concat(s,'"])')));l.forEach((b,f)=>{var h=document.querySelector('[for="'.concat(b.getAttribute("id"),'"] iam-card'));h.dispatchEvent(new Event("inactive"))}),t.click();var u=n.checked;u?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}}),a){var c=this.getAttribute("data-add-link");a.addEventListener("click",o=>{o.stopPropagation(),o.preventDefault(),window.location=c})}}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(t,e,a){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=a);break}case"class":{var i=this.classList.toString();this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)')&&(i+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(i));break}}}}function zt(r,t){function e(c,o){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=!1,s=o.getAttribute("name");if(!s)return!1;s.includes("[]")&&(s=s.replace("[]","[".concat(o.value,"]")));var l=c.querySelector('[data-name="'.concat(s,'"]'));l&&o.getAttribute("type")=="checkbox"&&(d=!o.checked);var u=o.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),c.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),n&&l.classList.add("tag--not-set"),l.setAttribute("data-name",s),l.innerHTML=u.replace("$value",o.value),(!o.value||d)&&l.remove(),o.parentNode.closest("[data-filter-text]")){var b=o.parentNode.closest("[data-filter-text]"),f=!0;if(s="",b.querySelectorAll("input").forEach((p,v)=>{var w=p.getAttribute("name");if(s+="".concat(v!=0?",":"").concat(w),c.querySelector('[data-name="'.concat(w,'"]'))&&c.querySelector('[data-name="'.concat(w,'"]')).remove(),p.value){var g=document.createElement("button");g.setAttribute("type","button"),g.classList.add("filter"),g.classList.add("tag"),n&&l.classList.add("tag--not-set"),g.setAttribute("data-name",w),g.innerHTML=u.replace("$value",p.value),c.appendChild(g)}else f=!1}),c.querySelector('[data-name="'.concat(s,'"]'))&&c.querySelector('[data-name="'.concat(s,'"]')).remove(),f){var h=b.getAttribute("data-filter-text");b.querySelectorAll("input").forEach((p,v)=>{var w=p.getAttribute("name");c.querySelector('[data-name="'.concat(w,'"]'))&&c.querySelector('[data-name="'.concat(w,'"]')).remove(),h=h.replace("$".concat(v+1),p.value)});var m=document.createElement("button");m.setAttribute("type","button"),m.classList.add("filter"),m.classList.add("tag"),n&&l.classList.add("tag--not-set"),m.setAttribute("data-name",s),m.innerHTML=h,c.appendChild(m)}}}Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((c,o)=>{e(t,c,!1)});var a=r.closest("dialog");if(a){var i=new MutationObserver(function(c){c[0].attributeName=="open"&&Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((o,n)=>{e(t,o,!1)})});i.observe(a,{attributes:!0})}r.addEventListener("tags-set",function(c){t.innerHTML="",Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((o,n)=>{e(t,o,!1)})}),Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((c,o)=>{c.addEventListener("change",function(n){r.hasAttribute("data-keep-same")||e(t,c),n.stopPropagation()})}),r.addEventListener("change",function(c){if(c&&c.target instanceof HTMLElement&&c.target.closest("input[data-filter-text]")){var o=c.target.closest("input[data-filter-text]");r.hasAttribute("data-keep-same")||e(t,o)}}),t.addEventListener("click",function(c){if(c&&c.target instanceof HTMLElement&&c.target.closest(".filter")){for(var o=c.target.closest(".filter"),n=o.getAttribute("data-name").split(","),d=0;d<n.length;d++){var s=n[d],l='[name="'.concat(s,'"]');if(s.match(/\[(.*)\]/)){s.replace(/\[(.*)\]/,"[]");var u=s.replace(/.*\[(.*)\]/,"$1");l='[value="'.concat(u,'"]')}for(var b=r.querySelectorAll(l),f=0;f<b.length;f++){var h=b[f];if(h.getAttribute("type")!="radio"&&h.getAttribute("type")!="checkbox"){h.value="";var c=new Event("force");r.hasAttribute("data-nosubmit")||h.closest("form").dispatchEvent(c)}else{h.checked=!1;var c=new Event("force");r.hasAttribute("data-nosubmit")||h.closest("form").dispatchEvent(c)}}}o.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});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"),a='@import "'.concat(t,'/css/components/applied-filters.css";'),i=this.classList.toString(),c=document.createElement("template");c.innerHTML=`
96
+ `).concat(this.hasAttribute("data-add-link")?'<button class="btn btn-compact btn-secondary fa-plus">Add property</button>':"",`
97
+ <slot name="checkbox"></slot>
98
+ <div class="card__footer" part="footer">
99
+ <slot name="footer"></slot>
100
+ <slot name="btns"></slot>
101
+ `).concat(this.hasAttribute("data-cta")?'<span class="link d-inline-block pt-0 mb-0">'.concat(this.getAttribute("data-cta"),"</span>"):"",`
102
+ </div>`)}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label, router-link"),e=this.shadowRoot.querySelector(".card"),a=this.shadowRoot.querySelector(".btn-compact");if(this.hasAttribute("data-record")&&this.getAttribute("data-record"),!t)return!1;if(t&&t.setAttribute("tabindex","-1"),t.matches("label[for]")){var i=document.getElementById(t.getAttribute("for")).checked;i?e.classList.add("checked"):e.classList.remove("checked")}if(this.addEventListener("click",o=>{var n=new Event("click");e.dispatchEvent(n)}),e.addEventListener("click",o=>{if(t.matches("label[for]")){o.stopPropagation(),o.preventDefault();var n=document.getElementById(t.getAttribute("for")),d=n.getAttribute("name"),s=n.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(d,'"][type="radio"]:not([id="').concat(s,'"])')));l.forEach((b,v)=>{var u=document.querySelector('[for="'.concat(b.getAttribute("id"),'"] iam-card'));u.dispatchEvent(new Event("inactive"))}),t.click();var h=n.checked;h?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",o=>{e.classList.remove("checked")}),e.addEventListener("keydown",o=>{switch(o.keyCode){case 32:case 13:if(t.matches("label[for]")){o.stopPropagation(),o.preventDefault();var n=document.getElementById(t.getAttribute("for")),d=n.getAttribute("name"),s=n.getAttribute("id"),l=Array.from(document.querySelectorAll('[name="'.concat(d,'"]:not([id="').concat(s,'"])')));l.forEach((b,v)=>{var u=document.querySelector('[for="'.concat(b.getAttribute("id"),'"] iam-card'));u.dispatchEvent(new Event("inactive"))}),t.click();var h=n.checked;h?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}}),a){var c=this.getAttribute("data-add-link");a.addEventListener("click",o=>{o.stopPropagation(),o.preventDefault(),window.location=c})}}static get observedAttributes(){return["data-total","class","data-image"]}attributeChangedCallback(t,e,a){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=a);break}case"class":{if(e!=a){var i=this.classList.toString();this.querySelector('*:not(.badge):not(small):not(.btn) > [class*="fa-"]:not(.btn)')&&(i+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(i)),this.shadowRoot.querySelector(".card").innerHTML=this.createCardConent()}break}case"data-image":{e!=a&&(this.shadowRoot.querySelector(".card").innerHTML=this.createCardConent());break}}}}function Gt(r,t){function e(c,o){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,d=!1,s=o.getAttribute("name");if(!s)return!1;s.includes("[]")&&(s=s.replace("[]","[".concat(o.value,"]")));var l=c.querySelector('[data-name="'.concat(s,'"]'));l&&o.getAttribute("type")=="checkbox"&&(d=!o.checked);var h=o.getAttribute("data-filter-text");if(l||(l=document.createElement("button"),c.appendChild(l)),l.setAttribute("type","button"),l.classList.add("filter"),l.classList.add("tag"),n&&l.classList.add("tag--not-set"),l.setAttribute("data-name",s),l.innerHTML=h.replace("$value",o.value),(!o.value||d)&&l.remove(),o.parentNode.closest("[data-filter-text]")){var b=o.parentNode.closest("[data-filter-text]"),v=!0;if(s="",b.querySelectorAll("input").forEach((m,p)=>{var y=m.getAttribute("name");if(s+="".concat(p!=0?",":"").concat(y),c.querySelector('[data-name="'.concat(y,'"]'))&&c.querySelector('[data-name="'.concat(y,'"]')).remove(),m.value){var g=document.createElement("button");g.setAttribute("type","button"),g.classList.add("filter"),g.classList.add("tag"),n&&l.classList.add("tag--not-set"),g.setAttribute("data-name",y),g.innerHTML=h.replace("$value",m.value),c.appendChild(g)}else v=!1}),c.querySelector('[data-name="'.concat(s,'"]'))&&c.querySelector('[data-name="'.concat(s,'"]')).remove(),v){var u=b.getAttribute("data-filter-text");b.querySelectorAll("input").forEach((m,p)=>{var y=m.getAttribute("name");c.querySelector('[data-name="'.concat(y,'"]'))&&c.querySelector('[data-name="'.concat(y,'"]')).remove(),u=u.replace("$".concat(p+1),m.value)});var f=document.createElement("button");f.setAttribute("type","button"),f.classList.add("filter"),f.classList.add("tag"),n&&l.classList.add("tag--not-set"),f.setAttribute("data-name",s),f.innerHTML=u,c.appendChild(f)}}}Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((c,o)=>{e(t,c,!1)});var a=r.closest("dialog");if(a){var i=new MutationObserver(function(c){c[0].attributeName=="open"&&Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((o,n)=>{e(t,o,!1)})});i.observe(a,{attributes:!0})}r.addEventListener("tags-set",function(c){t.innerHTML="",Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((o,n)=>{e(t,o,!1)})}),Array.from(r.querySelectorAll('input[type="checkbox"]:checked, input:not([type="checkbox"]):not([type="radio"])')).forEach((c,o)=>{c.addEventListener("change",function(n){r.hasAttribute("data-keep-same")||e(t,c),n.stopPropagation()})}),r.addEventListener("change",function(c){if(c&&c.target instanceof HTMLElement&&c.target.closest("input[data-filter-text]")){var o=c.target.closest("input[data-filter-text]");r.hasAttribute("data-keep-same")||e(t,o)}}),t.addEventListener("click",function(c){if(c&&c.target instanceof HTMLElement&&c.target.closest(".filter")){for(var o=c.target.closest(".filter"),n=o.getAttribute("data-name").split(","),d=0;d<n.length;d++){var s=n[d],l='[name="'.concat(s,'"]');if(s.match(/\[(.*)\]/)){s.replace(/\[(.*)\]/,"[]");var h=s.replace(/.*\[(.*)\]/,"$1");l='[value="'.concat(h,'"]')}for(var b=r.querySelectorAll(l),v=0;v<b.length;v++){var u=b[v];if(u.getAttribute("type")!="radio"&&u.getAttribute("type")!="checkbox"){u.value="";var c=new Event("force");r.hasAttribute("data-nosubmit")||u.closest("form").dispatchEvent(c)}else{u.checked=!1;var c=new Event("force");r.hasAttribute("data-nosubmit")||u.closest("form").dispatchEvent(c)}}}o.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});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"),a='@import "'.concat(t,'/css/components/applied-filters.css";'),i=this.classList.toString(),c=document.createElement("template");c.innerHTML=`
101
103
  <style>
102
104
  @import "`.concat(e,`";
103
105
  `).concat(a,`
@@ -105,7 +107,7 @@
105
107
  </style>
106
108
  <div class="applied-filters `).concat(i,`"></div>
107
109
  <slot></slot>
108
- `),this.shadowRoot.appendChild(c.content.cloneNode(!0))}connectedCallback(){zt(this,this.shadowRoot.querySelector(".applied-filters"))}}class Xt 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"),a='@import "'.concat(t,'/css/components/pagination.css";'),i=document.createElement("template");i.innerHTML=`
110
+ `),this.shadowRoot.appendChild(c.content.cloneNode(!0))}connectedCallback(){Gt(this,this.shadowRoot.querySelector(".applied-filters"))}}class Xt 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"),a='@import "'.concat(t,'/css/components/pagination.css";'),i=document.createElement("template");i.innerHTML=`
109
111
  <style>
110
112
  @import "`.concat(e,`";
111
113
  `).concat(a,`
@@ -142,10 +144,10 @@
142
144
  <button class="load-more btn btn-primary m-auto">Load more</a>
143
145
  </div>
144
146
  </div>
145
- `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",15),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",this.getAttribute("data-show"));var e=this.shadowRoot.querySelector(".page-jump select"),a=this.shadowRoot.querySelector(".prev"),i=this.shadowRoot.querySelector(".next"),c=this.shadowRoot.querySelector(".per-page select"),o=this.shadowRoot.querySelector(".load-more");this.setup(),e.addEventListener("change",n=>{this.setAttribute("data-show",this.getAttribute("data-increment")),this.setAttribute("data-page",n.target.value)}),i.addEventListener("click",n=>{e.value=parseInt(e.value)+1,e.dispatchEvent(new Event("change"))}),a.addEventListener("click",n=>{e.value=parseInt(e.value)-1,e.dispatchEvent(new Event("change"))}),c.addEventListener("change",n=>{this.setAttribute("data-increment",n.target.value)}),o.addEventListener("click",n=>{var d=parseInt(this.getAttribute("data-show"))+parseInt(this.getAttribute("data-increment"));this.setAttribute("data-show",d),d>parseInt(this.getAttribute("data-total"))&&o.remove()})}setup(){var t=this.shadowRoot.querySelector(".pagination"),e=this.shadowRoot.querySelector(".page-jump select"),a=this.shadowRoot.querySelector(".prev"),i=this.shadowRoot.querySelector(".next"),c=this.shadowRoot.querySelector(".item-count"),o=this.shadowRoot.querySelector(".per-page select"),n=this.shadowRoot.querySelector(".total-pages"),d=parseInt(this.getAttribute("data-page")),s=parseInt(this.getAttribute("data-total")),l=parseInt(this.getAttribute("data-show")),u=parseInt(this.getAttribute("data-increment")),b=Math.ceil(s/u);s>l&&t.classList.remove("d-none");for(var f="",h=1;h<=b;h++)f+='<option value="'.concat(h,'" ').concat(h==d?"selected":"",">").concat(h,"</option>");e.innerHTML=f,n.innerHTML="of ".concat(b),d==b?i.setAttribute("disabled","disabled"):i.removeAttribute("disabled"),d==1?a.setAttribute("disabled","disabled"):a.removeAttribute("disabled");var m=d==1?1:(d-1)*l+1,p=d==1?l:d*l;c.innerHTML="".concat(m," - ").concat(p>s?s:p," of ").concat(s," items");var v=[15,25,40,50];u&&o.value!=u&&!v.includes(u)&&(o.innerHTML='<option value="'.concat(u,'">').concat(u,`</option>
146
- <option value="`).concat(u*2,'">').concat(u*2,`</option>
147
- <option value="`).concat(u*3,'">').concat(u*3,`</option>
148
- <option value="`).concat(u*4,'">').concat(u*4,"</option>")),o.value=u}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(t,e,a){switch(t){case"data-total":{e!=a&&(this.setAttribute("data-page",1),this.setup());break}case"data-show":{e!=a&&(this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:a}})));break}case"data-increment":{e!=a&&(this.setAttribute("data-show",a),this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:a}})));break}case"data-page":{e&&e!=a&&(this.setup(),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:a}})));break}}}}function Jt(r,t){Qt(r,t)}function Qt(r,t){var e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){at(r,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),at(r,t.value)})}var at=function(t,e){Array.from(t.querySelectorAll(":scope > li")).forEach((a,i)=>{var c=a.textContent.toLowerCase();a.classList.add("d-none"),c.includes(e.toLowerCase())&&a.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"),a=document.createElement("template");a.innerHTML=`
147
+ `),this.shadowRoot.appendChild(i.content.cloneNode(!0))}connectedCallback(){var t=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",15),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",this.getAttribute("data-show"));var e=this.shadowRoot.querySelector(".page-jump select"),a=this.shadowRoot.querySelector(".prev"),i=this.shadowRoot.querySelector(".next"),c=this.shadowRoot.querySelector(".per-page select"),o=this.shadowRoot.querySelector(".load-more");this.setup(),e.addEventListener("change",n=>{this.setAttribute("data-show",this.getAttribute("data-increment")),this.setAttribute("data-page",n.target.value)}),i.addEventListener("click",n=>{e.value=parseInt(e.value)+1,e.dispatchEvent(new Event("change"))}),a.addEventListener("click",n=>{e.value=parseInt(e.value)-1,e.dispatchEvent(new Event("change"))}),c.addEventListener("change",n=>{this.setAttribute("data-increment",n.target.value)}),o.addEventListener("click",n=>{var d=parseInt(this.getAttribute("data-show"))+parseInt(this.getAttribute("data-increment"));this.setAttribute("data-show",d),d>parseInt(this.getAttribute("data-total"))&&o.remove()})}setup(){var t=this.shadowRoot.querySelector(".pagination"),e=this.shadowRoot.querySelector(".page-jump select"),a=this.shadowRoot.querySelector(".prev"),i=this.shadowRoot.querySelector(".next"),c=this.shadowRoot.querySelector(".item-count"),o=this.shadowRoot.querySelector(".per-page select"),n=this.shadowRoot.querySelector(".total-pages"),d=parseInt(this.getAttribute("data-page")),s=parseInt(this.getAttribute("data-total")),l=parseInt(this.getAttribute("data-show")),h=parseInt(this.getAttribute("data-increment")),b=Math.ceil(s/h);s>l&&t.classList.remove("d-none");for(var v="",u=1;u<=b;u++)v+='<option value="'.concat(u,'" ').concat(u==d?"selected":"",">").concat(u,"</option>");e.innerHTML=v,n.innerHTML="of ".concat(b),d==b?i.setAttribute("disabled","disabled"):i.removeAttribute("disabled"),d==1?a.setAttribute("disabled","disabled"):a.removeAttribute("disabled");var f=d==1?1:(d-1)*l+1,m=d==1?l:d*l;c.innerHTML="".concat(f," - ").concat(m>s?s:m," of ").concat(s," items");var p=[15,25,40,50];h&&o.value!=h&&!p.includes(h)&&(o.innerHTML='<option value="'.concat(h,'">').concat(h,`</option>
148
+ <option value="`).concat(h*2,'">').concat(h*2,`</option>
149
+ <option value="`).concat(h*3,'">').concat(h*3,`</option>
150
+ <option value="`).concat(h*4,'">').concat(h*4,"</option>")),o.value=h}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(t,e,a){switch(t){case"data-total":{e!=a&&(this.setAttribute("data-page",1),this.setup());break}case"data-show":{e!=a&&(this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:a}})));break}case"data-increment":{e!=a&&(this.setAttribute("data-show",a),this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:a}})));break}case"data-page":{e&&e!=a&&(this.setup(),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:a}})));break}}}}function Jt(r,t){Qt(r,t)}function Qt(r,t){var e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){at(r,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),at(r,t.value)})}var at=function(t,e){Array.from(t.querySelectorAll(":scope > li")).forEach((a,i)=>{var c=a.textContent.toLowerCase();a.classList.add("d-none"),c.includes(e.toLowerCase())&&a.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"),a=document.createElement("template");a.innerHTML=`
149
151
  <style>
150
152
  @import "`.concat(e,`";
151
153
  `).concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",`
@@ -172,7 +174,7 @@
172
174
  <div class="list__wrapper" part="wrapper">
173
175
  <slot></slot>
174
176
  </div>
175
- `),this.shadowRoot.appendChild(a.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>'),Jt(this.querySelector("ul"),this.shadowRoot.querySelector("#search"))}}function Kt(r){if(r.hasAttribute("data-type")&&r.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)),r.closest(".notification__holder")||t.appendChild(r)}if(r.setAttribute("role","alert"),r.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(i.preventDefault(),z(r))},!1),r.hasAttribute("data-timeout")){var e=r.getAttribute("data-timeout"),a=new Vt(function(){z(r)},e);r.addEventListener("mouseenter",i=>{a.pause()}),r.addEventListener("mouseleave",i=>{a.resume()})}}function Vt(r,t){var e,a,i=t;this.pause=function(){window.clearTimeout(e),i-=new Date-a},this.resume=function(){a=new Date,window.clearTimeout(e),e=window.setTimeout(r,i)},this.resume()}var z=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});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"),a='@import "'.concat(t,'/css/components/notification.css";'),i='@import "'.concat(t,'/css/components/notification.global.css";'),c=this.querySelectorAll("a,button");Array.from(c).forEach((n,d)=>{n.setAttribute("slot","btns"),n.classList.add("link")}),(c.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");var o=document.createElement("template");o.innerHTML=`
177
+ `),this.shadowRoot.appendChild(a.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>'),Jt(this.querySelector("ul"),this.shadowRoot.querySelector("#search"))}}function Kt(r){if(r.hasAttribute("data-type")&&r.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)),r.closest(".notification__holder")||t.appendChild(r)}if(r.setAttribute("role","alert"),r.addEventListener("click",function(i){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(i.preventDefault(),z(r))},!1),r.hasAttribute("data-timeout")){var e=r.getAttribute("data-timeout"),a=new Vt(function(){z(r)},e);r.addEventListener("mouseenter",i=>{a.pause()}),r.addEventListener("mouseleave",i=>{a.resume()})}}function Vt(r,t){var e,a,i=t;this.pause=function(){window.clearTimeout(e),i-=new Date-a},this.resume=function(){a=new Date,window.clearTimeout(e),e=window.setTimeout(r,i)},this.resume()}var z=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class te 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"),a='@import "'.concat(t,'/css/components/notification.css";'),i='@import "'.concat(t,'/css/components/notification.global.css";'),c=this.querySelectorAll("a,button");Array.from(c).forEach((n,d)=>{n.setAttribute("slot","btns"),n.classList.add("link")}),(c.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");var o=document.createElement("template");o.innerHTML=`
176
178
  <style>
177
179
  @import "`.concat(e,`";
178
180
  `).concat(a,`
@@ -184,5 +186,5 @@
184
186
  <div class="notification__inner"><div class="notification__text"><slot></slot></div>`).concat(c.length?'<div class="notification__btns"><slot name="btns"></slot></div>':"",`</div>
185
187
  `).concat(this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button part="dismiss-btn">Dismiss</button></div>':"",`
186
188
  </div>
187
- `),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",'<style id="notificationHolder">'.concat(i,"</style>"))}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 a=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>'}Kt(a),t&&t.addEventListener("click",function(i){z(a)},!1)}}document.addEventListener("DOMContentLoaded",function(){mt(),j(document.body),ct(),ft(document.body),gt(document.body),window.customElements.get("iam-header")||window.customElements.define("iam-header",Tt),window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",Ct),window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",Dt),window.customElements.get("iam-table")||window.customElements.define("iam-table",Yt),window.customElements.get("iam-card")||window.customElements.define("iam-card",$t),window.customElements.get("iam-filterlist")||window.customElements.define("iam-filterlist",Zt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",Xt),window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",Gt),window.customElements.get("iam-notification")||window.customElements.define("iam-notification",Wt),Array.from(document.querySelectorAll(".nav")).forEach(r=>{wt(r)}),Array.from(document.querySelectorAll(".testimonial")).forEach(r=>{Lt(r)}),Array.from(document.querySelectorAll(".carousel")).forEach(r=>{St(r)}),Array.from(document.querySelectorAll("form")).forEach(r=>{kt(r)}),Array.from(document.querySelectorAll(".youtube-embed")).forEach(r=>{new ht(r)}),window.addEventListener("hashchange",function(){var r=location.hash.replace("#",""),t=document.querySelector('label[for="'.concat(r,'"]'));t instanceof HTMLElement&&t.click()},!1)})});
189
+ `),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",'<style id="notificationHolder">'.concat(i,"</style>"))}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 a=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>'}Kt(a),t&&t.addEventListener("click",function(i){z(a)},!1)}}document.addEventListener("DOMContentLoaded",function(){mt(),I(document.body),ct(),bt(document.body),yt(document.body),window.customElements.get("iam-header")||window.customElements.define("iam-header",Ct),window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",Mt),window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",Nt),window.customElements.get("iam-table")||window.customElements.define("iam-table",$t),window.customElements.get("iam-card")||window.customElements.define("iam-card",zt),window.customElements.get("iam-filterlist")||window.customElements.define("iam-filterlist",Zt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",Xt),window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",Wt),window.customElements.get("iam-notification")||window.customElements.define("iam-notification",te),Array.from(document.querySelectorAll(".nav")).forEach(r=>{Lt(r)}),Array.from(document.querySelectorAll(".testimonial")).forEach(r=>{St(r)}),Array.from(document.querySelectorAll(".carousel")).forEach(r=>{Et(r)}),Array.from(document.querySelectorAll("form")).forEach(r=>{Tt(r)}),Array.from(document.querySelectorAll(".youtube-embed")).forEach(r=>{new ft(r)}),window.addEventListener("hashchange",function(){var r=location.hash.replace("#",""),t=document.querySelector('label[for="'.concat(r,'"]'));t instanceof HTMLElement&&t.click()},!1)})});
188
190
  //# sourceMappingURL=scripts.bundle.js.map