@iamproperty/components 4.1.1-beta-4 → 4.1.1-beta-6

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 (41) hide show
  1. package/assets/css/components/component.reset.css +1 -1
  2. package/assets/css/components/component.reset.css.map +1 -1
  3. package/assets/css/core.min.css +1 -1
  4. package/assets/css/core.min.css.map +1 -1
  5. package/assets/css/style.min.css +1 -1
  6. package/assets/css/style.min.css.map +1 -1
  7. package/assets/img/buyer.png +0 -0
  8. package/assets/img/estate-agents.png +0 -0
  9. package/assets/img/illustrations/modified/auctioneer-28days.png +0 -0
  10. package/assets/img/illustrations/modified/auctioneer-56days.png +0 -0
  11. package/assets/img/seller.png +0 -0
  12. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  13. package/assets/js/components/actionbar/actionbar.component.min.js +1 -1
  14. package/assets/js/components/address-lookup/address-lookup.component.js +1 -1
  15. package/assets/js/components/address-lookup/address-lookup.component.min.js +4 -4
  16. package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
  17. package/assets/js/components/applied-filters/applied-filters.component.min.js +3 -3
  18. package/assets/js/components/applied-filters/applied-filters.component.min.js.map +1 -1
  19. package/assets/js/components/card/card.component.min.js +1 -1
  20. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  21. package/assets/js/components/fileupload/fileupload.component.min.js +1 -1
  22. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  23. package/assets/js/components/header/header.component.min.js +1 -1
  24. package/assets/js/components/nav/nav.component.min.js +1 -1
  25. package/assets/js/components/notification/notification.component.min.js +1 -1
  26. package/assets/js/components/pagination/pagination.component.min.js +1 -1
  27. package/assets/js/components/table/table.component.min.js +1 -1
  28. package/assets/js/components/tabs/tabs.component.min.js +1 -1
  29. package/assets/js/dynamic.min.js +1 -1
  30. package/assets/js/modules/applied-filters.js +10 -1
  31. package/assets/js/scripts.bundle.js +2 -2
  32. package/assets/js/scripts.bundle.js.map +1 -1
  33. package/assets/js/scripts.bundle.min.js +2 -2
  34. package/assets/js/scripts.bundle.min.js.map +1 -1
  35. package/assets/sass/foundations/reboot.scss +3 -0
  36. package/assets/sass/helpers/dynamic.scss +8 -0
  37. package/assets/ts/components/address-lookup/address-lookup.component.ts +1 -1
  38. package/assets/ts/modules/applied-filters.ts +16 -3
  39. package/dist/components.es.js +19 -14
  40. package/dist/components.umd.js +14 -14
  41. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function r(s,t){n(s,t)}function n(s,t){var e;t.addEventListener("keyup",a=>{clearTimeout(e),e=setTimeout(function(){o(s,t.value)},500)}),t.addEventListener("change",a=>{clearTimeout(e),o(s,t.value)})}const o=function(s,t){Array.from(s.querySelectorAll(":scope > li")).forEach((e,a)=>{let i=e.textContent.toLowerCase();e.classList.add("d-none"),i.includes(t.toLowerCase())&&e.classList.remove("d-none")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Filtered list",value:t})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"filterlist"});class l extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const 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"):`${t}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class p extends HTMLElement{constructor(){super();const d=this.attachShadow({mode:"open"}),n=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",r=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function r(i){if(i.hasAttribute("data-type")&&i.getAttribute("data-type")=="toast"){let t=document.querySelector(".notification__holder");t||(t=document.createElement("div"),t.classList.add("notification__holder"),t.classList.add("container"),document.querySelector("body").appendChild(t)),i.closest(".notification__holder")||t.appendChild(i)}if(i.setAttribute("role","alert"),i.addEventListener("click",function(t){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(t.preventDefault(),n(i))},!1),i.hasAttribute("data-timeout")){let t=i.getAttribute("data-timeout");var e=new c(function(){n(i)},t);i.addEventListener("mouseenter",o=>{e.pause()}),i.addEventListener("mouseleave",o=>{e.resume()})}}function c(i,e){var t,o,a=e;this.pause=function(){window.clearTimeout(t),a-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(i,a)},this.resume()}const n=function(i){i.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class d extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,o=this.querySelectorAll("a,button");Array.from(o).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(o.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */class v extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const i=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${i}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const B=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},Q=(a,e)=>String(a).padStart(e,"0"),X=a=>a.charAt(0).toUpperCase()+a.slice(1);var Y=function(a,e,o,r){function b(c){return c instanceof o?c:new o(function(i){i(c)})}return new(o||(o=Promise))(function(c,i){function n(u){try{t(r.next(u))}catch(s){i(s)}}function d(u){try{t(r.throw(u))}catch(s){i(s)}}function t(u){u.done?c(u.value):b(u.value).then(n,d)}t((r=r.apply(a,e||[])).next())})};const R=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((r,b)=>{const c=Array.from(r.querySelectorAll("th, td")),i=["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)=>{const t=e[d];if(typeof t<"u"){let u=document.createElement("div");u.innerHTML=t.innerHTML;let s=u.textContent||u.innerText||"";n.setAttribute("data-label",s),t.hasAttribute("data-td-class")&&n.setAttribute("class",t.getAttribute("data-td-class")),t.hasAttribute("data-format")&&(n.setAttribute("data-format",t.getAttribute("data-format")),n.innerHTML=M(t.getAttribute("data-format"),n.textContent.trim())),i.includes(n.textContent.trim().toLowerCase())&&n.setAttribute("data-content",n.textContent.trim().toLowerCase())}})})},J=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((o,r)=>{let b=window.getComputedStyle(document.querySelector("html")),c=o.querySelector(":scope > *:last-child > *:first-child");if(c){c.classList.add("text-nowrap");let i=c.offsetWidth/parseFloat(b.fontSize);i+=1.7,e=e>i?e:i}}),e},G=(a,e)=>{if(e.classList.contains(".table--fullwidth")&&!e.hasAttribute("data-expandable")||a.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(a.querySelectorAll("thead tr")).forEach((o,r)=>{o.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((o,r)=>{o.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button>Expand</button></td>')})},K=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let o=e.target.closest("[data-expand-button]"),r=o.closest("tr");r.getAttribute("data-view")=="full"?r.setAttribute("data-view","default"):r.setAttribute("data-view","full"),o.blur()}})},N=(a,e)=>{let o=e.querySelector("[data-search]");if(!o)return!1;const r=o.getAttribute("id"),b=o.getAttribute("data-search").split(",");let c=o.parentNode,i={};b.forEach((n,d)=>{Array.from(a.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((t,u)=>{t.querySelector(".td__content")?i[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:i[t.textContent]=t.textContent})}),o.setAttribute("list",`${r}_list`),o.setAttribute("autocomplete","off"),c.querySelector("datalist")||(c.innerHTML+=`<datalist id="${r}_list"></datalist>`),c.querySelector("datalist").innerHTML=`${Object.keys(i).map(n=>`<option value="${n}"></option>`).join("")}`},V=(a,e,o,r,b)=>{var c;let i=function(t,u=!1){if(e.classList.contains("processing"))return!1;if(t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((s,m)=>{const h=s.getAttribute("data-duplicate"),l=document.getElementById(h),g=document.querySelector(`[for="${h}"] iam-card`);if(l.checked!=s.checked)if(g){let y=new Event("click");g.dispatchEvent(y)}else l.checked=s.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!u){let s=e.querySelector("[data-pagination]");s.value=1,r.setAttribute("data-page",1)}z(a,e,o,r)}else e.hasAttribute("data-submit")?e.submit():(C(a,e,r),E(a,e));if(e.hasAttribute("data-ajax-post")){let s=new FormData(e),m=new URLSearchParams(s).toString();const h=new XMLHttpRequest;h.open("GET",`${window.location.href}?ajax=true&${m}`),h.send()}};e.addEventListener("keyup",t=>{clearTimeout(c),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&(c=setTimeout(function(){i(t)},500))}),e.addEventListener("change",t=>{clearTimeout(c),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||O(a,e,b),i(t)),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&i(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(C(a,e,r),E(a,e)):(t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&t.target.closest("form .dialog__wrapper > dialog")||t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter]")&&!t.target.closest("form dialog"))&&i(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&i(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&i(t)}),e.addEventListener("click",t=>{if(clearTimeout(c),t&&t.target instanceof HTMLElement&&t.target.closest('dialog button:not([type="button"])')&&t.target.closest('dialog button:not([type="button"])').closest("dialog").close(),t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__close")&&(t.preventDefault(),t.stopPropagation()),t&&t.target instanceof HTMLElement&&t.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((s,m)=>{s.innerHTML=""});let u=e.elements;for(let s=0;s<u.length;s++)switch(u[s].type.toLowerCase()?u[s].type.toLowerCase():"text"){case"text":case"password":case"textarea":u[s].value="";break;case"radio":case"checkbox":if(u[s].checked){let h=u[s],l=h.getAttribute("id"),g=document.querySelector(`[for="${l}"`);if(g.querySelector("iam-card")){let y=g.querySelector("iam-card"),v=new Event("click");y.dispatchEvent(v)}h.checked=!1}break;case"select-one":case"select-multi":u[s].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||O(a,e,b),i(t)}}),e.addEventListener("submit",t=>{clearTimeout(c),e.hasAttribute("data-submit")||t.preventDefault(),i(t)}),e.addEventListener("force",t=>{i(t)}),e.addEventListener("paginate",t=>{i(t,!0)});let n=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,u)=>{let s=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${s}"]`)).forEach((m,h)=>{let l=m.closest("form");n.includes(l)||n.push(l),d.includes(s)||d.push(s)})}),n.forEach((t,u)=>{const s=function(){let m=[],h=new FormData(t);for(const[l,g]of h)document.querySelector(`[data-mimic="${l}"]`)&&!m.includes(l)?(m.push(l),document.querySelector(`[data-mimic="${l}"]`).value=g):document.querySelector(`[data-mimic="${l}"]`)&&(document.querySelector(`[data-mimic="${l}"]`).value+=","+g);for(const l of m){const g=new Event("force");e.dispatchEvent(g)}for(const l of d)if(!h.has(l)&&t.querySelector(`[name="${l}"]`)){document.querySelector(`[data-mimic="${l}"]`).value="";const g=new Event("force");e.dispatchEvent(g)}};t.addEventListener("force",m=>{s()}),t.addEventListener("change",m=>{s()})})},O=(a,e,o)=>{if(e.getAttribute("data-ajax"))return!1;let r=a.querySelector("tbody"),b=e.querySelector("[data-sort]"),c=b.querySelector(`option:nth-child(${b.selectedIndex+1})`),i=c.getAttribute("data-sort"),n=c.getAttribute("data-order"),d=c.getAttribute("data-format");if(!i)return r.innerHTML=o.innerHTML,R(a),!1;let t=[];["asc","desc","descending"].includes(n)||(t=n.split(","));let u=[];Array.from(r.querySelectorAll("tr")).forEach((m,h)=>{let l=m.querySelector('td[data-label="'+i+'"], th[data-label="'+i+'"]').textContent.trim();m.querySelector('[data-label="'+i+'"] .td__content')&&(l=m.querySelector('[data-label="'+i+'"] .td__content').textContent.trim()),t.length&&t.includes(l)&&(l=t.indexOf(l)),B(l)&&(l=Q(l,10)),d&&d=="date"&&(l=new Date(l));const g={index:l,row:m};u.push(g)}),u.sort((m,h)=>m.index>h.index?1:-1),(n=="descending"||n=="desc")&&(u=u.reverse());let s="";u.forEach((m,h)=>{s+=m.row.outerHTML}),r.innerHTML=s},C=(a,e,o)=>{a.classList.remove("table--filtered");let r=P(e),b=[],c=0,i=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,n=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(a.querySelectorAll("tbody tr")).forEach((t,u)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")}),e.querySelector("[data-search]")){let t=e.querySelector("[data-search]");e.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((s,m)=>{b.push({column:`${s.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,u)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let d=0;Object.values(r).forEach((t,u)=>{typeof t=="object"&&Object.values(t).length?d+=Object.values(t).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,u)=>{t.innerHTML+=`(${d})`,t.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[t,u]of Object.entries(r))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((s,m)=>{let h=!1;u.forEach((l,g)=>{let y=s.querySelector(`[data-label="${t}"]`);if(l&&l=="$today")l=M("date",new Date);else if(l&&l=="$yesterday"){let f=new Date;f.setDate(f.getDate()-1),l=M("date",f)}else if(l&&(l=="$thisWeek"||l=="$lastWeek")){let f=new Date,x=new Date(f.setDate(f.getDate()-(f.getDay()-1))),w=new Date(f.setDate(f.getDate()-f.getDay()+7)),p=new Date(y.textContent.toLowerCase());if(f.setHours(0,0,0,0),x.setHours(0,0,0,0),w.setHours(0,0,0,0),p.setHours(0,0,0,0),l=="$thisWeek")h=p>=x&&p<=w;else{let T=new Date(x.setDate(x.getDate()-7)),A=new Date(w.setDate(w.getDate()-7));T.setHours(0,0,0,0),A.setHours(0,0,0,0),h=p>=T&&p<=A}}else if(l&&l=="$thisMonth"){let f=new Date,x=f.getFullYear(),w=f.getMonth();var v=new Date(x,w,1),k=new Date(x,w+1,0);let p=new Date(y.textContent.toLowerCase());v.setHours(0,0,0,0),k.setHours(0,0,0,0),p.setHours(0,0,0,0),h=p>=v&&p<=k}else if(l&&l=="$lastMonth"){let f=new Date,x=f.getFullYear(),w=f.getMonth();var S=new Date(x,w-1,1),L=new Date(x,w,0);let p=new Date(y.textContent.toLowerCase());S.setHours(0,0,0,0),L.setHours(0,0,0,0),p.setHours(0,0,0,0),h=p>=S&&p<=L}y&&y.textContent.toLowerCase().includes(l.toLowerCase())&&(h=!0)}),h||(s.classList.add("filtered"),s.setAttribute("data-filtered-by",t))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,u)=>{let s=!(b.length>0&&b[0].value.length>=3);b.forEach((m,h)=>{let l=t.querySelector(`[data-label="${m.column}"]`);l&&m.value.length>=3&&l.textContent.toLowerCase().includes(m.value.toLowerCase())&&(s=!0)}),s||t.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((t,u)=>{c++,t.classList.add("filtered--matched"),Math.ceil(c/n)==parseInt(i)&&t.classList.add("filtered--show")}),o&&(o.setAttribute("data-total",c),o.setAttribute("data-show",n),o.setAttribute("data-page",i))},E=(a,e,o)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((b,c)=>{let i=b.getAttribute("data-query"),n;if(i=="total")o.hasAttribute("data-total")?n=o.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!i.includes(" == ")&&i.includes(" & ")){let d=i.split(" & "),t="";d.forEach(u=>{t+=`:not([data-filtered-by="${u}"])`}),n=Array.from(a.querySelectorAll(`tbody tr${t}`)).length}else if(!i.includes(" == "))n=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${i}"])`)).length;else if(i.includes(" && ")){let d=i.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let u=!0;for(const[s,m]of Object.entries(d)){let h=m.split(" == ");(!t.querySelector(`td[data-label="${h[0]}"]`)||t.querySelector(`td[data-label="${h[0]}"]`).textContent!=`${h[1]}`)&&(u=!1)}return u}).length}else{let d=i.split(" == ");n=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${d[0]}"], tbody tr[data-filtered-by="${d[0]}"] td[data-label="${d[0]}"]`)).filter(function(t){return t.textContent===d[1]}).length}b.hasAttribute("data-total")?b.setAttribute("data-total",n):b.innerHTML=n})},Z=function(a,e,o,r){o.addEventListener("update-page",b=>{let c=e.querySelector("[data-pagination]"),i=b.detail.page;if(c.value=i,e.dispatchEvent(new Event("paginate")),r.setAttribute("data-page",i),a.hasAttribute("data-show-history")){const n=new URL(location);n.searchParams.set("page",i),history.pushState({type:"pagination",form:e.getAttribute("id"),page:i},"",n)}if(!r.hasAttribute("data-no-scroll")){const d=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:d,behavior:"smooth"})}}),o.addEventListener("update-show",b=>{let c=e.querySelector("[data-show]"),i=b.detail.show;c.value=i,r.setAttribute("data-show",i),e.dispatchEvent(new Event("submit"))})},tt=(a,e)=>{if(!a)return!1;a.addEventListener("click",o=>{et(e)})},et=function(a){for(var e=[],o=a.getElementsByTagName("tr"),r=0;r<o.length;r++){for(var b=o[r].querySelectorAll("td,th"),c=[],i=0;i<b.length;i++)c.push(`"${b[i].textContent}"`);e.push(c.join(","))}e=e.join(`
5
5
  `);let n=new Blob([e],{type:"text/csv"});var d=document.createElement("a");d.download="export.csv";var t=window.URL.createObjectURL(n);d.href=t,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d)},I=function(a,e,o,r){if(R(a),G(a,r),E(a,e,r),r&&r.classList.contains("table--cta")){let c=function(){Array.from(a.querySelectorAll("tr")).forEach((i,n)=>{let d=i.offsetHeight;i.style.setProperty("--row-height",`${d}px`)})};const b=J(a);r.style.setProperty("--cta-width",`${b}rem`),new ResizeObserver(c).observe(a)}},P=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((r,b)=>{if(!(r.type=="radio"&&!r.checked)&&!(r.type=="checkbox"&&!r.checked)&&r&&r.value){let c=r.getAttribute("data-filter");e[c]||(e[c]=new Array),e[c].push(r.value)}}),e},z=function(a,e,o,r){return Y(this,void 0,void 0,function*(){const b=(h,l,g)=>l.split(/[\.\[\]\'\"]/).filter(y=>y).reduce((y,v)=>y?y[v]:g,h);let c=new FormData(e),i=new URLSearchParams(c).toString(),n=a.querySelectorAll("thead tr th"),d=a.querySelector("tbody"),t=e.getAttribute("data-ajax");r.classList.add("table--loading");let u=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,l)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});let s=0;Object.values(u).forEach((h,l)=>{typeof h=="object"&&Object.values(h).length?s+=Object.values(h).length:s++}),s&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,l)=>{h.innerHTML+=`(${s})`,h.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[t]&&window.controller[t].abort(),window.controller[t]=new AbortController;const{signal:m}=controller[t];o.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(t+"?"+i,{signal:m,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(h=>h.json()).then(h=>{let l=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",g=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",y=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",v=b(h,g,15),k=b(h,y,1),S=b(h,l),L=r.hasAttribute("data-empty-msg")?r.getAttribute("data-empty-msg"):"No results found";S?(d.innerHTML="",S.forEach((f,x)=>{var w=document.createElement("tr");n.forEach((p,T)=>{let A="";var _=document.createElement("td");if(_.setAttribute("data-label",p.innerText),p.getAttribute("data-output")){var H=p.getAttribute("data-output");A=H.replace(new RegExp(/{(.*?)}/,"gm"),function(D){return b(f,D.replace("{","").replace("}",""))})}if(p.hasAttribute("data-output-array")){var H=p.getAttribute("data-output");let F=b(f,H.replace("{","").replace("}",""));A="",F.forEach((j,it)=>{let W=p.getAttribute("data-output-array"),q="";if(p.hasAttribute("data-output-array-property")&&p.hasAttribute("data-output-array-transform")){const $=b(j,p.getAttribute("data-output-array-property")),U=JSON.parse(p.getAttribute("data-output-array-transform"))[$];q=W.replace(`{${p.getAttribute("data-output-array-property")}}`,U)}q=q.replace(new RegExp(/{(.*?)}/,"gm"),function($){return b(j,$.replace("{","").replace("}",""))}),A+=q})}p.hasAttribute("data-transform")&&(A=JSON.parse(p.getAttribute("data-transform"))[A],!A&&p.hasAttribute("data-default")&&(A=p.getAttribute("data-default"))),_.innerHTML=A,w.appendChild(_)}),d.appendChild(w)}),N(a,e),r.setAttribute("data-total",parseInt(v)),r.setAttribute("data-page",parseInt(k)),I(a,e,o,r),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((f,x)=>{let w=b(h,f.getAttribute("data-ajax-query"),"");f.hasAttribute("data-total")?f.setAttribute("data-total",w):f.innerHTML=w}),parseInt(v)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${L}</span></td></tr>`),r.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:t,formData:i})):d.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',o.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(h){console.log(h)}})},M=(a,e)=>{switch(a){case"datetime":return new Date(e).toLocaleDateString("en-gb",{weekday:"short",year:"2-digit",month:"long",day:"numeric"})+" "+new Date(e).toLocaleTimeString("en-gb",{hour:"2-digit",minute:"2-digit"});case"date":return new Date(e).toLocaleDateString("en-gb",{year:"2-digit",month:"long",day:"numeric"});case"capitalise":return e=X(e)}};class at extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",o=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const d=function(t){const r=t.querySelectorAll(":scope > details");t.querySelectorAll(":scope > details > summary");let 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");let e=document.createElement("div");e.classList.add("tabs__links__wrapper"),e.prepend(a),t.prepend(e)}r.forEach((e,i)=>{let l=e.querySelector(":scope > summary"),o=l.classList.contains("disabled");l.classList.add("visually-hidden");let s=document.createElement("button");e.hasAttribute("id")&&(s=document.createElement("a"),s.setAttribute("href",`#${e.getAttribute("id")}`)),e.hasAttribute("open")&&s.setAttribute("aria-pressed",!0),s.innerHTML=`${l.innerText}`,s.classList.add("link"),s.setAttribute("data-index",i),s.setAttribute("tabindex","-1"),o&&s.classList.add("disabled"),a.appendChild(s)})},n=function(t){let r=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > details > summary"),e=t.querySelectorAll(":scope .tabs__links > .link");t.shadowRoot&&(e=t.shadowRoot.querySelectorAll(".tabs__links > .link")),e.forEach(i=>{i.addEventListener("click",l=>{if(l.preventDefault(),i.classList.contains("disabled"))return!1;e.forEach(o=>{let s=o==i;o.setAttribute("aria-pressed",s)}),r.forEach((o,s)=>{let c=i.getAttribute("data-index")==s;c?o.setAttribute("open",c):o.removeAttribute("open")}),i.hasAttribute("href")&&history.pushState(void 0,void 0,i.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:i.textContent})})}),a.forEach((i,l)=>{i.addEventListener("focus",o=>{e.forEach(s=>{s.classList.remove("focus")}),e[l].classList.add("focus")}),i.addEventListener("click",o=>{o.preventDefault(),e[l].click()})})},u=function(t){let r=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");t.shadowRoot&&(a=t.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&t.querySelector(`.tabs__links [href="${location.hash}"]`)?(t.querySelector(`[href="${location.hash}"]`).setAttribute("open",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(r[0].setAttribute("open",!0),a[0].setAttribute("aria-pressed",!0))},p=function(t){d(t),n(t),u(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const r=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"):`${r}/css/core.min.css`,e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */(function(b){typeof define=="function"&&define.amd?define(b):b()})(function(){"use strict";const b=t=>(t.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&t.classList.add("ie"),null),w=t=>{const a=function(e){const o=document.querySelector(`label[for="${e.replace("#","")}"]`),i=document.querySelector(e+" summary"),r=document.querySelector(`dialog${e}`);o instanceof HTMLElement?o.click():i instanceof HTMLElement?i.click():r instanceof HTMLElement&&r.showModal()};return location.hash&&a(location.hash),window.addEventListener("hashchange",function(){a(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state.type&&e.state.type=="pagination"){let o=document.querySelector(`#${e.state.form}`),i=document.querySelector(`#${e.state.form} [data-pagination]`);i?i.value=e.state.page:o.innerHTML+=`<input name="page" type="hidden" data-pagination="true" value="${e.state.page}" />`,o.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){let o=e.target;o.querySelector(":invalid")&&(o.classList.add("was-validated"),e.preventDefault())}}),null};class v{constructor(a){document.body.classList.contains("youtubeLoaded")?a.addEventListener("click",function(e){for(var o=e.target;o&&o!=this;o=o.parentNode)if(o.matches("a")){e.preventDefault(),p(o);break}},!1):this.loadScripts(a,this.createEmbed)}loadScripts(a){return new Promise((e,o)=>{const i=new Image;i.onload=function(){var r=document.createElement("script");r.src="https://www.youtube.com/iframe_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(r,s),document.body.classList.add("youtubeLoaded"),e(!0),r.onload=()=>{a.addEventListener("click",function(l){console.log("click"),l&&l.target instanceof HTMLElement&&l.target.closest("a")&&(l.preventDefault(),p(l.target.closest("a")))},!1)}},i.onerror=function(){o(!1)},i.src="https://youtube.com/favicon.ico"})}}const p=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=t.getAttribute("data-id"),e=t.getAttribute("id");if(typeof e>"u"||e==null){var o=String.fromCharCode(65+Math.floor(Math.random()*26));e=o+Date.now(),t.setAttribute("id",e)}function i(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:r,onStateChange:l}})}i();function r(n){n.target.playVideo()}var s=!1;function l(n){if(n.data==YT.PlayerState.PLAYING&&!s){var c=document.getElementById(e);c.classList.add("player-ready"),s=!0}}},S=t=>(Array.from(t.querySelectorAll("dialog[open]")).forEach((a,e)=>{a.closest(".dialog__wrapper")||(a.removeAttribute("open"),a.showModal(),a.focus(),A(a))}),t.addEventListener("click",a=>{if(a.target.tagName=="IAM-ACTIONBAR")return!1;if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-modal]")){const i=a.target.closest("[data-modal]"),r=i.hasAttribute("data-modal")?i.getAttribute("data-modal"):i.getAttribute("data-filter"),s=document.querySelector(`dialog#${r}`);A(s),s.showModal(),s.focus();let l=s.offsetWidth;s.setAttribute("style",`max-width: ${l}px;`),Array.from(s.querySelectorAll("[data-duplicate]")).forEach((n,c)=>{const d=n.getAttribute("data-duplicate"),u=document.getElementById(d);if(n.checked!=u.checked){n.checked=u.checked;let f=new Event("change");n.dispatchEvent(f)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(a&&a.target instanceof HTMLElement&&a.target.closest("button.dialog__close")){const i=a.target.closest("dialog[open]");a.preventDefault(),i.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((r,s)=>{r.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest('button[formmethod="dialog"]')){const i=a.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((r,s)=>{r.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest("dialog[open]")){let i=a.target.closest("dialog[open]");var e=window.getComputedStyle(i);if(e.display==="contents"&&(i=i.parentNode.closest("dialog[open]")),!i.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||i.classList.contains("dialog--multi")){const r=i.getBoundingClientRect();(a.clientX<r.left||a.clientX>r.right||a.clientY<r.top||a.clientY>r.bottom)&&(a.target.closest('input[type="radio"]')||i.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")}))}}if(a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__wrapper > button")){a.stopPropagation();let i=a.target.closest(".dialog__wrapper > button"),r=a.target.closest(".dialog__wrapper > button").parentNode,s="openPopover",l=r.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=l&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,f)=>{u.classList.remove("active")}),l.hasAttribute("open"))l.close(),s="closePopover",l.removeAttribute("style"),i.classList.remove("active");else{l.show(),i.classList.add("active");var o=i.getBoundingClientRect();let u=o.top,f=o.left;if(i.closest("iam-table")){let m=i.closest("iam-table").parentNode.getBoundingClientRect();u-=m.top,f-=m.left}l.classList.contains("dialog--fix")&&l.setAttribute("style",`position:fixed;top: ${u}px; left: ${f}px; margin: 3rem 0 0 0;`)}let n=l.getBoundingClientRect(),c=n.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(c>d){let u=l.hasAttribute("style")?l.getAttribute("style")+" ":"";l.setAttribute("style",u+"transform: translate(0, calc(-100% - 4rem))"),n=l.getBoundingClientRect(),n.top-window.scrollY<100&&l.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:s,id:i.textContent})}a&&a.target instanceof HTMLElement&&!a.target.closest("dialog[open]")&&!a.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((i,r)=>{i.classList.remove("active")}))}),null),A=t=>{t.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!t.classList.contains("dialog--multi")&&t.addEventListener("cancel",e=>{e.preventDefault()});let a=t.querySelector(".youtube-embed a");if(a&&p(a),t.classList.contains("dialog--multi")&&!t.querySelector(":scope > .steps")&&q(t),!t.querySelector(":scope > .mh-lg")&&!t.classList.contains("dialog--multi")){t.innerHTML=`<div class="mh-lg">${t.innerHTML}</div>`;let e=t.querySelector(".mh-lg"),o=t.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(o){let i=o.previousSibling;e.before(o),i&&o.before(i)}}t.querySelector(":scope > button:first-child")||t.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},q=t=>{let a="",e=Array.from(t.querySelectorAll("fieldset[data-title]")),o=t.querySelector("form");e.forEach((s,l)=>{a+=`<button data-title="${s.getAttribute("data-title")}" type="button" class="${l==0?"active":""}" tabindex="-1">${s.getAttribute("data-title")}</button>`;const n=document.createElement("div");if(n.classList.add("btn--wrapper"),s.appendChild(n),l!=0&&(n.innerHTML+=`<button data-title="${e[l-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),l!=e.length-1&&(n.innerHTML+=`<button data-title="${e[l+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),l==e.length-1)if(o&&o.querySelector(':scope > button[type="submit"]')){let c=o.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),n.insertAdjacentElement("beforeend",c)}else n.innerHTML+=`<button data-title="${e[l].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${a}</div>`);let i=Array.from(t.querySelectorAll("fieldset.was-validated"));for(let s=0;s<i.length;s++){let l=i[s],n=l.getAttribute("data-title");if(l.querySelector(".is-invalid")){Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((c,d)=>{c.classList.add("active")});break}else Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((c,d)=>{c.classList.add("valid")})}t.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function r(s){const l=t.querySelector("fieldset.active")?t.querySelector("fieldset.active"):t.querySelector("fieldset[data-title]"),n=l.getAttribute("data-title");let c=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((f,m)=>{f.checkValidity()||(c=!1)}),c?Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((f,m)=>{f.classList.add("valid")}):Array.from(t.querySelectorAll(`[data-title="${n}"]`)).forEach((f,m)=>{f.classList.remove("valid")}),c||!s.hasAttribute("data-next")){const f=t.querySelector(`fieldset[data-title="${s.getAttribute("data-title")}"]`),m=t.querySelector(`.steps button[data-title="${s.getAttribute("data-title")}"]`);Array.from(t.querySelectorAll("button")).forEach((g,O)=>{g.classList.remove("active")}),Array.from(t.querySelectorAll("fieldset")).forEach((g,O)=>{g.classList.remove("active")}),m.classList.add("active"),f.classList.add("active")}let d=Array.from(t.querySelectorAll("fieldset")).length,u=Array.from(t.querySelectorAll("fieldset.valid")).length;t.style.setProperty("--progress",`${u/(d-1)*100}%`)}t.addEventListener("keydown",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest("button")){const l=s.target.closest("button");s.keyCode==13&&l.getAttribute("type")!="submit"&&(s.preventDefault(),r(l))}s&&s.target instanceof HTMLElement&&s.target.closest("input")&&(s.target.closest("input").classList.remove("is-invalid"),s.keyCode==13&&s.preventDefault())}),t.addEventListener("click",s=>{if(s&&s.target instanceof HTMLElement&&s.target.closest('button[type="submit"]'))s.target.closest("form").classList.add("was-validated");else if(s&&s.target instanceof HTMLElement&&s.target.closest("button[data-title]")){const l=s.target.closest("button[data-title]");r(l)}return null})};function E(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",t=>{const a=t.target.closest("[open] summary");if(a)window.dataLayer.push({event:"closeDetails",detailsTitle:a.textContent||""});else{const e=t.target.closest("summary"),o=t.target.closest("a"),i=t.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),o&&window.dataLayer.push({event:"linkClicked",linkText:o.hasAttribute("title")?o.getAttribute("title")||"":o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||"",href:o.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}const x=t=>{document.addEventListener("load",function(){console.log(Array.from(document.querySelectorAll("input[maxlength]"))),Array.from(document.querySelectorAll("input")).forEach((a,e)=>{a.parentElement,T(a)})}),t.addEventListener("input",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("input,textarea,select")){const e=a.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}}),t.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("select")){const e=a.target.closest("select");if(console.log(e),e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){const o=document.getElementById(e.getAttribute("data-input")),i=e.value;L(o,i)}}if(a&&a.target instanceof HTMLElement&&a.target.closest('dialog [type="radio"]')){const e=a.target.closest("dialog");a.target.closest('dialog [type="radio"]'),Array.from(e.querySelectorAll('[type="radio"][autofocus]')).forEach((o,i)=>{o.removeAttribute("autofocus")}),Array.from(e.querySelectorAll('[type="radio"]:checked')).forEach((o,i)=>{o.setAttribute("autofocus",!0)})}}),t.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-change-type][data-input]:not(select)")){const e=a.target.closest("[data-change-type]"),o=document.getElementById(e.getAttribute("data-input")),i=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",o.getAttribute("type")),L(o,i),e.hasAttribute("data-alt-class")){const r=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",r)}}})},T=t=>{let a=t.parentElement,e=t.getAttribute("maxlength");a.style.setProperty("--maxlength",e);let o=t.nextElementSibling;(!o||o&&o.classList.contains("invalid-feedback"))&&(o=document.createElement("span"),a.insertBefore(o,t.nextSibling)),o.setAttribute("data-count",t.value.length)},L=(t,a)=>{t.setAttribute("type",a)},_=t=>{Array.from(t.querySelectorAll("details")).forEach((a,e)=>{a.addEventListener("mouseenter",function(o){window.matchMedia("(min-width: 62em)").matches&&a.setAttribute("open","true")},!1),a.addEventListener("mouseleave",function(o){window.matchMedia("(min-width: 62em)").matches&&a.removeAttribute("open")},!1)}),"IntersectionObserver"in window&&new IntersectionObserver(([e])=>e.target.classList.toggle("is-stuck",e.intersectionRatio<1),{threshold:[1]}).observe(t)};function M(t){var a;const e=t.querySelector(".testimonial__images"),o=e.querySelectorAll("img").length;if(o==1)return!1;t.classList.add("testimonial--multi");const i=function(r){const s=t.querySelector(".btn-next"),l=t.querySelector(".btn-prev");s.setAttribute("data-go",r+1),l.setAttribute("data-go",r-1),s.removeAttribute("disabled"),l.removeAttribute("disabled"),r==1?l.setAttribute("disabled",!0):r==o&&s.setAttribute("disabled",!0)};e.addEventListener("scroll",function(r){clearTimeout(a),a=setTimeout(function(){let s=e.scrollWidth,l=e.scrollHeight,n=e.scrollLeft,c=e.scrollTop,d=Math.round(n/s*o)+1;n==0&&c!=0&&(d=Math.round(c/l*o)+1),t.setAttribute("data-show",d),i(d)},300)},!1),t.addEventListener("click",function(r){for(var s=r.target;s&&s!=this;s=s.parentNode)if(s.matches("[data-go]")){let l=parseInt(s.getAttribute("data-go")),n=0,c=0,d=e.scrollWidth,u=e.scrollHeight;d>u?c=Math.floor(d*((l-1)/o)):n=Math.floor(u*((l-1)/o)),e.scroll({top:n,left:c,behavior:"smooth"});break}},!1)}function k(t){var a;let e=t.querySelector(".carousel__inner"),o=t.querySelectorAll(".carousel__item").length;t.getAttribute("data-cols");let i=t.getAttribute("data-sm-cols"),r=t.getAttribute("data-md-cols");t.querySelector(".carousel__controls a").classList.add("active"),e.addEventListener("scroll",function(s){clearTimeout(a),a=setTimeout(function(){let l=e.clientWidth,n=e.scrollWidth,c=e.scrollLeft,d=Math.round(c/n*o)+1,u=t.querySelector(".carousel__item:last-child").offsetLeft;Array.from(t.querySelectorAll(".carousel__controls a")).forEach((f,m)=>{f.classList.remove("active")}),t.querySelector(".control-"+d).classList.add("active"),d==1?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+l>u?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),t.addEventListener("click",function(s){for(var l=s.target;l&&l!=this;l=l.parentNode)if(l.matches(".carousel__controls a")){s.preventDefault(),Array.from(t.querySelectorAll(".carousel__controls a")).forEach((c,d)=>{c.classList.remove("active")}),l.classList.add("active");const n=document.querySelector(l.getAttribute("href"));e.scroll({top:0,left:n.offsetLeft,behavior:"smooth"});break}},!1),t.addEventListener("click",function(s){for(var l=s.target;l&&l!=this;l=l.parentNode)if(l.matches(".btn-next, .btn-prev")){s.preventDefault();let n=l.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:n,behavior:"smooth"});break}},!1),o==1&&t.classList.add("hide-btns"),i>=o&&t.classList.add("hide-sm-btns"),r>=o&&t.classList.add("hide-md-btns")}function $(t){t.addEventListener("change",function(a){var e=parseInt(t.querySelector("[data-min] select,[data-min] input").value),o=parseInt(t.querySelector("[data-max] select,[data-max] input").value);Array.from(t.querySelectorAll("[data-min] input")).forEach((i,r)=>{i.setAttribute("max",o)}),Array.from(t.querySelectorAll("[data-max] input")).forEach((i,r)=>{i.setAttribute("min",e)}),Array.from(t.querySelectorAll("[data-min] select option")).forEach((i,r)=>{parseInt(i.getAttribute("value"))>o?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(t.querySelectorAll("[data-max] select option")).forEach((i,r)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function C(t){t.addEventListener("change",function(a){if(t.matches("[data-value-if]")){const e=t.getAttribute("data-redirect"),o=t.getAttribute("data-value-if");t.value==o&&(document.location.href=e)}else typeof t.value<"u"&&(document.location.href=t.value)},!1)}function H(t){const e=t.querySelector(".row").cloneNode(!0),o=t.querySelector("[data-add]");t.addEventListener("click",function(i){for(var r=i.target;r&&r!=this;r=r.parentNode){if(r.matches("[data-add]")){const s=e.cloneNode(!0);t.insertBefore(s,r),o.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length>=o.dataset.maxfiles&&o.setAttribute("disabled","disabled");break}if(r.matches("[data-delete]")){r.closest(".row").remove(),o.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length<o.dataset.maxfiles&&o.removeAttribute("disabled");break}}},!1)}function I(t){Array.from(t.querySelectorAll("[data-input-range]")).forEach((a,e)=>{$(a)}),Array.from(t.querySelectorAll("[data-redirect]")).forEach((a,e)=>{C(a)}),Array.from(t.querySelectorAll(".multiple-file-uploads")).forEach((a,e)=>{H(a)}),t.addEventListener("change",function(a){for(var e=a.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){const o=e.dataset.filesize;e.files[0].size>o&&(e.value="",alert("File too large"));break}},!1),t.addEventListener("change",function(a){Array.from(t.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,o)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${r}"],input[data-id="${r}"]`).value==s?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(t.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,o)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,r=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${r}"],input[data-id="${r}"]`).value==s?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}function D(t){if(t.hasAttribute("data-type")&&t.getAttribute("data-type")=="toast"){let e=document.querySelector(".notification__holder");e||(e=document.createElement("div"),e.classList.add("notification__holder"),e.classList.add("container"),document.querySelector("body").appendChild(e)),t.closest(".notification__holder")||e.appendChild(t)}if(t.setAttribute("role","alert"),t.addEventListener("click",function(e){event&&event.target instanceof HTMLElement&&event.target.closest("[data-dismiss-button]")&&(e.preventDefault(),y(t))},!1),t.hasAttribute("data-timeout")){let e=t.getAttribute("data-timeout");var a=new B(function(){y(t)},e);t.addEventListener("mouseenter",o=>{a.pause()}),t.addEventListener("mouseleave",o=>{a.resume()})}}function B(t,a){var e,o,i=a;this.pause=function(){window.clearTimeout(e),i-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(e),e=window.setTimeout(t,i)},this.resume()}const y=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});class N extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=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"):`${a}/css/core.min.css`,o=`@import "${a}/css/components/notification.css";`,i=this.querySelectorAll("a,button");Array.from(i).forEach((s,l)=>{s.setAttribute("slot","btns"),s.classList.add("link")}),(i.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const r=document.createElement("template");r.innerHTML=`
5
5
  <style>
@@ -7,7 +7,7 @@ function createAppliedFilters(container, filters) {
7
7
  inputName = inputName.replace('[]', `[${input.value}]`);
8
8
  let filter = filters.querySelector(`[data-name="${inputName}"]`);
9
9
  if (filter && input.getAttribute('type') == 'checkbox')
10
- shouldRemoveFilter = true;
10
+ shouldRemoveFilter = !input.checked ? true : false;
11
11
  let filterText = input.getAttribute('data-filter-text');
12
12
  if (!filter) {
13
13
  filter = document.createElement('button');
@@ -66,11 +66,20 @@ function createAppliedFilters(container, filters) {
66
66
  Array.from(container.querySelectorAll('input[type="checkbox"]:checked')).forEach((input, index) => {
67
67
  addFilterButton(filters, input);
68
68
  });
69
+ // check for change in displayed inputs
69
70
  Array.from(container.querySelectorAll('input[data-filter-text]')).forEach((input, index) => {
70
71
  input.addEventListener('change', function (event) {
71
72
  addFilterButton(filters, input);
73
+ event.stopPropagation(); // Don't allow the below event handler to trigger
72
74
  });
73
75
  });
76
+ // Some change event aren't getting triggered above so this event listener on the container will pick them up. This happens with input in modals
77
+ container.addEventListener('change', function (event) {
78
+ if (event && event.target instanceof HTMLElement && event.target.closest('input[data-filter-text]')) {
79
+ let input = event.target.closest('input[data-filter-text]');
80
+ addFilterButton(filters, input);
81
+ }
82
+ });
74
83
  filters.addEventListener('click', function (event) {
75
84
  if (event && event.target instanceof HTMLElement && event.target.closest('.filter')) {
76
85
  let filter = event.target.closest('.filter');
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v4.1.1-beta-4
2
+ * iamKey v4.1.1-beta-6
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */(function(R){typeof define=="function"&&define.amd?define(R):R()})(function(){"use strict";var R=a=>(a.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie"),null),rt=a=>{var t=function(r){var i=document.querySelector('label[for="'.concat(r.replace("#",""),'"]')),n=document.querySelector(r+" summary"),c=document.querySelector("dialog".concat(r));i instanceof HTMLElement?i.click():n instanceof HTMLElement?n.click():c instanceof HTMLElement&&c.showModal()};return location.hash&&t(location.hash),window.addEventListener("hashchange",function(){t(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state.type&&e.state.type=="pagination"){var r=document.querySelector("#".concat(e.state.form)),i=document.querySelector("#".concat(e.state.form," [data-pagination]"));i?i.value=e.state.page:r.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(e.state.page,'" />'),r.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){var r=e.target;r.querySelector(":invalid")&&(r.classList.add("was-validated"),e.preventDefault())}}),null},st=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},it=(a,t)=>String(a).padStart(t,"0"),ot=a=>a.charAt(0).toUpperCase()+a.slice(1);class nt{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",function(e){for(var r=e.target;r&&r!=this;r=r.parentNode)if(r.matches("a")){e.preventDefault(),Y(r);break}},!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise((e,r)=>{var i=new Image;i.onload=function(){var n=document.createElement("script");n.src="https://www.youtube.com/iframe_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(n,c),document.body.classList.add("youtubeLoaded"),e(!0),n.onload=()=>{t.addEventListener("click",function(o){console.log("click"),o&&o.target instanceof HTMLElement&&o.target.closest("a")&&(o.preventDefault(),Y(o.target.closest("a")))},!1)}},i.onerror=function(){r(!1)},i.src="https://youtube.com/favicon.ico"})}}var Y=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=t.getAttribute("data-id"),r=t.getAttribute("id");if(typeof r>"u"||r==null){var i=String.fromCharCode(65+Math.floor(Math.random()*26));r=i+Date.now(),t.setAttribute("id",r)}function n(){window.player=new YT.Player(r,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:c,onStateChange:d}})}n();function c(s){s.target.playVideo()}var o=!1;function d(s){if(s.data==YT.PlayerState.PLAYING&&!o){var l=document.getElementById(r);l.classList.add("player-ready"),o=!0}}},ct=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((t,e)=>{var r=t.closest(".dialog__wrapper");r||(t.removeAttribute("open"),t.showModal(),t.focus(),Q(t))}),a.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]"),r=e.hasAttribute("data-modal")?e.getAttribute("data-modal"):e.getAttribute("data-filter"),i=document.querySelector("dialog#".concat(r));Q(i),i.showModal(),i.focus();var n=i.offsetWidth;i.setAttribute("style","max-width: ".concat(n,"px;")),Array.from(i.querySelectorAll("[data-duplicate]")).forEach((g,A)=>{var k=g.getAttribute("data-duplicate"),S=document.getElementById(k);if(g.checked!=S.checked){g.checked=S.checked;var E=new Event("change");g.dispatchEvent(E)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:r})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var c=t.target.closest("dialog[open]");t.preventDefault(),c.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,A)=>{g.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var o=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,A)=>{g.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("dialog[open]")){var d=t.target.closest("dialog[open]"),s=window.getComputedStyle(d);if(s.display==="contents"&&(d=d.parentNode.closest("dialog[open]")),!d.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||d.classList.contains("dialog--multi")){var l=d.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||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 h=t.target.closest(".dialog__wrapper > button"),f=t.target.closest(".dialog__wrapper > button").parentNode,v="openPopover",u=f.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=u&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((g,A)=>{g.classList.remove("active")}),u.hasAttribute("open"))u.close(),v="closePopover",u.removeAttribute("style"),h.classList.remove("active");else{u.show(),h.classList.add("active");var m=h.getBoundingClientRect(),b=m.top,p=m.left;if(h.closest("iam-table")){var L=h.closest("iam-table").parentNode.getBoundingClientRect();b-=L.top,p-=L.left}u.classList.contains("dialog--fix")&&u.setAttribute("style","position:fixed;top: ".concat(b,"px; left: ").concat(p,"px; margin: 3rem 0 0 0;"))}var w=u.getBoundingClientRect(),y=w.bottom-window.scrollY,x=window.innerHeight-window.scrollY;if(y>x){var q=u.hasAttribute("style")?u.getAttribute("style")+" ":"";u.setAttribute("style",q+"transform: translate(0, calc(-100% - 4rem))"),w=u.getBoundingClientRect();var T=w.top-window.scrollY;T<100&&u.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:v,id:h.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((g,A)=>{g.classList.remove("active")}))}),null),Q=a=>{a.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!a.classList.contains("dialog--multi")&&a.addEventListener("cancel",n=>{n.preventDefault()});var t=a.querySelector(".youtube-embed a");if(t&&Y(t),a.classList.contains("dialog--multi")&&!a.querySelector(":scope > .steps")&&dt(a),!a.querySelector(":scope > .mh-lg")&&!a.classList.contains("dialog--multi")){a.innerHTML='<div class="mh-lg">'.concat(a.innerHTML,"</div>");var e=a.querySelector(".mh-lg"),r=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(r){var i=r.previousSibling;e.before(r),i&&r.before(i)}}a.querySelector(":scope > button:first-child")||a.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},dt=a=>{var t="",e=Array.from(a.querySelectorAll("fieldset[data-title]")),r=a.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(r&&r.querySelector(':scope > button[type="submit"]')){var f=r.querySelector(':scope > button[type="submit"]');f.classList.add("mb-0"),h.insertAdjacentElement("beforeend",f)}else h.innerHTML+='<button data-title="'.concat(e[l].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')}),a.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(t,"</div>"));for(var i=Array.from(a.querySelectorAll("fieldset.was-validated")),n=0;n<i.length;n++){var c=i[n],o=c.getAttribute("data-title");if(c.querySelector(".is-invalid")){Array.from(a.querySelectorAll('[data-title="'.concat(o,'"]'))).forEach((s,l)=>{s.classList.add("active")});break}else Array.from(a.querySelectorAll('[data-title="'.concat(o,'"]'))).forEach((s,l)=>{s.classList.add("valid")})}a.addEventListener("invalid",function(){return function(s){s.preventDefault()}}(),!0);function d(s){var l=a.querySelector("fieldset.active")?a.querySelector("fieldset.active"):a.querySelector("fieldset[data-title]"),h=l.getAttribute("data-title"),f=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((p,L)=>{p.checkValidity()||(f=!1)}),f?Array.from(a.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((p,L)=>{p.classList.add("valid")}):Array.from(a.querySelectorAll('[data-title="'.concat(h,'"]'))).forEach((p,L)=>{p.classList.remove("valid")}),f||!s.hasAttribute("data-next")){var v=a.querySelector('fieldset[data-title="'.concat(s.getAttribute("data-title"),'"]')),u=a.querySelector('.steps button[data-title="'.concat(s.getAttribute("data-title"),'"]'));Array.from(a.querySelectorAll("button")).forEach((p,L)=>{p.classList.remove("active")}),Array.from(a.querySelectorAll("fieldset")).forEach((p,L)=>{p.classList.remove("active")}),u.classList.add("active"),v.classList.add("active")}var m=Array.from(a.querySelectorAll("fieldset")).length,b=Array.from(a.querySelectorAll("fieldset.valid")).length;a.style.setProperty("--progress","".concat(b/(m-1)*100,"%"))}a.addEventListener("keydown",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()}}),a.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 lt(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",a=>{var t=a.target.closest("[open] summary");if(t)window.dataLayer.push({event:"closeDetails",detailsTitle:t.textContent||""});else{var e=a.target.closest("summary"),r=a.target.closest("a"),i=a.target.closest("button");e&&window.dataLayer.push({event:"openDetails",detailsTitle:e.textContent||""}),r&&window.dataLayer.push({event:"linkClicked",linkText:r.hasAttribute("title")?r.getAttribute("title")||"":r.textContent||"",class:r.hasAttribute("class")&&r.getAttribute("class")||"",href:r.getAttribute("href")||""}),i&&window.dataLayer.push({event:"buttonClicked",buttonText:i.textContent||"",class:i.hasAttribute("class")&&i.getAttribute("class")||""})}})}var ut=a=>{document.addEventListener("load",function(){console.log(Array.from(document.querySelectorAll("input[maxlength]"))),Array.from(document.querySelectorAll("input")).forEach((t,e)=>{t.parentElement,ht(t)})}),a.addEventListener("input",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("input,textarea,select")){var e=t.target.closest("input,textarea,select");e.parentElement,e.hasAttribute("type")&&e.getAttribute("type")=="color"&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}}),a.addEventListener("change",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("select")){var e=t.target.closest("select");if(console.log(e),e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var r=document.getElementById(e.getAttribute("data-input")),i=e.value;J(r,i)}}if(t&&t.target instanceof HTMLElement&&t.target.closest('dialog [type="radio"]')){var n=t.target.closest("dialog");t.target.closest('dialog [type="radio"]'),Array.from(n.querySelectorAll('[type="radio"][autofocus]')).forEach((c,o)=>{c.removeAttribute("autofocus")}),Array.from(n.querySelectorAll('[type="radio"]:checked')).forEach((c,o)=>{c.setAttribute("autofocus",!0)})}}),a.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("[data-change-type][data-input]:not(select)")){var e=t.target.closest("[data-change-type]"),r=document.getElementById(e.getAttribute("data-input")),i=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",r.getAttribute("type")),J(r,i),e.hasAttribute("data-alt-class")){var n=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",n)}}})},ht=a=>{var t=a.parentElement,e=a.getAttribute("maxlength");t.style.setProperty("--maxlength",e);var r=a.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),t.insertBefore(r,a.nextSibling)),r.setAttribute("data-count",a.value.length)},J=(a,t)=>{a.setAttribute("type",t)},ft=a=>{if(Array.from(a.querySelectorAll("details")).forEach((e,r)=>{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[r]=e;return r.target.classList.toggle("is-stuck",r.intersectionRatio<1)},{threshold:[1]});t.observe(a)}};function mt(a){var t,e=a.querySelector(".testimonial__images"),r=e.querySelectorAll("img").length;if(r==1)return!1;a.classList.add("testimonial--multi");var i=function(c){var o=a.querySelector(".btn-next"),d=a.querySelector(".btn-prev");o.setAttribute("data-go",c+1),d.setAttribute("data-go",c-1),o.removeAttribute("disabled"),d.removeAttribute("disabled"),c==1?d.setAttribute("disabled",!0):c==r&&o.setAttribute("disabled",!0)};e.addEventListener("scroll",function(n){clearTimeout(t),t=setTimeout(function(){var c=e.scrollWidth,o=e.scrollHeight,d=e.scrollLeft,s=e.scrollTop,l=Math.round(d/c*r)+1;d==0&&s!=0&&(l=Math.round(s/o*r)+1),a.setAttribute("data-show",l),i(l)},300)},!1),a.addEventListener("click",function(n){for(var c=n.target;c&&c!=this;c=c.parentNode)if(c.matches("[data-go]")){var o=parseInt(c.getAttribute("data-go")),d=0,s=0,l=e.scrollWidth,h=e.scrollHeight;l>h?s=Math.floor(l*((o-1)/r)):d=Math.floor(h*((o-1)/r)),e.scroll({top:d,left:s,behavior:"smooth"});break}},!1)}function vt(a){var t,e=a.querySelector(".carousel__inner"),r=a.querySelectorAll(".carousel__item").length;a.getAttribute("data-cols");var i=a.getAttribute("data-sm-cols"),n=a.getAttribute("data-md-cols");a.querySelector(".carousel__controls a").classList.add("active"),e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var o=e.clientWidth,d=e.scrollWidth,s=e.scrollLeft,l=Math.round(s/d*r)+1,h=a.querySelector(".carousel__item:last-child").offsetLeft;Array.from(a.querySelectorAll(".carousel__controls a")).forEach((f,v)=>{f.classList.remove("active")}),a.querySelector(".control-"+l).classList.add("active"),l==1?a.querySelector(".btn-prev").setAttribute("disabled","disabled"):a.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+o>h?a.querySelector(".btn-next").setAttribute("disabled","disabled"):a.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),a.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches(".carousel__controls a")){c.preventDefault(),Array.from(a.querySelectorAll(".carousel__controls a")).forEach((s,l)=>{s.classList.remove("active")}),o.classList.add("active");var d=document.querySelector(o.getAttribute("href"));e.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),a.addEventListener("click",function(c){for(var o=c.target;o&&o!=this;o=o.parentNode)if(o.matches(".btn-next, .btn-prev")){c.preventDefault();var d=o.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:d,behavior:"smooth"});break}},!1),r==1&&a.classList.add("hide-btns"),i>=r&&a.classList.add("hide-sm-btns"),n>=r&&a.classList.add("hide-md-btns")}function bt(a){a.addEventListener("change",function(t){var e=parseInt(a.querySelector("[data-min] select,[data-min] input").value),r=parseInt(a.querySelector("[data-max] select,[data-max] input").value);Array.from(a.querySelectorAll("[data-min] input")).forEach((i,n)=>{i.setAttribute("max",r)}),Array.from(a.querySelectorAll("[data-max] input")).forEach((i,n)=>{i.setAttribute("min",e)}),Array.from(a.querySelectorAll("[data-min] select option")).forEach((i,n)=>{parseInt(i.getAttribute("value"))>r?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(a.querySelectorAll("[data-max] select option")).forEach((i,n)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function pt(a){a.addEventListener("change",function(t){if(a.matches("[data-value-if]")){var e=a.getAttribute("data-redirect"),r=a.getAttribute("data-value-if");a.value==r&&(document.location.href=e)}else typeof a.value<"u"&&(document.location.href=a.value)},!1)}function yt(a){var t=a.querySelector(".row"),e=t.cloneNode(!0),r=a.querySelector("[data-add]");a.addEventListener("click",function(i){for(var n=i.target;n&&n!=this;n=n.parentNode){if(n.matches("[data-add]")){var c=e.cloneNode(!0);a.insertBefore(c,n),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length>=r.dataset.maxfiles&&r.setAttribute("disabled","disabled");break}if(n.matches("[data-delete]")){var o=n.closest(".row");o.remove(),r.matches("[data-maxfiles]")&&Array.from(a.querySelectorAll(":scope > .row")).length<r.dataset.maxfiles&&r.removeAttribute("disabled");break}}},!1)}function gt(a){Array.from(a.querySelectorAll("[data-input-range]")).forEach((t,e)=>{bt(t)}),Array.from(a.querySelectorAll("[data-redirect]")).forEach((t,e)=>{pt(t)}),Array.from(a.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{yt(t)}),a.addEventListener("change",function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){var r=e.dataset.filesize;e.files[0].size>r&&(e.value="",alert("File too large"));break}},!1),a.addEventListener("change",function(t){Array.from(a.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,r)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):a,n=e.dataset.activeif,c=e.dataset.equals,o=i.querySelector('select[data-id="'.concat(n,'"],input[data-id="').concat(n,'"]'));o.value==c?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(a.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,r)=>{var i=e.closest("[data-group]")?e.closest("[data-group]"):a,n=e.dataset.activeif,c=e.dataset.equals,o=i.querySelector('select[data-id="'.concat(n,'"],input[data-id="').concat(n,'"]'));o.value==c?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class At extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/header.css";'),i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -88,7 +88,7 @@
88
88
  <slot name="checkbox"></slot>
89
89
  `).concat(this.hasAttribute("data-cta")?'<div class="card__footer"><span class="link">'.concat(this.getAttribute("data-cta"),"</span></div>"):"",`
90
90
  </div>
91
- `),this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label"),e=this.shadowRoot.querySelector(".card");if(t.setAttribute("tabindex","-1"),t.matches("label[for]")){var r=document.getElementById(t.getAttribute("for")).checked;r?e.classList.add("checked"):e.classList.remove("checked")}this.addEventListener("click",i=>{var n=new Event("click");e.dispatchEvent(n)}),e.addEventListener("click",i=>{if(t.matches("label[for]")){i.stopPropagation(),i.preventDefault();var n=document.getElementById(t.getAttribute("for")),c=n.getAttribute("name"),o=n.getAttribute("id"),d=Array.from(document.querySelectorAll('[name="'.concat(c,'"][type="radio"]:not([id="').concat(o,'"])')));d.forEach((l,h)=>{var f=document.querySelector('[for="'.concat(l.getAttribute("id"),'"] iam-card'));f.dispatchEvent(new Event("inactive"))}),t.click();var s=n.checked;s?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",i=>{e.classList.remove("checked")}),e.addEventListener("keydown",i=>{switch(i.keyCode){case 32:case 13:if(t.matches("label[for]")){i.stopPropagation(),i.preventDefault();var n=document.getElementById(t.getAttribute("for")),c=n.getAttribute("name"),o=n.getAttribute("id"),d=Array.from(document.querySelectorAll('[name="'.concat(c,'"]:not([id="').concat(o,'"])')));d.forEach((l,h)=>{var f=document.querySelector('[for="'.concat(l.getAttribute("id"),'"] iam-card'));f.dispatchEvent(new Event("inactive"))}),t.click();var s=n.checked;s?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(t,e,r){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=r);break}case"class":{var i=this.classList.toString();this.querySelector('[class*="fa-"]')&&(i+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(i));break}}}}function Bt(a,t){function e(r,i){var n=!1,c=i.getAttribute("name");c.includes("[]")&&(c=c.replace("[]","[".concat(i.value,"]")));var o=r.querySelector('[data-name="'.concat(c,'"]'));o&&i.getAttribute("type")=="checkbox"&&(n=!0);var d=i.getAttribute("data-filter-text");if(o||(o=document.createElement("button"),r.appendChild(o)),o.setAttribute("type","button"),o.classList.add("filter"),o.setAttribute("data-name",c),o.innerHTML=d.replace("$value",i.value),(!i.value||n)&&o.remove(),i.parentNode.closest("[data-filter-text]")){var s=i.parentNode.closest("[data-filter-text]"),l=!0;if(c="",s.querySelectorAll("input").forEach((v,u)=>{var m=v.getAttribute("name");if(c+="".concat(u!=0?",":"").concat(m),r.querySelector('[data-name="'.concat(m,'"]'))&&r.querySelector('[data-name="'.concat(m,'"]')).remove(),v.value){var b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",m),b.innerHTML=d.replace("$value",v.value),r.appendChild(b)}else l=!1}),r.querySelector('[data-name="'.concat(c,'"]'))&&r.querySelector('[data-name="'.concat(c,'"]')).remove(),l){var h=s.getAttribute("data-filter-text");s.querySelectorAll("input").forEach((v,u)=>{var m=v.getAttribute("name");r.querySelector('[data-name="'.concat(m,'"]'))&&r.querySelector('[data-name="'.concat(m,'"]')).remove(),h=h.replace("$".concat(u+1),v.value)});var f=document.createElement("button");f.setAttribute("type","button"),f.classList.add("filter"),f.setAttribute("data-name",c),f.innerHTML=h,r.appendChild(f)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((r,i)=>{e(t,r)}),Array.from(a.querySelectorAll("input[data-filter-text]")).forEach((r,i)=>{r.addEventListener("change",function(n){e(t,r)})}),t.addEventListener("click",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest(".filter")){for(var i=r.target.closest(".filter"),n=i.getAttribute("data-name").split(","),c=0;c<n.length;c++){var o=n[c],d='[name="'.concat(o,'"]');if(o.match(/\[(.*)\]/)){o.replace(/\[(.*)\]/,"[]");var s=o.replace(/.*\[(.*)\]/,"$1");d='[value="'.concat(s,'"]')}for(var l=a.querySelectorAll(d),h=0;h<l.length;h++){var f=l[h];if(f.getAttribute("type")!="radio"&&f.getAttribute("type")!="checkbox")f.value="";else{f.checked=!1;var r=new Event("force");a.hasAttribute("data-nosubmit")||f.closest("form").dispatchEvent(r)}}}i.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class Pt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/applied-filters.css";'),i=this.classList.toString(),n=document.createElement("template");n.innerHTML=`
91
+ `),this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label"),e=this.shadowRoot.querySelector(".card");if(t.setAttribute("tabindex","-1"),t.matches("label[for]")){var r=document.getElementById(t.getAttribute("for")).checked;r?e.classList.add("checked"):e.classList.remove("checked")}this.addEventListener("click",i=>{var n=new Event("click");e.dispatchEvent(n)}),e.addEventListener("click",i=>{if(t.matches("label[for]")){i.stopPropagation(),i.preventDefault();var n=document.getElementById(t.getAttribute("for")),c=n.getAttribute("name"),o=n.getAttribute("id"),d=Array.from(document.querySelectorAll('[name="'.concat(c,'"][type="radio"]:not([id="').concat(o,'"])')));d.forEach((l,h)=>{var f=document.querySelector('[for="'.concat(l.getAttribute("id"),'"] iam-card'));f.dispatchEvent(new Event("inactive"))}),t.click();var s=n.checked;s?e.classList.add("checked"):e.classList.remove("checked")}}),this.addEventListener("inactive",i=>{e.classList.remove("checked")}),e.addEventListener("keydown",i=>{switch(i.keyCode){case 32:case 13:if(t.matches("label[for]")){i.stopPropagation(),i.preventDefault();var n=document.getElementById(t.getAttribute("for")),c=n.getAttribute("name"),o=n.getAttribute("id"),d=Array.from(document.querySelectorAll('[name="'.concat(c,'"]:not([id="').concat(o,'"])')));d.forEach((l,h)=>{var f=document.querySelector('[for="'.concat(l.getAttribute("id"),'"] iam-card'));f.dispatchEvent(new Event("inactive"))}),t.click();var s=n.checked;s?e.classList.add("checked"):e.classList.remove("checked")}else t.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(t,e,r){switch(t){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=r);break}case"class":{var i=this.classList.toString();this.querySelector('[class*="fa-"]')&&(i+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(i));break}}}}function Bt(a,t){function e(r,i){var n=!1,c=i.getAttribute("name");c.includes("[]")&&(c=c.replace("[]","[".concat(i.value,"]")));var o=r.querySelector('[data-name="'.concat(c,'"]'));o&&i.getAttribute("type")=="checkbox"&&(n=!i.checked);var d=i.getAttribute("data-filter-text");if(o||(o=document.createElement("button"),r.appendChild(o)),o.setAttribute("type","button"),o.classList.add("filter"),o.setAttribute("data-name",c),o.innerHTML=d.replace("$value",i.value),(!i.value||n)&&o.remove(),i.parentNode.closest("[data-filter-text]")){var s=i.parentNode.closest("[data-filter-text]"),l=!0;if(c="",s.querySelectorAll("input").forEach((v,u)=>{var m=v.getAttribute("name");if(c+="".concat(u!=0?",":"").concat(m),r.querySelector('[data-name="'.concat(m,'"]'))&&r.querySelector('[data-name="'.concat(m,'"]')).remove(),v.value){var b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",m),b.innerHTML=d.replace("$value",v.value),r.appendChild(b)}else l=!1}),r.querySelector('[data-name="'.concat(c,'"]'))&&r.querySelector('[data-name="'.concat(c,'"]')).remove(),l){var h=s.getAttribute("data-filter-text");s.querySelectorAll("input").forEach((v,u)=>{var m=v.getAttribute("name");r.querySelector('[data-name="'.concat(m,'"]'))&&r.querySelector('[data-name="'.concat(m,'"]')).remove(),h=h.replace("$".concat(u+1),v.value)});var f=document.createElement("button");f.setAttribute("type","button"),f.classList.add("filter"),f.setAttribute("data-name",c),f.innerHTML=h,r.appendChild(f)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((r,i)=>{e(t,r)}),Array.from(a.querySelectorAll("input[data-filter-text]")).forEach((r,i)=>{r.addEventListener("change",function(n){e(t,r),n.stopPropagation()})}),a.addEventListener("change",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest("input[data-filter-text]")){var i=r.target.closest("input[data-filter-text]");e(t,i)}}),t.addEventListener("click",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest(".filter")){for(var i=r.target.closest(".filter"),n=i.getAttribute("data-name").split(","),c=0;c<n.length;c++){var o=n[c],d='[name="'.concat(o,'"]');if(o.match(/\[(.*)\]/)){o.replace(/\[(.*)\]/,"[]");var s=o.replace(/.*\[(.*)\]/,"$1");d='[value="'.concat(s,'"]')}for(var l=a.querySelectorAll(d),h=0;h<l.length;h++){var f=l[h];if(f.getAttribute("type")!="radio"&&f.getAttribute("type")!="checkbox")f.value="";else{f.checked=!1;var r=new Event("force");a.hasAttribute("data-nosubmit")||f.closest("form").dispatchEvent(r)}}}i.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class Pt extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});var t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",e=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(t,"/css/core.min.css"),r='@import "'.concat(t,'/css/components/applied-filters.css";'),i=this.classList.toString(),n=document.createElement("template");n.innerHTML=`
92
92
  <style>
93
93
  @import "`.concat(e,`";
94
94
  `).concat(r,`