@iamproperty/components 5.1.0-beta3 → 5.1.0-beta4

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function n(e){let r=e.querySelectorAll("details"),a=e.querySelectorAll("summary");if(r.forEach(o=>{o.classList.add("accordion-item")}),a.forEach(o=>{o.classList.add("accordion-header"),o.classList.add("accordion-button"),o.classList.add("h4")}),!e.classList.contains("accordion--keep-open")){const o=e.querySelectorAll(":scope > details");o.forEach(c=>{c.addEventListener("click",()=>{o.forEach(t=>{t!==c&&t.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class i 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`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const A=function(i){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var a=i.getAttribute("data-id"),d=i.getAttribute("id");if(typeof d>"u"||d==null){var n=String.fromCharCode(65+Math.floor(Math.random()*26));d=n+Date.now(),i.setAttribute("id",d)}function o(){window.player=new YT.Player(d,{height:"100%",width:"100%",videoId:a,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:u,onStateChange:e}})}o();function u(r){r.target.playVideo()}var t=!1;function e(r){if(r.data==YT.PlayerState.PLAYING&&!t){var s=document.getElementById(d);s.classList.add("player-ready"),t=!0}}},L=i=>(Array.from(i.querySelectorAll("dialog[open]")).forEach((a,d)=>{a.closest(".dialog__wrapper")||(a.removeAttribute("open"),a.showModal(),a.focus(),w(a))}),i.addEventListener("click",a=>{if(a.target.tagName=="IAM-ACTIONBAR")return!1;if(a&&a.target instanceof HTMLElement&&a.target.closest("[data-modal]")){const o=a.target.closest("[data-modal]"),u=o.hasAttribute("data-modal")?o.getAttribute("data-modal"):o.getAttribute("data-filter"),t=document.querySelector(`dialog#${u}`);w(t),t.showModal(),t.focus();let e=t.offsetWidth;t.setAttribute("style",`max-width: ${e}px;`),Array.from(t.querySelectorAll("[data-duplicate]")).forEach((r,s)=>{const b=r.getAttribute("data-duplicate"),c=document.getElementById(b);if(r.checked!=c.checked){r.checked=c.checked;let l=new Event("change");r.dispatchEvent(l)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:u})}if(a&&a.target instanceof HTMLElement&&a.target.closest("button.dialog__close")){const o=a.target.closest("dialog[open]");a.preventDefault(),o.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,t)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest('button[formmethod="dialog"]')){const o=a.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,t)=>{u.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")})}if(a&&a.target instanceof HTMLElement&&a.target.closest("dialog[open]")){let o=a.target.closest("dialog[open]");var d=window.getComputedStyle(o);if(d.display==="contents"&&(o=o.parentNode.closest("dialog[open]")),!o.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||o.classList.contains("dialog--multi")){const u=o.getBoundingClientRect();(a.clientX<u.left||a.clientX>u.right||a.clientY<u.top||a.clientY>u.bottom)&&(a.target.closest('input[type="radio"]')||o.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:o.getAttribute("id")}))}}if(a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__wrapper > button")){a.stopPropagation();let o=a.target.closest(".dialog__wrapper > button"),u=a.target.closest(".dialog__wrapper > button").parentNode,t="openPopover",e=u.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=e&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((c,l)=>{c.removeAttribute("aria-expanded")}),e.hasAttribute("open"))e.close(),t="closePopover",e.removeAttribute("style"),o.removeAttribute("aria-expanded");else{e.show(),o.setAttribute("aria-expanded",!0);var n=o.getBoundingClientRect();let c=n.top,l=n.left;if(o.closest("iam-table")){let h=o.closest("iam-table").parentNode.getBoundingClientRect();c-=h.top,l-=h.left}e.classList.contains("dialog--fix")&&e.setAttribute("style",`position:fixed;top: ${c}px; left: ${l}px; margin: 3rem 0 0 0;`)}let r=e.getBoundingClientRect(),s=r.bottom-window.scrollY,b=window.innerHeight-window.scrollY;if(s>b){let c=e.hasAttribute("style")?e.getAttribute("style")+" ":"";e.setAttribute("style",c+"transform: translate(0, calc(-100% - 4rem))"),r=e.getBoundingClientRect(),r.top-window.scrollY<100&&e.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,id:o.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((o,u)=>{o.removeAttribute("aria-expanded")}))}),null),w=i=>{i.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!i.classList.contains("dialog--multi")&&i.addEventListener("cancel",d=>{d.preventDefault()});let a=i.querySelector(".youtube-embed a");if(a&&A(a),i.classList.contains("dialog--multi")&&!i.querySelector(":scope > .steps")&&_(i),!i.querySelector(":scope > .mh-lg")&&!i.classList.contains("dialog--multi")){i.innerHTML=`<div class="mh-lg">${i.innerHTML}</div>`;let d=i.querySelector(".mh-lg"),n=i.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(n){let o=n.previousSibling;d.before(n),o&&n.before(o)}}i.querySelector(":scope > button:first-child")||i.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},_=i=>{let a="",d=Array.from(i.querySelectorAll("fieldset[data-title]")),n=i.querySelector("form");d.forEach((t,e)=>{a+=`<button data-title="${t.getAttribute("data-title")}" type="button" class="${e==0?"active":""}" tabindex="-1">${t.getAttribute("data-title")}</button>`;const r=document.createElement("div");if(r.classList.add("btn--wrapper"),t.appendChild(r),e!=0&&(r.innerHTML+=`<button data-title="${d[e-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),e!=d.length-1&&(r.innerHTML+=`<button data-title="${d[e+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),e==d.length-1)if(n&&n.querySelector(':scope > button[type="submit"]')){let s=n.querySelector(':scope > button[type="submit"]');s.classList.add("mb-0"),r.insertAdjacentElement("beforeend",s)}else r.innerHTML+=`<button data-title="${d[e].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),i.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${a}</div>`);let o=Array.from(i.querySelectorAll("fieldset.was-validated"));for(let t=0;t<o.length;t++){let e=o[t],r=e.getAttribute("data-title");if(e.querySelector(".is-invalid")){Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((s,b)=>{s.classList.add("active")});break}else Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((s,b)=>{s.classList.add("valid")})}i.addEventListener("invalid",function(){return function(t){t.preventDefault()}}(),!0);function u(t){const e=i.querySelector("fieldset.active")?i.querySelector("fieldset.active"):i.querySelector("fieldset[data-title]"),r=e.getAttribute("data-title");let s=!0;if(e.classList.add("was-validated"),Array.from(e.querySelectorAll("input")).forEach((l,h)=>{l.checkValidity()||(s=!1)}),s?Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((l,h)=>{l.classList.add("valid")}):Array.from(i.querySelectorAll(`[data-title="${r}"]`)).forEach((l,h)=>{l.classList.remove("valid")}),s||!t.hasAttribute("data-next")){const l=i.querySelector(`fieldset[data-title="${t.getAttribute("data-title")}"]`),h=i.querySelector(`.steps button[data-title="${t.getAttribute("data-title")}"]`);Array.from(i.querySelectorAll("button")).forEach((g,m)=>{g.classList.remove("active")}),Array.from(i.querySelectorAll("fieldset")).forEach((g,m)=>{g.classList.remove("active")}),h.classList.add("active"),l.classList.add("active")}let b=Array.from(i.querySelectorAll("fieldset")).length,c=Array.from(i.querySelectorAll("fieldset.valid")).length;i.style.setProperty("--progress",`${c/(b-1)*100}%`)}i.addEventListener("keydown",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button")){const e=t.target.closest("button");t.keyCode==13&&e.getAttribute("type")!="submit"&&(t.preventDefault(),u(e))}t&&t.target instanceof HTMLElement&&t.target.closest("input")&&(t.target.closest("input").classList.remove("is-invalid"),t.keyCode==13&&t.preventDefault())}),i.addEventListener("click",t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest('button[type="submit"]'))t.target.closest("form").classList.add("was-validated");else if(t&&t.target instanceof HTMLElement&&t.target.closest("button[data-title]")){const e=t.target.closest("button[data-title]");u(e)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function v(i,a){i&&a=="all"?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!0,i.querySelector("label").textContent="Select all"):i&&a==0?(i.querySelector("input").indeterminate=!1,i.querySelector("input").checked=!1,i.querySelector("label").textContent="Select all"):i&&a?(i.querySelector("input").indeterminate=!0,i.querySelector("input").checked=!1,i.querySelector("label").textContent=`${a} item${a>1?"s":""} selected`):i&&(i.querySelector("input").checked=!1,i.querySelector("input").indeterminate=!1,i.querySelector("label").textContent="Select all")}class S extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const a=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",d=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${a}/css/core.min.css`,n=document.createElement("template");n.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */import k from"js-cookie";var g=function(q,r,o,a){function m(c){return c instanceof o?c:new o(function(u){u(c)})}return new(o||(o=Promise))(function(c,u){function b(n){try{f(a.next(n))}catch(p){u(p)}}function v(n){try{f(a.throw(n))}catch(p){u(p)}}function f(n){n.done?c(n.value):m(n.value).then(b,v)}f((a=a.apply(q,r||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class $ extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const r=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"):`${r}/css/core.min.css`,a=document.createElement("template");a.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function h(d,m){function u(e,t){let l=!1,r=t.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${t.value}]`));let i=e.querySelector(`[data-name="${r}"]`);i&&t.getAttribute("type")=="checkbox"&&(l=!t.checked);let o=t.getAttribute("data-filter-text");if(i||(i=document.createElement("button"),e.appendChild(i)),i.setAttribute("type","button"),i.classList.add("filter"),i.setAttribute("data-name",r),i.innerHTML=o.replace("$value",t.value),(!t.value||l)&&i.remove(),t.parentNode.closest("[data-filter-text]")){let p=t.parentNode.closest("[data-filter-text]"),f=!0;if(r="",p.querySelectorAll("input").forEach((a,n)=>{let s=a.getAttribute("name");if(r+=`${n!=0?",":""}${s}`,e.querySelector(`[data-name="${s}"]`)&&e.querySelector(`[data-name="${s}"]`).remove(),a.value){let c=document.createElement("button");c.setAttribute("type","button"),c.classList.add("filter"),c.setAttribute("data-name",s),c.innerHTML=o.replace("$value",a.value),e.appendChild(c)}else f=!1}),e.querySelector(`[data-name="${r}"]`)&&e.querySelector(`[data-name="${r}"]`).remove(),f){let a=p.getAttribute("data-filter-text");p.querySelectorAll("input").forEach((s,c)=>{let b=s.getAttribute("name");e.querySelector(`[data-name="${b}"]`)&&e.querySelector(`[data-name="${b}"]`).remove(),a=a.replace(`$${c+1}`,s.value)});let n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",r),n.innerHTML=a,e.appendChild(n)}}}Array.from(d.querySelectorAll('input[type="checkbox"]:checked')).forEach((e,t)=>{u(m,e)}),Array.from(d.querySelectorAll("input[data-filter-text]")).forEach((e,t)=>{e.addEventListener("change",function(l){u(m,e),l.stopPropagation()})}),d.addEventListener("change",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest("input[data-filter-text]")){let t=e.target.closest("input[data-filter-text]");u(m,t)}}),m.addEventListener("click",function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){let r=e.target.closest(".filter"),i=r.getAttribute("data-name").split(",");for(var t=0;t<i.length;t++){let o=i[t],p=`[name="${o}"]`;o.match(/\[(.*)\]/)&&(o.replace(/\[(.*)\]/,"[]"),p=`[value="${o.replace(/.*\[(.*)\]/,"$1")}"]`);let f=d.querySelectorAll(p);for(var l=0;l<f.length;l++){let a=f[l];if(a.getAttribute("type")!="radio"&&a.getAttribute("type")!="checkbox")a.value="";else{a.checked=!1;var e=new Event("force");d.hasAttribute("data-nosubmit")||a.closest("form").dispatchEvent(e)}}}r.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class g extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const m=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",u=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${m}/css/core.min.css`;let e=this.classList.toString();const t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class h extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");let e=this.classList.toString();const a=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"):`${a}/css/core.min.css`,t=document.createElement("template");t.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class s 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`,n=document.createElement("template");n.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */function h(c,o){const r=o.querySelector(".files"),l=o.querySelector(".drop-area"),t=c.querySelector("input"),u=c.hasAttribute("data-maxsize")?c.getAttribute("data-maxsize"):0,a=t.cloneNode();l.append(a),o.addEventListener("click",e=>{e&&e.target instanceof HTMLElement&&e.target.closest(".btn-primary")&&(e.target.closest(".btn-primary"),(t.hasAttribute("multiple")?a:t).click())}),o.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest(".files button")){const i=new DataTransfer,{files:d}=t,p=e.target.closest(".files button");for(let n=0;n<d.length;n++){const s=d[n];s.name!=p.getAttribute("data-file")&&i.items.add(s)}t.files=i.files;const m=new Event("change");t.dispatchEvent(m)}}),a.addEventListener("change",e=>{if(t.hasAttribute("multiple")){const d=[...t.files,...a.files];let p=[];const m=new DataTransfer;for(let n=0;n<d.length;n++){const s=d[n],f=s.size/1e3;!p.includes(s.name)&&(u==0||f<u)&&m.items.add(s),p.push(s.name)}t.files=m.files}else t.files=a.files;const i=new Event("change");t.dispatchEvent(i)}),a.addEventListener("dragenter",e=>{a.classList.add("focus")}),a.addEventListener("dragleave",e=>{a.classList.remove("focus")}),a.addEventListener("drop",e=>{a.classList.remove("focus")}),t.addEventListener("change",e=>{r.innerHTML="";for(const i of t.files)r.innerHTML+=`<span class="file">${i.name} <button data-file="${i.name}">Remove</button></span>`})}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class b extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=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"):`${o}/css/core.min.css`,l=document.createElement("template");l.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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 v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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 v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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 c=this.attachShadow({mode:"open"}),n=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"):`${n}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style class="styles">
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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(),a(i))},!1),i.hasAttribute("data-timeout")){let t=i.getAttribute("data-timeout");var n=new c(function(){a(i)},t);i.addEventListener("mouseenter",o=>{n.pause()}),i.addEventListener("mouseleave",o=>{n.resume()})}}function c(i,n){var t,o,e=n;this.pause=function(){window.clearTimeout(t),e-=new Date-o},this.resume=function(){o=new Date,window.clearTimeout(t),t=window.setTimeout(i,e)},this.resume()}const a=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 n=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"):`${n}/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 e=document.createElement("template");e.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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 v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */import $ from"js-cookie";const C=t=>t.replace(/ /g,"_"),R=function(t){return t=t.toLowerCase(),t=C(t),t=t.replace(/\W/g,""),t},v=(t,l,a)=>l.split(/[\.\[\]\'\"]/).filter(o=>o).reduce((o,c)=>o?o[c]:a,t),g=t=>Array.isArray(t)||t!==null&&["function","object"].includes(typeof t);var S=function(t,l,a,o){function c(r){return r instanceof a?r:new a(function(s){s(r)})}return new(a||(a=Promise))(function(r,s){function u(n){try{d(o.next(n))}catch(i){s(i)}}function e(n){try{d(o.throw(n))}catch(i){s(i)}}function d(n){n.done?r(n.value):c(n.value).then(u,e)}d((o=o.apply(t,l||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Search"});class j extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const l=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"):`${l}/css/core.min.css`,o=document.createElement("template");o.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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),k=(a,e,o)=>e.split(/[\.\[\]\'\"]/).filter(i=>i).reduce((i,b)=>i?i[b]:o,a);var Y=function(a,e,o,i){function b(d){return d instanceof o?d:new o(function(r){r(d)})}return new(o||(o=Promise))(function(d,r){function n(c){try{t(i.next(c))}catch(h){r(h)}}function l(c){try{t(i.throw(c))}catch(h){r(h)}}function t(c){c.done?d(c.value):b(c.value).then(n,l)}t((i=i.apply(a,e||[])).next())})};const R=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((i,b)=>{const d=Array.from(i.querySelectorAll("th, td")),r=["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"];d.forEach((n,l)=>{const t=e[l];if(typeof t<"u"){let c=document.createElement("div");c.innerHTML=t.innerHTML;let h=c.textContent||c.innerText||"";n.setAttribute("data-label",h),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())),r.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,i)=>{let b=window.getComputedStyle(document.querySelector("html")),d=o.querySelector(":scope > *:last-child > *:first-child");if(d){d.classList.add("text-nowrap");let r=d.offsetWidth/parseFloat(b.fontSize);r+=1.7,e=e>r?e:r}}),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,i)=>{o.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((o,i)=>{const b=o.getAttribute("data-view")==="full"?"aria-expanded":"";o.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${b}>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]"),i=o.closest("tr");o.toggleAttribute("aria-expanded"),i.getAttribute("data-view")=="full"?i.setAttribute("data-view","default"):i.setAttribute("data-view","full"),o.blur()}})},N=(a,e)=>{let o=e.querySelector("[data-search]");if(!o)return!1;const i=o.getAttribute("id"),b=o.getAttribute("data-search").split(",");let d=o.parentNode,r={};b.forEach((n,l)=>{Array.from(a.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((t,c)=>{t.querySelector(".td__content")?r[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:r[t.textContent]=t.textContent})}),o.setAttribute("list",`${i}_list`),o.setAttribute("autocomplete","off"),d.querySelector("datalist")||(d.innerHTML+=`<datalist id="${i}_list"></datalist>`),d.querySelector("datalist").innerHTML=`${Object.keys(r).map(n=>`<option value="${n}"></option>`).join("")}`},V=(a,e,o,i,b)=>{var d;let r=function(t,c=!1){if(e.classList.contains("processing"))return!1;if(t.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((h,u)=>{const m=h.getAttribute("data-duplicate"),s=document.getElementById(m),g=document.querySelector(`[for="${m}"] iam-card`);if(s.checked!=h.checked)if(g){let x=new Event("click");g.dispatchEvent(x)}else s.checked=h.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!c){let h=e.querySelector("[data-pagination]");h.value=1,i.setAttribute("data-page",1)}z(a,e,o,i)}else e.hasAttribute("data-submit")?e.submit():(C(a,e,i),_(a,e));if(e.hasAttribute("data-ajax-post")){let h=new FormData(e),u=new URLSearchParams(h).toString();const m=new XMLHttpRequest;m.open("GET",`${window.location.href}?ajax=true&${u}`),m.send()}};e.addEventListener("keyup",t=>{clearTimeout(d),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&(d=setTimeout(function(){r(t)},500))}),e.addEventListener("change",t=>{clearTimeout(d),t&&t.target instanceof HTMLElement&&t.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||O(a,e,b),r(t)),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-filter][data-no-ajax]")?(C(a,e,i),_(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"))&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-show]")&&r(t),t&&t.target instanceof HTMLElement&&t.target.closest("[data-mimic]")&&r(t)}),e.addEventListener("click",t=>{if(clearTimeout(d),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((h,u)=>{h.innerHTML=""});let c=e.elements;for(let h=0;h<c.length;h++)switch(c[h].type.toLowerCase()?c[h].type.toLowerCase():"text"){case"text":case"password":case"textarea":c[h].value="";break;case"radio":case"checkbox":if(c[h].checked){let m=c[h],s=m.getAttribute("id"),g=document.querySelector(`[for="${s}"`);if(g.querySelector("iam-card")){let x=g.querySelector("iam-card"),S=new Event("click");x.dispatchEvent(S)}m.checked=!1}break;case"select-one":case"select-multi":c[h].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||O(a,e,b),r(t)}}),e.addEventListener("submit",t=>{clearTimeout(d),e.hasAttribute("data-submit")||t.preventDefault(),r(t)}),e.addEventListener("force",t=>{r(t)}),e.addEventListener("paginate",t=>{r(t,!0)});let n=[],l=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((t,c)=>{let h=t.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${h}"]`)).forEach((u,m)=>{let s=u.closest("form");n.includes(s)||n.push(s),l.includes(h)||l.push(h)})}),n.forEach((t,c)=>{const h=function(){let u=[],m=new FormData(t);for(const[s,g]of m)document.querySelector(`[data-mimic="${s}"]`)&&!u.includes(s)?(u.push(s),document.querySelector(`[data-mimic="${s}"]`).value=g):document.querySelector(`[data-mimic="${s}"]`)&&(document.querySelector(`[data-mimic="${s}"]`).value+=","+g);for(const s of u){const g=new Event("force");e.dispatchEvent(g)}for(const s of l)if(!m.has(s)&&t.querySelector(`[name="${s}"]`)){document.querySelector(`[data-mimic="${s}"]`).value="";const g=new Event("force");e.dispatchEvent(g)}};t.addEventListener("force",u=>{h()}),t.addEventListener("change",u=>{h()})})},O=(a,e,o)=>{if(e.getAttribute("data-ajax"))return!1;let i=a.querySelector("tbody"),b=e.querySelector("[data-sort]"),d=b.querySelector(`option:nth-child(${b.selectedIndex+1})`),r=d.getAttribute("data-sort"),n=d.getAttribute("data-order"),l=d.getAttribute("data-format");if(!r)return i.innerHTML=o.innerHTML,R(a),!1;let t=[];["asc","desc","descending"].includes(n)||(t=n.split(","));let c=[];Array.from(i.querySelectorAll("tr")).forEach((u,m)=>{let s=u.querySelector('td[data-label="'+r+'"], th[data-label="'+r+'"]').textContent.trim();u.querySelector('[data-label="'+r+'"] .td__content')&&(s=u.querySelector('[data-label="'+r+'"] .td__content').textContent.trim()),t.length&&t.includes(s)&&(s=t.indexOf(s)),B(s)&&(s=Q(s,10)),l&&l=="date"&&(s=new Date(s));const g={index:s,row:u};c.push(g)}),c.sort((u,m)=>u.index>m.index?1:-1),(n=="descending"||n=="desc")&&(c=c.reverse());let h="";c.forEach((u,m)=>{h+=u.row.outerHTML}),i.innerHTML=h},C=(a,e,o)=>{a.classList.remove("table--filtered");let i=P(e),b=[],d=0,r=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,c)=>{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((h,u)=>{b.push({column:`${h.trim()}`,value:`${t.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,c)=>{t.innerHTML="",t.parentNode.classList.remove("hover")});let l=0;Object.values(i).forEach((t,c)=>{typeof t=="object"&&Object.values(t).length?l+=Object.values(t).length:l++}),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((t,c)=>{t.innerHTML+=`(${l})`,t.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[t,c]of Object.entries(i))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((h,u)=>{let m=!1;c.forEach((s,g)=>{let x=h.querySelector(`[data-label="${t}"]`);if(s&&s=="$today")s=M("date",new Date);else if(s&&s=="$yesterday"){let f=new Date;f.setDate(f.getDate()-1),s=M("date",f)}else if(s&&(s=="$thisWeek"||s=="$lastWeek")){let f=new Date,y=new Date(f.setDate(f.getDate()-(f.getDay()-1))),p=new Date(f.setDate(f.getDate()-f.getDay()+7)),w=new Date(x.textContent.toLowerCase());if(f.setHours(0,0,0,0),y.setHours(0,0,0,0),p.setHours(0,0,0,0),w.setHours(0,0,0,0),s=="$thisWeek")m=w>=y&&w<=p;else{let A=new Date(y.setDate(y.getDate()-7)),L=new Date(p.setDate(p.getDate()-7));A.setHours(0,0,0,0),L.setHours(0,0,0,0),m=w>=A&&w<=L}}else if(s&&s=="$thisMonth"){let f=new Date,y=f.getFullYear(),p=f.getMonth();var S=new Date(y,p,1),q=new Date(y,p+1,0);let w=new Date(x.textContent.toLowerCase());S.setHours(0,0,0,0),q.setHours(0,0,0,0),w.setHours(0,0,0,0),m=w>=S&&w<=q}else if(s&&s=="$lastMonth"){let f=new Date,y=f.getFullYear(),p=f.getMonth();var E=new Date(y,p-1,1),v=new Date(y,p,0);let w=new Date(x.textContent.toLowerCase());E.setHours(0,0,0,0),v.setHours(0,0,0,0),w.setHours(0,0,0,0),m=w>=E&&w<=v}x&&x.textContent.toLowerCase().includes(s.toLowerCase())&&(m=!0)}),m||(h.classList.add("filtered"),h.setAttribute("data-filtered-by",t))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((t,c)=>{let h=!(b.length>0&&b[0].value.length>=3);b.forEach((u,m)=>{let s=t.querySelector(`[data-label="${u.column}"]`);s&&u.value.length>=3&&s.textContent.toLowerCase().includes(u.value.toLowerCase())&&(h=!0)}),h||t.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((t,c)=>{d++,t.classList.add("filtered--matched"),Math.ceil(d/n)==parseInt(r)&&t.classList.add("filtered--show")}),o&&(o.setAttribute("data-total",d),o.setAttribute("data-show",n),o.setAttribute("data-page",r))},_=(a,e,o)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((b,d)=>{let r=b.getAttribute("data-query"),n;if(r=="total")o.hasAttribute("data-total")?n=o.getAttribute("data-total"):n=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!r.includes(" == ")&&r.includes(" & ")){let l=r.split(" & "),t="";l.forEach(c=>{t+=`:not([data-filtered-by="${c}"])`}),n=Array.from(a.querySelectorAll(`tbody tr${t}`)).length}else if(!r.includes(" == "))n=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${r}"])`)).length;else if(r.includes(" && ")){let l=r.split(" && ");n=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(t){let c=!0;for(const[h,u]of Object.entries(l)){let m=u.split(" == ");(!t.querySelector(`td[data-label="${m[0]}"]`)||t.querySelector(`td[data-label="${m[0]}"]`).textContent!=`${m[1]}`)&&(c=!1)}return c}).length}else{let l=r.split(" == ");n=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${l[0]}"], tbody tr[data-filtered-by="${l[0]}"] td[data-label="${l[0]}"]`)).filter(function(t){return t.textContent===l[1]}).length}b.hasAttribute("data-total")?b.setAttribute("data-total",n):b.innerHTML=n})},Z=function(a,e,o,i){o.addEventListener("update-page",b=>{let d=e.querySelector("[data-pagination]"),r=b.detail.page;if(d.value=r,e.dispatchEvent(new Event("paginate")),i.setAttribute("data-page",r),a.hasAttribute("data-show-history")){const n=new URL(location);n.searchParams.set("page",r),history.pushState({type:"pagination",form:e.getAttribute("id"),page:r},"",n)}if(!i.hasAttribute("data-no-scroll")){const l=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:l,behavior:"smooth"})}}),o.addEventListener("update-show",b=>{let d=e.querySelector("[data-show]"),r=b.detail.show;d.value=r,i.setAttribute("data-show",r),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"),i=0;i<o.length;i++){for(var b=o[i].querySelectorAll("td,th"),d=[],r=0;r<b.length;r++)d.push(`"${b[r].textContent}"`);e.push(d.join(","))}e=e.join(`
5
5
  `);let n=new Blob([e],{type:"text/csv"});var l=document.createElement("a");l.download="export.csv";var t=window.URL.createObjectURL(n);l.href=t,l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l)},I=function(a,e,o,i){if(R(a),G(a,i),_(a,e,i),i&&i.classList.contains("table--cta")){let d=function(){Array.from(a.querySelectorAll("tr")).forEach((r,n)=>{let l=r.offsetHeight;r.style.setProperty("--row-height",`${l}px`)})};const b=J(a);i.style.setProperty("--cta-width",`${b}rem`),new ResizeObserver(d).observe(a)}},P=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((i,b)=>{if(!(i.type=="radio"&&!i.checked)&&!(i.type=="checkbox"&&!i.checked)&&i&&i.value){let d=i.getAttribute("data-filter");e[d]||(e[d]=new Array),e[d].push(i.value)}}),e},z=function(a,e,o,i){return Y(this,void 0,void 0,function*(){let b=new FormData(e),d=new URLSearchParams(b).toString(),r=a.querySelectorAll("thead tr th"),n=a.querySelector("tbody"),l=e.getAttribute("data-ajax");i.classList.add("table--loading");let t=P(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,m)=>{u.innerHTML="",u.parentNode.classList.remove("hover")});let c=0;Object.values(t).forEach((u,m)=>{typeof u=="object"&&Object.values(u).length?c+=Object.values(u).length:c++}),c&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((u,m)=>{u.innerHTML+=`(${c})`,u.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;const{signal:h}=controller[l];o.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(l+"?"+d,{signal:h,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(u=>u.json()).then(u=>{let m=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",s=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",g=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",x=k(u,s,15),S=k(u,g,1),q=k(u,m),E=i.hasAttribute("data-empty-msg")?i.getAttribute("data-empty-msg"):"No results found";q?(n.innerHTML="",q.forEach((v,f)=>{var y=document.createElement("tr");r.forEach((p,w)=>{let A="";var L=document.createElement("td");if(L.setAttribute("data-label",p.innerText),p.getAttribute("data-output")){var $=p.getAttribute("data-output");A=$.replace(new RegExp(/{(.*?)}/,"gm"),function(D){return k(v,D.replace("{","").replace("}",""))})}if(p.hasAttribute("data-output-array")){var $=p.getAttribute("data-output");let F=k(v,$.replace("{","").replace("}",""));A="",F.forEach((j,it)=>{let W=p.getAttribute("data-output-array"),T="";if(p.hasAttribute("data-output-array-property")&&p.hasAttribute("data-output-array-transform")){const H=k(j,p.getAttribute("data-output-array-property")),U=JSON.parse(p.getAttribute("data-output-array-transform"))[H];T=W.replace(`{${p.getAttribute("data-output-array-property")}}`,U)}T=T.replace(new RegExp(/{(.*?)}/,"gm"),function(H){return k(j,H.replace("{","").replace("}",""))}),A+=T})}p.hasAttribute("data-transform")&&(A=JSON.parse(p.getAttribute("data-transform"))[A],!A&&p.hasAttribute("data-default")&&(A=p.getAttribute("data-default"))),L.innerHTML=A,y.appendChild(L)}),n.appendChild(y)}),N(a,e),i.setAttribute("data-total",parseInt(x)),i.setAttribute("data-page",parseInt(S)),I(a,e,o,i),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((v,f)=>{let y=k(u,v.getAttribute("data-ajax-query"),"");v.hasAttribute("data-total")?v.setAttribute("data-total",y):v.innerHTML=y}),parseInt(x)==0&&(n.innerHTML=`<tr><td colspan="100%"><span>${E}</span></td></tr>`),i.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:d})):n.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',o.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(u){console.log(u)}})},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`,i=document.createElement("template");i.innerHTML=`
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const d=function(t){t.querySelectorAll(":scope > details");const o=t.querySelectorAll(":scope > details, :scope > a");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)}let i=0;o.forEach((e,r)=>{let n=document.createElement("button");if(e.matches("details")){let s=e.querySelector(":scope > summary"),l=s.classList.contains("disabled");s.classList.add("visually-hidden"),e.hasAttribute("id")&&n.setAttribute("data-id",`${e.getAttribute("id")}`),e.hasAttribute("open")&&n.setAttribute("aria-pressed",!0),n.innerHTML=`${s.innerText}`,n.classList.add("link"),n.setAttribute("data-index",i),e.setAttribute("tabindex","-1"),l&&n.classList.add("disabled"),i++}else e.matches("a")&&(n=e);n.classList.add("link"),a.appendChild(n)})},c=function(t){let o=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(e=>{e.addEventListener("click",r=>{if(r.preventDefault(),e.classList.contains("disabled"))return!1;i.forEach(n=>{let s=n==e;n.setAttribute("aria-pressed",s)}),o.forEach((n,s)=>{let l=e.getAttribute("data-index")==s;l?n.setAttribute("open",l):n.removeAttribute("open")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:e.textContent})})}),a.forEach((e,r)=>{e.addEventListener("click",n=>{n.preventDefault(),i[r].click()})})},p=function(t){if(!t.querySelector(":scope > details"))return!1;let o=t.querySelectorAll(":scope > details"),a=t.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&t.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(t.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),t.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):t.querySelector("details[open]")||(o[0].setAttribute("open",!0),a[0].setAttribute("aria-pressed",!0))},b=function(t){d(t),c(t),p(t)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class u extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const o=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"):`${o}/css/core.min.css`,i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
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),L=t=>{const o=function(e){const a=document.querySelector(`label[for="${e.replace("#","")}"]`),i=document.querySelector(e+" summary"),l=document.querySelector(`dialog${e}`);a instanceof HTMLElement?a.click():i instanceof HTMLElement?i.click():l instanceof HTMLElement&&l.showModal()};return location.hash&&o(location.hash),window.addEventListener("hashchange",function(){o(location.hash)},!1),addEventListener("popstate",e=>{if(e&&e.state&&e.state.type&&e.state.type=="pagination"){let a=document.querySelector(`#${e.state.form}`),i=document.querySelector(`#${e.state.form} [data-pagination]`);i?i.value=e.state.page:a.innerHTML+=`<input name="page" type="hidden" data-pagination="true" value="${e.state.page}" />`,a.dispatchEvent(new Event("submit"))}}),document.addEventListener("submit",e=>{if(e&&e.target instanceof HTMLElement&&e.target.matches("form")){let a=e.target;a.querySelector(":invalid")&&(a.classList.add("was-validated"),e.preventDefault())}}),null};class v{constructor(o){document.body.classList.contains("youtubeLoaded")?o.addEventListener("click",function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches("a")){e.preventDefault(),y(a);break}},!1):this.loadScripts(o,this.createEmbed)}loadScripts(o){return new Promise((e,a)=>{const i=new Image;i.onload=function(){var l=document.createElement("script");l.src="https://www.youtube.com/iframe_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(l,s),document.body.classList.add("youtubeLoaded"),e(!0),l.onload=()=>{o.addEventListener("click",function(r){console.log("click"),r&&r.target instanceof HTMLElement&&r.target.closest("a")&&(r.preventDefault(),y(r.target.closest("a")))},!1)}},i.onerror=function(){a(!1)},i.src="https://youtube.com/favicon.ico"})}}const y=function(t){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var o=t.getAttribute("data-id"),e=t.getAttribute("id");if(typeof e>"u"||e==null){var a=String.fromCharCode(65+Math.floor(Math.random()*26));e=a+Date.now(),t.setAttribute("id",e)}function i(){window.player=new YT.Player(e,{height:"100%",width:"100%",videoId:o,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:l,onStateChange:r}})}i();function l(n){n.target.playVideo()}var s=!1;function r(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((o,e)=>{o.closest(".dialog__wrapper")||(o.removeAttribute("open"),o.showModal(),o.focus(),A(o))}),t.addEventListener("click",o=>{if(o.target.tagName=="IAM-ACTIONBAR")return!1;if(o&&o.target instanceof HTMLElement&&o.target.closest("[data-modal]")){const i=o.target.closest("[data-modal]"),l=i.hasAttribute("data-modal")?i.getAttribute("data-modal"):i.getAttribute("data-filter"),s=document.querySelector(`dialog#${l}`);A(s),s.showModal(),s.focus();let r=s.offsetWidth;s.setAttribute("style",`max-width: ${r}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:l})}if(o&&o.target instanceof HTMLElement&&o.target.closest("button.dialog__close")){const i=o.target.closest("dialog[open]");o.preventDefault(),i.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((l,s)=>{l.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(o&&o.target instanceof HTMLElement&&o.target.closest('button[formmethod="dialog"]')){const i=o.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:i.getAttribute("id")})}if(o&&o.target instanceof HTMLElement&&o.target.closest("dialog[open]")){let i=o.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 l=i.getBoundingClientRect();(o.clientX<l.left||o.clientX>l.right||o.clientY<l.top||o.clientY>l.bottom)&&(o.target.closest('input[type="radio"]')||i.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")}))}}if(o&&o.target instanceof HTMLElement&&o.target.closest(".dialog__wrapper > button")){o.stopPropagation();let i=o.target.closest(".dialog__wrapper > button"),l=o.target.closest(".dialog__wrapper > button").parentNode,s="openPopover",r=l.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=r&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,f)=>{u.removeAttribute("aria-expanded")}),r.hasAttribute("open"))r.close(),s="closePopover",r.removeAttribute("style"),i.removeAttribute("aria-expanded");else{r.show(),i.setAttribute("aria-expanded",!0);var a=i.getBoundingClientRect();let u=a.top,f=a.left;if(i.closest("iam-table")){let m=i.closest("iam-table").parentNode.getBoundingClientRect();u-=m.top,f-=m.left}r.classList.contains("dialog--fix")&&r.setAttribute("style",`position:fixed;top: ${u}px; left: ${f}px; margin: 3rem 0 0 0;`)}let n=r.getBoundingClientRect(),c=n.bottom-window.scrollY,d=window.innerHeight-window.scrollY;if(c>d){let u=r.hasAttribute("style")?r.getAttribute("style")+" ":"";r.setAttribute("style",u+"transform: translate(0, calc(-100% - 4rem))"),n=r.getBoundingClientRect(),n.top-window.scrollY<100&&r.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:s,id:i.textContent})}o&&o.target instanceof HTMLElement&&!o.target.closest("dialog[open]")&&!o.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,l)=>{i.removeAttribute("aria-expanded")}))}),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 o=t.querySelector(".youtube-embed a");if(o&&y(o),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"),a=t.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(a){let i=a.previousSibling;e.before(a),i&&a.before(i)}}t.querySelector(":scope > button:first-child")||t.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},q=t=>{let o="",e=Array.from(t.querySelectorAll("fieldset[data-title]")),a=t.querySelector("form");e.forEach((s,r)=>{o+=`<button data-title="${s.getAttribute("data-title")}" type="button" class="${r==0?"active":""}" tabindex="-1">${s.getAttribute("data-title")}</button>`;const n=document.createElement("div");if(n.classList.add("btn--wrapper"),s.appendChild(n),r!=0&&(n.innerHTML+=`<button data-title="${e[r-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),r!=e.length-1&&(n.innerHTML+=`<button data-title="${e[r+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),r==e.length-1)if(a&&a.querySelector(':scope > button[type="submit"]')){let c=a.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),n.insertAdjacentElement("beforeend",c)}else n.innerHTML+=`<button data-title="${e[r].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${o}</div>`);let i=Array.from(t.querySelectorAll("fieldset.was-validated"));for(let s=0;s<i.length;s++){let r=i[s],n=r.getAttribute("data-title");if(r.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 l(s){const r=t.querySelector("fieldset.active")?t.querySelector("fieldset.active"):t.querySelector("fieldset[data-title]"),n=r.getAttribute("data-title");let c=!0;if(r.classList.add("was-validated"),Array.from(r.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 r=s.target.closest("button");s.keyCode==13&&r.getAttribute("type")!="submit"&&(s.preventDefault(),l(r))}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 r=s.target.closest("button[data-title]");l(r)}return null})};function E(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",t=>{const o=t.target.closest("[open] summary");if(o)window.dataLayer.push({event:"closeDetails",detailsTitle:o.textContent||""});else{const e=t.target.closest("summary"),a=t.target.closest("a"),i=t.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")||""})}})}const x=t=>{function o(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((e,a)=>{e.parentElement,T(e)}),document.querySelector('input[type="date"]')){let a=function(i){const l=i.getFullYear(),s=String(i.getMonth()+1).padStart(2,"0"),r=String(i.getDate()).padStart(2,"0");return`${l}-${s}-${r}`};const e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((i,l)=>{let s=e;if(i.hasAttribute("data-start")&&(s.setDate(s.getDate()+parseInt(i.getAttribute("data-start"))),i.setAttribute("min",a(s))),i.hasAttribute("data-period")){let r=parseInt(i.getAttribute("data-period")),n=new Date;n.setDate(s.getDate()+r),i.setAttribute("max",a(n))}if(i.hasAttribute("data-allowed-days")){let r=JSON.parse(`[${i.getAttribute("data-allowed-days")}]`);i.addEventListener("input",function(n){var c=new Date(this.value).getUTCDay();r.includes(c)?i.setCustomValidity(""):i.setCustomValidity("That day of the week is not allowed")})}})}}document.readyState==="complete"&&o(),document.onreadystatechange=()=>{document.readyState==="complete"&&o()},t.addEventListener("input",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("input,textarea,select")){const 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)}}),t.addEventListener("change",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("select")){const a=e.target.closest("select");if(a.hasAttribute("data-change-type")&&a.hasAttribute("data-input")){const i=document.getElementById(a.getAttribute("data-input")),l=a.value;w(i,l)}}if(e&&e.target instanceof HTMLElement&&e.target.closest('dialog [type="radio"]')){const a=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(a.querySelectorAll('[type="radio"][autofocus]')).forEach((i,l)=>{i.removeAttribute("autofocus")}),Array.from(a.querySelectorAll('[type="radio"]:checked')).forEach((i,l)=>{i.setAttribute("autofocus",!0)})}}),t.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-change-type][data-input]:not(select)")){const a=e.target.closest("[data-change-type]"),i=document.getElementById(a.getAttribute("data-input")),l=a.getAttribute("data-change-type");if(a.setAttribute("data-change-type",i.getAttribute("type")),w(i,l),a.hasAttribute("data-alt-class")){const s=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",s)}}})},T=t=>{let o=t.parentElement,e=t.getAttribute("maxlength");o.style.setProperty("--maxlength",e);let a=t.nextElementSibling;(!a||a&&a.classList.contains("invalid-feedback"))&&(a=document.createElement("span"),o.insertBefore(a,t.nextSibling)),a.setAttribute("data-count",t.value.length)},w=(t,o)=>{t.setAttribute("type",o)},_=t=>{Array.from(t.querySelectorAll("details")).forEach((o,e)=>{o.addEventListener("mouseenter",function(a){window.matchMedia("(min-width: 62em)").matches&&o.setAttribute("open","true")},!1),o.addEventListener("mouseleave",function(a){window.matchMedia("(min-width: 62em)").matches&&o.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 o;const e=t.querySelector(".testimonial__images"),a=e.querySelectorAll("img").length;if(a==1)return!1;t.classList.add("testimonial--multi");const i=function(l){const s=t.querySelector(".btn-next"),r=t.querySelector(".btn-prev");s.setAttribute("data-go",l+1),r.setAttribute("data-go",l-1),s.removeAttribute("disabled"),r.removeAttribute("disabled"),l==1?r.setAttribute("disabled",!0):l==a&&s.setAttribute("disabled",!0)};e.addEventListener("scroll",function(l){clearTimeout(o),o=setTimeout(function(){let s=e.scrollWidth,r=e.scrollHeight,n=e.scrollLeft,c=e.scrollTop,d=Math.round(n/s*a)+1;n==0&&c!=0&&(d=Math.round(c/r*a)+1),t.setAttribute("data-show",d),i(d)},300)},!1),t.addEventListener("click",function(l){for(var s=l.target;s&&s!=this;s=s.parentNode)if(s.matches("[data-go]")){let r=parseInt(s.getAttribute("data-go")),n=0,c=0,d=e.scrollWidth,u=e.scrollHeight;d>u?c=Math.floor(d*((r-1)/a)):n=Math.floor(u*((r-1)/a)),e.scroll({top:n,left:c,behavior:"smooth"});break}},!1)}function k(t){var o;let e=t.querySelector(".carousel__inner"),a=t.querySelectorAll(".carousel__item").length;t.getAttribute("data-cols");let i=t.getAttribute("data-sm-cols"),l=t.getAttribute("data-md-cols");t.querySelector(".carousel__controls a").setAttribute("aria-current",!0),e.addEventListener("scroll",function(s){clearTimeout(o),o=setTimeout(function(){let r=e.clientWidth,n=e.scrollWidth,c=e.scrollLeft,d=Math.round(c/n*a)+1,u=t.querySelector(".carousel__item:last-child").offsetLeft;Array.from(t.querySelectorAll(".carousel__controls a")).forEach((f,m)=>{f.removeAttribute("aria-current")}),t.querySelector(".control-"+d).setAttribute("aria-current",!0),d==1?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),e.scrollLeft+r>u?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),t.addEventListener("click",function(s){for(var r=s.target;r&&r!=this;r=r.parentNode)if(r.matches(".carousel__controls a")){s.preventDefault(),Array.from(t.querySelectorAll(".carousel__controls a")).forEach((c,d)=>{c.removeAttribute("aria-current")}),r.setAttribute("aria-current",!0);const n=document.querySelector(r.getAttribute("href"));e.scroll({top:0,left:n.offsetLeft,behavior:"smooth"});break}},!1),t.addEventListener("click",function(s){for(var r=s.target;r&&r!=this;r=r.parentNode)if(r.matches(".btn-next, .btn-prev")){s.preventDefault();let n=r.classList.contains("btn-prev")?e.scrollLeft-e.clientWidth:e.scrollLeft+e.clientWidth;e.scroll({top:0,left:n,behavior:"smooth"});break}},!1),a==1&&t.classList.add("hide-btns"),i>=a&&t.classList.add("hide-sm-btns"),l>=a&&t.classList.add("hide-md-btns")}function $(t){t.addEventListener("change",function(o){var e=parseInt(t.querySelector("[data-min] select,[data-min] input").value),a=parseInt(t.querySelector("[data-max] select,[data-max] input").value);Array.from(t.querySelectorAll("[data-min] input")).forEach((i,l)=>{i.setAttribute("max",a)}),Array.from(t.querySelectorAll("[data-max] input")).forEach((i,l)=>{i.setAttribute("min",e)}),Array.from(t.querySelectorAll("[data-min] select option")).forEach((i,l)=>{parseInt(i.getAttribute("value"))>a?i.classList.add("d-none"):i.classList.remove("d-none")}),Array.from(t.querySelectorAll("[data-max] select option")).forEach((i,l)=>{parseInt(i.getAttribute("value"))<e?i.classList.add("d-none"):i.classList.remove("d-none")})},!1)}function C(t){t.addEventListener("change",function(o){if(t.matches("[data-value-if]")){const e=t.getAttribute("data-redirect"),a=t.getAttribute("data-value-if");t.value==a&&(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),a=t.querySelector("[data-add]");t.addEventListener("click",function(i){for(var l=i.target;l&&l!=this;l=l.parentNode){if(l.matches("[data-add]")){const s=e.cloneNode(!0);t.insertBefore(s,l),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(l.matches("[data-delete]")){l.closest(".row").remove(),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function D(t){Array.from(t.querySelectorAll("[data-input-range]")).forEach((o,e)=>{$(o)}),Array.from(t.querySelectorAll("[data-redirect]")).forEach((o,e)=>{C(o)}),Array.from(t.querySelectorAll(".multiple-file-uploads")).forEach((o,e)=>{H(o)}),t.addEventListener("change",function(o){for(var e=o.target;e&&e!=this;e=e.parentNode)if(e.matches('[type="file"][data-filesize]')&&e.files&&e.files[0]){const a=e.dataset.filesize;e.files[0].size>a&&(e.value="",alert("File too large"));break}},!1),t.addEventListener("change",function(o){Array.from(t.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach((e,a)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,l=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${l}"],input[data-id="${l}"]`).value==s?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")}),Array.from(t.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach((e,a)=>{let i=e.closest("[data-group]")?e.closest("[data-group]"):t,l=e.dataset.activeif,s=e.dataset.equals;i.querySelector(`select[data-id="${l}"],input[data-id="${l}"]`).value==s?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}function I(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(),p(t))},!1),t.hasAttribute("data-timeout")){let e=t.getAttribute("data-timeout");var o=new B(function(){p(t)},e);t.addEventListener("mouseenter",a=>{o.pause()}),t.addEventListener("mouseleave",a=>{o.resume()})}}function B(t,o){var e,a,i=o;this.pause=function(){window.clearTimeout(e),i-=new Date-a},this.resume=function(){a=new Date,window.clearTimeout(e),e=window.setTimeout(t,i)},this.resume()}const p=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 o=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"):`${o}/css/core.min.css`,a=`@import "${o}/css/components/notification.css";`,i=`@import "${o}/css/components/notification.global.css";`,l=this.querySelectorAll("a,button");Array.from(l).forEach((r,n)=>{r.setAttribute("slot","btns"),r.classList.add("link")}),(l.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");const s=document.createElement("template");s.innerHTML=`
5
5
  <style>
@@ -85,12 +85,12 @@ const runEvent = (element, event, eventType) => {
85
85
  document.querySelector(`${event['target']}`).dispatchEvent(theEvent);
86
86
  break;
87
87
  case "setAttribute":
88
- Array.from(form.querySelectorAll(`${event['target']}`)).forEach(function (element, index) {
88
+ Array.from(document.querySelectorAll(`${event['target']}`)).forEach(function (element, index) {
89
89
  element.setAttribute(event['attribute'], event['value']);
90
90
  });
91
91
  break;
92
92
  case "removeAttribute":
93
- Array.from(form.querySelectorAll(`${event['target']}`)).forEach(function (element, index) {
93
+ Array.from(document.querySelectorAll(`${event['target']}`)).forEach(function (element, index) {
94
94
  element.removeAttribute(event['attribute']);
95
95
  });
96
96
  break;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */(function(_){typeof define=="function"&&define.amd?define(_):_()})(function(){"use strict";var _=r=>(r.classList.add("js-enabled"),(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&r.classList.add("ie"),null),it=r=>{var t=function(a){var i=document.querySelector('label[for="'.concat(a.replace("#",""),'"]')),c=document.querySelector(a+" summary"),n=document.querySelector("dialog".concat(a));i instanceof HTMLElement?i.click():c instanceof HTMLElement?c.click():n instanceof HTMLElement&&n.showModal()};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;a.querySelector(":invalid")&&(a.classList.add("was-validated"),e.preventDefault())}}),null},st=function(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))},ot=(r,t)=>String(r).padStart(t,"0"),nt=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);class ct{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(),Y(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 n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(c,n),document.body.classList.add("youtubeLoaded"),e(!0),c.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(){a(!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"),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:n,onStateChange:d}})}c();function n(s){s.target.playVideo()}var o=!1;function d(s){if(s.data==YT.PlayerState.PLAYING&&!o){var l=document.getElementById(a);l.classList.add("player-ready"),o=!0}}},dt=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((v,x)=>{var L=v.getAttribute("data-duplicate"),q=document.getElementById(L);if(v.checked!=q.checked){v.checked=q.checked;var k=new Event("change");v.dispatchEvent(k)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:a})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var n=t.target.closest("dialog[open]");t.preventDefault(),n.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.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('button[formmethod="dialog"]')){var o=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.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 u=t.target.closest(".dialog__wrapper > button"),f=t.target.closest(".dialog__wrapper > button").parentNode,m="openPopover",h=f.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=h&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((v,x)=>{v.removeAttribute("aria-expanded")}),h.hasAttribute("open"))h.close(),m="closePopover",h.removeAttribute("style"),u.removeAttribute("aria-expanded");else{h.show(),u.setAttribute("aria-expanded",!0);var b=u.getBoundingClientRect(),p=b.top,y=b.left;if(u.closest("iam-table")){var w=u.closest("iam-table").parentNode.getBoundingClientRect();p-=w.top,y-=w.left}h.classList.contains("dialog--fix")&&h.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(y,"px; margin: 3rem 0 0 0;"))}var A=h.getBoundingClientRect(),g=A.bottom-window.scrollY,S=window.innerHeight-window.scrollY;if(g>S){var T=h.hasAttribute("style")?h.getAttribute("style")+" ":"";h.setAttribute("style",T+"transform: translate(0, calc(-100% - 4rem))"),A=h.getBoundingClientRect();var E=A.top-window.scrollY;E<100&&h.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:m,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((v,x)=>{v.removeAttribute("aria-expanded")}))}),null),J=r=>{r.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!r.classList.contains("dialog--multi")&&r.addEventListener("cancel",c=>{c.preventDefault()});var t=r.querySelector(".youtube-embed a");if(t&&Y(t),r.classList.contains("dialog--multi")&&!r.querySelector(":scope > .steps")&&lt(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>')},lt=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 f=a.querySelector(':scope > button[type="submit"]');f.classList.add("mb-0"),u.insertAdjacentElement("beforeend",f)}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 n=i[c],o=n.getAttribute("data-title");if(n.querySelector(".is-invalid")){Array.from(r.querySelectorAll('[data-title="'.concat(o,'"]'))).forEach((s,l)=>{s.classList.add("active")});break}else Array.from(r.querySelectorAll('[data-title="'.concat(o,'"]'))).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"),f=!0;if(l.classList.add("was-validated"),Array.from(l.querySelectorAll("input")).forEach((y,w)=>{y.checkValidity()||(f=!1)}),f?Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.add("valid")}):Array.from(r.querySelectorAll('[data-title="'.concat(u,'"]'))).forEach((y,w)=>{y.classList.remove("valid")}),f||!s.hasAttribute("data-next")){var m=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((y,w)=>{y.classList.remove("active")}),Array.from(r.querySelectorAll("fieldset")).forEach((y,w)=>{y.classList.remove("active")}),h.classList.add("active"),m.classList.add("active")}var b=Array.from(r.querySelectorAll("fieldset")).length,p=Array.from(r.querySelectorAll("fieldset.valid")).length;r.style.setProperty("--progress","".concat(p/(b-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 ut(){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")||""})}})}var ht=r=>{function t(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach((a,i)=>{a.parentElement,ft(a)}),document.querySelector('input[type="date"]')){let a=function(i){var c=i.getFullYear(),n=String(i.getMonth()+1).padStart(2,"0"),o=String(i.getDate()).padStart(2,"0");return"".concat(c,"-").concat(n,"-").concat(o)};var e=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach((i,c)=>{var n=e;if(i.hasAttribute("data-start")&&(n.setDate(n.getDate()+parseInt(i.getAttribute("data-start"))),i.setAttribute("min",a(n))),i.hasAttribute("data-period")){var o=parseInt(i.getAttribute("data-period")),d=new Date;d.setDate(n.getDate()+o),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)}}),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 n=e.target.closest("dialog");e.target.closest('dialog [type="radio"]'),Array.from(n.querySelectorAll('[type="radio"][autofocus]')).forEach((o,d)=>{o.removeAttribute("autofocus")}),Array.from(n.querySelectorAll('[type="radio"]:checked')).forEach((o,d)=>{o.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 n=a.getAttribute("data-alt-class");a.setAttribute("data-alt-class",a.getAttribute("class")),a.setAttribute("class",n)}}})},ft=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.setAttribute("type",t)},mt=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 bt(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(n){var o=r.querySelector(".btn-next"),d=r.querySelector(".btn-prev");o.setAttribute("data-go",n+1),d.setAttribute("data-go",n-1),o.removeAttribute("disabled"),d.removeAttribute("disabled"),n==1?d.setAttribute("disabled",!0):n==a&&o.setAttribute("disabled",!0)};e.addEventListener("scroll",function(c){clearTimeout(t),t=setTimeout(function(){var n=e.scrollWidth,o=e.scrollHeight,d=e.scrollLeft,s=e.scrollTop,l=Math.round(d/n*a)+1;d==0&&s!=0&&(l=Math.round(s/o*a)+1),r.setAttribute("data-show",l),i(l)},300)},!1),r.addEventListener("click",function(c){for(var n=c.target;n&&n!=this;n=n.parentNode)if(n.matches("[data-go]")){var o=parseInt(n.getAttribute("data-go")),d=0,s=0,l=e.scrollWidth,u=e.scrollHeight;l>u?s=Math.floor(l*((o-1)/a)):d=Math.floor(u*((o-1)/a)),e.scroll({top:d,left:s,behavior:"smooth"});break}},!1)}function vt(r){var t,e=r.querySelector(".carousel__inner"),a=r.querySelectorAll(".carousel__item").length;r.getAttribute("data-cols");var i=r.getAttribute("data-sm-cols"),c=r.getAttribute("data-md-cols");r.querySelector(".carousel__controls a").setAttribute("aria-current",!0),e.addEventListener("scroll",function(n){clearTimeout(t),t=setTimeout(function(){var o=e.clientWidth,d=e.scrollWidth,s=e.scrollLeft,l=Math.round(s/d*a)+1,u=r.querySelector(".carousel__item:last-child").offsetLeft;Array.from(r.querySelectorAll(".carousel__controls a")).forEach((f,m)=>{f.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"),e.scrollLeft+o>u?r.querySelector(".btn-next").setAttribute("disabled","disabled"):r.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),r.addEventListener("click",function(n){for(var o=n.target;o&&o!=this;o=o.parentNode)if(o.matches(".carousel__controls a")){n.preventDefault(),Array.from(r.querySelectorAll(".carousel__controls a")).forEach((s,l)=>{s.removeAttribute("aria-current")}),o.setAttribute("aria-current",!0);var d=document.querySelector(o.getAttribute("href"));e.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),r.addEventListener("click",function(n){for(var o=n.target;o&&o!=this;o=o.parentNode)if(o.matches(".btn-next, .btn-prev")){n.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),a==1&&r.classList.add("hide-btns"),i>=a&&r.classList.add("hide-sm-btns"),c>=a&&r.classList.add("hide-md-btns")}function pt(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 yt(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 gt(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 n=e.cloneNode(!0);r.insertBefore(n,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 o=c.closest(".row");o.remove(),a.matches("[data-maxfiles]")&&Array.from(r.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}},!1)}function At(r){Array.from(r.querySelectorAll("[data-input-range]")).forEach((t,e)=>{pt(t)}),Array.from(r.querySelectorAll("[data-redirect]")).forEach((t,e)=>{yt(t)}),Array.from(r.querySelectorAll(".multiple-file-uploads")).forEach((t,e)=>{gt(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,n=e.dataset.equals,o=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));o.value==n?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,n=e.dataset.equals,o=i.querySelector('select[data-id="'.concat(c,'"],input[data-id="').concat(c,'"]'));o.value==n?e.classList.remove("d-none"):e.classList.add("d-none")})},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});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/header.css";'),i=document.createElement("template");i.innerHTML=`
5
5
  <style>
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */
5
5
  !function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";var t=(t,e,a)=>e.split(/[\.\[\]\'\"]/).filter((t=>t)).reduce(((t,e)=>t?t[e]:a),t);class e{constructor(t){document.body.classList.contains("youtubeLoaded")?t.addEventListener("click",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches("a")){t.preventDefault(),a(e);break}}),!1):this.loadScripts(t,this.createEmbed)}loadScripts(t){return new Promise(((e,r)=>{var o=new Image;o.onload=function(){var r=document.createElement("script");r.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(r,o),document.body.classList.add("youtubeLoaded"),e(!0),r.onload=()=>{t.addEventListener("click",(function(t){console.log("click"),t&&t.target instanceof HTMLElement&&t.target.closest("a")&&(t.preventDefault(),a(t.target.closest("a")))}),!1)}},o.onerror=function(){r(!1)},o.src="https://youtube.com/favicon.ico"}))}}var a=function(t){typeof window.player<"u"&&"function"==typeof window.player.pauseVideo&&window.player.pauseVideo();var e=t.getAttribute("data-id"),a=t.getAttribute("id");if(typeof a>"u"||null==a){var r=String.fromCharCode(65+Math.floor(26*Math.random()));a=r+Date.now(),t.setAttribute("id",a)}window.player=new YT.Player(a,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:function(t){t.target.playVideo()},onStateChange:function(t){t.data!=YT.PlayerState.PLAYING||o||(document.getElementById(a).classList.add("player-ready"),o=!0)}}});var o=!1},r=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",(t=>{t.preventDefault()}));var e=t.querySelector(".youtube-embed a");if(e&&a(e),t.classList.contains("dialog--multi")&&!t.querySelector(":scope > .steps")&&o(t),!t.querySelector(":scope > .mh-lg")&&!t.classList.contains("dialog--multi")){t.innerHTML='<div class="mh-lg">'.concat(t.innerHTML,"</div>");var r=t.querySelector(".mh-lg"),n=t.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(n){var s=n.previousSibling;r.before(n),s&&n.before(s)}}t.querySelector(":scope > button:first-child")||t.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},o=t=>{var e="",a=Array.from(t.querySelectorAll("fieldset[data-title]")),r=t.querySelector("form");a.forEach(((t,o)=>{e+='<button data-title="'.concat(t.getAttribute("data-title"),'" type="button" class="').concat(0==o?"active":"",'" tabindex="-1">').concat(t.getAttribute("data-title"),"</button>");var n=document.createElement("div");if(n.classList.add("btn--wrapper"),t.appendChild(n),0!=o&&(n.innerHTML+='<button data-title="'.concat(a[o-1].getAttribute("data-title"),'" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>')),o!=a.length-1&&(n.innerHTML+='<button data-title="'.concat(a[o+1].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="button">Next</button>')),o==a.length-1)if(r&&r.querySelector(':scope > button[type="submit"]')){var s=r.querySelector(':scope > button[type="submit"]');s.classList.add("mb-0"),n.insertAdjacentElement("beforeend",s)}else n.innerHTML+='<button data-title="'.concat(a[o].getAttribute("data-title"),'" class="btn btn-primary mb-0" data-next type="submit">Submit</button>')})),t.insertAdjacentHTML("afterbegin",'<div class="steps bg-primary">'.concat(e,"</div>"));for(var o=Array.from(t.querySelectorAll("fieldset.was-validated")),n=0;n<o.length;n++){var s=o[n],i=s.getAttribute("data-title");if(s.querySelector(".is-invalid")){Array.from(t.querySelectorAll('[data-title="'.concat(i,'"]'))).forEach(((t,e)=>{t.classList.add("active")}));break}Array.from(t.querySelectorAll('[data-title="'.concat(i,'"]'))).forEach(((t,e)=>{t.classList.add("valid")}))}function c(e){var a=t.querySelector("fieldset.active")?t.querySelector("fieldset.active"):t.querySelector("fieldset[data-title]"),r=a.getAttribute("data-title"),o=!0;if(a.classList.add("was-validated"),Array.from(a.querySelectorAll("input")).forEach(((t,e)=>{t.checkValidity()||(o=!1)})),o?Array.from(t.querySelectorAll('[data-title="'.concat(r,'"]'))).forEach(((t,e)=>{t.classList.add("valid")})):Array.from(t.querySelectorAll('[data-title="'.concat(r,'"]'))).forEach(((t,e)=>{t.classList.remove("valid")})),o||!e.hasAttribute("data-next")){var n=t.querySelector('fieldset[data-title="'.concat(e.getAttribute("data-title"),'"]')),s=t.querySelector('.steps button[data-title="'.concat(e.getAttribute("data-title"),'"]'));Array.from(t.querySelectorAll("button")).forEach(((t,e)=>{t.classList.remove("active")})),Array.from(t.querySelectorAll("fieldset")).forEach(((t,e)=>{t.classList.remove("active")})),s.classList.add("active"),n.classList.add("active")}var i=Array.from(t.querySelectorAll("fieldset")).length,c=Array.from(t.querySelectorAll("fieldset.valid")).length;t.style.setProperty("--progress","".concat(c/(i-1)*100,"%"))}t.addEventListener("invalid",(function(t){t.preventDefault()}),!0),t.addEventListener("keydown",(t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("button")){var e=t.target.closest("button");13==t.keyCode&&"submit"!=e.getAttribute("type")&&(t.preventDefault(),c(e))}t&&t.target instanceof HTMLElement&&t.target.closest("input")&&(t.target.closest("input").classList.remove("is-invalid"),13==t.keyCode&&t.preventDefault())})),t.addEventListener("click",(t=>(t&&t.target instanceof HTMLElement&&t.target.closest('button[type="submit"]')?t.target.closest("form").classList.add("was-validated"):t&&t.target instanceof HTMLElement&&t.target.closest("button[data-title]")&&c(t.target.closest("button[data-title]")),null)))},n=t=>{function e(){if(Array.from(document.querySelectorAll("input[maxlength]")).forEach(((t,e)=>{t.parentElement,s(t)})),document.querySelector('input[type="date"]')){let e=function(t){var e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return"".concat(e,"-").concat(a,"-").concat(r)};var t=new Date;Array.from(document.querySelectorAll('input[type="date"]')).forEach(((a,r)=>{var o=t;if(a.hasAttribute("data-start")&&(o.setDate(o.getDate()+parseInt(a.getAttribute("data-start"))),a.setAttribute("min",e(o))),a.hasAttribute("data-period")){var n=parseInt(a.getAttribute("data-period")),s=new Date;s.setDate(o.getDate()+n),a.setAttribute("max",e(s))}if(a.hasAttribute("data-allowed-days")){var i=JSON.parse("[".concat(a.getAttribute("data-allowed-days"),"]"));a.addEventListener("input",(function(t){var e=new Date(this.value).getUTCDay();i.includes(e)?a.setCustomValidity(""):a.setCustomValidity("That day of the week is not allowed")}))}}))}}"complete"===document.readyState&&e(),document.onreadystatechange=()=>{"complete"===document.readyState&&e()},t.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")&&"color"==e.getAttribute("type")&&(e.nextElementSibling.value=e.value),e.hasAttribute("maxlength")&&e.nextElementSibling&&e.nextElementSibling.setAttribute("data-count",e.value.length)}})),t.addEventListener("change",(t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest("select")){var e=t.target.closest("select");if(e.hasAttribute("data-change-type")&&e.hasAttribute("data-input")){var a=document.getElementById(e.getAttribute("data-input")),r=e.value;i(a,r)}}if(t&&t.target instanceof HTMLElement&&t.target.closest('dialog [type="radio"]')){var o=t.target.closest("dialog");t.target.closest('dialog [type="radio"]'),Array.from(o.querySelectorAll('[type="radio"][autofocus]')).forEach(((t,e)=>{t.removeAttribute("autofocus")})),Array.from(o.querySelectorAll('[type="radio"]:checked')).forEach(((t,e)=>{t.setAttribute("autofocus",!0)}))}})),t.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]"),a=document.getElementById(e.getAttribute("data-input")),r=e.getAttribute("data-change-type");if(e.setAttribute("data-change-type",a.getAttribute("type")),i(a,r),e.hasAttribute("data-alt-class")){var o=e.getAttribute("data-alt-class");e.setAttribute("data-alt-class",e.getAttribute("class")),e.setAttribute("class",o)}}}))},s=t=>{var e=t.parentElement,a=t.getAttribute("maxlength");e.style.setProperty("--maxlength",a);var r=t.nextElementSibling;(!r||r&&r.classList.contains("invalid-feedback"))&&(r=document.createElement("span"),e.insertBefore(r,t.nextSibling)),r.setAttribute("data-count",t.value.length)},i=(t,e)=>{t.setAttribute("type",e)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class c 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";'),r=document.createElement("template");r.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <div class="header-banner">\n <div class="container" part="container">\n <slot name="breadcrumb"></slot>\n <div class="header-banner__inner">\n <slot></slot>\n </div>\n </div>\n <picture>\n \x3c!-- Actual image only loaded on desktops --\x3e\n <source srcset="" media="(min-width: 62em)">\n \x3c!-- Placeholder image --\x3e\n <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" lazy="" />\n </picture>\n </div>\n '),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");var t=this.shadowRoot.querySelector("picture"),e=this.shadowRoot.querySelector("picture source");this.hasAttribute("image")?e.setAttribute("srcset",this.getAttribute("image")):t.remove()}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class l 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/accordion.css";'),r='@import "'.concat(t,'/css/components/accordion.global.css";'),o=document.createElement("template");o.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <div class="accordion">\n <slot></slot>\n </div>\n '),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("accordionGlobal")||document.head.insertAdjacentHTML("beforeend",'<style id="accordionGlobal">'.concat(r,"</style>"))}connectedCallback(){!function(t){var e=t.querySelectorAll("details"),a=t.querySelectorAll("summary");if(e.forEach((t=>{t.classList.add("accordion-item")})),a.forEach((t=>{t.classList.add("accordion-header"),t.classList.add("accordion-button"),t.classList.add("h4")})),!t.classList.contains("accordion--keep-open")){var r=t.querySelectorAll(":scope > details");r.forEach((t=>{t.addEventListener("click",(()=>{r.forEach((e=>{e!==t&&e.removeAttribute("open")}))}))}))}}(this)}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class d 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";'),r=document.createElement("template");r.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n\n :host(.admin-panel){\n display: contents!important;\n }\n \n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <div class="tabs">\n <div class="tabs__links__wrapper">\n <div class="tabs__links"></div>\n </div>\n <slot></slot>\n </div>\n '),this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){var t=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class","tabs ".concat(t)),function(t){(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")).classList.add("tabs__links");var r=document.createElement("div");r.classList.add("tabs__links__wrapper"),r.prepend(a),t.prepend(r)}var o=0;e.forEach(((t,e)=>{var r=document.createElement("button");if(t.matches("details")){var n=t.querySelector(":scope > summary"),s=n.classList.contains("disabled");n.classList.add("visually-hidden"),t.hasAttribute("id")&&r.setAttribute("data-id","".concat(t.getAttribute("id"))),t.hasAttribute("open")&&r.setAttribute("aria-pressed",!0),r.innerHTML="".concat(n.innerText),r.classList.add("link"),r.setAttribute("data-index",o),t.setAttribute("tabindex","-1"),s&&r.classList.add("disabled"),o++}else t.matches("a")&&(r=t);r.classList.add("link"),a.appendChild(r)}))})(t),function(t){var e=t.querySelectorAll(":scope > details"),a=t.querySelectorAll(":scope > details > summary"),r=t.querySelectorAll(":scope .tabs__links > button");t.shadowRoot&&(r=t.shadowRoot.querySelectorAll(".tabs__links > button")),r.forEach((t=>{t.addEventListener("click",(a=>{if(a.preventDefault(),t.classList.contains("disabled"))return!1;r.forEach((e=>{var a=e==t;e.setAttribute("aria-pressed",a)})),e.forEach(((e,a)=>{var r=t.getAttribute("data-index")==a;r?e.setAttribute("open",r):e.removeAttribute("open")})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:t.textContent})}))})),a.forEach(((t,e)=>{t.addEventListener("click",(t=>{t.preventDefault(),r[e].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))}(t)}(this)}}var u=t=>{var e=Array.from(t.querySelectorAll("thead th"));Array.from(t.querySelectorAll("tbody tr")).forEach(((t,a)=>{var r=Array.from(t.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"];r.forEach(((t,a)=>{var r=e[a];if(typeof r<"u"){var n=document.createElement("div");n.innerHTML=r.innerHTML;var s=n.textContent||n.innerText||"";t.setAttribute("data-label",s),r.hasAttribute("data-td-class")&&t.setAttribute("class",r.getAttribute("data-td-class")),r.hasAttribute("data-format")&&(t.setAttribute("data-format",r.getAttribute("data-format")),t.innerHTML=v(r.getAttribute("data-format"),t.textContent.trim())),o.includes(t.textContent.trim().toLowerCase())&&t.setAttribute("data-content",t.textContent.trim().toLowerCase())}}))}))},h=(t,e)=>{var a=e.querySelector("[data-search]");if(!a)return!1;var r=a.getAttribute("id"),o=a.getAttribute("data-search").split(","),n=a.parentNode,s={};o.forEach(((e,a)=>{Array.from(t.querySelectorAll('td[data-label="'+e.trim()+'"]')).forEach(((t,e)=>{t.querySelector(".td__content")?s[t.querySelector(".td__content").textContent]=t.querySelector(".td__content").textContent:s[t.textContent]=t.textContent}))})),a.setAttribute("list","".concat(r,"_list")),a.setAttribute("autocomplete","off"),n.querySelector("datalist")||(n.innerHTML+='<datalist id="'.concat(r,'_list"></datalist>')),n.querySelector("datalist").innerHTML="".concat(Object.keys(s).map((t=>'<option value="'.concat(t,'"></option>'))).join(""))},m=(t,e,a)=>{if(e.getAttribute("data-ajax"))return!1;var r=t.querySelector("tbody"),o=e.querySelector("[data-sort]"),n=o.querySelector("option:nth-child(".concat(o.selectedIndex+1,")")),s=n.getAttribute("data-sort"),i=n.getAttribute("data-order"),c=n.getAttribute("data-format");if(!s)return r.innerHTML=a.innerHTML,u(t),!1;var l=[];["asc","desc","descending"].includes(i)||(l=i.split(","));var d=[];Array.from(r.querySelectorAll("tr")).forEach(((t,e)=>{var a=t.querySelector('td[data-label="'+s+'"], th[data-label="'+s+'"]').textContent.trim();t.querySelector('[data-label="'+s+'"] .td__content')&&(a=t.querySelector('[data-label="'+s+'"] .td__content').textContent.trim()),l.length&&l.includes(a)&&(a=l.indexOf(a)),function(t){return"string"==typeof t&&!isNaN(t)&&!isNaN(parseFloat(t))}(a)&&(a=((t,e)=>String(t).padStart(10,"0"))(a)),c&&"date"==c&&(a=new Date(a));var r={index:a,row:t};d.push(r)})),d.sort(((t,e)=>t.index>e.index?1:-1)),("descending"==i||"desc"==i)&&(d=d.reverse());var h="";d.forEach(((t,e)=>{h+=t.row.outerHTML})),r.innerHTML=h},p=(t,e,a)=>{t.classList.remove("table--filtered");var r=y(e),o=[],n=0,s=e.querySelector("[data-pagination]")?parseInt(e.querySelector("[data-pagination]").value):1,i=e.querySelector("[data-show]")?parseInt(e.querySelector("[data-show]").value):15;if(Array.from(t.querySelectorAll("tbody tr")).forEach(((t,e)=>{t.classList.remove("filtered"),t.classList.remove("filtered--matched"),t.classList.remove("filtered--show"),t.removeAttribute("data-filtered-by")})),e.querySelector("[data-search]")){var c=e.querySelector("[data-search]");e.querySelector("[data-search]").getAttribute("data-search").split(",").forEach(((t,e)=>{o.push({column:"".concat(t.trim()),value:"".concat(c.value)})}))}Array.from(e.querySelectorAll("[data-filter-count]")).forEach(((t,e)=>{t.innerHTML="",t.parentNode.classList.remove("hover")}));var l=0;Object.values(r).forEach(((t,e)=>{"object"==typeof t&&Object.values(t).length?l+=Object.values(t).length:l++})),l&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach(((t,e)=>{t.innerHTML+="(".concat(l,")"),t.parentNode.classList.add("hover")})),t.classList.add("table--filtered");var d=function(e,a){Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach(((t,r)=>{var o=!1;a.forEach(((a,r)=>{var n=t.querySelector('[data-label="'.concat(e,'"]'));if(a&&"$today"==a)a=v("date",new Date);else if(a&&"$yesterday"==a){var s=new Date;s.setDate(s.getDate()-1),a=v("date",s)}else if(!a||"$thisWeek"!=a&&"$lastWeek"!=a){if(a&&"$thisMonth"==a){var i=new Date,c=i.getFullYear(),l=i.getMonth(),d=new Date(c,l,1),u=new Date(c,l+1,0),h=new Date(n.textContent.toLowerCase());d.setHours(0,0,0,0),u.setHours(0,0,0,0),h.setHours(0,0,0,0),o=h>=d&&h<=u}else if(a&&"$lastMonth"==a){var m=new Date,p=m.getFullYear(),b=m.getMonth(),f=new Date(p,b-1,1),y=new Date(p,b,0),g=new Date(n.textContent.toLowerCase());f.setHours(0,0,0,0),y.setHours(0,0,0,0),g.setHours(0,0,0,0),o=g>=f&&g<=y}}else{var A=new Date,w=new Date(A.setDate(A.getDate()-(A.getDay()-1))),L=new Date(A.setDate(A.getDate()-A.getDay()+7)),E=new Date(n.textContent.toLowerCase());if(A.setHours(0,0,0,0),w.setHours(0,0,0,0),L.setHours(0,0,0,0),E.setHours(0,0,0,0),"$thisWeek"==a)o=E>=w&&E<=L;else{var S=new Date(w.setDate(w.getDate()-7)),q=new Date(L.setDate(L.getDate()-7));S.setHours(0,0,0,0),q.setHours(0,0,0,0),o=E>=S&&E<=q}}n&&n.textContent.toLowerCase().includes(a.toLowerCase())&&(o=!0)})),o||(t.classList.add("filtered"),t.setAttribute("data-filtered-by",e))}))};for(var[u,h]of Object.entries(r))d(u,h);Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).forEach(((t,e)=>{var a=!(o.length>0&&o[0].value.length>=3);o.forEach(((e,r)=>{var o=t.querySelector('[data-label="'.concat(e.column,'"]'));o&&e.value.length>=3&&o.textContent.toLowerCase().includes(e.value.toLowerCase())&&(a=!0)})),a||t.classList.add("filtered")})),Array.from(t.querySelectorAll("tbody tr:not(.filtered")).forEach(((t,e)=>{n++,t.classList.add("filtered--matched"),Math.ceil(n/i)==parseInt(s)&&t.classList.add("filtered--show")})),a&&(a.setAttribute("data-total",n),a.setAttribute("data-show",i),a.setAttribute("data-page",s))},b=(t,e,a)=>{Array.from(e.querySelectorAll("[data-query]")).forEach(((e,r)=>{var o,n=e.getAttribute("data-query");if("total"==n)a.hasAttribute("data-total")?o=a.getAttribute("data-total"):(t.classList.contains("table--filtered"),o=t.querySelectorAll("tbody tr").length);else if(!n.includes(" == ")&&n.includes(" & ")){var s=n.split(" & "),i="";s.forEach((t=>{i+=':not([data-filtered-by="'.concat(t,'"])')})),o=Array.from(t.querySelectorAll("tbody tr".concat(i))).length}else if(n.includes(" == "))if(n.includes(" && ")){var c=n.split(" && ");o=Array.from(t.querySelectorAll("tbody tr:not(.filtered)")).filter((function(t){var e=!0;for(var[a,r]of Object.entries(c)){var o=r.split(" == ");(!t.querySelector('td[data-label="'.concat(o[0],'"]'))||t.querySelector('td[data-label="'.concat(o[0],'"]')).textContent!="".concat(o[1]))&&(e=!1)}return e})).length}else{var l=n.split(" == ");o=Array.from(t.querySelectorAll('tbody tr.filtered--matched td[data-label="'.concat(l[0],'"], tbody tr[data-filtered-by="').concat(l[0],'"] td[data-label="').concat(l[0],'"]'))).filter((function(t){return t.textContent===l[1]})).length}else o=Array.from(t.querySelectorAll('tbody tr:not([data-filtered-by="'.concat(n,'"])'))).length;e.hasAttribute("data-total")?e.setAttribute("data-total",o):e.innerHTML=o}))},f=function(t,e,a,r){if(u(t),((t,e)=>{if(e.classList.contains(".table--fullwidth")&&!e.hasAttribute("data-expandable")||t.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(t.querySelectorAll("thead tr")).forEach(((t,e)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')})),Array.from(t.querySelectorAll("tbody tr")).forEach(((t,e)=>{var a="full"===t.getAttribute("data-view")?"aria-expanded":"";t.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button '.concat(a,">Expand</button></td>"))}))})(t,r),b(t,e,r),r&&r.classList.contains("table--cta")){let e=function(){Array.from(t.querySelectorAll("tr")).forEach(((t,e)=>{var a=t.offsetHeight;t.style.setProperty("--row-height","".concat(a,"px"))}))};var o=(t=>{var e=0;return Array.from(t.querySelectorAll("tbody tr")).forEach(((t,a)=>{var r=window.getComputedStyle(document.querySelector("html")),o=t.querySelector(":scope > *:last-child > *:first-child");if(o){o.classList.add("text-nowrap");var n=o.offsetWidth/parseFloat(r.fontSize);e=e>(n+=1.7)?e:n}})),e})(t);r.style.setProperty("--cta-width","".concat(o,"rem")),new ResizeObserver(e).observe(t)}},y=function(t){var e=new Object;return Array.from(t.querySelectorAll("[data-filter]")).forEach(((t,a)=>{if(("radio"!=t.type||t.checked)&&("checkbox"!=t.type||t.checked)&&t&&t.value){var r=t.getAttribute("data-filter");e[r]||(e[r]=new Array),e[r].push(t.value)}})),e},g=function(e,a,r,o){return function(t,e,a,r){return new(a||(a=Promise))((function(o,n){function s(t){try{c(r.next(t))}catch(t){n(t)}}function i(t){try{c(r.throw(t))}catch(t){n(t)}}function c(t){t.done?o(t.value):function(t){return t instanceof a?t:new a((function(e){e(t)}))}(t.value).then(s,i)}c((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function*(){var n=new FormData(a),s=new URLSearchParams(n).toString(),i=e.querySelectorAll("thead tr th"),c=e.querySelector("tbody"),l=a.getAttribute("data-ajax");o.classList.add("table--loading");var d=y(a);Array.from(a.querySelectorAll("[data-filter-count]")).forEach(((t,e)=>{t.innerHTML="",t.parentNode.classList.remove("hover")}));var u=0;Object.values(d).forEach(((t,e)=>{"object"==typeof t&&Object.values(t).length?u+=Object.values(t).length:u++})),u&&Array.from(a.querySelectorAll("[data-filter-count]")).forEach(((t,e)=>{t.innerHTML+="(".concat(u,")"),t.parentNode.classList.add("hover")})),window.controller||(window.controller=[]),window.controller[l]&&window.controller[l].abort(),window.controller[l]=new AbortController;var{signal:m}=controller[l];r.setAttribute("data-loading","true"),a.classList.add("processing");try{yield fetch(l+"?"+s,{signal:m,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then((t=>t.json())).then((n=>{var d=a.hasAttribute("data-schema")?a.getAttribute("data-schema"):"data",u=a.hasAttribute("data-schema-total")?a.getAttribute("data-schema-total"):"meta.total",m=a.hasAttribute("data-schema-page")?a.getAttribute("data-schema-page"):"meta.current_page",p=t(n,u,15),b=t(n,m,1),y=t(n,d),g=o.hasAttribute("data-empty-msg")?o.getAttribute("data-empty-msg"):"No results found";y?(c.innerHTML="",y.forEach(((e,a)=>{var r=document.createElement("tr");i.forEach(((a,o)=>{var n="",s=document.createElement("td");if(s.setAttribute("data-label",a.innerText),a.getAttribute("data-output")){var i=a.getAttribute("data-output");n=i.replace(new RegExp(/{(.*?)}/,"gm"),(function(a){return t(e,a.replace("{","").replace("}",""))}))}if(a.hasAttribute("data-output-array")){i=a.getAttribute("data-output");var c=t(e,i.replace("{","").replace("}",""));n="",c.forEach(((e,r)=>{var o=a.getAttribute("data-output-array"),s="";if(a.hasAttribute("data-output-array-property")&&a.hasAttribute("data-output-array-transform")){var i=t(e,a.getAttribute("data-output-array-property")),c=JSON.parse(a.getAttribute("data-output-array-transform"))[i];s=o.replace("{".concat(a.getAttribute("data-output-array-property"),"}"),c)}s=s.replace(new RegExp(/{(.*?)}/,"gm"),(function(a){return t(e,a.replace("{","").replace("}",""))})),n+=s}))}if(a.hasAttribute("data-transform")){var l=JSON.parse(a.getAttribute("data-transform"));!(n=l[n])&&a.hasAttribute("data-default")&&(n=a.getAttribute("data-default"))}s.innerHTML=n,r.appendChild(s)})),c.appendChild(r)})),h(e,a),o.setAttribute("data-total",parseInt(p)),o.setAttribute("data-page",parseInt(b)),f(e,a,0,o),Array.from(a.querySelectorAll("[data-ajax-query]")).forEach(((e,a)=>{var r=t(n,e.getAttribute("data-ajax-query"),"");e.hasAttribute("data-total")?e.setAttribute("data-total",r):e.innerHTML=r})),0==parseInt(p)&&(c.innerHTML='<tr><td colspan="100%"><span>'.concat(g,"</span></td></tr>")),o.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:l,formData:s})):c.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',r.removeAttribute("data-loading"),a.classList.remove("processing")}))}catch(t){console.log(t)}}))},v=(t,e)=>{switch(t){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(t=>t.charAt(0).toUpperCase()+t.slice(1))(e)}};class A 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";'),r='@import "'.concat(t,'/css/components/table.global.css";'),o=document.createElement("template");o.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n\n :host(.mh-sm){\n max-height: none!important;\n }\n :host(.mh-md){\n max-height: none!important;\n }\n :host(.mh-lg){\n max-height: none!important;\n }\n \n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <slot name="before"></slot>\n <div class="table--cta">\n <div class="table__wrapper">\n <slot></slot>\n </div>\n </div>\n <iam-pagination class="pagination--table" ').concat(this.hasAttribute("data-page")?'data-page="'.concat(this.getAttribute("data-page"),'"'):""," ></iam-pagination>\n "),this.shadowRoot.appendChild(o.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",'<style id="tableExtras">'.concat(r,"</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();if(e=(e=e.replace("table--cta","")).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"),this.classList.contains("table--cta")||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"),h(this.table,this.form),this.form.querySelector("[data-pagination]")||(this.form.innerHTML+='<input name="page" type="hidden" value="'.concat(this.getAttribute("data-page"),'" data-pagination="true" />')),this.form.querySelector("[data-show]")||(this.form.innerHTML+='<input name="show" type="hidden" value="'.concat(this.getAttribute("data-show"),'" data-show="true" />')),this.table.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"),"full"==a.getAttribute("data-view")?a.setAttribute("data-view","default"):a.setAttribute("data-view","full"),e.blur()}})),((t,e,a,r,o)=>{var n,s=function(o){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.classList.contains("processing"))return!1;if("submit"==o.type&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach(((t,e)=>{var a=t.getAttribute("data-duplicate"),r=document.getElementById(a),o=document.querySelector('[for="'.concat(a,'"] iam-card'));if(r.checked!=t.checked)if(o){var n=new Event("click");o.dispatchEvent(n)}else r.checked=t.checked})),e.classList.remove("processing")),e.hasAttribute("data-ajax")?(n||(e.querySelector("[data-pagination]").value=1,r.setAttribute("data-page",1)),g(t,e,a,r)):e.hasAttribute("data-submit")?e.submit():(p(t,e,r),b(t,e)),e.hasAttribute("data-ajax-post")){var s=new FormData(e),i=new URLSearchParams(s).toString(),c=new XMLHttpRequest;c.open("GET","".concat(window.location.href,"?ajax=true&").concat(i)),c.send()}};e.addEventListener("keyup",(t=>{clearTimeout(n),t&&t.target instanceof HTMLElement&&t.target.closest("[data-search]")&&(n=setTimeout((function(){s(t)}),500))})),e.addEventListener("change",(a=>{clearTimeout(n),a&&a.target instanceof HTMLElement&&a.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||m(t,e,o),s(a)),a&&a.target instanceof HTMLElement&&a.target.closest("[data-search]")&&s(a),a&&a.target instanceof HTMLElement&&a.target.closest("[data-filter][data-no-ajax]")?(p(t,e,r),b(t,e)):(a&&a.target instanceof HTMLElement&&a.target.closest("[data-filter]")&&a.target.closest("form .dialog__wrapper > dialog")||a&&a.target instanceof HTMLElement&&a.target.closest("[data-filter]")&&!a.target.closest("form dialog"))&&s(a),a&&a.target instanceof HTMLElement&&a.target.closest("[data-show]")&&s(a),a&&a.target instanceof HTMLElement&&a.target.closest("[data-mimic]")&&s(a)})),e.addEventListener("click",(a=>{if(clearTimeout(n),a&&a.target instanceof HTMLElement&&a.target.closest('dialog button:not([type="button"])')&&a.target.closest('dialog button:not([type="button"])').closest("dialog").close(),a&&a.target instanceof HTMLElement&&a.target.closest(".dialog__close")&&(a.preventDefault(),a.stopPropagation()),a&&a.target instanceof HTMLElement&&a.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach(((t,e)=>{t.innerHTML=""}));for(var r=e.elements,i=0;i<r.length;i++)switch(r[i].type.toLowerCase()?r[i].type.toLowerCase():"text"){case"text":case"password":case"textarea":r[i].value="";break;case"radio":case"checkbox":if(r[i].checked){var c=r[i],l=c.getAttribute("id"),d=document.querySelector('[for="'.concat(l,'"'));if(d.querySelector("iam-card")){var u=d.querySelector("iam-card"),h=new Event("click");u.dispatchEvent(h)}c.checked=!1}break;case"select-one":case"select-multi":r[i].selectedIndex=-1}e.classList.remove("processing"),e.hasAttribute("data-submit")||m(t,e,o),s(a)}})),e.addEventListener("submit",(t=>{clearTimeout(n),e.hasAttribute("data-submit")||t.preventDefault(),s(t)})),e.addEventListener("force",(t=>{s(t)})),e.addEventListener("paginate",(t=>{s(t,!0)}));var i=[],c=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach(((t,e)=>{var a=t.getAttribute("data-mimic");Array.from(document.querySelectorAll('[name="'.concat(a,'"]'))).forEach(((t,e)=>{var r=t.closest("form");i.includes(r)||i.push(r),c.includes(a)||c.push(a)}))})),i.forEach(((t,a)=>{var r=function(){var a=[],r=new FormData(t);for(var[o,n]of r)document.querySelector('[data-mimic="'.concat(o,'"]'))&&!a.includes(o)?(a.push(o),document.querySelector('[data-mimic="'.concat(o,'"]')).value=n):document.querySelector('[data-mimic="'.concat(o,'"]'))&&(document.querySelector('[data-mimic="'.concat(o,'"]')).value+=","+n);for(var s of a){var i=new Event("force");e.dispatchEvent(i)}for(var l of c)if(!r.has(l)&&t.querySelector('[name="'.concat(l,'"]'))){document.querySelector('[data-mimic="'.concat(l,'"]')).value="";var d=new Event("force");e.dispatchEvent(d)}};t.addEventListener("force",(t=>{r()})),t.addEventListener("change",(t=>{r()}))}))})(this.table,this.form,this.pagination,this,this.savedTableBody),function(t,e,a,r){a.addEventListener("update-page",(a=>{var o=e.querySelector("[data-pagination]"),n=a.detail.page;if(o.value=n,e.dispatchEvent(new Event("paginate")),r.setAttribute("data-page",n),t.hasAttribute("data-show-history")){var s=new URL(location);s.searchParams.set("page",n),history.pushState({type:"pagination",form:e.getAttribute("id"),page:n},"",s)}if(!r.hasAttribute("data-no-scroll")){var i=t.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:i,behavior:"smooth"})}})),a.addEventListener("update-show",(t=>{var a=e.querySelector("[data-show]"),o=t.detail.show;a.value=o,r.setAttribute("data-show",o),e.dispatchEvent(new Event("submit"))}))}(this.table,this.form,this.pagination,this),((t,e)=>{if(!t)return!1;t.addEventListener("click",(t=>{!function(t){for(var e=[],a=t.getElementsByTagName("tr"),r=0;r<a.length;r++){for(var o=a[r].querySelectorAll("td,th"),n=[],s=0;s<o.length;s++)n.push('"'.concat(o[s].textContent,'"'));e.push(n.join(","))}e=e.join("\n");var i=new Blob([e],{type:"text/csv"}),c=document.createElement("a");c.download="export.csv";var l=window.URL.createObjectURL(i);c.href=l,c.style.display="none",document.body.appendChild(c),c.click(),document.body.removeChild(c)}(e)}))})(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))g(this.table,this.form,this.pagination,this);else{let t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return Math.floor(Math.random()*Date.now()*(t+1))};if(this.querySelector("iam-actionbar[data-selectall]")){var a=this.querySelector("iam-actionbar[data-selectall]");Array.from(this.table.querySelectorAll("thead tr")).forEach(((t,e)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')})),Array.from(this.table.querySelectorAll("tbody tr")).forEach(((e,a)=>{var r="row".concat(t(a));e.insertAdjacentHTML("afterbegin",'<td class="td--fixed selectrow"><input type="checkbox" name="row" id="'.concat(r,'"/><label for="').concat(r,'"><span class="visually-hidden">Select row</span></label></td>'))})),this.table.addEventListener("change",(t=>{if(t&&t.target instanceof HTMLElement&&t.target.closest(".selectrow input")){var e=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,r=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;a.setAttribute("data-selected",e==r?"all":r)}})),a.addEventListener("selected",(t=>{"0"==t.detail.selected?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach(((t,e)=>{t.checked=!1})):"all"==t.detail.selected&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach(((t,e)=>{t.checked=!0}))}))}var r=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach(((t,e)=>{if(t.querySelector(":scope > td > .dialog__wrapper")){var a=t.querySelector(":scope > td > .dialog__wrapper").parentNode;a.classList.add("td--fixed"),r=Array.from(a.parentNode.children).indexOf(a)}})),-1!=r&&(this.table.querySelector("thead tr th:nth-child(".concat(r+1,")")).classList.add("th--fixed"),Array.from(this.table.querySelectorAll("tbody tr td:nth-child(".concat(r+1,")"))).forEach(((t,e)=>{t.classList.add("td--fixed")}))),f(this.table,this.form,this.pagination,this),p(this.table,this.form,this),b(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",(t=>{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)}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class w extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");var t=this.classList.toString(),e=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",a=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):"".concat(e,"/css/core.min.css"),r='@import "'.concat(e,'/css/components/card.css";'),o='@import "'.concat(e,'/css/components/card.global.css";'),n=document.createElement("template");n.innerHTML='\n <style>\n @import "'.concat(a,'";\n ').concat(r,"\n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <div class="card ').concat(t,'" tabindex="0" role="button">\n ').concat(this.hasAttribute("data-image")?'<div class="card__head"><img src="'.concat(this.getAttribute("data-image"),'" alt="" loading="lazy" /></div>'):"",'\n <div class="card__body">\n ').concat(this.classList.contains("card--filter")&&this.hasAttribute("data-total")?'<div class="card__total">'.concat(this.getAttribute("data-total"),"</div>"):"","\n ").concat(this.hasAttribute("data-illustration")?'<div class="card__illustration"><img src="'.concat(this.getAttribute("data-illustration"),'" alt="" loading="lazy" /></div>'):"",'\n <slot></slot>\n </div>\n \n <slot name="checkbox"></slot>\n ').concat(this.hasAttribute("data-cta")?'<div class="card__footer"><span class="link">'.concat(this.getAttribute("data-cta"),"</span></div>"):"","\n </div>\n "),this.shadowRoot.appendChild(n.content.cloneNode(!0)),document.getElementById("cardGlobal")||document.head.insertAdjacentHTML("beforeend",'<style id="cardGlobal">'.concat(o,"</style>"))}connectedCallback(){this.classList.add("loaded");var t=this.parentNode.closest("a, button, label"),e=this.shadowRoot.querySelector(".card");t.setAttribute("tabindex","-1"),t.matches("label[for]")&&(document.getElementById(t.getAttribute("for")).checked?e.classList.add("checked"):e.classList.remove("checked")),this.addEventListener("click",(t=>{var a=new Event("click");e.dispatchEvent(a)})),e.addEventListener("click",(a=>{if(t.matches("label[for]")){a.stopPropagation(),a.preventDefault();var r=document.getElementById(t.getAttribute("for")),o=r.getAttribute("name"),n=r.getAttribute("id");Array.from(document.querySelectorAll('[name="'.concat(o,'"][type="radio"]:not([id="').concat(n,'"])'))).forEach(((t,e)=>{document.querySelector('[for="'.concat(t.getAttribute("id"),'"] iam-card')).dispatchEvent(new Event("inactive"))})),t.click(),r.checked?e.classList.add("checked"):e.classList.remove("checked")}})),this.addEventListener("inactive",(t=>{e.classList.remove("checked")})),e.addEventListener("keydown",(a=>{switch(a.keyCode){case 32:case 13:if(t.matches("label[for]")){a.stopPropagation(),a.preventDefault();var r=document.getElementById(t.getAttribute("for")),o=r.getAttribute("name"),n=r.getAttribute("id");Array.from(document.querySelectorAll('[name="'.concat(o,'"]:not([id="').concat(n,'"])'))).forEach(((t,e)=>{document.querySelector('[for="'.concat(t.getAttribute("id"),'"] iam-card')).dispatchEvent(new Event("inactive"))})),t.click(),r.checked?e.classList.add("checked"):e.classList.remove("checked")}else t.click()}}))}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 r=this.classList.toString();this.querySelector('[class*="fa-"]')&&(r+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class","card ".concat(r))}}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});class L 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";'),r=this.classList.toString(),o=document.createElement("template");o.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <div class="applied-filters ').concat(r,'"></div>\n <slot></slot>\n '),this.shadowRoot.appendChild(o.content.cloneNode(!0))}connectedCallback(){!function(t,e){function a(t,e){var a=!1,r=e.getAttribute("name");r.includes("[]")&&(r=r.replace("[]","[".concat(e.value,"]")));var o=t.querySelector('[data-name="'.concat(r,'"]'));o&&"checkbox"==e.getAttribute("type")&&(a=!e.checked);var n=e.getAttribute("data-filter-text");if(o||(o=document.createElement("button"),t.appendChild(o)),o.setAttribute("type","button"),o.classList.add("filter"),o.setAttribute("data-name",r),o.innerHTML=n.replace("$value",e.value),(!e.value||a)&&o.remove(),e.parentNode.closest("[data-filter-text]")){var s=e.parentNode.closest("[data-filter-text]"),i=!0;if(r="",s.querySelectorAll("input").forEach(((e,a)=>{var o=e.getAttribute("name");if(r+="".concat(0!=a?",":"").concat(o),t.querySelector('[data-name="'.concat(o,'"]'))&&t.querySelector('[data-name="'.concat(o,'"]')).remove(),e.value){var s=document.createElement("button");s.setAttribute("type","button"),s.classList.add("filter"),s.setAttribute("data-name",o),s.innerHTML=n.replace("$value",e.value),t.appendChild(s)}else i=!1})),t.querySelector('[data-name="'.concat(r,'"]'))&&t.querySelector('[data-name="'.concat(r,'"]')).remove(),i){var c=s.getAttribute("data-filter-text");s.querySelectorAll("input").forEach(((e,a)=>{var r=e.getAttribute("name");t.querySelector('[data-name="'.concat(r,'"]'))&&t.querySelector('[data-name="'.concat(r,'"]')).remove(),c=c.replace("$".concat(a+1),e.value)}));var l=document.createElement("button");l.setAttribute("type","button"),l.classList.add("filter"),l.setAttribute("data-name",r),l.innerHTML=c,t.appendChild(l)}}}Array.from(t.querySelectorAll('input[type="checkbox"]:checked')).forEach(((t,r)=>{a(e,t)})),Array.from(t.querySelectorAll("input[data-filter-text]")).forEach(((t,r)=>{t.addEventListener("change",(function(r){a(e,t),r.stopPropagation()}))})),t.addEventListener("change",(function(t){if(t&&t.target instanceof HTMLElement&&t.target.closest("input[data-filter-text]")){var r=t.target.closest("input[data-filter-text]");a(e,r)}})),e.addEventListener("click",(function(e){if(e&&e.target instanceof HTMLElement&&e.target.closest(".filter")){for(var a=e.target.closest(".filter"),r=a.getAttribute("data-name").split(","),o=0;o<r.length;o++){var n=r[o],s='[name="'.concat(n,'"]');if(n.match(/\[(.*)\]/)){n.replace(/\[(.*)\]/,"[]");var i=n.replace(/.*\[(.*)\]/,"$1");s='[value="'.concat(i,'"]')}for(var c=t.querySelectorAll(s),l=0;l<c.length;l++){var d=c[l];"radio"!=d.getAttribute("type")&&"checkbox"!=d.getAttribute("type")?d.value="":(d.checked=!1,e=new Event("force"),t.hasAttribute("data-nosubmit")||d.closest("form").dispatchEvent(e))}}a.remove()}}),!1)}(this,this.shadowRoot.querySelector(".applied-filters"))}}class E 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";'),r=document.createElement("template");r.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n \n ").concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n </style>\n <link rel="stylesheet" href="https://kit.fontawesome.com/26fdbf0179.css" crossorigin="anonymous">\n <div class="pagination d-none">\n \n <div class="minimal" part="minimal">\n <div class="page-jump">\n <div><select class="select--minimal"></select></div>\n <span class="total-pages"></span>\n </div>\n \n <button class="prev" disabled>Prev</button>\n <button class="next" disabled>Next</button>\n </div>\n\n <div class="item-count" part="item-count"></div>\n <div class="per-page" part="per-page">\n <div>\n <select class="select--minimal">\n <option value="15">15</option>\n <option value="25">25</option>\n <option value="40">40</option>\n <option value="50">50</option>\n </select>\n </div>\n <span> / page</span>\n </div>\n <div class="mobile-controls m-auto text-center">\n <i class="fa-solid fa-spinner fa-spin"></i>\n <button class="load-more btn btn-primary m-auto">Load more</a>\n </div>\n </div>\n '),this.shadowRoot.appendChild(r.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"),r=this.shadowRoot.querySelector(".next"),o=this.shadowRoot.querySelector(".per-page select"),n=this.shadowRoot.querySelector(".load-more");this.setup(),e.addEventListener("change",(t=>{this.setAttribute("data-show",this.getAttribute("data-increment")),this.setAttribute("data-page",t.target.value)})),r.addEventListener("click",(t=>{e.value=parseInt(e.value)+1,e.dispatchEvent(new Event("change"))})),a.addEventListener("click",(t=>{e.value=parseInt(e.value)-1,e.dispatchEvent(new Event("change"))})),o.addEventListener("change",(t=>{this.setAttribute("data-increment",t.target.value)})),n.addEventListener("click",(t=>{var e=parseInt(this.getAttribute("data-show"))+parseInt(this.getAttribute("data-increment"));this.setAttribute("data-show",e),e>parseInt(this.getAttribute("data-total"))&&n.remove()}))}setup(){var t=this.shadowRoot.querySelector(".pagination"),e=this.shadowRoot.querySelector(".page-jump select"),a=this.shadowRoot.querySelector(".prev"),r=this.shadowRoot.querySelector(".next"),o=this.shadowRoot.querySelector(".item-count"),n=this.shadowRoot.querySelector(".per-page select"),s=this.shadowRoot.querySelector(".total-pages"),i=parseInt(this.getAttribute("data-page")),c=parseInt(this.getAttribute("data-total")),l=parseInt(this.getAttribute("data-show")),d=parseInt(this.getAttribute("data-increment")),u=Math.ceil(c/d);c>l&&t.classList.remove("d-none");for(var h="",m=1;m<=u;m++)h+='<option value="'.concat(m,'" ').concat(m==i?"selected":"",">").concat(m,"</option>");e.innerHTML=h,s.innerHTML="of ".concat(u),i==u?r.setAttribute("disabled","disabled"):r.removeAttribute("disabled"),1==i?a.setAttribute("disabled","disabled"):a.removeAttribute("disabled");var p=1==i?1:(i-1)*l+1,b=1==i?l:i*l;o.innerHTML="".concat(p," - ").concat(b>c?c:b," of ").concat(c," items"),d&&n.value!=d&&![15,25,40,50].includes(d)&&(n.innerHTML='<option value="'.concat(d,'">').concat(d,'</option>\n <option value="').concat(2*d,'">').concat(2*d,'</option>\n <option value="').concat(3*d,'">').concat(3*d,'</option>\n <option value="').concat(4*d,'">').concat(4*d,"</option>")),n.value=d}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}})))}}}var S=function(t,e){Array.from(t.querySelectorAll(":scope > li")).forEach(((t,a)=>{var r=t.textContent.toLowerCase();t.classList.add("d-none"),r.includes(e.toLowerCase())&&t.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 q 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='\n <style>\n @import "'.concat(e,'";\n ').concat(this.hasAttribute("css")?'@import "'.concat(this.getAttribute("css"),'";'):"",'\n \n :host {\n margin-bottom: 1rem;\n display:block;\n }\n :host(.mh-sm){\n max-height: none!important;\n }\n :host(.mh-md){\n max-height: none!important;\n }\n :host(.mh-lg){\n max-height: none!important;\n }\n </style>\n <div class="form-control__wrapper">\n <label for="search" class="visually-hidden">Search</label>\n <span class="suffix" role="presentation"><slot name="icon"></slot></span>\n <input name="search" id="search" type="text" class="form-control" autocomplete="off" placeholder="Search" />\n </div>\n <div class="list__wrapper">\n <slot></slot>\n </div>\n '),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>'),function(t,e){!function(t,e){var a;e.addEventListener("keyup",(r=>{clearTimeout(a),a=setTimeout((function(){S(t,e.value)}),500)})),e.addEventListener("change",(r=>{clearTimeout(a),S(t,e.value)}))}(t,e)}(this.querySelector("ul"),this.shadowRoot.querySelector("#search"))}}function x(t,e){var a,r,o=e;this.pause=function(){window.clearTimeout(a),o-=new Date-r},this.resume=function(){r=new Date,window.clearTimeout(a),a=window.setTimeout(t,o)},this.resume()}var k=function(t){t.classList.add("d-none")};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Notification"});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/notification.css";'),r='@import "'.concat(t,'/css/components/notification.global.css";'),o=this.querySelectorAll("a,button");Array.from(o).forEach(((t,e)=>{t.setAttribute("slot","btns"),t.classList.add("link")})),(o.length||this.hasAttribute("data-dismiss"))&&this.classList.add("notification--dismissable");var n=document.createElement("template");n.innerHTML='\n <style>\n @import "'.concat(e,'";\n ').concat(a,"\n ").concat(this.hasAttribute("data-css")?"".concat(this.getAttribute("data-css")):"",'\n </style>\n\n <div class="notification">\n <div class="notification__icon"><slot name="icon"></slot></div>\n <div class="notification__inner"><div class="notification__text"><slot></slot></div>').concat(o.length?'<div class="notification__btns"><slot name="btns"></slot></div>':"","</div>\n ").concat(this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>':"","\n </div>\n "),this.shadowRoot.appendChild(n.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",'<style id="notificationHolder">'.concat(r,"</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>'}(function(t){if(t.hasAttribute("data-type")&&"toast"==t.getAttribute("data-type")){var e=document.querySelector(".notification__holder");e||((e=document.createElement("div")).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(),k(t))}),!1),t.hasAttribute("data-timeout")){var a=new x((function(){k(t)}),t.getAttribute("data-timeout"));t.addEventListener("mouseenter",(t=>{a.pause()})),t.addEventListener("mouseleave",(t=>{a.resume()}))}})(a),t&&t.addEventListener("click",(function(t){k(a)}),!1)}}document.addEventListener("DOMContentLoaded",(function(){var t,a;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Pageview",pageTitle:document.title}),document.addEventListener("click",(t=>{var e=t.target.closest("[open] summary");if(e)window.dataLayer.push({event:"closeDetails",detailsTitle:e.textContent||""});else{var a=t.target.closest("summary"),r=t.target.closest("a"),o=t.target.closest("button");a&&window.dataLayer.push({event:"openDetails",detailsTitle:a.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")||""}),o&&window.dataLayer.push({event:"buttonClicked",buttonText:o.textContent||"",class:o.hasAttribute("class")&&o.getAttribute("class")||""})}})),(a=document.body).classList.add("js-enabled"),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&a.classList.add("ie"),t=function(t){var e=document.querySelector('label[for="'.concat(t.replace("#",""),'"]')),a=document.querySelector(t+" summary"),r=document.querySelector("dialog".concat(t));e instanceof HTMLElement?e.click():a instanceof HTMLElement?a.click():r instanceof HTMLElement&&r.showModal()},location.hash&&t(location.hash),window.addEventListener("hashchange",(function(){t(location.hash)}),!1),addEventListener("popstate",(t=>{if(t&&t.state&&t.state.type&&"pagination"==t.state.type){var e=document.querySelector("#".concat(t.state.form)),a=document.querySelector("#".concat(t.state.form," [data-pagination]"));a?a.value=t.state.page:e.innerHTML+='<input name="page" type="hidden" data-pagination="true" value="'.concat(t.state.page,'" />'),e.dispatchEvent(new Event("submit"))}})),document.addEventListener("submit",(t=>{if(t&&t.target instanceof HTMLElement&&t.target.matches("form")){var e=t.target;e.querySelector(":invalid")&&(e.classList.add("was-validated"),t.preventDefault())}})),(t=>{Array.from(t.querySelectorAll("dialog[open]")).forEach(((t,e)=>{t.closest(".dialog__wrapper")||(t.removeAttribute("open"),t.showModal(),t.focus(),r(t))})),t.addEventListener("click",(t=>{if("IAM-ACTIONBAR"==t.target.tagName)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"),o=document.querySelector("dialog#".concat(a));r(o),o.showModal(),o.focus();var n=o.offsetWidth;o.setAttribute("style","max-width: ".concat(n,"px;")),Array.from(o.querySelectorAll("[data-duplicate]")).forEach(((t,e)=>{var a=t.getAttribute("data-duplicate"),r=document.getElementById(a);if(t.checked!=r.checked){t.checked=r.checked;var o=new Event("change");t.dispatchEvent(o)}})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:a})}if(t&&t.target instanceof HTMLElement&&t.target.closest("button.dialog__close")){var s=t.target.closest("dialog[open]");t.preventDefault(),s.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((t,e)=>{t.classList.remove("active")})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest('button[formmethod="dialog"]')){var i=t.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((t,e)=>{t.classList.remove("active")})),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:i.getAttribute("id")})}if(t&&t.target instanceof HTMLElement&&t.target.closest("dialog[open]")){var c=t.target.closest("dialog[open]");if("contents"===window.getComputedStyle(c).display&&(c=c.parentNode.closest("dialog[open]")),!c.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||c.classList.contains("dialog--multi")){var l=c.getBoundingClientRect();(t.clientX<l.left||t.clientX>l.right||t.clientY<l.top||t.clientY>l.bottom)&&(t.target.closest('input[type="radio"]')||c.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:c.getAttribute("id")}))}}if(t&&t.target instanceof HTMLElement&&t.target.closest(".dialog__wrapper > button")){t.stopPropagation();var d=t.target.closest(".dialog__wrapper > button"),u="openPopover",h=t.target.closest(".dialog__wrapper > button").parentNode.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=h&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach(((t,e)=>{t.removeAttribute("aria-expanded")})),h.hasAttribute("open"))h.close(),u="closePopover",h.removeAttribute("style"),d.removeAttribute("aria-expanded");else{h.show(),d.setAttribute("aria-expanded",!0);var m=d.getBoundingClientRect(),p=m.top,b=m.left;if(d.closest("iam-table")){var f=d.closest("iam-table").parentNode.getBoundingClientRect();p-=f.top,b-=f.left}h.classList.contains("dialog--fix")&&h.setAttribute("style","position:fixed;top: ".concat(p,"px; left: ").concat(b,"px; margin: 3rem 0 0 0;"))}var y=h.getBoundingClientRect();if(y.bottom-window.scrollY>window.innerHeight-window.scrollY){var g=h.hasAttribute("style")?h.getAttribute("style")+" ":"";h.setAttribute("style",g+"transform: translate(0, calc(-100% - 4rem))"),(y=h.getBoundingClientRect()).top-window.scrollY<100&&h.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:u,id:d.textContent})}t&&t.target instanceof HTMLElement&&!t.target.closest("dialog[open]")&&!t.target.closest(".dialog__wrapper > button")&&(document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]")&&document.querySelector(".dialog__wrapper:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper:not([data-keep-open]) > button")).forEach(((t,e)=>{t.removeAttribute("aria-expanded")})))}))})(document.body),n(document.body),window.customElements.get("iam-header")||window.customElements.define("iam-header",c),window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",l),window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",d),window.customElements.get("iam-table")||window.customElements.define("iam-table",A),window.customElements.get("iam-card")||window.customElements.define("iam-card",w),window.customElements.get("iam-filterlist")||window.customElements.define("iam-filterlist",q),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",E),window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",L),window.customElements.get("iam-notification")||window.customElements.define("iam-notification",T),Array.from(document.querySelectorAll(".nav")).forEach((t=>{(t=>{Array.from(t.querySelectorAll("details")).forEach(((t,e)=>{t.addEventListener("mouseenter",(function(e){window.matchMedia("(min-width: 62em)").matches&&t.setAttribute("open","true")}),!1),t.addEventListener("mouseleave",(function(e){window.matchMedia("(min-width: 62em)").matches&&t.removeAttribute("open")}),!1)})),"IntersectionObserver"in window&&new IntersectionObserver((t=>{var[e]=t;return e.target.classList.toggle("is-stuck",e.intersectionRatio<1)}),{threshold:[1]}).observe(t)})(t)})),Array.from(document.querySelectorAll(".testimonial")).forEach((t=>{!function(t){var e,a=t.querySelector(".testimonial__images"),r=a.querySelectorAll("img").length;if(1==r)return!1;t.classList.add("testimonial--multi"),a.addEventListener("scroll",(function(o){clearTimeout(e),e=setTimeout((function(){var e=a.scrollWidth,o=a.scrollHeight,n=a.scrollLeft,s=a.scrollTop,i=Math.round(n/e*r)+1;0==n&&0!=s&&(i=Math.round(s/o*r)+1),t.setAttribute("data-show",i),function(e){var a=t.querySelector(".btn-next"),o=t.querySelector(".btn-prev");a.setAttribute("data-go",e+1),o.setAttribute("data-go",e-1),a.removeAttribute("disabled"),o.removeAttribute("disabled"),1==e?o.setAttribute("disabled",!0):e==r&&a.setAttribute("disabled",!0)}(i)}),300)}),!1),t.addEventListener("click",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches("[data-go]")){var o=parseInt(e.getAttribute("data-go")),n=0,s=0,i=a.scrollWidth,c=a.scrollHeight;i>c?s=Math.floor(i*((o-1)/r)):n=Math.floor(c*((o-1)/r)),a.scroll({top:n,left:s,behavior:"smooth"});break}}),!1)}(t)})),Array.from(document.querySelectorAll(".carousel")).forEach((t=>{!function(t){var e,a=t.querySelector(".carousel__inner"),r=t.querySelectorAll(".carousel__item").length;t.getAttribute("data-cols");var o=t.getAttribute("data-sm-cols"),n=t.getAttribute("data-md-cols");t.querySelector(".carousel__controls a").setAttribute("aria-current",!0),a.addEventListener("scroll",(function(o){clearTimeout(e),e=setTimeout((function(){var e=a.clientWidth,o=a.scrollWidth,n=a.scrollLeft,s=Math.round(n/o*r)+1,i=t.querySelector(".carousel__item:last-child").offsetLeft;Array.from(t.querySelectorAll(".carousel__controls a")).forEach(((t,e)=>{t.removeAttribute("aria-current")})),t.querySelector(".control-"+s).setAttribute("aria-current",!0),1==s?t.querySelector(".btn-prev").setAttribute("disabled","disabled"):t.querySelector(".btn-prev").removeAttribute("disabled"),a.scrollLeft+e>i?t.querySelector(".btn-next").setAttribute("disabled","disabled"):t.querySelector(".btn-next").removeAttribute("disabled")}),100)}),!1),t.addEventListener("click",(function(e){for(var r=e.target;r&&r!=this;r=r.parentNode)if(r.matches(".carousel__controls a")){e.preventDefault(),Array.from(t.querySelectorAll(".carousel__controls a")).forEach(((t,e)=>{t.removeAttribute("aria-current")})),r.setAttribute("aria-current",!0);var o=document.querySelector(r.getAttribute("href"));a.scroll({top:0,left:o.offsetLeft,behavior:"smooth"});break}}),!1),t.addEventListener("click",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches(".btn-next, .btn-prev")){t.preventDefault();var r=e.classList.contains("btn-prev")?a.scrollLeft-a.clientWidth:a.scrollLeft+a.clientWidth;a.scroll({top:0,left:r,behavior:"smooth"});break}}),!1),1==r&&t.classList.add("hide-btns"),o>=r&&t.classList.add("hide-sm-btns"),n>=r&&t.classList.add("hide-md-btns")}(t)})),Array.from(document.querySelectorAll("form")).forEach((t=>{!function(t){Array.from(t.querySelectorAll("[data-input-range]")).forEach(((t,e)=>{!function(t){t.addEventListener("change",(function(e){var a=parseInt(t.querySelector("[data-min] select,[data-min] input").value),r=parseInt(t.querySelector("[data-max] select,[data-max] input").value);Array.from(t.querySelectorAll("[data-min] input")).forEach(((t,e)=>{t.setAttribute("max",r)})),Array.from(t.querySelectorAll("[data-max] input")).forEach(((t,e)=>{t.setAttribute("min",a)})),Array.from(t.querySelectorAll("[data-min] select option")).forEach(((t,e)=>{parseInt(t.getAttribute("value"))>r?t.classList.add("d-none"):t.classList.remove("d-none")})),Array.from(t.querySelectorAll("[data-max] select option")).forEach(((t,e)=>{parseInt(t.getAttribute("value"))<a?t.classList.add("d-none"):t.classList.remove("d-none")}))}),!1)}(t)})),Array.from(t.querySelectorAll("[data-redirect]")).forEach(((t,e)=>{!function(t){t.addEventListener("change",(function(e){if(t.matches("[data-value-if]")){var a=t.getAttribute("data-redirect"),r=t.getAttribute("data-value-if");t.value==r&&(document.location.href=a)}else typeof t.value<"u"&&(document.location.href=t.value)}),!1)}(t)})),Array.from(t.querySelectorAll(".multiple-file-uploads")).forEach(((t,e)=>{!function(t){var e=t.querySelector(".row").cloneNode(!0),a=t.querySelector("[data-add]");t.addEventListener("click",(function(r){for(var o=r.target;o&&o!=this;o=o.parentNode){if(o.matches("[data-add]")){var n=e.cloneNode(!0);t.insertBefore(n,o),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length>=a.dataset.maxfiles&&a.setAttribute("disabled","disabled");break}if(o.matches("[data-delete]")){o.closest(".row").remove(),a.matches("[data-maxfiles]")&&Array.from(t.querySelectorAll(":scope > .row")).length<a.dataset.maxfiles&&a.removeAttribute("disabled");break}}}),!1)}(t)})),t.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),t.addEventListener("change",(function(e){Array.from(t.querySelectorAll("select[data-activeif][data-equals],input[data-activeif][data-equals]")).forEach(((e,a)=>{var r=e.closest("[data-group]")?e.closest("[data-group]"):t,o=e.dataset.activeif,n=e.dataset.equals;r.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]')).value==n?e.removeAttribute("disabled"):(e.setAttribute("disabled","disabled"),e.value="")})),Array.from(t.querySelectorAll(".form-control__wrapper[data-displayif][data-equals]")).forEach(((e,a)=>{var r=e.closest("[data-group]")?e.closest("[data-group]"):t,o=e.dataset.activeif,n=e.dataset.equals;r.querySelector('select[data-id="'.concat(o,'"],input[data-id="').concat(o,'"]')).value==n?e.classList.remove("d-none"):e.classList.add("d-none")}))}),!1)}(t)})),Array.from(document.querySelectorAll(".youtube-embed")).forEach((t=>{new e(t)})),window.addEventListener("hashchange",(function(){var t=location.hash.replace("#",""),e=document.querySelector('label[for="'.concat(t,'"]'));e instanceof HTMLElement&&e.click()}),!1)}))}));
@@ -111,12 +111,12 @@ const runEvent = (element,event,eventType) => {
111
111
  break;
112
112
  case "setAttribute":
113
113
 
114
- Array.from(form.querySelectorAll(`${event['target']}`)).forEach(function(element,index){
114
+ Array.from(document.querySelectorAll(`${event['target']}`)).forEach(function(element,index){
115
115
  element.setAttribute(event['attribute'],event['value']);
116
116
  });
117
117
  break;
118
118
  case "removeAttribute":
119
- Array.from(form.querySelectorAll(`${event['target']}`)).forEach(function(element,index){
119
+ Array.from(document.querySelectorAll(`${event['target']}`)).forEach(function(element,index){
120
120
  element.removeAttribute(event['attribute']);
121
121
  });
122
122
  break;
@@ -48,7 +48,7 @@ function wt(e, a, t, i, s, n) {
48
48
  }
49
49
  const Di = /* @__PURE__ */ y(gt, [["render", wt]]);
50
50
  /*!
51
- * iamKey v5.1.0-beta3
51
+ * iamKey v5.1.0-beta4
52
52
  * Copyright 2022-2023 iamproperty
53
53
  */
54
54
  const _t = function(e) {
@@ -557,7 +557,7 @@ class Mt extends HTMLElement {
557
557
  }
558
558
  }
559
559
  /*!
560
- * iamKey v5.1.0-beta3
560
+ * iamKey v5.1.0-beta4
561
561
  * Copyright 2022-2023 iamproperty
562
562
  */
563
563
  class nt extends HTMLElement {
@@ -1152,7 +1152,7 @@ const be = {
1152
1152
  props: {},
1153
1153
  mounted() {
1154
1154
  this.$nextTick(function() {
1155
- D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/accordion/accordion.component.js": () => import("./accordion.component-bd9af0d7.mjs"), "../../../assets/js/components/accordion/accordion.component.min.js": () => import("./accordion.component.min-1ef3ba33.mjs") }), "../../../assets/js/components/accordion/accordion.component.js").then((e) => {
1155
+ D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/accordion/accordion.component.js": () => import("./accordion.component-bd9af0d7.mjs"), "../../../assets/js/components/accordion/accordion.component.min.js": () => import("./accordion.component.min-8809a59e.mjs") }), "../../../assets/js/components/accordion/accordion.component.js").then((e) => {
1156
1156
  window.customElements.get("iam-accordion") || window.customElements.define("iam-accordion", e.default);
1157
1157
  }).catch((e) => {
1158
1158
  console.log(e.message);
@@ -1263,7 +1263,7 @@ const Ii = /* @__PURE__ */ y(Ae, [["render", Ee]]), Te = {
1263
1263
  name: "Card",
1264
1264
  mounted() {
1265
1265
  this.$nextTick(function() {
1266
- D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/card/card.component.js": () => import("./card.component-4a8f3fbe.mjs"), "../../../assets/js/components/card/card.component.min.js": () => import("./card.component.min-dca6a544.mjs") }), "../../../assets/js/components/card/card.component.js").then((e) => {
1266
+ D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/card/card.component.js": () => import("./card.component-4a8f3fbe.mjs"), "../../../assets/js/components/card/card.component.min.js": () => import("./card.component.min-17db52e1.mjs") }), "../../../assets/js/components/card/card.component.js").then((e) => {
1267
1267
  window.customElements.get("iam-card") || window.customElements.define("iam-card", e.default);
1268
1268
  }).catch((e) => {
1269
1269
  console.log(e.message);
@@ -1464,7 +1464,7 @@ function Be(e, a, t, i, s, n) {
1464
1464
  }
1465
1465
  const Oi = /* @__PURE__ */ y(Ce, [["render", Be]]);
1466
1466
  /*!
1467
- * iamKey v5.1.0-beta3
1467
+ * iamKey v5.1.0-beta4
1468
1468
  * Copyright 2022-2023 iamproperty
1469
1469
  */
1470
1470
  window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "header" });
@@ -1917,7 +1917,7 @@ const Wi = /* @__PURE__ */ y(ga, [["render", Ta]]), Ha = {
1917
1917
  name: "Nav",
1918
1918
  mounted() {
1919
1919
  this.$nextTick(function() {
1920
- D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/nav/nav.component.js": () => import("./nav.component-ff8d1484.mjs"), "../../../assets/js/components/nav/nav.component.min.js": () => import("./nav.component.min-13c39b66.mjs") }), "../../../assets/js/components/nav/nav.component.js").then((e) => {
1920
+ D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/nav/nav.component.js": () => import("./nav.component-ff8d1484.mjs"), "../../../assets/js/components/nav/nav.component.min.js": () => import("./nav.component.min-aa89c16d.mjs") }), "../../../assets/js/components/nav/nav.component.js").then((e) => {
1921
1921
  window.customElements.get("iam-nav") || window.customElements.define("iam-nav", e.default);
1922
1922
  }).catch((e) => {
1923
1923
  console.log(e.message);
@@ -2037,7 +2037,7 @@ const Qa = {
2037
2037
  name: "Tabs",
2038
2038
  mounted() {
2039
2039
  this.$nextTick(function() {
2040
- D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/tabs/tabs.component.js": () => import("./tabs.component-1dfbdb3b.mjs"), "../../../assets/js/components/tabs/tabs.component.min.js": () => import("./tabs.component.min-0fa28dd3.mjs") }), "../../../assets/js/components/tabs/tabs.component.js").then((e) => {
2040
+ D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/tabs/tabs.component.js": () => import("./tabs.component-1dfbdb3b.mjs"), "../../../assets/js/components/tabs/tabs.component.min.js": () => import("./tabs.component.min-9bf2758c.mjs") }), "../../../assets/js/components/tabs/tabs.component.js").then((e) => {
2041
2041
  window.customElements.get("iam-tabs") || window.customElements.define("iam-tabs", e.default);
2042
2042
  }).catch((e) => {
2043
2043
  console.log(e.message);
@@ -2167,7 +2167,7 @@ function ui(e, a, t, i, s, n) {
2167
2167
  }
2168
2168
  const Zi = /* @__PURE__ */ y(ni, [["render", ui]]);
2169
2169
  /*!
2170
- * iamKey v5.1.0-beta3
2170
+ * iamKey v5.1.0-beta4
2171
2171
  * Copyright 2022-2023 iamproperty
2172
2172
  */
2173
2173
  function mi(e, a) {
@@ -2263,7 +2263,7 @@ function bi(e, a, t, i, s, n) {
2263
2263
  }
2264
2264
  const to = /* @__PURE__ */ y(pi, [["render", bi]]);
2265
2265
  /*!
2266
- * iamKey v5.1.0-beta3
2266
+ * iamKey v5.1.0-beta4
2267
2267
  * Copyright 2022-2023 iamproperty
2268
2268
  */
2269
2269
  function fi(e, a) {
@@ -2433,7 +2433,7 @@ const ao = /* @__PURE__ */ y(ki, [["render", Li]]), Si = {
2433
2433
  props: {},
2434
2434
  mounted() {
2435
2435
  this.$nextTick(function() {
2436
- D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/actionbar/actionbar.component.js": () => import("./actionbar.component-3f2c98c0.mjs"), "../../../assets/js/components/actionbar/actionbar.component.min.js": () => import("./actionbar.component.min-3489d829.mjs") }), "../../../assets/js/components/actionbar/actionbar.component.js").then((e) => {
2436
+ D(/* @__PURE__ */ Object.assign({ "../../../assets/js/components/actionbar/actionbar.component.js": () => import("./actionbar.component-3f2c98c0.mjs"), "../../../assets/js/components/actionbar/actionbar.component.min.js": () => import("./actionbar.component.min-7bb6c7e1.mjs") }), "../../../assets/js/components/actionbar/actionbar.component.js").then((e) => {
2437
2437
  window.customElements.get("iam-actionbar") || window.customElements.define("iam-actionbar", e.default);
2438
2438
  }).catch((e) => {
2439
2439
  console.log(e.message);
@@ -2480,7 +2480,7 @@ function Hi(e, a, t, i, s, n) {
2480
2480
  }
2481
2481
  const no = /* @__PURE__ */ y(Ti, [["render", Hi]]);
2482
2482
  /*!
2483
- * iamKey v5.1.0-beta3
2483
+ * iamKey v5.1.0-beta4
2484
2484
  * Copyright 2022-2023 iamproperty
2485
2485
  */
2486
2486
  window.dataLayer = window.dataLayer || [], window.dataLayer.push({ event: "customElementRegistered", element: "collapsible side menu" });
@@ -1,5 +1,5 @@
1
1
  (function(w,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(w=typeof globalThis<"u"?globalThis:w||self,i(w.iamkey={},w.Vue))})(this,function(w,i){"use strict";const k=(o,e)=>{const t=o.__vccOpts||o;for(const[r,s]of e)t[r]=s;return t},st={name:"Logo",props:{id:{type:String,required:!1,default:"property"},path:{type:String,required:!1,default:"/svg/logo.svg"},desc:{type:String}},computed:{src:function(){return"#logo-"+this.id},className:function(){return"brand brand--"+this.id}}},lt=["xlink:href"],ct=["innerHTML"];function dt(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(l.className)},[(i.openBlock(),i.createElementBlock("svg",null,[i.createElementVNode("title",null,"iam "+i.toDisplayString(t.id),1),i.createElementVNode("use",{"xlink:href":t.path+l.src},null,8,lt)])),t.desc?(i.openBlock(),i.createElementBlock("span",{key:0,innerHTML:t.desc},null,8,ct)):i.createCommentVNode("",!0)],2)}const mt=k(st,[["render",dt]]);/*!
2
- * iamKey v5.1.0-beta3
2
+ * iamKey v5.1.0-beta4
3
3
  * Copyright 2022-2023 iamproperty
4
4
  */const ut=function(o){return typeof o!="string"?!1:!isNaN(o)&&!isNaN(parseFloat(o))},ht=(o,e)=>String(o).padStart(e,"0"),pt=o=>o.charAt(0).toUpperCase()+o.slice(1),q=(o,e,t)=>e.split(/[\.\[\]\'\"]/).filter(r=>r).reduce((r,s)=>r?r[s]:t,o);var bt=function(o,e,t,r){function s(l){return l instanceof t?l:new t(function(a){a(l)})}return new(t||(t=Promise))(function(l,a){function n(m){try{c(r.next(m))}catch(u){a(u)}}function d(m){try{c(r.throw(m))}catch(u){a(u)}}function c(m){m.done?l(m.value):s(m.value).then(n,d)}c((r=r.apply(o,e||[])).next())})};const O=o=>{const e=Array.from(o.querySelectorAll("thead th"));Array.from(o.querySelectorAll("tbody tr")).forEach((t,r)=>{const s=Array.from(t.querySelectorAll("th, td")),l=["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"];s.forEach((a,n)=>{const d=e[n];if(typeof d<"u"){let c=document.createElement("div");c.innerHTML=d.innerHTML;let m=c.textContent||c.innerText||"";a.setAttribute("data-label",m),d.hasAttribute("data-td-class")&&a.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(a.setAttribute("data-format",d.getAttribute("data-format")),a.innerHTML=j(d.getAttribute("data-format"),a.textContent.trim())),l.includes(a.textContent.trim().toLowerCase())&&a.setAttribute("data-content",a.textContent.trim().toLowerCase())}})})},ft=o=>{let e=0;return Array.from(o.querySelectorAll("tbody tr")).forEach((t,r)=>{let s=window.getComputedStyle(document.querySelector("html")),l=t.querySelector(":scope > *:last-child > *:first-child");if(l){l.classList.add("text-nowrap");let a=l.offsetWidth/parseFloat(s.fontSize);a+=1.7,e=e>a?e:a}}),e},gt=(o,e)=>{if(e.classList.contains(".table--fullwidth")&&!e.hasAttribute("data-expandable")||o.querySelectorAll("thead tr th").length<4&&!e.hasAttribute("data-expandable"))return!1;Array.from(o.querySelectorAll("thead tr")).forEach((t,r)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(o.querySelectorAll("tbody tr")).forEach((t,r)=>{const s=t.getAttribute("data-view")==="full"?"aria-expanded":"";t.insertAdjacentHTML("afterbegin",`<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button ${s}>Expand</button></td>`)})},yt=o=>{o.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let t=e.target.closest("[data-expand-button]"),r=t.closest("tr");t.toggleAttribute("aria-expanded"),r.getAttribute("data-view")=="full"?r.setAttribute("data-view","default"):r.setAttribute("data-view","full"),t.blur()}})},I=(o,e)=>{let t=e.querySelector("[data-search]");if(!t)return!1;const r=t.getAttribute("id"),s=t.getAttribute("data-search").split(",");let l=t.parentNode,a={};s.forEach((n,d)=>{Array.from(o.querySelectorAll('td[data-label="'+n.trim()+'"]')).forEach((c,m)=>{c.querySelector(".td__content")?a[c.querySelector(".td__content").textContent]=c.querySelector(".td__content").textContent:a[c.textContent]=c.textContent})}),t.setAttribute("list",`${r}_list`),t.setAttribute("autocomplete","off"),l.querySelector("datalist")||(l.innerHTML+=`<datalist id="${r}_list"></datalist>`),l.querySelector("datalist").innerHTML=`${Object.keys(a).map(n=>`<option value="${n}"></option>`).join("")}`},vt=(o,e,t,r,s)=>{var l;let a=function(c,m=!1){if(e.classList.contains("processing"))return!1;if(c.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((u,h)=>{const b=u.getAttribute("data-duplicate"),p=document.getElementById(b),f=document.querySelector(`[for="${b}"] iam-card`);if(p.checked!=u.checked)if(f){let y=new Event("click");f.dispatchEvent(y)}else p.checked=u.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!m){let u=e.querySelector("[data-pagination]");u.value=1,r.setAttribute("data-page",1)}Y(o,e,t,r)}else e.hasAttribute("data-submit")?e.submit():(R(o,e,r),M(o,e));if(e.hasAttribute("data-ajax-post")){let u=new FormData(e),h=new URLSearchParams(u).toString();const b=new XMLHttpRequest;b.open("GET",`${window.location.href}?ajax=true&${h}`),b.send()}};e.addEventListener("keyup",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&(l=setTimeout(function(){a(c)},500))}),e.addEventListener("change",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||W(o,e,s),a(c)),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&a(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter][data-no-ajax]")?(R(o,e,r),M(o,e)):(c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter]")&&c.target.closest("form .dialog__wrapper > dialog")||c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter]")&&!c.target.closest("form dialog"))&&a(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-show]")&&a(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-mimic]")&&a(c)}),e.addEventListener("click",c=>{if(clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest('dialog button:not([type="button"])')&&c.target.closest('dialog button:not([type="button"])').closest("dialog").close(),c&&c.target instanceof HTMLElement&&c.target.closest(".dialog__close")&&(c.preventDefault(),c.stopPropagation()),c&&c.target instanceof HTMLElement&&c.target.closest("[data-clear]")){e.classList.add("processing"),Array.from(e.querySelectorAll(".applied-filters")).forEach((u,h)=>{u.innerHTML=""});let m=e.elements;for(let u=0;u<m.length;u++)switch(m[u].type.toLowerCase()?m[u].type.toLowerCase():"text"){case"text":case"password":case"textarea":m[u].value="";break;case"radio":case"checkbox":if(m[u].checked){let h=m[u],b=h.getAttribute("id"),p=document.querySelector(`[for="${b}"`);if(p.querySelector("iam-card")){let f=p.querySelector("iam-card"),y=new Event("click");f.dispatchEvent(y)}h.checked=!1}break;case"select-one":case"select-multi":m[u].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||W(o,e,s),a(c)}}),e.addEventListener("submit",c=>{clearTimeout(l),e.hasAttribute("data-submit")||c.preventDefault(),a(c)}),e.addEventListener("force",c=>{a(c)}),e.addEventListener("paginate",c=>{a(c,!0)});let n=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((c,m)=>{let u=c.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${u}"]`)).forEach((h,b)=>{let p=h.closest("form");n.includes(p)||n.push(p),d.includes(u)||d.push(u)})}),n.forEach((c,m)=>{const u=function(){let h=[],b=new FormData(c);for(const[p,f]of b)document.querySelector(`[data-mimic="${p}"]`)&&!h.includes(p)?(h.push(p),document.querySelector(`[data-mimic="${p}"]`).value=f):document.querySelector(`[data-mimic="${p}"]`)&&(document.querySelector(`[data-mimic="${p}"]`).value+=","+f);for(const p of h){const f=new Event("force");e.dispatchEvent(f)}for(const p of d)if(!b.has(p)&&c.querySelector(`[name="${p}"]`)){document.querySelector(`[data-mimic="${p}"]`).value="";const f=new Event("force");e.dispatchEvent(f)}};c.addEventListener("force",h=>{u()}),c.addEventListener("change",h=>{u()})})},W=(o,e,t)=>{if(e.getAttribute("data-ajax"))return!1;let r=o.querySelector("tbody"),s=e.querySelector("[data-sort]"),l=s.querySelector(`option:nth-child(${s.selectedIndex+1})`),a=l.getAttribute("data-sort"),n=l.getAttribute("data-order"),d=l.getAttribute("data-format");if(!a)return r.innerHTML=t.innerHTML,O(o),!1;let c=[];["asc","desc","descending"].includes(n)||(c=n.split(","));let m=[];Array.from(r.querySelectorAll("tr")).forEach((h,b)=>{let p=h.querySelector('td[data-label="'+a+'"], th[data-label="'+a+'"]').textContent.trim();h.querySelector('[data-label="'+a+'"] .td__content')&&(p=h.querySelector('[data-label="'+a+'"] .td__content').textContent.trim()),c.length&&c.includes(p)&&(p=c.indexOf(p)),ut(p)&&(p=ht(p,10)),d&&d=="date"&&(p=new Date(p));const f={index:p,row:h};m.push(f)}),m.sort((h,b)=>h.index>b.index?1:-1),(n=="descending"||n=="desc")&&(m=m.reverse());let u="";m.forEach((h,b)=>{u+=h.row.outerHTML}),r.innerHTML=u},R=(o,e,t)=>{o.classList.remove("table--filtered");let r=G(e),s=[],l=0,a=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(o.querySelectorAll("tbody tr")).forEach((c,m)=>{c.classList.remove("filtered"),c.classList.remove("filtered--matched"),c.classList.remove("filtered--show"),c.removeAttribute("data-filtered-by")}),e.querySelector("[data-search]")){let c=e.querySelector("[data-search]");e.querySelector("[data-search]").getAttribute("data-search").split(",").forEach((m,u)=>{s.push({column:`${m.trim()}`,value:`${c.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,m)=>{c.innerHTML="",c.parentNode.classList.remove("hover")});let d=0;Object.values(r).forEach((c,m)=>{typeof c=="object"&&Object.values(c).length?d+=Object.values(c).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,m)=>{c.innerHTML+=`(${d})`,c.parentNode.classList.add("hover")}),o.classList.add("table--filtered");for(const[c,m]of Object.entries(r))Array.from(o.querySelectorAll("tbody tr:not(.filtered)")).forEach((u,h)=>{let b=!1;m.forEach((p,f)=>{let y=u.querySelector(`[data-label="${c}"]`);if(p&&p=="$today")p=j("date",new Date);else if(p&&p=="$yesterday"){let _=new Date;_.setDate(_.getDate()-1),p=j("date",_)}else if(p&&(p=="$thisWeek"||p=="$lastWeek")){let _=new Date,x=new Date(_.setDate(_.getDate()-(_.getDay()-1))),A=new Date(_.setDate(_.getDate()-_.getDay()+7)),S=new Date(y.textContent.toLowerCase());if(_.setHours(0,0,0,0),x.setHours(0,0,0,0),A.setHours(0,0,0,0),S.setHours(0,0,0,0),p=="$thisWeek")b=S>=x&&S<=A;else{let E=new Date(x.setDate(x.getDate()-7)),C=new Date(A.setDate(A.getDate()-7));E.setHours(0,0,0,0),C.setHours(0,0,0,0),b=S>=E&&S<=C}}else if(p&&p=="$thisMonth"){let _=new Date,x=_.getFullYear(),A=_.getMonth();var v=new Date(x,A,1),g=new Date(x,A+1,0);let S=new Date(y.textContent.toLowerCase());v.setHours(0,0,0,0),g.setHours(0,0,0,0),S.setHours(0,0,0,0),b=S>=v&&S<=g}else if(p&&p=="$lastMonth"){let _=new Date,x=_.getFullYear(),A=_.getMonth();var T=new Date(x,A-1,1),L=new Date(x,A,0);let S=new Date(y.textContent.toLowerCase());T.setHours(0,0,0,0),L.setHours(0,0,0,0),S.setHours(0,0,0,0),b=S>=T&&S<=L}y&&y.textContent.toLowerCase().includes(p.toLowerCase())&&(b=!0)}),b||(u.classList.add("filtered"),u.setAttribute("data-filtered-by",c))});Array.from(o.querySelectorAll("tbody tr:not(.filtered)")).forEach((c,m)=>{let u=!(s.length>0&&s[0].value.length>=3);s.forEach((h,b)=>{let p=c.querySelector(`[data-label="${h.column}"]`);p&&h.value.length>=3&&p.textContent.toLowerCase().includes(h.value.toLowerCase())&&(u=!0)}),u||c.classList.add("filtered")}),Array.from(o.querySelectorAll("tbody tr:not(.filtered")).forEach((c,m)=>{l++,c.classList.add("filtered--matched"),Math.ceil(l/n)==parseInt(a)&&c.classList.add("filtered--show")}),t&&(t.setAttribute("data-total",l),t.setAttribute("data-show",n),t.setAttribute("data-page",a))},M=(o,e,t)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((r,s)=>{let l=r.getAttribute("data-query"),a;if(l=="total")t.hasAttribute("data-total")?a=t.getAttribute("data-total"):a=(o.classList.contains("table--filtered"),o.querySelectorAll("tbody tr").length);else if(!l.includes(" == ")&&l.includes(" & ")){let n=l.split(" & "),d="";n.forEach(c=>{d+=`:not([data-filtered-by="${c}"])`}),a=Array.from(o.querySelectorAll(`tbody tr${d}`)).length}else if(!l.includes(" == "))a=Array.from(o.querySelectorAll(`tbody tr:not([data-filtered-by="${l}"])`)).length;else if(l.includes(" && ")){let n=l.split(" && ");a=Array.from(o.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let c=!0;for(const[m,u]of Object.entries(n)){let h=u.split(" == ");(!d.querySelector(`td[data-label="${h[0]}"]`)||d.querySelector(`td[data-label="${h[0]}"]`).textContent!=`${h[1]}`)&&(c=!1)}return c}).length}else{let n=l.split(" == ");a=Array.from(o.querySelectorAll(`tbody tr.filtered--matched td[data-label="${n[0]}"], tbody tr[data-filtered-by="${n[0]}"] td[data-label="${n[0]}"]`)).filter(function(d){return d.textContent===n[1]}).length}r.hasAttribute("data-total")?r.setAttribute("data-total",a):r.innerHTML=a})},wt=function(o,e,t,r){t.addEventListener("update-page",s=>{let l=e.querySelector("[data-pagination]"),a=s.detail.page;if(l.value=a,e.dispatchEvent(new Event("paginate")),r.setAttribute("data-page",a),o.hasAttribute("data-show-history")){const n=new URL(location);n.searchParams.set("page",a),history.pushState({type:"pagination",form:e.getAttribute("id"),page:a},"",n)}if(!r.hasAttribute("data-no-scroll")){const n=o.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:n,behavior:"smooth"})}}),t.addEventListener("update-show",s=>{let l=e.querySelector("[data-show]"),a=s.detail.show;l.value=a,r.setAttribute("data-show",a),e.dispatchEvent(new Event("submit"))})},At=(o,e)=>{if(!o)return!1;o.addEventListener("click",t=>{kt(e)})},kt=function(o){for(var e=[],t=o.getElementsByTagName("tr"),r=0;r<t.length;r++){for(var s=t[r].querySelectorAll("td,th"),l=[],a=0;a<s.length;a++)l.push(`"${s[a].textContent}"`);e.push(l.join(","))}e=e.join(`
5
5
  `);let n=new Blob([e],{type:"text/csv"});var d=document.createElement("a");d.download="export.csv";var c=window.URL.createObjectURL(n);d.href=c,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d)},U=function(o,e,t,r){if(O(o),gt(o,r),M(o,e,r),r&&r.classList.contains("table--cta")){let s=function(){Array.from(o.querySelectorAll("tr")).forEach((a,n)=>{let d=a.offsetHeight;a.style.setProperty("--row-height",`${d}px`)})};const l=ft(o);r.style.setProperty("--cta-width",`${l}rem`),new ResizeObserver(s).observe(o)}},G=function(o){let e=new Object;return Array.from(o.querySelectorAll("[data-filter]")).forEach((t,r)=>{if(!(t.type=="radio"&&!t.checked)&&!(t.type=="checkbox"&&!t.checked)&&t&&t.value){let s=t.getAttribute("data-filter");e[s]||(e[s]=new Array),e[s].push(t.value)}}),e},Y=function(o,e,t,r){return bt(this,void 0,void 0,function*(){let s=new FormData(e),l=new URLSearchParams(s).toString(),a=o.querySelectorAll("thead tr th"),n=o.querySelector("tbody"),d=e.getAttribute("data-ajax");r.classList.add("table--loading");let c=G(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});let m=0;Object.values(c).forEach((h,b)=>{typeof h=="object"&&Object.values(h).length?m+=Object.values(h).length:m++}),m&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML+=`(${m})`,h.parentNode.classList.add("hover")}),window.controller||(window.controller=[]),window.controller[d]&&window.controller[d].abort(),window.controller[d]=new AbortController;const{signal:u}=controller[d];t.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(d+"?"+l,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest"})}).then(h=>h.json()).then(h=>{let b=e.hasAttribute("data-schema")?e.getAttribute("data-schema"):"data",p=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",f=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",y=q(h,p,15),v=q(h,f,1),g=q(h,b),T=r.hasAttribute("data-empty-msg")?r.getAttribute("data-empty-msg"):"No results found";g?(n.innerHTML="",g.forEach((L,_)=>{var x=document.createElement("tr");a.forEach((A,S)=>{let E="";var C=document.createElement("td");if(C.setAttribute("data-label",A.innerText),A.getAttribute("data-output")){var P=A.getAttribute("data-output");E=P.replace(new RegExp(/{(.*?)}/,"gm"),function(Nr){return q(L,Nr.replace("{","").replace("}",""))})}if(A.hasAttribute("data-output-array")){var P=A.getAttribute("data-output");let zr=q(L,P.replace("{","").replace("}",""));E="",zr.forEach((it,Kr)=>{let Dr=A.getAttribute("data-output-array"),B="";if(A.hasAttribute("data-output-array-property")&&A.hasAttribute("data-output-array-transform")){const F=q(it,A.getAttribute("data-output-array-property")),Vr=JSON.parse(A.getAttribute("data-output-array-transform"))[F];B=Dr.replace(`{${A.getAttribute("data-output-array-property")}}`,Vr)}B=B.replace(new RegExp(/{(.*?)}/,"gm"),function(F){return q(it,F.replace("{","").replace("}",""))}),E+=B})}A.hasAttribute("data-transform")&&(E=JSON.parse(A.getAttribute("data-transform"))[E],!E&&A.hasAttribute("data-default")&&(E=A.getAttribute("data-default"))),C.innerHTML=E,x.appendChild(C)}),n.appendChild(x)}),I(o,e),r.setAttribute("data-total",parseInt(y)),r.setAttribute("data-page",parseInt(v)),U(o,e,t,r),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((L,_)=>{let x=q(h,L.getAttribute("data-ajax-query"),"");L.hasAttribute("data-total")?L.setAttribute("data-total",x):L.innerHTML=x}),parseInt(y)==0&&(n.innerHTML=`<tr><td colspan="100%"><span>${T}</span></td></tr>`),r.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:d,formData:l})):n.innerHTML='<tr><td colspan="100%"><span>Error loading table</span></td></tr>',t.removeAttribute("data-loading"),e.classList.remove("processing")})}catch(h){console.log(h)}})},j=(o,e)=>{switch(o){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=pt(e)}};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",t=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${e}/css/core.min.css`,r=document.createElement("template");r.innerHTML=`
@@ -29,7 +29,7 @@
29
29
  <iam-pagination class="pagination--table" ${this.hasAttribute("data-page")?`data-page="${this.getAttribute("data-page")}"`:""} ></iam-pagination>
30
30
  `,this.shadowRoot.appendChild(r.content.cloneNode(!0)),document.getElementById("tableExtras")||document.head.insertAdjacentHTML("beforeend",`<style id="tableExtras">*:has(>iam-table){container-type:inline-size}iam-table{--hover-background: var(--colour-light);--row-bg: var(--colour-canvas-2)}iam-table thead tr{background:var(--row-bg)}iam-table tbody tr{background:var(--row-bg)}iam-table tbody tr:is(:hover,:focus-within,.hover){--bg-colour-rgb: 238,238,238;--row-bg: var(--hover-background);background:var(--row-bg)}@media screen and (prefers-color-scheme: dark){iam-table tbody tr{--hover-background: var(--colour-canvas)}iam-table tbody tr:is(:hover,:focus-within,.hover){background:var(--row-bg)}}iam-table[data-expandable] [data-expand-button][aria-expanded]{background-color:rgba(0,0,0,0)}@container (width < 23.4375em){iam-table:not(.table--fullwidth) thead{display:none}iam-table:not(.table--fullwidth) tbody{display:block;overflow:visible}iam-table:not(.table--fullwidth) tbody tr td:first-child{padding-top:0}iam-table:not(.table--fullwidth) tr{display:block;position:relative;border:none;background:var(--row-bg);padding:var(--wrapper-padding);box-shadow:0px 6px 12px rgba(0,0,0,.11);border-radius:0.5rem}iam-table:not(.table--fullwidth) tr+tr{margin-top:2rem}iam-table:not(.table--fullwidth) tr:is(:hover,:focus,.hover){--row-bg: var(--colour-canvas-2)}iam-table:not(.table--fullwidth) :is(td,th){display:block;border-color:var(--colour-border);padding-right:0}iam-table:not(.table--fullwidth) :is(td,th):nth-child(1){border-top:none}iam-table:not(.table--fullwidth) :is(td,th)[data-label]:not([data-label=""]):before{content:attr(data-label);color:var(--colour-heading);padding:0 0 0.375rem 0;margin-bottom:0;display:block;font-weight:bold}iam-table:not(.table--fullwidth) td:first-child::after{top:1.75rem !important}iam-table:not(.table--fullwidth) td::after{top:2.5rem}iam-table:not(.table--fullwidth) .td--fixed{padding-right:50%}iam-table:not(.table--fullwidth) tbody tr td:not(:first-child){border-top:var(--border-width) solid currentColor;border-color:var(--colour-border) !important}iam-table:not(.table--fullwidth) tr:not([data-view=full]) td p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}iam-table:not(.table--fullwidth) td:has([data-expand-button]){height:0;padding:0;position:relative}iam-table:not(.table--fullwidth) td:has([data-expand-button])+td{border-top:none !important;padding-top:0 !important}iam-table:not(.table--fullwidth) [data-expand-button]{top:0;right:0;background:rgba(0,0,0,0) !important;border:none;position:absolute;overflow:hidden;--compact-size: 2rem}iam-table:not(.table--fullwidth) [data-expand-button]:before{font-family:"Font Awesome 6 Pro";content:"";font-weight:300 !important;font-size:1.75rem;line-height:var(--compact-size) !important}iam-table:not(.table--fullwidth) [data-expand-button][aria-expanded]:before{content:"";font-weight:900 !important}iam-table:not(.table--fullwidth) .dialog__wrapper{margin-top:-0.5rem;margin-left:-1rem;z-index:10}iam-table:not(.table--fullwidth) tbody tr:not([data-view=full]) td:not(.td--fixed)+td:not(.td--fixed)+td+td{display:none}iam-table.table--cta:not(.table--fullwidth) tr td:not(:first-child):last-child{display:block !important;position:static;width:100%;min-width:100%;margin-left:0;padding-left:0;text-align:left;min-height:0}iam-table.table--cta:not(.table--fullwidth) tr td:not(:first-child):last-child:after{display:none}}@container (width > 23.4375em){iam-table.table--cta:not(.table--loading):has(tr:first-child td:first-child:last-child){padding-right:calc(var(--wrapper-padding) + 1.5rem)}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>th:nth-last-child(2),iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>td:nth-last-child(2){padding-right:var(--cta-width)}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child{position:absolute;left:calc(100% - var(--cta-width));top:auto;background:rgba(0,0,0,0);width:var(--cta-width);min-height:calc(var(--row-height) - 2px);text-align:right;background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem);cursor:default}@media screen and (prefers-color-scheme: dark){iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child{background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem)}}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tr>*:not(:first-child):last-child a{white-space:nowrap;padding-right:.2rem}iam-table.table--cta:not(.table--loading):not(:has(tr:first-child td:first-child:last-child)) tbody tr:hover>*:not(:first-child):last-child{background:linear-gradient(90deg, transparent 0%, var(--row-bg) 1.25rem)}}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta){position:relative}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) thead{position:sticky;top:0;left:0;z-index:1;background-color:var(--row-bg)}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) thead:before{content:"";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--colour-primary)}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody{position:relative}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody tr:first-child td{border-top:0}iam-table:is(.mh-sm,.mh-md,.mh-lg):not(.table--cta) tbody tr:last-child td{border-bottom:0}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty)){position:relative;padding-left:1.5rem}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty))::before{margin-left:-1.5rem !important}table :is([data-content=low],[data-content=medium],[data-content=high],[data-content=unknown],[data-content=due],[data-content=overdue],[data-content=incomplete],[data-content="requires approval"],[data-content=upcoming],[data-content="approval required"],[data-content=warning],[data-content=verified],[data-content="not started"],[data-content="to do"],[data-content="on track"],[data-content=completed],[data-content=complete],.alert-status:not([data-content="0"]):not([data-content=""]):not(:empty)):after{font-family:"Font Awesome 6 Pro";position:absolute;top:1rem;left:0;font-size:1rem;line-height:1;height:1rem;width:1rem;display:inline-block}table [data-content=high]:after{content:"";font-weight:normal;color:var(--colour-danger)}table [data-content=medium]:after{content:"";font-weight:normal;color:var(--colour-warning)}table [data-content=low]:after{content:"";font-weight:normal;color:var(--colour-complete)}table [data-content=unknown]:after{content:"";font-weight:normal;color:var(--colour-muted)}table :is([data-content=overdue],[data-content=due],[data-content=incomplete]):after{content:"";color:var(--colour-danger)}table :is([data-content="not started"],[data-content="to do"],[data-content="on track"]):after{content:"";color:var(--colour-muted)}table :is([data-content="requires approval"],[data-content="approval required"],[data-content=upcoming]):after{content:"";color:var(--colour-warning)}table :is([data-content=warning]):after{content:"";color:var(--colour-warning)}table :is([data-content=verified],[data-content=completed],[data-content=complete]):after{content:"";font-weight:normal;color:var(--colour-complete)}table .alert-status:not([data-content="0"]):not([data-content=""]):not(:empty):after{content:"";color:var(--colour-primary)}iam-table .table--filtered tbody tr:not(.filtered--show){display:none !important}iam-table table:not(.table--filtered):not(.table--ajax) tbody tr:nth-child(15)~tr{display:none}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick){padding-left:0 !important;margin:0 !important}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):before,iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):after{top:.75rem !important;left:.25rem !important}iam-table:has([type=checkbox]:checked) tr:has([type=checkbox]) [type=checkbox]{width:100vw;height:100%;max-height:var(--row-height);max-width:100vw;cursor:pointer;pointer-events:all;top:auto;margin:0;margin-top:0rem}iam-table tr:has([type=checkbox]:checked){--row-bg: #E0E0E0}@media screen and (prefers-color-scheme: dark){iam-table tr:has([type=checkbox]:checked){--row-bg: #000000}}@container (width < 23.4375em){@media screen and (prefers-color-scheme: light){iam-table:has([slot=before]) iam-actionbar{background-color:#e6eaec}}iam-table:has([slot=before]) .actionbar__sticky+*{margin-top:0 !important}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick){padding-left:0 !important;margin:0 !important;min-height:2rem}iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):before,iam-table input:is([type=radio],[type=checkbox])+label:not(.radio--tick):after{top:.25rem !important;left:0 !important}iam-table:has([type=checkbox]:checked) tr:has([type=checkbox]) [type=checkbox]{width:100%;height:100%;max-height:100%;max-width:100%;margin-top:-2rem}}iam-table.table--fullwidth:not([data-expandable]) th.expand-button-heading{display:none}iam-table.table--fullwidth:not([data-expandable]) td:has([data-expand-button]){display:none}@container (width > 23.4375em){iam-table:not([data-expandable]) th.expand-button-heading{display:none}iam-table:not([data-expandable]) td.td--expand{display:none}iam-table[data-expandable] [data-expand-button]{margin:0}iam-table[data-expandable] [data-expand-button]:before{font-family:"Font Awesome 6 Pro";content:"";font-weight:500}iam-table[data-expandable] [data-expand-button][aria-expanded]:before{content:""}iam-table[data-expandable] tr:not(:has(p)) [data-expand-button]{display:none}iam-table[data-expandable] tr:not([data-view=full]) td p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}}@container (width < 23.4375em){iam-table:not(.table--fullwidth) .td--fixed+td:not(.td--fixed){border-top:none}}@container (width > 23.4375em){iam-table{--width-adjust: 0px}iam-table:has([type=checkbox]){--width-adjust: -1rem}iam-table .th--fixed{min-width:calc(4.5rem + var(--width-adjust));position:absolute;padding:0}iam-table .th--fixed:after{top:auto;left:0;content:"";position:absolute;width:100%;height:calc(var(--row-height) - 2px);background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table .td--fixed{position:absolute;position:absolute;left:auto;top:auto;z-index:3;padding:0.25rem 0 0 0;min-width:4.5rem;height:calc(var(--row-height) - 2px);text-align:left;background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table .td--fixed:has([open]){z-index:4}iam-table tr:is(:hover,:focus) .td--fixed{background:linear-gradient(90deg, var(--row-bg) calc(100% - 1.5rem), transparent 100%)}iam-table tr:has([data-expand-button]){height:calc(4.625rem - 2px)}iam-table .th--fixed+th:not(.th--fixed),iam-table .td--fixed+td:not(.td--fixed){padding-left:calc(4.5rem + var(--width-adjust))}iam-table .th--fixed:not(.expand-button-heading)+.th--fixed+th:not(.th--fixed),iam-table .td--fixed:not(.td--expand)+.td--fixed+td:not(.td--fixed){padding-left:calc(7.75rem + var(--width-adjust))}iam-table[data-expandable] .th--fixed+.th--fixed+th:not(.th--fixed),iam-table[data-expandable] .td--fixed+.td--fixed+td:not(.td--fixed){padding-left:calc(7.75rem + var(--width-adjust))}iam-table .th--fixed+.th--fixed,iam-table .td--fixed+.td--fixed{padding-left:calc(3.25rem + var(--width-adjust));min-width:calc(7.75rem + var(--width-adjust))}iam-table .th--fixed:has(+.th--fixed),iam-table .td--fixed:has(+.td--fixed){min-width:calc(3.25rem + var(--width-adjust));z-index:5}iam-table .dialog__wrapper{z-index:10}iam-table .dialog__wrapper:has([open]){z-index:20}iam-table[data-expandable] input:is([type=radio],[type=checkbox])+label:before,iam-table[data-expandable] input:is([type=radio],[type=checkbox])+label:after{left:1.25rem !important}iam-table:not([data-expandable]) th.expand-button-heading+th{padding-left:0 !important}iam-table:not([data-expandable]) td.td--expand+td{padding-left:0 !important}iam-table:not([data-expandable]) th.expand-button-heading+.th--fixed{min-width:calc(4.5rem + var(--width-adjust)) !important}iam-table:not([data-expandable]) td.td--expand+.td--fixed{min-width:calc(4.5rem + var(--width-adjust)) !important}}/*# sourceMappingURL=assets/css/components/table.global.css.map */
31
31
  </style>`)}connectedCallback(){const e=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",e.has("page")?e.get("page"):1),this.hasAttribute("data-show")||this.setAttribute("data-show",e.has("show")?e.get("show"):15),this.hasAttribute("data-increment")||this.setAttribute("data-increment",this.getAttribute("data-show"));let t=this.classList.toString();if(t=t.replace("table--cta",""),t=t.replace("table--loading",""),this.shadowRoot.querySelector(".table__wrapper").className+=` ${t}`,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"),this.classList.contains("table--cta")||this.shadowRoot.querySelector(".table--cta").classList.remove("table--cta"),this.form=document.createElement("form"),this.hasAttribute("data-filterby")?this.form=document.querySelector(`#${this.getAttribute("data-filterby")}`):this.table.parentNode.insertBefore(this.form,this.table.nextSibling),this.form.hasAttribute("data-ajax")&&this.table.classList.add("table--ajax"),I(this.table,this.form),this.form.querySelector("[data-pagination]")||(this.form.innerHTML+=`<input name="page" type="hidden" value="${this.getAttribute("data-page")}" data-pagination="true" />`),this.form.querySelector("[data-show]")||(this.form.innerHTML+=`<input name="show" type="hidden" value="${this.getAttribute("data-show")}" data-show="true" />`),yt(this.table),vt(this.table,this.form,this.pagination,this,this.savedTableBody),wt(this.table,this.form,this.pagination,this),At(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))Y(this.table,this.form,this.pagination,this);else{let r=function(l=1){return Math.floor(Math.random()*Date.now()*(l+1))};if(this.querySelector("iam-actionbar[data-selectall]")){const l=this.querySelector("iam-actionbar[data-selectall]");Array.from(this.table.querySelectorAll("thead tr")).forEach((a,n)=>{a.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((a,n)=>{let d=`row${r(n)}`;a.insertAdjacentHTML("afterbegin",`<td class="td--fixed selectrow"><input type="checkbox" name="row" id="${d}"/><label for="${d}"><span class="visually-hidden">Select row</span></label></td>`)}),this.table.addEventListener("change",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest(".selectrow input")){let n=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,d=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;l.setAttribute("data-selected",n==d?"all":d)}}),l.addEventListener("selected",a=>{a.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((n,d)=>{n.checked=!1}):a.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((n,d)=>{n.checked=!0})})}let s=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((l,a)=>{if(l.querySelector(":scope > td > .dialog__wrapper")){let n=l.querySelector(":scope > td > .dialog__wrapper").parentNode;n.classList.add("td--fixed"),s=Array.from(n.parentNode.children).indexOf(n)}}),s!=-1&&(this.table.querySelector(`thead tr th:nth-child(${s+1})`).classList.add("th--fixed"),Array.from(this.table.querySelectorAll(`tbody tr td:nth-child(${s+1})`)).forEach((l,a)=>{l.classList.add("td--fixed")})),U(this.table,this.form,this.pagination,this),R(this.table,this.form,this),M(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",r=>{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(e,t,r){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),e){case"data-total":{t!=r&&this.pagination.setAttribute("data-total",r);break}case"data-show":{t!=r&&this.pagination.setAttribute("data-show",r);break}case"data-page":{t!=r&&this.pagination.setAttribute("data-page",r);break}}}}/*!
32
- * iamKey v5.1.0-beta3
32
+ * iamKey v5.1.0-beta4
33
33
  * Copyright 2022-2023 iamproperty
34
34
  */let X=class 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`,r=document.createElement("template");r.innerHTML=`
35
35
  <style>
@@ -88,7 +88,7 @@
88
88
  <div class="files"></div>
89
89
  </div>
90
90
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){this.innerHTML+='<i class="fa-regular fa-arrow-up-from-bracket me-2" aria-hidden="true" slot="btn"></i>';const e=this.shadowRoot.querySelector(".file-upload"),t=this.querySelector("input"),r=this.shadowRoot.querySelector(".helper-text");r.innerHTML=`${this.hasAttribute("data-maxsize")?`Max file size is ${this.getAttribute("data-maxsize")}kb. `:""}${t.hasAttribute("accept")?`Supported file types are ${t.getAttribute("accept")}`:""}`,ae(this,e)}}const re={name:"FileUpload",props:{maxfilesize:{type:Number,required:!1},maxfiles:{type:Number,required:!1}},mounted(){this.$nextTick(function(){window.customElements.get("iam-fileupload")||window.customElements.define("iam-fileupload",oe)})}};function ne(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-fileupload",null,[i.renderSlot(o.$slots,"default")])}const ie=k(re,[["render",ne]]),$=(o,e)=>{const t=o[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((r,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))})},Pr="",se={name:"Accordion",props:{},mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/accordion/accordion.component.js":()=>Promise.resolve().then(()=>Jo),"../../../assets/js/components/accordion/accordion.component.min.js":()=>Promise.resolve().then(()=>tr)}),"../../../assets/js/components/accordion/accordion.component.js").then(o=>{window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",o.default)}).catch(o=>{console.log(o.message)})})}},le={ref:"wrapper"};function ce(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-accordion",le,[i.renderSlot(o.$slots,"default")],512)}const de=k(se,[["render",ce]]),me={name:"AccordionItem",props:{title:{type:String,required:!0},titlecolour:{type:String,required:!1},badge:{type:[Number,String],required:!1},badgecolour:{type:String,required:!1,default:"light"},lazy:{type:Boolean,required:!1}},computed:{createID(){return o=>`${Et(o)}`}},data(){return{show:!this.lazy}}},ue=["id"],he=["classList"];function pe(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("details",{id:l.createID(t.title)},[i.createElementVNode("summary",{classList:`${t.titlecolour?`bg-${t.titlecolour}`:""}`},[i.createTextVNode(i.toDisplayString(t.title),1),t.badge?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(`badge bg-${t.badgecolour}`)},i.toDisplayString(t.badge),3)):i.createCommentVNode("",!0)],8,he),i.renderSlot(o.$slots,"default")],8,ue)}const be=k(me,[["render",pe]]),fe={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1},background:{type:String,default:"light",required:!1}}},ge={class:"container"},ye={class:"row"},ve={class:"col-sm-6"},we={class:"pt-5 pb-3 px-4"},Ae={class:"col-sm-6 col-md-5 ms-auto"},ke=["src"];function _e(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",ge,[i.createElementVNode("div",{class:i.normalizeClass("bg-"+t.background+" mb-4")},[i.createElementVNode("div",ye,[i.createElementVNode("div",ve,[i.createElementVNode("div",we,[i.createElementVNode("h2",null,i.toDisplayString(t.title),1),i.renderSlot(o.$slots,"default")])]),i.createElementVNode("div",Ae,[t.image?(i.openBlock(),i.createElementBlock("img",{key:0,src:t.image,alt:"",class:"h-100 w-100 object-cover"},null,8,ke)):i.createCommentVNode("",!0)])])],2)])}const xe=k(fe,[["render",_e]]),Le={name:"Card",mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/card/card.component.js":()=>Promise.resolve().then(()=>ar),"../../../assets/js/components/card/card.component.min.js":()=>Promise.resolve().then(()=>rr)}),"../../../assets/js/components/card/card.component.js").then(o=>{window.customElements.get("iam-card")||window.customElements.define("iam-card",o.default)}).catch(o=>{console.log(o.message)})})}};function Se(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-card",null,[i.renderSlot(o.$slots,"default")])}const K=k(Le,[["render",Se]]);function Ee(o){var e;let t=o.querySelector(".carousel__inner"),r=o.querySelectorAll(".carousel__item").length;o.getAttribute("data-cols");let s=o.getAttribute("data-sm-cols"),l=o.getAttribute("data-md-cols");o.querySelector(".carousel__controls a").setAttribute("aria-current",!0),t.addEventListener("scroll",function(a){clearTimeout(e),e=setTimeout(function(){let n=t.clientWidth,d=t.scrollWidth,c=t.scrollLeft,m=Math.round(c/d*r)+1,u=o.querySelector(".carousel__item:last-child").offsetLeft;Array.from(o.querySelectorAll(".carousel__controls a")).forEach((h,b)=>{h.removeAttribute("aria-current")}),o.querySelector(".control-"+m).setAttribute("aria-current",!0),m==1?o.querySelector(".btn-prev").setAttribute("disabled","disabled"):o.querySelector(".btn-prev").removeAttribute("disabled"),t.scrollLeft+n>u?o.querySelector(".btn-next").setAttribute("disabled","disabled"):o.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),o.addEventListener("click",function(a){for(var n=a.target;n&&n!=this;n=n.parentNode)if(n.matches(".carousel__controls a")){a.preventDefault(),Array.from(o.querySelectorAll(".carousel__controls a")).forEach((c,m)=>{c.removeAttribute("aria-current")}),n.setAttribute("aria-current",!0);const d=document.querySelector(n.getAttribute("href"));t.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),o.addEventListener("click",function(a){for(var n=a.target;n&&n!=this;n=n.parentNode)if(n.matches(".btn-next, .btn-prev")){a.preventDefault();let d=n.classList.contains("btn-prev")?t.scrollLeft-t.clientWidth:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:d,behavior:"smooth"});break}},!1),r==1&&o.classList.add("hide-btns"),s>=r&&o.classList.add("hide-sm-btns"),l>=r&&o.classList.add("hide-md-btns")}const Fr="",qe={components:{Card:K},name:"Carousel",data(){return{id:null}},props:{items:{type:Array,required:!1},cols:{type:Number,required:!1,default:1},smcols:{type:Number,required:!1,default:1},mdcols:{type:Number,required:!1,default:3},gap:{type:Number,required:!1,default:4},cardtype:{type:String,required:!1},cardclass:{type:String,required:!1},btntype:{type:String,required:!1},titleclass:{type:String,required:!1},ctatext:{type:String,required:!1},hidectatext:{type:Boolean,required:!1,default:!1},colclass:{type:String,required:!1},type:{type:String,required:!1}},computed:{content(){return o=>`${o.image?`<img src="${o.image}" alt="" />`:""}${o.content?o.content:""}`}},mounted(){this.id=this._uid,this.$nextTick(function(){Ee(this.$refs.wrapper)})}},$e=["id","data-cols","data-sm-cols","data-md-cols"],Te={class:"carousel__wrapper"},Ce={class:"carousel__inner"},Me=["id"],He=["innerHTML","id"],Be=["href"],Re=i.createElementVNode("button",{class:"btn btn-prev","data-go":"0",disabled:""},"Prev",-1),je=i.createElementVNode("button",{class:"btn btn-next","data-go":"2"},"Next",-1);function Ne(o,e,t,r,s,l){const a=i.resolveComponent("Card");return i.openBlock(),i.createElementBlock("div",{class:"container carousel",id:"carousel"+s.id,ref:"wrapper","data-cols":t.cols,"data-sm-cols":t.smcols,"data-md-cols":t.mdcols},[i.renderSlot(o.$slots,"default"),i.createElementVNode("div",Te,[i.createElementVNode("div",Ce,[t.type=="card"?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(n,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,id:"carousel"+s.id+"slide"+(d+1)},[i.createVNode(a,i.mergeProps(n,{class:t.cardclass,type:t.cardtype,btnyype:t.btntype,titleclass:t.titleclass,ctatext:t.ctatext,hidectatext:t.hidectatext}),null,16,["class","type","btnyype","titleclass","ctatext","hidectatext"])],10,Me))),128))],2)):i.createCommentVNode("",!0),t.type!="card"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(n,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,innerHTML:l.content(n),id:"carousel"+s.id+"slide"+(d+1)},null,10,He))),128))],2)):i.createCommentVNode("",!0)]),i.createElementVNode("div",{class:i.normalizeClass(`carousel__controls cols-${t.cols} cols-sm-${t.smcols} cols-md-${t.mdcols}`)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(n,d)=>(i.openBlock(),i.createElementBlock("a",{key:d,href:"#carousel"+s.id+"slide"+(d+1),class:i.normalizeClass(`control-${d+1}`)},"Slide "+i.toDisplayString(d+1),11,Be))),128))],2),Re,je])],8,$e)}const ze=k(qe,[["render",Ne]]);/*!
91
- * iamKey v5.1.0-beta3
91
+ * iamKey v5.1.0-beta4
92
92
  * Copyright 2022-2023 iamproperty
93
93
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"header"});class De 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`,r=document.createElement("template");r.innerHTML=`
94
94
  <style>
@@ -112,7 +112,7 @@
112
112
  </picture>
113
113
  </div>
114
114
  `,this.shadowRoot.appendChild(r.content.cloneNode(!0))}connectedCallback(){this.classList.add("loaded");const e=this.shadowRoot.querySelector("picture"),t=this.shadowRoot.querySelector("picture source");this.hasAttribute("image")?t.setAttribute("srcset",this.getAttribute("image")):e.remove()}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,default:De},Symbol.toStringTag,{value:"Module"})),Pe={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1}},mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/header/header.component.js":()=>Promise.resolve().then(()=>ir),"../../../assets/js/components/header/header.component.min.js":()=>Promise.resolve().then(()=>Ve)}),"../../../assets/js/components/header/header.component.js").then(o=>{window.customElements.get("iam-header")||window.customElements.define("iam-header",o.default)}).catch(o=>{console.log(o.message)})})}},Fe=["image"],Oe=["innerHTML"];function Ie(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-header",{class:"bg-secondary",image:t.image},[i.renderSlot(o.$slots,"breadcrumb"),t.title?(i.openBlock(),i.createElementBlock("h1",{key:0,innerHTML:t.title},null,8,Oe)):i.createCommentVNode("",!0),i.renderSlot(o.$slots,"default")],8,Fe)}const We=k(Pe,[["render",Ie]]);function Ue(o){var e;const t=o.querySelector(".testimonial__images"),r=t.querySelectorAll("img").length;if(r==1)return!1;o.classList.add("testimonial--multi");const s=function(l){const a=o.querySelector(".btn-next"),n=o.querySelector(".btn-prev");a.setAttribute("data-go",l+1),n.setAttribute("data-go",l-1),a.removeAttribute("disabled"),n.removeAttribute("disabled"),l==1?n.setAttribute("disabled",!0):l==r&&a.setAttribute("disabled",!0)};t.addEventListener("scroll",function(l){clearTimeout(e),e=setTimeout(function(){let a=t.scrollWidth,n=t.scrollHeight,d=t.scrollLeft,c=t.scrollTop,m=Math.round(d/a*r)+1;d==0&&c!=0&&(m=Math.round(c/n*r)+1),o.setAttribute("data-show",m),s(m)},300)},!1),o.addEventListener("click",function(l){for(var a=l.target;a&&a!=this;a=a.parentNode)if(a.matches("[data-go]")){let n=parseInt(a.getAttribute("data-go")),d=0,c=0,m=t.scrollWidth,u=t.scrollHeight;m>u?c=Math.floor(m*((n-1)/r)):d=Math.floor(u*((n-1)/r)),t.scroll({top:d,left:c,behavior:"smooth"});break}},!1)}const Or="",Ge={name:"Testimonial",props:{items:{type:Array,required:!0},background:{type:String,default:"light",required:!1}},mounted(){Ue(this.$refs.wrapper)}},Ye={class:"container testimonial mb-5","data-show":"1",ref:"wrapper"},Xe={class:"row"},Ke={class:"col-md-5 position-relative"},Je={class:"testimonial__images"},Qe=["src"],Ze=i.createElementVNode("div",{class:"testimonial__controls"},[i.createElementVNode("button",{"data-go":"0",disabled:"",class:"btn-prev"},"Previous"),i.createElementVNode("button",{"data-go":"2",class:"btn-next"},"Next")],-1),ta={class:"col-md-7"},ea=i.createElementVNode("h2",null,"What our customers think…",-1),aa={class:"testimonial__content"},oa=["innerHTML"],ra=["innerHTML"],na={class:"testimonial__after"},ia=i.createElementVNode("span",{class:"circle circle--dots d-none d-md-block"},null,-1);function sa(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",Ye,[i.createElementVNode("div",{class:i.normalizeClass("bg-"+t.background)},[i.createElementVNode("div",Xe,[i.createElementVNode("div",Ke,[i.createElementVNode("div",Je,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(a,n)=>(i.openBlock(),i.createElementBlock("img",{key:n,src:a.image?a.image:"data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"",class:i.normalizeClass("h-100 w-100 object-cover"+(a.image?"":" opacity-0"))},null,10,Qe))),128))]),Ze]),i.createElementVNode("div",ta,[ea,i.createElementVNode("div",aa,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(a,n)=>(i.openBlock(),i.createElementBlock("blockquote",{key:n,class:i.normalizeClass(a.class)},[i.createElementVNode("div",{innerHTML:a.quote},null,8,oa),i.createElementVNode("cite",{innerHTML:a.cite},null,8,ra)],2))),128))]),i.createElementVNode("div",na,[i.renderSlot(o.$slots,"default")])])]),ia],2)],512)}const la=k(Ge,[["render",sa]]),Ir="",ca={name:"Timeline",props:{image:{type:String,required:!1}}},da={class:"timeline"},ma={class:"timeline__content"},ua=["src"];function ha(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",da,[i.createElementVNode("div",ma,[i.renderSlot(o.$slots,"default")]),t.image?(i.openBlock(),i.createElementBlock("img",{key:0,src:t.image,alt:""},null,8,ua)):i.createCommentVNode("",!0)])}const pa=k(ca,[["render",ha]]),Wr="",ba={components:{Input:z},name:"PropertySearchbar",props:{formaction:{type:String,required:!1},formmethod:{type:String,required:!1},location:{type:String,required:!1},locations:{type:Array,required:!1},distances:{type:Array,required:!1,default(){return[{value:"0.25",display:"+¼ mi"},{value:"0.5",display:"+½ mi"},{value:"1",display:"+1 mi"},{value:"2",display:"+2 mi"},{value:"3",display:"+3 mi"},{value:"4",display:"+4 mi"},{value:"5",display:"+5 mi"}]}},pricemin:{type:Array,required:!1,default(){return[{value:"0",display:"No min"},{value:"50000",display:"£50k min"},{value:"75000",display:"£75k min"},{value:"100000",display:"£100k min"},{value:"150000",display:"£150k min"},{value:"200000",display:"£200k min"},{value:"250000",display:"£250k min"}]}},pricemax:{type:Array,required:!1,default(){return[{value:"any",display:"No max"},{value:"50000",display:"£50k max"},{value:"75000",display:"£75k max"},{value:"100000",display:"£100k max"},{value:"150000",display:"£150k max"},{value:"200000",display:"£200k max"},{value:"250000",display:"£250k max"}]}},bedsmin:{type:Array,required:!1,default(){return[{value:"any",display:"No min"},{value:"0",display:"Studio min"},{value:"1",display:"1 bed min"},{value:"2",display:"2 beds min"},{value:"3",display:"3 beds min"},{value:"4",display:"4 beds min"},{value:"5",display:"5 beds min"},{value:"6",display:"6 beds min"}]}},bedsmax:{type:Array,required:!1,default(){return[{value:"any",display:"No max"},{value:"0",display:"Studio max"},{value:"1",display:"1 bed max"},{value:"2",display:"2 beds max"},{value:"3",display:"3 beds max"},{value:"4",display:"4 beds max"},{value:"5",display:"5 beds max"},{value:"6",display:"6 beds max"}]}},propertytypes:{type:Array,required:!1,default(){return[{value:"all",display:"Show all"},{value:"Bungalow",display:"Bungalow"},{value:"Character Property",display:"Character Property"},{value:"Commercial Property",display:"Commercial Property"},{value:"Flat / Apartment",display:"Flat / Apartment"},{value:"Garage / Parking",display:"Garage / Parking"},{value:"Guest House / Hotel",display:"Guest House / Hotel"},{value:"House",display:"House"},{value:"House / Flat Share",display:"House / Flat Share"},{value:"Land",display:"Land"},{value:"Mobile / Park Home",display:"Mobile / Park Home"},{value:"Private Halls",display:"Private Halls"},{value:"Retirement Property",display:"Retirement Property"}]}}},data(){return{locationSave:""}},methods:{locationKeyup:function(o){this.$emit("locationKeyup",o)}},computed:{locationSet:{get(){return this.locationSave?this.locationSave:this.location},set(o){this.locationSave=o,this.$emit("input",o)}},locationsList(){return()=>this.locations?this.locations:[{value:"Newcastle"}]}}},fa={class:"container",ref:"wrapper"},ga={class:"property-searchbar"},ya=["action","method"],va={class:"col-12 col-md-3"},wa={class:"col-12 col-md"},Aa=i.createElementVNode("span",{class:"form-label d-none d-md-block"},"Price range",-1),ka={class:"row","data-input-range":""},_a={class:"col-12 col-md"},xa=i.createElementVNode("span",{class:"form-label d-none d-md-block"},"Number of beds",-1),La={class:"row","data-input-range":""},Sa={class:"col-12 col-md-2"},Ea=i.createElementVNode("div",{class:"col-12 col-md mw-md-fit-content d-flex property-searchbar__btn"},[i.createElementVNode("button",{class:"btn w-100 me-0",type:"submit",value:"submit"},"Search")],-1);function qa(o,e,t,r,s,l){const a=i.resolveComponent("Input");return i.openBlock(),i.createElementBlock("div",fa,[i.renderSlot(o.$slots,"default"),i.createElementVNode("div",ga,[i.createElementVNode("form",{class:"row",action:t.formaction,method:t.formmethod},[i.createElementVNode("fieldset",va,[i.createVNode(a,{inputClass:"input--locations",modelValue:l.locationSet,"onUpdate:modelValue":e[0]||(e[0]=n=>l.locationSet=n),label:"Location",id:"location",options:l.locationsList(),required:"",placeholder:"i.e. Newcastle or NE1",onKeyupEvent:e[1]||(e[1]=n=>l.locationKeyup(...arguments)),ref:"search"},null,8,["modelValue","options"]),i.createVNode(a,{class:"select--miles",label:"Miles",id:"miles",type:"select",options:t.distances},null,8,["options"])]),i.createElementVNode("fieldset",wa,[Aa,i.createElementVNode("div",ka,[i.createVNode(a,{class:"col-6",label:"Minimum price",id:"price-min","data-min":"true",type:"select",options:t.pricemin},null,8,["options"]),i.createVNode(a,{class:"col-6",label:"Maximum price",id:"price-max","data-max":"true",type:"select",options:t.pricemax},null,8,["options"])])]),i.createElementVNode("fieldset",_a,[xa,i.createElementVNode("div",La,[i.createVNode(a,{class:"col-6",label:"Minimum beds",id:"beds-min","data-min":"true",type:"select",options:t.bedsmin},null,8,["options"]),i.createVNode(a,{class:"col-6",label:"Maximum beds",id:"beds-max","data-max":"true",type:"select",options:t.bedsmax},null,8,["options"])])]),i.createElementVNode("fieldset",Sa,[i.createVNode(a,{label:"Property type",id:"property-type",type:"select",options:t.propertytypes},null,8,["options"])]),Ea],8,ya)]),i.renderSlot(o.$slots,"after")],512)}const $a=k(ba,[["render",qa]]),Ta={components:{},name:"Nav",mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/nav/nav.component.js":()=>Promise.resolve().then(()=>lr),"../../../assets/js/components/nav/nav.component.min.js":()=>Promise.resolve().then(()=>cr)}),"../../../assets/js/components/nav/nav.component.js").then(o=>{window.customElements.get("iam-nav")||window.customElements.define("iam-nav",o.default)}).catch(o=>{console.log(o.message)})})},methods:{}},Ca={ref:"wrapper"};function Ma(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-nav",Ca,[i.renderSlot(o.$slots,"default")],512)}const Ha=k(Ta,[["render",Ma]]),Ur="",Ba={name:"Stepper",props:{label:{type:String,required:!1},endlabel:{type:String,required:!1,default:"Complete"}}},Ra={class:"container"},ja=["aria-label"],Na={key:0,class:"h6 stepper__start"},za={class:"list-unstyled"},Da={class:"h6 stepper__end"};function Va(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",Ra,[i.createElementVNode("nav",{class:"stepper","aria-label":t.label?t.label:"Progress"},[t.label?(i.openBlock(),i.createElementBlock("span",Na,i.toDisplayString(t.label),1)):i.createCommentVNode("",!0),i.createElementVNode("ol",za,[i.renderSlot(o.$slots,"default")]),i.createElementVNode("span",Da,i.toDisplayString(t.endlabel),1)],8,ja)])}const Pa=k(Ba,[["render",Va]]),Gr="",Fa={name:"Snapshot",props:{items:{type:Array,required:!0}}},Oa={class:"container snapshot",ref:"wrapper"},Ia={class:"row"},Wa=["href"],Ua={class:"lead snapshot__title"},Ga={class:"stat"};function Ya(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("div",Oa,[i.renderSlot(o.$slots,"default"),i.createElementVNode("div",Ia,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.items,(a,n)=>(i.openBlock(),i.createElementBlock("div",{class:"col",key:n},[a.link?(i.openBlock(),i.createElementBlock("a",{key:0,href:a.link},"View "+i.toDisplayString(a.title),9,Wa)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(`snapshot__item ${a.bg?"bg-"+a.bg:""}`)},[i.createElementVNode("span",Ua,i.toDisplayString(a.title),1),i.createElementVNode("span",Ga,i.toDisplayString(a.number),1)],2)]))),128))])],512)}const Xa=k(Fa,[["render",Ya]]),Ka={name:"Stepper",props:{url:{type:String,required:!1},status:{type:String,required:!1},current:{type:String,required:!1}}},Ja=["href","aria-current"],Qa={key:0,class:"visually-hidden"};function Za(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("li",null,[i.createElementVNode("a",{href:t.url,class:i.normalizeClass(`${t.status?"bg-"+t.status:""}${typeof t.current<"u"?"current":""}`),"aria-current":typeof t.current<"u"?"step":!1},[i.createElementVNode("span",null,[i.renderSlot(o.$slots,"default")]),t.status?(i.openBlock(),i.createElementBlock("em",Qa," - status: "+i.toDisplayString(t.status),1)):i.createCommentVNode("",!0)],10,Ja)])}const to=k(Ka,[["render",Za]]),Yr="",eo={name:"Tabs",mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/tabs/tabs.component.js":()=>Promise.resolve().then(()=>br),"../../../assets/js/components/tabs/tabs.component.min.js":()=>Promise.resolve().then(()=>Ar)}),"../../../assets/js/components/tabs/tabs.component.js").then(o=>{window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",o.default)}).catch(o=>{console.log(o.message)})})}},ao={ref:"wrapper"};function oo(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-tabs",ao,[i.renderSlot(o.$slots,"default")],512)}const ro=k(eo,[["render",oo]]),no={name:"Tab",props:{title:{type:String,required:!0},lazy:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},data(){return{show:!this.lazy,isDisabled:!!this.disabled}}},io={class:"tab"},so=["innerHTML"];function lo(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("details",io,[i.createElementVNode("summary",{innerHTML:t.title,class:i.normalizeClass({disabled:s.isDisabled})},null,10,so),i.renderSlot(o.$slots,"default")])}const co=k(no,[["render",lo]]);let J=N.props;J.fields.required=!1;const mo={components:{Table:N,Input:z},data(){return{itemsData:[...this.items]}},methods:{submitForm:function(o){console.log(this);const e=new FormData(o.target);let t=new Date;const r=t.getFullYear();let s=t.getMonth()+1,l=t.getDate();l<10&&(l="0"+l),s<10&&(s="0"+s),t=l+"/"+s+"/"+r,this.itemsData.unshift({date_added:t,user:e.get("user"),note:e.get("addNote")}),this.$emit("formSubmitted",o)}},name:"NoteFeed",props:{user:{type:String,required:!0},...J,title:{type:String,required:!1},method:{type:String,required:!1,default:"post"},action:{type:String,required:!1}}},uo={class:"container note-feed mb-2"},ho=["innerHTML"],po=["action","method"],bo=["value"],fo=i.createElementVNode("button",{class:"btn btn-tertiary"},"Submit note",-1);function go(o,e,t,r,s,l){const a=i.resolveComponent("Table"),n=i.resolveComponent("Input");return i.openBlock(),i.createElementBlock("div",uo,[t.title?(i.openBlock(),i.createElementBlock("span",{key:0,class:"h3",innerHTML:t.title},null,8,ho)):i.createCommentVNode("",!0),i.createVNode(a,i.mergeProps({fields:[{key:"date_added"},{key:"user"},{key:"note"}],items:s.itemsData},o.$props,{class:"mb-0"}),null,16,["items"]),i.createElementVNode("form",{action:t.action,method:t.method,onSubmit:e[0]||(e[0]=i.withModifiers(d=>l.submitForm(...arguments),["prevent"]))},[i.createElementVNode("input",{type:"hidden",value:t.user,name:"user"},null,8,bo),i.createVNode(n,{id:"addNote",type:"textarea",label:"Add note",required:"",class:"mw-100"}),fo],40,po)])}const yo=k(mo,[["render",go]]);/*!
115
- * iamKey v5.1.0-beta3
115
+ * iamKey v5.1.0-beta4
116
116
  * Copyright 2022-2023 iamproperty
117
117
  */function vo(o,e){function t(r,s){let l=!1,a=s.getAttribute("name");a.includes("[]")&&(a=a.replace("[]",`[${s.value}]`));let n=r.querySelector(`[data-name="${a}"]`);n&&s.getAttribute("type")=="checkbox"&&(l=!s.checked);let d=s.getAttribute("data-filter-text");if(n||(n=document.createElement("button"),r.appendChild(n)),n.setAttribute("type","button"),n.classList.add("filter"),n.setAttribute("data-name",a),n.innerHTML=d.replace("$value",s.value),(!s.value||l)&&n.remove(),s.parentNode.closest("[data-filter-text]")){let c=s.parentNode.closest("[data-filter-text]"),m=!0;if(a="",c.querySelectorAll("input").forEach((u,h)=>{let b=u.getAttribute("name");if(a+=`${h!=0?",":""}${b}`,r.querySelector(`[data-name="${b}"]`)&&r.querySelector(`[data-name="${b}"]`).remove(),u.value){let p=document.createElement("button");p.setAttribute("type","button"),p.classList.add("filter"),p.setAttribute("data-name",b),p.innerHTML=d.replace("$value",u.value),r.appendChild(p)}else m=!1}),r.querySelector(`[data-name="${a}"]`)&&r.querySelector(`[data-name="${a}"]`).remove(),m){let u=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((b,p)=>{let f=b.getAttribute("name");r.querySelector(`[data-name="${f}"]`)&&r.querySelector(`[data-name="${f}"]`).remove(),u=u.replace(`$${p+1}`,b.value)});let h=document.createElement("button");h.setAttribute("type","button"),h.classList.add("filter"),h.setAttribute("data-name",a),h.innerHTML=u,r.appendChild(h)}}}Array.from(o.querySelectorAll('input[type="checkbox"]:checked')).forEach((r,s)=>{t(e,r)}),Array.from(o.querySelectorAll("input[data-filter-text]")).forEach((r,s)=>{r.addEventListener("change",function(l){t(e,r),l.stopPropagation()})}),o.addEventListener("change",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest("input[data-filter-text]")){let s=r.target.closest("input[data-filter-text]");t(e,s)}}),e.addEventListener("click",function(r){if(r&&r.target instanceof HTMLElement&&r.target.closest(".filter")){let a=r.target.closest(".filter"),n=a.getAttribute("data-name").split(",");for(var s=0;s<n.length;s++){let d=n[s],c=`[name="${d}"]`;d.match(/\[(.*)\]/)&&(d.replace(/\[(.*)\]/,"[]"),c=`[value="${d.replace(/.*\[(.*)\]/,"$1")}"]`);let m=o.querySelectorAll(c);for(var l=0;l<m.length;l++){let u=m[l];if(u.getAttribute("type")!="radio"&&u.getAttribute("type")!="checkbox")u.value="";else{u.checked=!1;var r=new Event("force");o.hasAttribute("data-nosubmit")||u.closest("form").dispatchEvent(r)}}}a.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});let wo=class 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`;let r=this.classList.toString();const s=document.createElement("template");s.innerHTML=`
118
118
  <style>
@@ -124,7 +124,7 @@
124
124
  <div class="applied-filters ${r}"></div>
125
125
  <slot></slot>
126
126
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){vo(this,this.shadowRoot.querySelector(".applied-filters"))}};window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",wo);const Ao={name:"Header"};function ko(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-applied-filters",null,[i.renderSlot(o.$slots,"default")])}const _o=k(Ao,[["render",ko]]);/*!
127
- * iamKey v5.1.0-beta3
127
+ * iamKey v5.1.0-beta4
128
128
  * Copyright 2022-2023 iamproperty
129
129
  */function xo(o,e){Lo(o,e)}function Lo(o,e){var t;e.addEventListener("keyup",r=>{clearTimeout(t),t=setTimeout(function(){Q(o,e.value)},500)}),e.addEventListener("change",r=>{clearTimeout(t),Q(o,e.value)})}const Q=function(o,e){Array.from(o.querySelectorAll(":scope > li")).forEach((t,r)=>{let s=t.textContent.toLowerCase();t.classList.add("d-none"),s.includes(e.toLowerCase())&&t.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 So 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`,r=document.createElement("template");r.innerHTML=`
130
130
  <style>
@@ -166,7 +166,7 @@
166
166
  ${this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>':""}
167
167
  </div>
168
168
  `,this.shadowRoot.appendChild(a.content.cloneNode(!0)),document.getElementById("notificationHolder")||document.head.insertAdjacentHTML("beforeend",`<style id="notificationHolder">${s}</style>`)}connectedCallback(){const e=this.shadowRoot.querySelector("[data-dismiss-button]"),t=this.hasAttribute("data-status")?this.getAttribute("data-status"):"white";this.hasAttribute("data-type")?this.classList.add(`bg-${t}`):this.classList.add(`colour-${t}`);const r=this;if(!this.querySelector("i"))switch(t){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>'}To(r),e&&e.addEventListener("click",function(s){D(r)},!1)}}const Ho={name:"Notification",props:{},created(){this.$nextTick(function(){window.customElements.get("iam-notification")||window.customElements.define("iam-notification",Mo)})}};function Bo(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-notification",null,[i.renderSlot(o.$slots,"default")])}const Ro=k(Ho,[["render",Bo]]),jo={name:"Actionbar",props:{},mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/actionbar/actionbar.component.js":()=>Promise.resolve().then(()=>Sr),"../../../assets/js/components/actionbar/actionbar.component.min.js":()=>Promise.resolve().then(()=>Cr)}),"../../../assets/js/components/actionbar/actionbar.component.js").then(o=>{window.customElements.get("iam-actionbar")||window.customElements.define("iam-actionbar",o.default)}).catch(o=>{console.log(o.message)})})}};function No(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-actionbar",null,[i.renderSlot(o.$slots,"default")])}const zo=k(jo,[["render",No]]),Do={name:"Pagination",props:{},computed:{},created(){this.$nextTick(function(){window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",X)})},updated(){}};function Vo(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-pagination")}const Po=k(Do,[["render",Vo]]),Fo={name:"Address Lookup",mounted(){this.$nextTick(function(){$(Object.assign({"../../../assets/js/components/address-lookup/address-lookup.component.js":()=>Promise.resolve().then(()=>Br),"../../../assets/js/components/address-lookup/address-lookup.component.min.js":()=>Promise.resolve().then(()=>jr)}),"../../../assets/js/components/address-lookup/address-lookup.component.js").then(o=>{window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",o.default)}).catch(o=>{console.log(o.message)})})}};function Oo(o,e,t,r,s,l){return i.openBlock(),i.createElementBlock("iam-address-lookup",null,[i.renderSlot(o.$slots,"default")])}const Io=k(Fo,[["render",Oo]]);/*!
169
- * iamKey v5.1.0-beta3
169
+ * iamKey v5.1.0-beta4
170
170
  * Copyright 2022-2023 iamproperty
171
171
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});class Wo 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`,r=document.createElement("template");r.innerHTML=`
172
172
  <style class="styles">
@@ -200,7 +200,7 @@
200
200
  <slot></slot>
201
201
  </div>
202
202
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0)),document.getElementById("accordionGlobal")||document.head.insertAdjacentHTML("beforeend",`<style id="accordionGlobal">${s}</style>`)}connectedCallback(){Xo(this)}}const Jo=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"}));/*!
203
- * iamKey v5.1.0-beta3
203
+ * iamKey v5.1.0-beta4
204
204
  * Copyright 2022-2023 iamproperty
205
205
  */function Qo(o){let e=o.querySelectorAll("details"),t=o.querySelectorAll("summary");if(e.forEach(r=>{r.classList.add("accordion-item")}),t.forEach(r=>{r.classList.add("accordion-header"),r.classList.add("accordion-button"),r.classList.add("h4")}),!o.classList.contains("accordion--keep-open")){const r=o.querySelectorAll(":scope > details");r.forEach(s=>{s.addEventListener("click",()=>{r.forEach(l=>{l!==s&&l.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});class Zo 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`,r=document.createElement("template");r.innerHTML=`
206
206
  <style>
@@ -231,7 +231,7 @@
231
231
  ${this.hasAttribute("data-cta")?`<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>`:""}
232
232
  </div>
233
233
  `,this.shadowRoot.appendChild(a.content.cloneNode(!0)),document.getElementById("cardGlobal")||document.head.insertAdjacentHTML("beforeend",`<style id="cardGlobal">${l}</style>`)}connectedCallback(){this.classList.add("loaded");const e=this.parentNode.closest("a, button, label"),t=this.shadowRoot.querySelector(".card");e.setAttribute("tabindex","-1"),e.matches("label[for]")&&(document.getElementById(e.getAttribute("for")).checked?t.classList.add("checked"):t.classList.remove("checked")),this.addEventListener("click",r=>{let s=new Event("click");t.dispatchEvent(s)}),t.addEventListener("click",r=>{if(e.matches("label[for]")){r.stopPropagation(),r.preventDefault();const s=document.getElementById(e.getAttribute("for")),l=s.getAttribute("name"),a=s.getAttribute("id");Array.from(document.querySelectorAll(`[name="${l}"][type="radio"]:not([id="${a}"])`)).forEach((c,m)=>{document.querySelector(`[for="${c.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"))}),e.click(),s.checked?t.classList.add("checked"):t.classList.remove("checked")}}),this.addEventListener("inactive",r=>{t.classList.remove("checked")}),t.addEventListener("keydown",r=>{switch(r.keyCode){case 32:case 13:if(e.matches("label[for]")){r.stopPropagation(),r.preventDefault();const s=document.getElementById(e.getAttribute("for")),l=s.getAttribute("name"),a=s.getAttribute("id");Array.from(document.querySelectorAll(`[name="${l}"]:not([id="${a}"])`)).forEach((c,m)=>{document.querySelector(`[for="${c.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"))}),e.click(),s.checked?t.classList.add("checked"):t.classList.remove("checked")}else e.click();break}})}static get observedAttributes(){return["data-total","class"]}attributeChangedCallback(e,t,r){switch(e){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=r);break}case"class":{let s=this.classList.toString();this.querySelector('[class*="fa-"]')&&(s+=" card--has-icon"),this.shadowRoot.querySelector(".card").setAttribute("class",`card ${s}`);break}}}}const ar=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"}));/*!
234
- * iamKey v5.1.0-beta3
234
+ * iamKey v5.1.0-beta4
235
235
  * Copyright 2022-2023 iamproperty
236
236
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Card"});class or extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.querySelector('[class*="fa-"]')&&this.classList.add("card--has-icon");let e=this.classList.toString();const t=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"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
237
237
  <style>
@@ -315,7 +315,7 @@
315
315
  </div>
316
316
  </div>
317
317
  </dialog>`);let n=this.shadowRoot.querySelector("#search-button"),d=this.shadowRoot.querySelector("#search-close"),c=this.shadowRoot.querySelector("#search-dialog");this.hasAttribute("data-search-open")&&(c.setAttribute("open","open"),this.classList.add("search-open"),n.setAttribute("aria-expanded",!0)),n.addEventListener("click",m=>{c.setAttribute("open","open"),this.classList.add("search-open"),n.setAttribute("aria-expanded",!0)}),d.addEventListener("click",m=>{c.removeAttribute("open"),this.classList.remove("search-open"),n.removeAttribute("aria-expanded")})}}}const lr=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"}));/*!
318
- * iamKey v5.1.0-beta3
318
+ * iamKey v5.1.0-beta4
319
319
  * Copyright 2022-2023 iamproperty
320
320
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});const cr=Object.freeze(Object.defineProperty({__proto__:null,default:class extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"}),t=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"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
321
321
  <style class="styles">
@@ -379,7 +379,7 @@
379
379
  <slot></slot>
380
380
  </div>
381
381
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){let e=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class",`tabs ${e}`),hr(this)}}const br=Object.freeze(Object.defineProperty({__proto__:null,default:pr},Symbol.toStringTag,{value:"Module"}));/*!
382
- * iamKey v5.1.0-beta3
382
+ * iamKey v5.1.0-beta4
383
383
  * Copyright 2022-2023 iamproperty
384
384
  */const fr=function(o){o.querySelectorAll(":scope > details");const e=o.querySelectorAll(":scope > details, :scope > a");o.querySelectorAll(":scope > details > summary");let t=o.querySelector(":scope > .tabs__links");if(o.shadowRoot&&o.shadowRoot.querySelector(".tabs__links")&&(t=o.shadowRoot.querySelector(".tabs__links")),!t){t=document.createElement("div"),t.classList.add("tabs__links");let s=document.createElement("div");s.classList.add("tabs__links__wrapper"),s.prepend(t),o.prepend(s)}let r=0;e.forEach((s,l)=>{let a=document.createElement("button");if(s.matches("details")){let n=s.querySelector(":scope > summary"),d=n.classList.contains("disabled");n.classList.add("visually-hidden"),s.hasAttribute("id")&&a.setAttribute("data-id",`${s.getAttribute("id")}`),s.hasAttribute("open")&&a.setAttribute("aria-pressed",!0),a.innerHTML=`${n.innerText}`,a.classList.add("link"),a.setAttribute("data-index",r),s.setAttribute("tabindex","-1"),d&&a.classList.add("disabled"),r++}else s.matches("a")&&(a=s);a.classList.add("link"),t.appendChild(a)})},gr=function(o){let e=o.querySelectorAll(":scope > details"),t=o.querySelectorAll(":scope > details > summary"),r=o.querySelectorAll(":scope .tabs__links > button");o.shadowRoot&&(r=o.shadowRoot.querySelectorAll(".tabs__links > button")),r.forEach(s=>{s.addEventListener("click",l=>{if(l.preventDefault(),s.classList.contains("disabled"))return!1;r.forEach(a=>{let n=a==s;a.setAttribute("aria-pressed",n)}),e.forEach((a,n)=>{let d=s.getAttribute("data-index")==n;d?a.setAttribute("open",d):a.removeAttribute("open")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:s.textContent})})}),t.forEach((s,l)=>{s.addEventListener("click",a=>{a.preventDefault(),r[l].click()})})},yr=function(o){if(!o.querySelector(":scope > details"))return!1;let e=o.querySelectorAll(":scope > details"),t=o.shadowRoot.querySelectorAll(".tabs__links > button");location.hash&&o.shadowRoot.querySelector(`.tabs__links [data-id="${location.hash.replace("#","")}"]`)?(o.shadowRoot.querySelector(`[data-id="${location.hash.replace("#","")}"]`).setAttribute("aria-pressed",!0),o.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):o.querySelector("details[open]")||(e[0].setAttribute("open",!0),t[0].setAttribute("aria-pressed",!0))},vr=function(o){fr(o),gr(o),yr(o)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});class wr 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`,r=document.createElement("template");r.innerHTML=`
385
385
  <style>
@@ -447,7 +447,7 @@
447
447
  </div>
448
448
  </div>
449
449
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0)),document.getElementById("actionbarGlobal")||document.head.insertAdjacentHTML("beforeend",`<style id="actionbarGlobal">${s}</style>`)}connectedCallback(){let e=this;const t=this.shadowRoot.querySelector(".actionbar__wrapper");if(this.hasAttribute("data-selectall")){t.insertAdjacentHTML("afterbegin",'<div class="selectall pb-0"><input type="checkbox" name="selectall" id="selectall"><label for="selectall" class="m-0">Select all</label></div>');let a=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&tt(a,this.getAttribute("data-selected")),a.addEventListener("change",d=>{d&&d.target instanceof HTMLElement&&d.target.closest("input")&&(d.target.closest("input").checked?this.setAttribute("data-selected","all"):this.setAttribute("data-selected",0))});let n=this.querySelector("button[data-cancel]");n&&n.addEventListener("click",d=>{this.setAttribute("data-selected",0)})}if(this.hasAttribute("data-select-watch")){const a=document.getElementById(this.getAttribute("data-select-watch"));a.setAttribute("data-select-container","true"),Array.from(a.querySelectorAll('input[type="checkbox"]')).forEach((n,d)=>{n.parentElement.setAttribute("slot","checkbox")}),a.addEventListener("change",n=>{if(n&&n.target instanceof HTMLElement&&n.target.closest('[type="checkbox"]')){let d=a.querySelectorAll('input[type="checkbox"]').length,c=a.querySelectorAll('input[type="checkbox"]:checked').length;e.setAttribute("data-selected",d==c?"all":c),n.target.closest('[type="checkbox"]'),c?Array.from(a.querySelectorAll('input[type="checkbox"]')).forEach((m,u)=>{m.closest("iam-card")&&m.closest("iam-card").setAttribute("data-selected","true")}):Array.from(a.querySelectorAll('input[type="checkbox"]')).forEach((m,u)=>{m.closest("iam-card")&&m.closest("iam-card").removeAttribute("data-selected")})}})}if(this.hasAttribute("data-switchviews")){let a="";this.getAttribute("data-switchviews").split(",").forEach((c,m)=>{let u="fa-grid-2";c=="list"?u="fa-grip-lines":c=="small"&&(u="fa-bars"),a+=`<button class="btn btn-action btn-compact mb-0 fa-regular ${u}">${c}</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="views m-0">${a}</div>`),this.shadowRoot.querySelector(".views").addEventListener("click",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest(".btn-action")){let m=c.target.closest(".btn-action");this.setAttribute("data-view",m.textContent);const u=new CustomEvent("switch-view",{detail:{view:m.textContent}});this.dispatchEvent(u)}})}const r=this.shadowRoot.querySelector(".actionbar--search");this.hasAttribute("data-search")&&this.getAttribute("data-search")=="show"&&r.classList.add("show");const s=this.shadowRoot.querySelector("button[data-search]");this.shadowRoot.addEventListener("click",a=>{a&&a.target instanceof HTMLElement&&a.target.closest("button[data-search]")&&(r.classList.toggle("show"),s.toggleAttribute("aria-expanded"))}),r.addEventListener("keyup",a=>{const n=new CustomEvent("search-keyup",{detail:{search:r.querySelector("input").value}});this.dispatchEvent(n)}),r.addEventListener("change",a=>{const n=new CustomEvent("search-change",{detail:{search:r.querySelector("input").value}});this.dispatchEvent(n)}),r.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("button.suffix")){const n=new CustomEvent("search-submit",{detail:{search:r.querySelector("input").value}});this.dispatchEvent(n)}}),Array.from(this.shadowRoot.querySelectorAll(".body")).forEach((a,n)=>{_r(a)});function l(){const a=t.scrollWidth,n=document.documentElement.scrollWidth;let d=750,c=16,m=e.hasAttribute("data-switchviews")?144:210,u=1;n>=992&&n<=1280?u=n/1280:n>=576&&n<=1280?u=n/768:n<576&&(u=n/375),a>=992&&a<=1280?d=d*u:a>=576&&a<=1280?d=450*u:a<576&&(d=m*u),c=c*u,a<576?Array.from(e.querySelectorAll(":scope > .btn:not(.js-updated)")).forEach((h,b)=>{h.className=h.className.replace(" btn-compact"," _btn-compact"),h.classList.add("btn-compact"),h.classList.add("js-updated")}):Array.from(e.querySelectorAll(":scope > .btn.js-updated")).forEach((h,b)=>{h.classList.remove("btn-compact"),h.classList.remove("js-updated"),h.className=h.className.replace(" _btn-compact"," btn-compact")}),Array.from(e.querySelectorAll("[slot]")).forEach((h,b)=>{h.getAttribute("slot")=="overflow"&&h.removeAttribute("slot"),h.getAttribute("slot")=="selected-overflow"&&h.setAttribute("slot","selected")}),Array.from(e.querySelectorAll(".show")).forEach((h,b)=>{h.classList.remove("show")}),Array.from(e.shadowRoot.querySelectorAll(".safe-area")).forEach((h,b)=>{let p="overflow";h.querySelector("slot").hasAttribute("name")&&h.querySelector("slot").getAttribute("name")=="selected"&&(p="selected-overflow");let f=h.querySelector("slot").assignedElements(),y=44*u;e.hasAttribute("data-search")&&(y+=44*u);for(let g=0;g<f.length;g++)!f[g].classList.contains("btn-action")&&!f[g].classList.contains("dialog__wrapper")&&(y+=f[g].offsetWidth,y+=c);for(let g=0;g<f.length;g++)if(f[g].classList.contains("dialog__wrapper")&&(f[g].classList.add("show"),y+=f[g].offsetWidth,y+=c/2,y-c/2>d)){f[g].classList.remove("show");break}for(let g=0;g<f.length;g++)if(f[g].classList.contains("btn-action")&&(f[g].classList.add("show"),y+=f[g].offsetWidth,y+=c/2,y-c/2>d)){f[g].classList.remove("show");break}let v=h.querySelector(".dialog-overflow");v&&v.classList.add("d-none");for(let g=0;g<f.length;g++)(f[g].classList.contains("btn-action")||f[g].classList.contains("dialog__wrapper"))&&(f[g].classList.contains("show")||(f[g].setAttribute("slot",p),v&&v.classList.remove("d-none")))})}l(),new ResizeObserver(l).observe(t)}static get observedAttributes(){return["data-selected"]}attributeChangedCallback(e,t,r){switch(e){case"data-selected":{let s=this.shadowRoot.querySelector(".selectall");s&&tt(s,r);const l=new CustomEvent("selected",{detail:{selected:r}});if(this.dispatchEvent(l),r=="all"&&this.hasAttribute("data-select-watch")){const a=document.getElementById(this.getAttribute("data-select-watch"));Array.from(a.querySelectorAll('input[type="checkbox"]')).forEach((n,d)=>{n.checked=!0,n.closest("iam-card")&&n.closest("iam-card").setAttribute("data-selected","true")})}if(r=="0"&&this.hasAttribute("data-select-watch")){const a=document.getElementById(this.getAttribute("data-select-watch"));Array.from(a.querySelectorAll('input[type="checkbox"]')).forEach((n,d)=>{n.checked=!1,n.closest("iam-card")&&n.closest("iam-card").removeAttribute("data-selected","true")})}break}}}}const Sr=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"}));/*!
450
- * iamKey v5.1.0-beta3
450
+ * iamKey v5.1.0-beta4
451
451
  * Copyright 2022-2023 iamproperty
452
452
  */const Er=function(o){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=o.getAttribute("data-id"),t=o.getAttribute("id");if(typeof t>"u"||t==null){var r=String.fromCharCode(65+Math.floor(Math.random()*26));t=r+Date.now(),o.setAttribute("id",t)}function s(){window.player=new YT.Player(t,{height:"100%",width:"100%",videoId:e,playerVars:{modestbranding:1,playsinline:1,rel:0,showinfo:0},events:{onReady:l,onStateChange:n}})}s();function l(d){d.target.playVideo()}var a=!1;function n(d){if(d.data==YT.PlayerState.PLAYING&&!a){var c=document.getElementById(t);c.classList.add("player-ready"),a=!0}}},qr=o=>(Array.from(o.querySelectorAll("dialog[open]")).forEach((e,t)=>{e.closest(".dialog__wrapper")||(e.removeAttribute("open"),e.showModal(),e.focus(),et(e))}),o.addEventListener("click",e=>{if(e.target.tagName=="IAM-ACTIONBAR")return!1;if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-modal]")){const s=e.target.closest("[data-modal]"),l=s.hasAttribute("data-modal")?s.getAttribute("data-modal"):s.getAttribute("data-filter"),a=document.querySelector(`dialog#${l}`);et(a),a.showModal(),a.focus();let n=a.offsetWidth;a.setAttribute("style",`max-width: ${n}px;`),Array.from(a.querySelectorAll("[data-duplicate]")).forEach((d,c)=>{const m=d.getAttribute("data-duplicate"),u=document.getElementById(m);if(d.checked!=u.checked){d.checked=u.checked;let h=new Event("change");d.dispatchEvent(h)}}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openModal",id:l})}if(e&&e.target instanceof HTMLElement&&e.target.closest("button.dialog__close")){const s=e.target.closest("dialog[open]");e.preventDefault(),s.close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((l,a)=>{l.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest('button[formmethod="dialog"]')){const s=e.target.closest("dialog[open]");Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((l,a)=>{l.classList.remove("active")}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")})}if(e&&e.target instanceof HTMLElement&&e.target.closest("dialog[open]")){let s=e.target.closest("dialog[open]");var t=window.getComputedStyle(s);if(t.display==="contents"&&(s=s.parentNode.closest("dialog[open]")),!s.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")||s.classList.contains("dialog--multi")){const l=s.getBoundingClientRect();(e.clientX<l.left||e.clientX>l.right||e.clientY<l.top||e.clientY>l.bottom)&&(e.target.closest('input[type="radio"]')||s.close(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"closeModal",id:s.getAttribute("id")}))}}if(e&&e.target instanceof HTMLElement&&e.target.closest(".dialog__wrapper > button")){e.stopPropagation();let s=e.target.closest(".dialog__wrapper > button"),l=e.target.closest(".dialog__wrapper > button").parentNode,a="openPopover",n=l.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=n&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((u,h)=>{u.removeAttribute("aria-expanded")}),n.hasAttribute("open"))n.close(),a="closePopover",n.removeAttribute("style"),s.removeAttribute("aria-expanded");else{n.show(),s.setAttribute("aria-expanded",!0);var r=s.getBoundingClientRect();let u=r.top,h=r.left;if(s.closest("iam-table")){let b=s.closest("iam-table").parentNode.getBoundingClientRect();u-=b.top,h-=b.left}n.classList.contains("dialog--fix")&&n.setAttribute("style",`position:fixed;top: ${u}px; left: ${h}px; margin: 3rem 0 0 0;`)}let d=n.getBoundingClientRect(),c=d.bottom-window.scrollY,m=window.innerHeight-window.scrollY;if(c>m){let u=n.hasAttribute("style")?n.getAttribute("style")+" ":"";n.setAttribute("style",u+"transform: translate(0, calc(-100% - 4rem))"),d=n.getBoundingClientRect(),d.top-window.scrollY<100&&n.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:a,id:s.textContent})}e&&e.target instanceof HTMLElement&&!e.target.closest("dialog[open]")&&!e.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((s,l)=>{s.removeAttribute("aria-expanded")}))}),null),et=o=>{o.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!o.classList.contains("dialog--multi")&&o.addEventListener("cancel",t=>{t.preventDefault()});let e=o.querySelector(".youtube-embed a");if(e&&Er(e),o.classList.contains("dialog--multi")&&!o.querySelector(":scope > .steps")&&$r(o),!o.querySelector(":scope > .mh-lg")&&!o.classList.contains("dialog--multi")){o.innerHTML=`<div class="mh-lg">${o.innerHTML}</div>`;let t=o.querySelector(".mh-lg"),r=o.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(r){let s=r.previousSibling;t.before(r),s&&r.before(s)}}o.querySelector(":scope > button:first-child")||o.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},$r=o=>{let e="",t=Array.from(o.querySelectorAll("fieldset[data-title]")),r=o.querySelector("form");t.forEach((a,n)=>{e+=`<button data-title="${a.getAttribute("data-title")}" type="button" class="${n==0?"active":""}" tabindex="-1">${a.getAttribute("data-title")}</button>`;const d=document.createElement("div");if(d.classList.add("btn--wrapper"),a.appendChild(d),n!=0&&(d.innerHTML+=`<button data-title="${t[n-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),n!=t.length-1&&(d.innerHTML+=`<button data-title="${t[n+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),n==t.length-1)if(r&&r.querySelector(':scope > button[type="submit"]')){let c=r.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),d.insertAdjacentElement("beforeend",c)}else d.innerHTML+=`<button data-title="${t[n].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),o.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${e}</div>`);let s=Array.from(o.querySelectorAll("fieldset.was-validated"));for(let a=0;a<s.length;a++){let n=s[a],d=n.getAttribute("data-title");if(n.querySelector(".is-invalid")){Array.from(o.querySelectorAll(`[data-title="${d}"]`)).forEach((c,m)=>{c.classList.add("active")});break}else Array.from(o.querySelectorAll(`[data-title="${d}"]`)).forEach((c,m)=>{c.classList.add("valid")})}o.addEventListener("invalid",function(){return function(a){a.preventDefault()}}(),!0);function l(a){const n=o.querySelector("fieldset.active")?o.querySelector("fieldset.active"):o.querySelector("fieldset[data-title]"),d=n.getAttribute("data-title");let c=!0;if(n.classList.add("was-validated"),Array.from(n.querySelectorAll("input")).forEach((h,b)=>{h.checkValidity()||(c=!1)}),c?Array.from(o.querySelectorAll(`[data-title="${d}"]`)).forEach((h,b)=>{h.classList.add("valid")}):Array.from(o.querySelectorAll(`[data-title="${d}"]`)).forEach((h,b)=>{h.classList.remove("valid")}),c||!a.hasAttribute("data-next")){const h=o.querySelector(`fieldset[data-title="${a.getAttribute("data-title")}"]`),b=o.querySelector(`.steps button[data-title="${a.getAttribute("data-title")}"]`);Array.from(o.querySelectorAll("button")).forEach((p,f)=>{p.classList.remove("active")}),Array.from(o.querySelectorAll("fieldset")).forEach((p,f)=>{p.classList.remove("active")}),b.classList.add("active"),h.classList.add("active")}let m=Array.from(o.querySelectorAll("fieldset")).length,u=Array.from(o.querySelectorAll("fieldset.valid")).length;o.style.setProperty("--progress",`${u/(m-1)*100}%`)}o.addEventListener("keydown",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest("button")){const n=a.target.closest("button");a.keyCode==13&&n.getAttribute("type")!="submit"&&(a.preventDefault(),l(n))}a&&a.target instanceof HTMLElement&&a.target.closest("input")&&(a.target.closest("input").classList.remove("is-invalid"),a.keyCode==13&&a.preventDefault())}),o.addEventListener("click",a=>{if(a&&a.target instanceof HTMLElement&&a.target.closest('button[type="submit"]'))a.target.closest("form").classList.add("was-validated");else if(a&&a.target instanceof HTMLElement&&a.target.closest("button[data-title]")){const n=a.target.closest("button[data-title]");l(n)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function at(o,e){o&&e=="all"?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!0,o.querySelector("label").textContent="Select all"):o&&e==0?(o.querySelector("input").indeterminate=!1,o.querySelector("input").checked=!1,o.querySelector("label").textContent="Select all"):o&&e?(o.querySelector("input").indeterminate=!0,o.querySelector("input").checked=!1,o.querySelector("label").textContent=`${e} item${e>1?"s":""} selected`):o&&(o.querySelector("input").checked=!1,o.querySelector("input").indeterminate=!1,o.querySelector("label").textContent="Select all")}class Tr 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`,r=document.createElement("template");r.innerHTML=`
453
453
  <style>
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "iamproperty"
6
6
  },
7
7
  "private": false,
8
- "version": "5.1.0-beta3",
8
+ "version": "5.1.0-beta4",
9
9
  "scripts": {
10
10
  "bootstrap": "copyfiles -u 2 node_modules/bootstrap/**/* assets/bootstrap",
11
11
  "dev": "npm run copy && node local_modules/delete-assets.js && vite --host",