@iamproperty/components 4.1.0 → 4.1.1-beta

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,8 +1,8 @@
1
1
  (function(y,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(y=typeof globalThis<"u"?globalThis:y||self,o(y.iamkey={},y.Vue))})(this,function(y,o){"use strict";const v=(a,e)=>{const t=a.__vccOpts||a;for(const[n,s]of e)t[n]=s;return t},rt={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}}},nt=["xlink:href"],it=["innerHTML"];function st(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.className)},[(o.openBlock(),o.createElementBlock("svg",null,[o.createElementVNode("title",null,"iam "+o.toDisplayString(t.id),1),o.createElementVNode("use",{"xlink:href":t.path+l.src},null,8,nt)])),t.desc?(o.openBlock(),o.createElementBlock("span",{key:0,innerHTML:t.desc},null,8,it)):o.createCommentVNode("",!0)],2)}const lt=v(rt,[["render",st]]);/*!
2
- * iamKey v4.1.0
2
+ * iamKey v4.1.1-beta
3
3
  * Copyright 2022-2023 iamproperty
4
- */const ct=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},dt=(a,e)=>String(a).padStart(e,"0"),mt=a=>a.charAt(0).toUpperCase()+a.slice(1);var ut=function(a,e,t,n){function s(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function i(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?l(u.value):s(u.value).then(i,d)}c((n=n.apply(a,e||[])).next())})};const P=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{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((r,i)=>{const d=e[i];if(typeof d<"u"){let c=document.createElement("div");c.innerHTML=d.innerHTML;let u=c.textContent||c.innerText||"";r.setAttribute("data-label",u),d.hasAttribute("data-td-class")&&r.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(r.setAttribute("data-format",d.getAttribute("data-format")),r.innerHTML=B(d.getAttribute("data-format"),r.textContent.trim())),l.includes(r.textContent.trim().toLowerCase())&&r.setAttribute("data-content",r.textContent.trim().toLowerCase())}})})},ht=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{let s=window.getComputedStyle(document.querySelector("html")),l=t.querySelector(":scope > *:last-child > *:first-child");if(l){l.classList.add("text-nowrap");let r=l.offsetWidth/parseFloat(s.fontSize);r+=1.7,e=e>r?e:r}}),e},pt=(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((t,n)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{t.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button>Expand</button></td>')})},bt=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let t=e.target.closest("[data-expand-button]"),n=t.closest("tr");n.getAttribute("data-view")=="full"?n.setAttribute("data-view","default"):n.setAttribute("data-view","full"),t.blur()}})},O=(a,e)=>{let t=e.querySelector("[data-search]");if(!t)return!1;const n=t.getAttribute("id"),s=t.getAttribute("data-search").split(",");let l=t.parentNode,r={};s.forEach((i,d)=>{Array.from(a.querySelectorAll('td[data-label="'+i.trim()+'"]')).forEach((c,u)=>{c.querySelector(".td__content")?r[c.querySelector(".td__content").textContent]=c.querySelector(".td__content").textContent:r[c.textContent]=c.textContent})}),t.setAttribute("list",`${n}_list`),t.setAttribute("autocomplete","off"),l.querySelector("datalist")||(l.innerHTML+=`<datalist id="${n}_list"></datalist>`),l.querySelector("datalist").innerHTML=`${Object.keys(r).map(i=>`<option value="${i}"></option>`).join("")}`},ft=(a,e,t,n,s)=>{var l;let r=function(c,u=!1){if(e.classList.contains("processing"))return!1;if(c.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((m,p)=>{const h=m.getAttribute("data-duplicate"),b=document.getElementById(h),f=document.querySelector(`[for="${h}"] iam-card`);if(b.checked!=m.checked)if(f){let A=new Event("click");f.dispatchEvent(A)}else b.checked=m.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!u){let m=e.querySelector("[data-pagination]");m.value=1,n.setAttribute("data-page",1)}X(a,e,t,n)}else e.hasAttribute("data-submit")?e.submit():(M(a,e,n),E(a,e));if(e.hasAttribute("data-ajax-post")){let m=new FormData(e),p=new URLSearchParams(m).toString();const h=new XMLHttpRequest;h.open("GET",`${window.location.href}?ajax=true&${p}`),h.send()}};e.addEventListener("keyup",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&(l=setTimeout(function(){r(c)},500))}),e.addEventListener("change",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||I(a,e,s),r(c)),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter][data-no-ajax]")?(M(a,e,n),E(a,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"))&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-show]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-mimic]")&&r(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((m,p)=>{m.innerHTML=""});let u=e.elements;for(let m=0;m<u.length;m++)switch(u[m].type.toLowerCase()?u[m].type.toLowerCase():"text"){case"text":case"password":case"textarea":u[m].value="";break;case"radio":case"checkbox":if(u[m].checked){let p=u[m],h=p.getAttribute("id"),b=document.querySelector(`[for="${h}"`);if(b.querySelector("iam-card")){let f=b.querySelector("iam-card"),A=new Event("click");f.dispatchEvent(A)}p.checked=!1}break;case"select-one":case"select-multi":u[m].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||I(a,e,s),r(c)}}),e.addEventListener("submit",c=>{clearTimeout(l),e.hasAttribute("data-submit")||c.preventDefault(),r(c)}),e.addEventListener("force",c=>{r(c)}),e.addEventListener("paginate",c=>{r(c,!0)});let i=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((c,u)=>{let m=c.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${m}"]`)).forEach((p,h)=>{let b=p.closest("form");i.includes(b)||i.push(b),d.includes(m)||d.push(m)})}),i.forEach((c,u)=>{const m=function(){let p=[],h=new FormData(c);for(const[b,f]of h)document.querySelector(`[data-mimic="${b}"]`)&&!p.includes(b)?(p.push(b),document.querySelector(`[data-mimic="${b}"]`).value=f):document.querySelector(`[data-mimic="${b}"]`)&&(document.querySelector(`[data-mimic="${b}"]`).value+=","+f);for(const b of p){const f=new Event("force");e.dispatchEvent(f)}for(const b of d)if(!h.has(b)&&c.querySelector(`[name="${b}"]`)){document.querySelector(`[data-mimic="${b}"]`).value="";const f=new Event("force");e.dispatchEvent(f)}};c.addEventListener("force",p=>{m()}),c.addEventListener("change",p=>{m()})})},I=(a,e,t)=>{if(e.getAttribute("data-ajax"))return!1;let n=a.querySelector("tbody"),s=e.querySelector("[data-sort]"),l=s.querySelector(`option:nth-child(${s.selectedIndex+1})`),r=l.getAttribute("data-sort"),i=l.getAttribute("data-order"),d=l.getAttribute("data-format");if(!r)return n.innerHTML=t.innerHTML,P(a),!1;let c=[];["asc","desc","descending"].includes(i)||(c=i.split(","));let u=[];Array.from(n.querySelectorAll("tr")).forEach((p,h)=>{let b=p.querySelector('td[data-label="'+r+'"], th[data-label="'+r+'"]').textContent.trim();p.querySelector('[data-label="'+r+'"] .td__content')&&(b=p.querySelector('[data-label="'+r+'"] .td__content').textContent.trim()),c.length&&c.includes(b)&&(b=c.indexOf(b)),ct(b)&&(b=dt(b,10)),d&&d=="date"&&(b=new Date(b));const f={index:b,row:p};u.push(f)}),u.sort((p,h)=>p.index>h.index?1:-1),(i=="descending"||i=="desc")&&(u=u.reverse());let m="";u.forEach((p,h)=>{m+=p.row.outerHTML}),n.innerHTML=m},M=(a,e,t)=>{a.classList.remove("table--filtered");let n=W(e),s=[],l=0,r=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(a.querySelectorAll("tbody tr")).forEach((c,u)=>{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((u,m)=>{s.push({column:`${u.trim()}`,value:`${c.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML="",c.parentNode.classList.remove("hover")});let d=0;Object.values(n).forEach((c,u)=>{typeof c=="object"&&Object.values(c).length?d+=Object.values(c).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML+=`(${d})`,c.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[c,u]of Object.entries(n))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((m,p)=>{let h=!1;u.forEach((b,f)=>{let A=m.querySelector(`[data-label="${c}"]`);if(b&&b=="$today")b=B("date",new Date);else if(b&&b=="$yesterday"){let k=new Date;k.setDate(k.getDate()-1),b=B("date",k)}else if(b&&(b=="$thisWeek"||b=="$lastWeek")){let k=new Date,L=new Date(k.setDate(k.getDate()-(k.getDay()-1))),_=new Date(k.setDate(k.getDate()-k.getDay()+7)),w=new Date(A.textContent.toLowerCase());if(k.setHours(0,0,0,0),L.setHours(0,0,0,0),_.setHours(0,0,0,0),w.setHours(0,0,0,0),b=="$thisWeek")h=w>=L&&w<=_;else{let D=new Date(L.setDate(L.getDate()-7)),x=new Date(_.setDate(_.getDate()-7));D.setHours(0,0,0,0),x.setHours(0,0,0,0),h=w>=D&&w<=x}}else if(b&&b=="$thisMonth"){let k=new Date,L=k.getFullYear(),_=k.getMonth();var g=new Date(L,_,1),$=new Date(L,_+1,0);let w=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),$.setHours(0,0,0,0),w.setHours(0,0,0,0),h=w>=g&&w<=$}else if(b&&b=="$lastMonth"){let k=new Date,L=k.getFullYear(),_=k.getMonth();var S=new Date(L,_-1,1),T=new Date(L,_,0);let w=new Date(A.textContent.toLowerCase());S.setHours(0,0,0,0),T.setHours(0,0,0,0),w.setHours(0,0,0,0),h=w>=S&&w<=T}A&&A.textContent.toLowerCase().includes(b.toLowerCase())&&(h=!0)}),h||(m.classList.add("filtered"),m.setAttribute("data-filtered-by",c))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((c,u)=>{let m=!(s.length>0&&s[0].value.length>=3);s.forEach((p,h)=>{let b=c.querySelector(`[data-label="${p.column}"]`);b&&p.value.length>=3&&b.textContent.toLowerCase().includes(p.value.toLowerCase())&&(m=!0)}),m||c.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((c,u)=>{l++,c.classList.add("filtered--matched"),Math.ceil(l/i)==parseInt(r)&&c.classList.add("filtered--show")}),t&&(t.setAttribute("data-total",l),t.setAttribute("data-show",i),t.setAttribute("data-page",r))},E=(a,e,t)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((n,s)=>{let l=n.getAttribute("data-query"),r;if(l=="total")t.hasAttribute("data-total")?r=t.getAttribute("data-total"):r=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!l.includes(" == ")&&l.includes(" & ")){let i=l.split(" & "),d="";i.forEach(c=>{d+=`:not([data-filtered-by="${c}"])`}),r=Array.from(a.querySelectorAll(`tbody tr${d}`)).length}else if(!l.includes(" == "))r=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${l}"])`)).length;else if(l.includes(" && ")){let i=l.split(" && ");r=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let c=!0;for(const[u,m]of Object.entries(i)){let p=m.split(" == ");(!d.querySelector(`td[data-label="${p[0]}"]`)||d.querySelector(`td[data-label="${p[0]}"]`).textContent!=`${p[1]}`)&&(c=!1)}return c}).length}else{let i=l.split(" == ");r=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${i[0]}"], tbody tr[data-filtered-by="${i[0]}"] td[data-label="${i[0]}"]`)).filter(function(d){return d.textContent===i[1]}).length}n.hasAttribute("data-total")?n.setAttribute("data-total",r):n.innerHTML=r})},gt=function(a,e,t,n){t.addEventListener("update-page",s=>{let l=e.querySelector("[data-pagination]"),r=s.detail.page;if(l.value=r,e.dispatchEvent(new Event("paginate")),n.setAttribute("data-page",r),a.hasAttribute("data-show-history")){const i=new URL(location);i.searchParams.set("page",r),history.pushState({type:"pagination",form:e.getAttribute("id"),page:r},"",i)}if(!n.hasAttribute("data-no-scroll")){const i=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:i,behavior:"smooth"})}}),t.addEventListener("update-show",s=>{let l=e.querySelector("[data-show]"),r=s.detail.show;l.value=r,n.setAttribute("data-show",r),e.dispatchEvent(new Event("submit"))})},yt=(a,e)=>{if(!a)return!1;a.addEventListener("click",t=>{wt(e)})},wt=function(a){for(var e=[],t=a.getElementsByTagName("tr"),n=0;n<t.length;n++){for(var s=t[n].querySelectorAll("td,th"),l=[],r=0;r<s.length;r++)l.push(`"${s[r].textContent}"`);e.push(l.join(","))}e=e.join(`
5
- `);let i=new Blob([e],{type:"text/csv"});var d=document.createElement("a");d.download="export.csv";var c=window.URL.createObjectURL(i);d.href=c,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d)},U=function(a,e,t,n){if(P(a),pt(a,n),E(a,e,n),n&&n.classList.contains("table--cta")){let s=function(){Array.from(a.querySelectorAll("tr")).forEach((r,i)=>{let d=r.offsetHeight;r.style.setProperty("--row-height",`${d}px`)})};const l=ht(a);n.style.setProperty("--cta-width",`${l}rem`),new ResizeObserver(s).observe(a)}},W=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((t,n)=>{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},X=function(a,e,t,n){return ut(this,void 0,void 0,function*(){const s=(h,b,f)=>b.split(/[\.\[\]\'\"]/).filter(A=>A).reduce((A,g)=>A?A[g]:f,h);let l=new FormData(e),r=new URLSearchParams(l).toString(),i=a.querySelectorAll("thead tr th"),d=a.querySelector("tbody"),c=e.getAttribute("data-ajax");n.classList.add("table--loading");let u=W(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});let m=0;Object.values(u).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[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:p}=controller[c];t.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(c+"?"+r,{signal:p,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",f=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",A=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",g=s(h,f,15),$=s(h,A,1),S=s(h,b),T=n.hasAttribute("data-empty-msg")?n.getAttribute("data-empty-msg"):"No results found";S?(d.innerHTML="",S.forEach((k,L)=>{var _=document.createElement("tr");i.forEach((w,D)=>{let x="";var V=document.createElement("td");if(V.setAttribute("data-label",w.innerText),w.getAttribute("data-output")){var z=w.getAttribute("data-output");x=z.replace(new RegExp(/{(.*?)}/,"gm"),function(ur){return s(k,ur.replace("{","").replace("}",""))})}if(w.hasAttribute("data-output-array")){var z=w.getAttribute("data-output");let hr=s(k,z.replace("{","").replace("}",""));x="",hr.forEach((ot,Lr)=>{let pr=w.getAttribute("data-output-array"),C="";if(w.hasAttribute("data-output-array-property")&&w.hasAttribute("data-output-array-transform")){const F=s(ot,w.getAttribute("data-output-array-property")),br=JSON.parse(w.getAttribute("data-output-array-transform"))[F];C=pr.replace(`{${w.getAttribute("data-output-array-property")}}`,br)}C=C.replace(new RegExp(/{(.*?)}/,"gm"),function(F){return s(ot,F.replace("{","").replace("}",""))}),x+=C})}w.hasAttribute("data-transform")&&(x=JSON.parse(w.getAttribute("data-transform"))[x],!x&&w.hasAttribute("data-default")&&(x=w.getAttribute("data-default"))),V.innerHTML=x,_.appendChild(V)}),d.appendChild(_)}),O(a,e),n.setAttribute("data-total",parseInt(g)),n.setAttribute("data-page",parseInt($)),U(a,e,t,n),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((k,L)=>{let _=s(h,k.getAttribute("data-ajax-query"),"");k.hasAttribute("data-total")?k.setAttribute("data-total",_):k.innerHTML=_}),parseInt(g)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${T}</span></td></tr>`),n.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:c,formData:r})):d.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)}})},B=(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=mt(e)}};class vt 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=`
4
+ */const ct=function(a){return typeof a!="string"?!1:!isNaN(a)&&!isNaN(parseFloat(a))},dt=(a,e)=>String(a).padStart(e,"0"),mt=a=>a.charAt(0).toUpperCase()+a.slice(1);var ut=function(a,e,t,n){function s(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function i(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?l(u.value):s(u.value).then(i,d)}c((n=n.apply(a,e||[])).next())})};const P=a=>{const e=Array.from(a.querySelectorAll("thead th"));Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{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((r,i)=>{const d=e[i];if(typeof d<"u"){let c=document.createElement("div");c.innerHTML=d.innerHTML;let u=c.textContent||c.innerText||"";r.setAttribute("data-label",u),d.hasAttribute("data-td-class")&&r.setAttribute("class",d.getAttribute("data-td-class")),d.hasAttribute("data-format")&&(r.setAttribute("data-format",d.getAttribute("data-format")),r.innerHTML=B(d.getAttribute("data-format"),r.textContent.trim())),l.includes(r.textContent.trim().toLowerCase())&&r.setAttribute("data-content",r.textContent.trim().toLowerCase())}})})},ht=a=>{let e=0;return Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{let s=window.getComputedStyle(document.querySelector("html")),l=t.querySelector(":scope > *:last-child > *:first-child");if(l){l.classList.add("text-nowrap");let r=l.offsetWidth/parseFloat(s.fontSize);r+=1.7,e=e>r?e:r}}),e},pt=(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((t,n)=>{t.insertAdjacentHTML("afterbegin",'<th class="th--fixed expand-button-heading"></th>')}),Array.from(a.querySelectorAll("tbody tr")).forEach((t,n)=>{t.insertAdjacentHTML("afterbegin",'<td class="td--fixed td--expand"><button class="btn btn-compact btn-secondary" data-expand-button>Expand</button></td>')})},bt=a=>{a.addEventListener("click",e=>{if(e&&e.target instanceof HTMLElement&&e.target.closest("[data-expand-button]")){let t=e.target.closest("[data-expand-button]"),n=t.closest("tr");n.getAttribute("data-view")=="full"?n.setAttribute("data-view","default"):n.setAttribute("data-view","full"),t.blur()}})},I=(a,e)=>{let t=e.querySelector("[data-search]");if(!t)return!1;const n=t.getAttribute("id"),s=t.getAttribute("data-search").split(",");let l=t.parentNode,r={};s.forEach((i,d)=>{Array.from(a.querySelectorAll('td[data-label="'+i.trim()+'"]')).forEach((c,u)=>{c.querySelector(".td__content")?r[c.querySelector(".td__content").textContent]=c.querySelector(".td__content").textContent:r[c.textContent]=c.textContent})}),t.setAttribute("list",`${n}_list`),t.setAttribute("autocomplete","off"),l.querySelector("datalist")||(l.innerHTML+=`<datalist id="${n}_list"></datalist>`),l.querySelector("datalist").innerHTML=`${Object.keys(r).map(i=>`<option value="${i}"></option>`).join("")}`},ft=(a,e,t,n,s)=>{var l;let r=function(c,u=!1){if(e.classList.contains("processing"))return!1;if(c.type=="submit"&&(e.classList.add("processing"),Array.from(e.querySelectorAll("[data-duplicate]")).forEach((m,p)=>{const h=m.getAttribute("data-duplicate"),b=document.getElementById(h),f=document.querySelector(`[for="${h}"] iam-card`);if(b.checked!=m.checked)if(f){let A=new Event("click");f.dispatchEvent(A)}else b.checked=m.checked}),e.classList.remove("processing")),e.hasAttribute("data-ajax")){if(!u){let m=e.querySelector("[data-pagination]");m.value=1,n.setAttribute("data-page",1)}X(a,e,t,n)}else e.hasAttribute("data-submit")?e.submit():(M(a,e,n),E(a,e));if(e.hasAttribute("data-ajax-post")){let m=new FormData(e),p=new URLSearchParams(m).toString();const h=new XMLHttpRequest;h.open("GET",`${window.location.href}?ajax=true&${p}`),h.send()}};e.addEventListener("keyup",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&(l=setTimeout(function(){r(c)},500))}),e.addEventListener("change",c=>{clearTimeout(l),c&&c.target instanceof HTMLElement&&c.target.closest("[data-sort]")&&(e.hasAttribute("data-submit")||O(a,e,s),r(c)),c&&c.target instanceof HTMLElement&&c.target.closest("[data-search]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-filter][data-no-ajax]")?(M(a,e,n),E(a,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"))&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-show]")&&r(c),c&&c.target instanceof HTMLElement&&c.target.closest("[data-mimic]")&&r(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((m,p)=>{m.innerHTML=""});let u=e.elements;for(let m=0;m<u.length;m++)switch(u[m].type.toLowerCase()?u[m].type.toLowerCase():"text"){case"text":case"password":case"textarea":u[m].value="";break;case"radio":case"checkbox":if(u[m].checked){let p=u[m],h=p.getAttribute("id"),b=document.querySelector(`[for="${h}"`);if(b.querySelector("iam-card")){let f=b.querySelector("iam-card"),A=new Event("click");f.dispatchEvent(A)}p.checked=!1}break;case"select-one":case"select-multi":u[m].selectedIndex=-1;break}e.classList.remove("processing"),e.hasAttribute("data-submit")||O(a,e,s),r(c)}}),e.addEventListener("submit",c=>{clearTimeout(l),e.hasAttribute("data-submit")||c.preventDefault(),r(c)}),e.addEventListener("force",c=>{r(c)}),e.addEventListener("paginate",c=>{r(c,!0)});let i=[],d=[];Array.from(e.querySelectorAll("[data-mimic]")).forEach((c,u)=>{let m=c.getAttribute("data-mimic");Array.from(document.querySelectorAll(`[name="${m}"]`)).forEach((p,h)=>{let b=p.closest("form");i.includes(b)||i.push(b),d.includes(m)||d.push(m)})}),i.forEach((c,u)=>{const m=function(){let p=[],h=new FormData(c);for(const[b,f]of h)document.querySelector(`[data-mimic="${b}"]`)&&!p.includes(b)?(p.push(b),document.querySelector(`[data-mimic="${b}"]`).value=f):document.querySelector(`[data-mimic="${b}"]`)&&(document.querySelector(`[data-mimic="${b}"]`).value+=","+f);for(const b of p){const f=new Event("force");e.dispatchEvent(f)}for(const b of d)if(!h.has(b)&&c.querySelector(`[name="${b}"]`)){document.querySelector(`[data-mimic="${b}"]`).value="";const f=new Event("force");e.dispatchEvent(f)}};c.addEventListener("force",p=>{m()}),c.addEventListener("change",p=>{m()})})},O=(a,e,t)=>{if(e.getAttribute("data-ajax"))return!1;let n=a.querySelector("tbody"),s=e.querySelector("[data-sort]"),l=s.querySelector(`option:nth-child(${s.selectedIndex+1})`),r=l.getAttribute("data-sort"),i=l.getAttribute("data-order"),d=l.getAttribute("data-format");if(!r)return n.innerHTML=t.innerHTML,P(a),!1;let c=[];["asc","desc","descending"].includes(i)||(c=i.split(","));let u=[];Array.from(n.querySelectorAll("tr")).forEach((p,h)=>{let b=p.querySelector('td[data-label="'+r+'"], th[data-label="'+r+'"]').textContent.trim();p.querySelector('[data-label="'+r+'"] .td__content')&&(b=p.querySelector('[data-label="'+r+'"] .td__content').textContent.trim()),c.length&&c.includes(b)&&(b=c.indexOf(b)),ct(b)&&(b=dt(b,10)),d&&d=="date"&&(b=new Date(b));const f={index:b,row:p};u.push(f)}),u.sort((p,h)=>p.index>h.index?1:-1),(i=="descending"||i=="desc")&&(u=u.reverse());let m="";u.forEach((p,h)=>{m+=p.row.outerHTML}),n.innerHTML=m},M=(a,e,t)=>{a.classList.remove("table--filtered");let n=W(e),s=[],l=0,r=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(a.querySelectorAll("tbody tr")).forEach((c,u)=>{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((u,m)=>{s.push({column:`${u.trim()}`,value:`${c.value}`})})}Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML="",c.parentNode.classList.remove("hover")});let d=0;Object.values(n).forEach((c,u)=>{typeof c=="object"&&Object.values(c).length?d+=Object.values(c).length:d++}),d&&Array.from(e.querySelectorAll("[data-filter-count]")).forEach((c,u)=>{c.innerHTML+=`(${d})`,c.parentNode.classList.add("hover")}),a.classList.add("table--filtered");for(const[c,u]of Object.entries(n))Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((m,p)=>{let h=!1;u.forEach((b,f)=>{let A=m.querySelector(`[data-label="${c}"]`);if(b&&b=="$today")b=B("date",new Date);else if(b&&b=="$yesterday"){let k=new Date;k.setDate(k.getDate()-1),b=B("date",k)}else if(b&&(b=="$thisWeek"||b=="$lastWeek")){let k=new Date,L=new Date(k.setDate(k.getDate()-(k.getDay()-1))),_=new Date(k.setDate(k.getDate()-k.getDay()+7)),w=new Date(A.textContent.toLowerCase());if(k.setHours(0,0,0,0),L.setHours(0,0,0,0),_.setHours(0,0,0,0),w.setHours(0,0,0,0),b=="$thisWeek")h=w>=L&&w<=_;else{let D=new Date(L.setDate(L.getDate()-7)),x=new Date(_.setDate(_.getDate()-7));D.setHours(0,0,0,0),x.setHours(0,0,0,0),h=w>=D&&w<=x}}else if(b&&b=="$thisMonth"){let k=new Date,L=k.getFullYear(),_=k.getMonth();var g=new Date(L,_,1),$=new Date(L,_+1,0);let w=new Date(A.textContent.toLowerCase());g.setHours(0,0,0,0),$.setHours(0,0,0,0),w.setHours(0,0,0,0),h=w>=g&&w<=$}else if(b&&b=="$lastMonth"){let k=new Date,L=k.getFullYear(),_=k.getMonth();var S=new Date(L,_-1,1),T=new Date(L,_,0);let w=new Date(A.textContent.toLowerCase());S.setHours(0,0,0,0),T.setHours(0,0,0,0),w.setHours(0,0,0,0),h=w>=S&&w<=T}A&&A.textContent.toLowerCase().includes(b.toLowerCase())&&(h=!0)}),h||(m.classList.add("filtered"),m.setAttribute("data-filtered-by",c))});Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).forEach((c,u)=>{let m=!(s.length>0&&s[0].value.length>=3);s.forEach((p,h)=>{let b=c.querySelector(`[data-label="${p.column}"]`);b&&p.value.length>=3&&b.textContent.toLowerCase().includes(p.value.toLowerCase())&&(m=!0)}),m||c.classList.add("filtered")}),Array.from(a.querySelectorAll("tbody tr:not(.filtered")).forEach((c,u)=>{l++,c.classList.add("filtered--matched"),Math.ceil(l/i)==parseInt(r)&&c.classList.add("filtered--show")}),t&&(t.setAttribute("data-total",l),t.setAttribute("data-show",i),t.setAttribute("data-page",r))},E=(a,e,t)=>{Array.from(e.querySelectorAll("[data-query]")).forEach((n,s)=>{let l=n.getAttribute("data-query"),r;if(l=="total")t.hasAttribute("data-total")?r=t.getAttribute("data-total"):r=(a.classList.contains("table--filtered"),a.querySelectorAll("tbody tr").length);else if(!l.includes(" == ")&&l.includes(" & ")){let i=l.split(" & "),d="";i.forEach(c=>{d+=`:not([data-filtered-by="${c}"])`}),r=Array.from(a.querySelectorAll(`tbody tr${d}`)).length}else if(!l.includes(" == "))r=Array.from(a.querySelectorAll(`tbody tr:not([data-filtered-by="${l}"])`)).length;else if(l.includes(" && ")){let i=l.split(" && ");r=Array.from(a.querySelectorAll("tbody tr:not(.filtered)")).filter(function(d){let c=!0;for(const[u,m]of Object.entries(i)){let p=m.split(" == ");(!d.querySelector(`td[data-label="${p[0]}"]`)||d.querySelector(`td[data-label="${p[0]}"]`).textContent!=`${p[1]}`)&&(c=!1)}return c}).length}else{let i=l.split(" == ");r=Array.from(a.querySelectorAll(`tbody tr.filtered--matched td[data-label="${i[0]}"], tbody tr[data-filtered-by="${i[0]}"] td[data-label="${i[0]}"]`)).filter(function(d){return d.textContent===i[1]}).length}n.hasAttribute("data-total")?n.setAttribute("data-total",r):n.innerHTML=r})},gt=function(a,e,t,n){t.addEventListener("update-page",s=>{let l=e.querySelector("[data-pagination]"),r=s.detail.page;if(l.value=r,e.dispatchEvent(new Event("paginate")),n.setAttribute("data-page",r),a.hasAttribute("data-show-history")){const i=new URL(location);i.searchParams.set("page",r),history.pushState({type:"pagination",form:e.getAttribute("id"),page:r},"",i)}if(!n.hasAttribute("data-no-scroll")){const i=a.getBoundingClientRect().top+window.pageYOffset+-250;window.scrollTo({top:i,behavior:"smooth"})}}),t.addEventListener("update-show",s=>{let l=e.querySelector("[data-show]"),r=s.detail.show;l.value=r,n.setAttribute("data-show",r),e.dispatchEvent(new Event("submit"))})},yt=(a,e)=>{if(!a)return!1;a.addEventListener("click",t=>{wt(e)})},wt=function(a){for(var e=[],t=a.getElementsByTagName("tr"),n=0;n<t.length;n++){for(var s=t[n].querySelectorAll("td,th"),l=[],r=0;r<s.length;r++)l.push(`"${s[r].textContent}"`);e.push(l.join(","))}e=e.join(`
5
+ `);let i=new Blob([e],{type:"text/csv"});var d=document.createElement("a");d.download="export.csv";var c=window.URL.createObjectURL(i);d.href=c,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d)},U=function(a,e,t,n){if(P(a),pt(a,n),E(a,e,n),n&&n.classList.contains("table--cta")){let s=function(){Array.from(a.querySelectorAll("tr")).forEach((r,i)=>{let d=r.offsetHeight;r.style.setProperty("--row-height",`${d}px`)})};const l=ht(a);n.style.setProperty("--cta-width",`${l}rem`),new ResizeObserver(s).observe(a)}},W=function(a){let e=new Object;return Array.from(a.querySelectorAll("[data-filter]")).forEach((t,n)=>{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},X=function(a,e,t,n){return ut(this,void 0,void 0,function*(){const s=(h,b,f)=>b.split(/[\.\[\]\'\"]/).filter(A=>A).reduce((A,g)=>A?A[g]:f,h);let l=new FormData(e),r=new URLSearchParams(l).toString(),i=a.querySelectorAll("thead tr th"),d=a.querySelector("tbody"),c=e.getAttribute("data-ajax");n.classList.add("table--loading");let u=W(e);Array.from(e.querySelectorAll("[data-filter-count]")).forEach((h,b)=>{h.innerHTML="",h.parentNode.classList.remove("hover")});let m=0;Object.values(u).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[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:p}=controller[c];t.setAttribute("data-loading","true"),e.classList.add("processing");try{yield fetch(c+"?"+r,{signal:p,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",f=e.hasAttribute("data-schema-total")?e.getAttribute("data-schema-total"):"meta.total",A=e.hasAttribute("data-schema-page")?e.getAttribute("data-schema-page"):"meta.current_page",g=s(h,f,15),$=s(h,A,1),S=s(h,b),T=n.hasAttribute("data-empty-msg")?n.getAttribute("data-empty-msg"):"No results found";S?(d.innerHTML="",S.forEach((k,L)=>{var _=document.createElement("tr");i.forEach((w,D)=>{let x="";var V=document.createElement("td");if(V.setAttribute("data-label",w.innerText),w.getAttribute("data-output")){var z=w.getAttribute("data-output");x=z.replace(new RegExp(/{(.*?)}/,"gm"),function(ur){return s(k,ur.replace("{","").replace("}",""))})}if(w.hasAttribute("data-output-array")){var z=w.getAttribute("data-output");let hr=s(k,z.replace("{","").replace("}",""));x="",hr.forEach((ot,Lr)=>{let pr=w.getAttribute("data-output-array"),C="";if(w.hasAttribute("data-output-array-property")&&w.hasAttribute("data-output-array-transform")){const F=s(ot,w.getAttribute("data-output-array-property")),br=JSON.parse(w.getAttribute("data-output-array-transform"))[F];C=pr.replace(`{${w.getAttribute("data-output-array-property")}}`,br)}C=C.replace(new RegExp(/{(.*?)}/,"gm"),function(F){return s(ot,F.replace("{","").replace("}",""))}),x+=C})}w.hasAttribute("data-transform")&&(x=JSON.parse(w.getAttribute("data-transform"))[x],!x&&w.hasAttribute("data-default")&&(x=w.getAttribute("data-default"))),V.innerHTML=x,_.appendChild(V)}),d.appendChild(_)}),I(a,e),n.setAttribute("data-total",parseInt(g)),n.setAttribute("data-page",parseInt($)),U(a,e,t,n),Array.from(e.querySelectorAll("[data-ajax-query]")).forEach((k,L)=>{let _=s(h,k.getAttribute("data-ajax-query"),"");k.hasAttribute("data-total")?k.setAttribute("data-total",_):k.innerHTML=_}),parseInt(g)==0&&(d.innerHTML=`<tr><td colspan="100%"><span>${T}</span></td></tr>`),n.classList.remove("table--loading"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Ajax table loaded",url:c,formData:r})):d.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)}})},B=(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=mt(e)}};class vt 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=`
6
6
  <style>
7
7
  @import "${t}";
8
8
  :host{--wrapper-padding: 2rem;--bg-colour: #ffffff;display:block;background:#fff;padding:var(--wrapper-padding);box-shadow:0px 6px 12px rgba(0,0,0,.11);border-radius:0.5rem;margin-bottom:2rem;overflow:hidden}:host:before{display:none !important}@media screen and (prefers-color-scheme: dark){:host{background:var(--colour-canvas-2)}}@media(forced-colors: active){:host{--wrapper-padding: 0;background:var(--colour-canvas-2)}}::slotted(table){margin-bottom:0 !important}.table__wrapper{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}@container (width < 23.4375em){:host(:not(.table--fullwidth)){margin-left:-1.5rem;margin-right:-1.5rem;margin-bottom:0;background:var(--colour-canvas-2);border-radius:0;background:none;padding:0;box-shadow:none;overflow:visible}:host(:not(.table--fullwidth)) .table__wrapper:not(.table--fullwidth){overflow:hidden;max-height:none !important}:host(:not(.table--fullwidth)) ::slotted(table){overflow:visible !important;margin-inline:1.5rem;margin-bottom:1.5rem !important;width:calc(100% - 3rem) !important;display:block}:host(:not(.table--fullwidth)) .table--cta{border-bottom:0}:host(:not(.table--fullwidth)) .table--cta:after{content:none;display:none !important}}@container (width > 23.4375em){:host{--cta-width: 8rem}:host(.table--loading){--cta-width: 1.5rem!important}.table--cta{position:relative}.table--cta .table__wrapper{overflow-y:hidden;margin-bottom:0}}.table__wrapper:is(.mh-sm,.mh-md,.mh-lg){position:relative}.table__wrapper:is(.mh-sm,.mh-md,.mh-lg)::before{top:calc(100% - 1.2rem);bottom:2px;height:1.2rem;border-bottom:2px solid var(--colour-border);margin-bottom:-1.2rem}.table--cta>.table__wrapper:is(.mh-sm,.mh-md,.mh-lg){max-height:none;position:static}.table--cta>.table__wrapper:is(.mh-sm,.mh-md,.mh-lg)::before{display:none}@container (width < 23.4375em){.table__wrapper.has-actionbar{margin-top:calc(-100vh + 6.75rem) !important}}:host(.table--loading){pointer-events:none;position:relative}:host(.table--loading) ::slotted(table){min-height:20rem;opacity:.5}:host(.table--loading)::after{content:"Loading...";position:absolute;top:6.25rem;left:50%;transform:translate(-50%, 0);font-weight:bold;color:var(--colour-heading);font-size:1.5rem;text-shadow:0px 0px 10px var(--colour-canvas-2);padding-inline:2rem;text-shadow:0px 0px 10px var(--colour-canvas-2);background:radial-gradient(var(--colour-canvas-2), transparent)}@container (width < 23.4375em){.pagination--table{margin-inline:1.5rem;width:auto}:host(.table--fullwidth) .pagination--table{margin-inline:0}}/*# sourceMappingURL=assets/css/components/table.css.map */
@@ -28,8 +28,8 @@
28
28
  </div>
29
29
  <iam-pagination class="pagination--table" ${this.hasAttribute("data-page")?`data-page="${this.getAttribute("data-page")}"`:""} ></iam-pagination>
30
30
  `,this.shadowRoot.appendChild(n.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)}}@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) tr[data-view=full] [data-expand-button]: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{padding-left:0 !important;margin:0 !important}iam-table input:is([type=radio],[type=checkbox])+label:before,iam-table input:is([type=radio],[type=checkbox])+label: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{padding-left:0 !important;margin:0 !important;min-height:2rem}iam-table input:is([type=radio],[type=checkbox])+label:before,iam-table input:is([type=radio],[type=checkbox])+label: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] tr[data-view=full] [data-expand-button]:before{content:""}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;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.extras.css.map */
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"),O(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" />`),bt(this.table),ft(this.table,this.form,this.pagination,this,this.savedTableBody),gt(this.table,this.form,this.pagination,this),yt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))X(this.table,this.form,this.pagination,this);else{let n=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((r,i)=>{r.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((r,i)=>{let d=`row${n(i)}`;r.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",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".selectrow input")){let i=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,d=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;l.setAttribute("data-selected",i==d?"all":d)}}),l.addEventListener("selected",r=>{r.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((i,d)=>{i.checked=!1}):r.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((i,d)=>{i.checked=!0})})}let s=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((l,r)=>{if(l.querySelector(":scope > td > .dialog__wrapper")){let i=l.querySelector(":scope > td > .dialog__wrapper").parentNode;i.classList.add("td--fixed"),s=Array.from(i.parentNode.children).indexOf(i)}}),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,r)=>{l.classList.add("td--fixed")})),U(this.table,this.form,this.pagination,this),M(this.table,this.form,this),E(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",n=>{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,n){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),e){case"data-total":{t!=n&&this.pagination.setAttribute("data-total",n);break}case"data-show":{t!=n&&this.pagination.setAttribute("data-show",n);break}case"data-page":{t!=n&&this.pagination.setAttribute("data-page",n);break}}}}/*!
32
- * iamKey v4.1.0
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" />`),bt(this.table),ft(this.table,this.form,this.pagination,this,this.savedTableBody),gt(this.table,this.form,this.pagination,this),yt(this.shadowRoot.querySelector("[data-export]"),this.table),this.form.getAttribute("data-ajax"))X(this.table,this.form,this.pagination,this);else{let n=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((r,i)=>{r.insertAdjacentHTML("afterbegin",'<th class="th--fixed"></th>')}),Array.from(this.table.querySelectorAll("tbody tr")).forEach((r,i)=>{let d=`row${n(i)}`;r.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",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".selectrow input")){let i=this.table.querySelectorAll('.selectrow input[type="checkbox"]').length,d=this.table.querySelectorAll('.selectrow input[type="checkbox"]:checked').length;l.setAttribute("data-selected",i==d?"all":d)}}),l.addEventListener("selected",r=>{r.detail.selected=="0"?Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((i,d)=>{i.checked=!1}):r.detail.selected=="all"&&Array.from(this.table.querySelectorAll('.selectrow input[type="checkbox"]')).forEach((i,d)=>{i.checked=!0})})}let s=-1;Array.from(this.table.querySelectorAll("tbody tr")).forEach((l,r)=>{if(l.querySelector(":scope > td > .dialog__wrapper")){let i=l.querySelector(":scope > td > .dialog__wrapper").parentNode;i.classList.add("td--fixed"),s=Array.from(i.parentNode.children).indexOf(i)}}),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,r)=>{l.classList.add("td--fixed")})),U(this.table,this.form,this.pagination,this),M(this.table,this.form,this),E(this.table,this.form)}this.shadowRoot.querySelector(".table__wrapper").addEventListener("scroll",n=>{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,n){switch(this.pagination=this.shadowRoot.querySelector("iam-pagination"),e){case"data-total":{t!=n&&this.pagination.setAttribute("data-total",n);break}case"data-show":{t!=n&&this.pagination.setAttribute("data-show",n);break}case"data-page":{t!=n&&this.pagination.setAttribute("data-page",n);break}}}}/*!
32
+ * iamKey v4.1.1-beta
33
33
  * Copyright 2022-2023 iamproperty
34
34
  */let K=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`,n=document.createElement("template");n.innerHTML=`
35
35
  <style>
@@ -72,7 +72,7 @@
72
72
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){const e=new URLSearchParams(window.location.search);this.hasAttribute("data-total")||this.setAttribute("data-total",15),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"));const t=this.shadowRoot.querySelector(".page-jump select"),n=this.shadowRoot.querySelector(".prev"),s=this.shadowRoot.querySelector(".next"),l=this.shadowRoot.querySelector(".per-page select"),r=this.shadowRoot.querySelector(".load-more");this.setup(),t.addEventListener("change",i=>{this.setAttribute("data-show",this.getAttribute("data-increment")),this.setAttribute("data-page",i.target.value)}),s.addEventListener("click",i=>{t.value=parseInt(t.value)+1,t.dispatchEvent(new Event("change"))}),n.addEventListener("click",i=>{t.value=parseInt(t.value)-1,t.dispatchEvent(new Event("change"))}),l.addEventListener("change",i=>{this.setAttribute("data-increment",i.target.value)}),r.addEventListener("click",i=>{let d=parseInt(this.getAttribute("data-show"))+parseInt(this.getAttribute("data-increment"));this.setAttribute("data-show",d),d>parseInt(this.getAttribute("data-total"))&&r.remove()})}setup(){const e=this.shadowRoot.querySelector(".pagination"),t=this.shadowRoot.querySelector(".page-jump select"),n=this.shadowRoot.querySelector(".prev"),s=this.shadowRoot.querySelector(".next"),l=this.shadowRoot.querySelector(".item-count"),r=this.shadowRoot.querySelector(".per-page select"),i=this.shadowRoot.querySelector(".total-pages"),d=parseInt(this.getAttribute("data-page")),c=parseInt(this.getAttribute("data-total")),u=parseInt(this.getAttribute("data-show")),m=parseInt(this.getAttribute("data-increment")),p=Math.ceil(c/m);c>u&&e.classList.remove("d-none");let h="";for(let g=1;g<=p;g++)h+=`<option value="${g}" ${g==d?"selected":""}>${g}</option>`;t.innerHTML=h,i.innerHTML=`of ${p}`,d==p?s.setAttribute("disabled","disabled"):s.removeAttribute("disabled"),d==1?n.setAttribute("disabled","disabled"):n.removeAttribute("disabled");let b=d==1?1:(d-1)*u+1,f=d==1?u:d*u;l.innerHTML=`${b} - ${f>c?c:f} of ${c} items`;const A=[15,25,40,50];m&&r.value!=m&&!A.includes(m)&&(r.innerHTML=`<option value="${m}">${m}</option>
73
73
  <option value="${m*2}">${m*2}</option>
74
74
  <option value="${m*3}">${m*3}</option>
75
- <option value="${m*4}">${m*4}</option>`),r.value=m}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(e,t,n){switch(e){case"data-total":{t!=n&&(this.setAttribute("data-page",1),this.setup());break}case"data-show":{t!=n&&(this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:n}})));break}case"data-increment":{t!=n&&(this.setAttribute("data-show",n),this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:n}})));break}case"data-page":{t!=n&&(this.setup(),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:n}})));break}}}};const kt=a=>a.charAt(0).toUpperCase()+a.slice(1),At=a=>a.replace(/_/g," "),_t=a=>a.replace(/ /g,"_"),Lt=function(a){return a=a.toLowerCase(),a=_t(a),a=a.replace(/\W/g,""),a},xt={name:"Table",props:{items:{type:Array,required:!1},fields:{type:Array,required:!1}},computed:{cellHeading(){return a=>`${kt(At(a))}`}},created(){this.$nextTick(function(){window.customElements.get("iam-table")||window.customElements.define("iam-table",vt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",K)})},updated(){}},St={key:0},Et={key:0},qt=["data-row-id"],$t=["innerHTML"];function Tt(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-table",null,[t.fields?(o.openBlock(),o.createElementBlock("table",St,[o.createElementVNode("thead",null,[o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.fields,r=>(o.openBlock(),o.createElementBlock("th",{key:r.key},o.toDisplayString(l.cellHeading(r.key)),1))),128))])]),t.items?(o.openBlock(),o.createElementBlock("tbody",Et,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("tr",{key:i,"data-row-id":r.rowid},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.fromEntries(Object.entries(r).filter(([d])=>d!=="rowid")),(d,c)=>(o.openBlock(),o.createElementBlock("td",{key:c,innerHTML:d},null,8,$t))),128))],8,qt))),128))])):o.createCommentVNode("",!0)])):o.renderSlot(a.$slots,"default",{key:1})])}const H=v(xt,[["render",Tt]]),Ct={name:"Input",props:{value:{type:String,required:!1},id:{type:String,required:!0},name:{type:String,required:!1},list:{type:String,required:!1},label:{type:String,required:!1},labelclass:{type:String,required:!1},inputclass:{type:String,required:!1},type:{type:String,required:!1,default:"text"},size:{type:String,required:!1},errormsg:{type:String,required:!1},options:{type:Array,required:!1},prefix:{type:String,required:!1},prefixClass:{type:String,required:!1},suffix:{type:String,required:!1},pattern:{type:String,required:!1},suffixClass:{type:String,required:!1},title:{type:String,required:!1},hint:{type:String,required:!1},multiple:{type:String,required:!1}},computed:{displayLabel(){return()=>this.$attrs.multiple?this.label+'<span class="small d-block text-body font-body fw-normal">Hold down the Ctrl (windows) or Command (Mac) button to select multiple options.</span>':this.hint?this.label+`<span class="small d-block text-body font-body fw-normal">${this.hint}</span>`:this.label},wrapperClass(){return()=>{switch(this.type){case"radio":case"checkbox":return"form-check";case"radio-btn":case"checkbox-btn":return!1;default:return"form-control__wrapper"}}},needPattern(){return()=>{if(this.pattern)return this.pattern;switch(this.type){case"datetime-local":return"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}"}return"(.*?)"}},needsLabel(){return()=>{switch(this.type){case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},isInput(){return()=>{switch(this.type){case"textarea":case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":case"range":case"color":return!1;default:return!0}}},allowDatalist(){return()=>{switch(this.type){case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},hasOptions(){return()=>{if(this.list)return this.list;if(this.options)return this.id+"-list"}},inputVal:{get(){return this.value==null&&this.options!=null&&this.type=="select"?this.$attrs.multiple?[]:this.options[0].value:this.value},set(a){this.$emit("input",a)}}},mounted(){this.$nextTick(function(){let a=this.$refs.wrapper;if(a.parentNode&&a.parentNode.classList.contains("form-check")||a.classList.length==0){const e=document.createDocumentFragment();Array.from(a.childNodes).forEach(t=>e.appendChild(t)),a.parentNode.insertBefore(e,a),a.parentNode.removeChild(a)}})},methods:{inputKeyup(a){this.$emit("keyupEvent",a)},clickEvent(){this.$emit("bus")}}},Mt=["for","innerHTML","title"],Bt=["innerHTML"],Ht=["innerHTML"],Nt=["type","name","id","pattern","list"],Rt=["type","name","id","pattern"],jt={key:5,class:"input-group"},Dt=["type","name","id","pattern","list"],Vt={class:"input-group-text border-0 col-2 col-sm-1 px-0"},zt={key:6,class:"input-group"},Ft=["type","name","id","pattern","list"],Pt={class:"input-group-text flex-fill"},Ot=["type","name","id","pattern"],It=["value"],Ut=["type","name","id"],Wt=["for","innerHTML"],Xt=["type","name","id"],Kt=["for","innerHTML"],Yt=["innerHTML"],Gt=["id"],Jt=["value"];function Qt(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.wrapperClass()),ref:"wrapper"},[l.needsLabel()?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(`form-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:l.displayLabel(),title:t.title},null,10,Mt)):o.createCommentVNode("",!0),t.prefix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(`prefix ${this.prefixClass} ${t.size?`prefix-${t.size}`:""}`),innerHTML:t.prefix,role:"presentation"},null,10,Bt)):o.createCommentVNode("",!0),t.suffix?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(`suffix ${this.suffixClass} ${t.size?`suffix-${t.size}`:""}`),innerHTML:t.suffix,role:"presentation"},null,10,Ht)):o.createCommentVNode("",!0),l.isInput()?o.withDirectives((o.openBlock(),o.createElementBlock("input",o.mergeProps({key:3,"onUpdate:modelValue":e[0]||(e[0]=r=>l.inputVal=r),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{onKeyup:e[1]||(e[1]=(...r)=>l.inputKeyup&&l.inputKeyup(...r))}),null,16,Nt)),[[o.vModelDynamic,l.inputVal]]):o.createCommentVNode("",!0),t.type=="textarea"?o.withDirectives((o.openBlock(),o.createElementBlock("textarea",o.mergeProps({key:4,"onUpdate:modelValue":e[2]||(e[2]=r=>l.inputVal=r),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern()},a.$attrs),null,16,Rt)),[[o.vModelText,l.inputVal]]):o.createCommentVNode("",!0),t.type=="range"?(o.openBlock(),o.createElementBlock("div",jt,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[3]||(e[3]=r=>l.inputVal=r),class:`form-range${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,Dt),[[o.vModelDynamic,l.inputVal]]),o.createElementVNode("output",Vt,o.toDisplayString(t.value),1)])):o.createCommentVNode("",!0),t.type=="color"?(o.openBlock(),o.createElementBlock("div",zt,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[4]||(e[4]=r=>l.inputVal=r),class:`form-control form-control-color${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,Ft),[[o.vModelDynamic,l.inputVal]]),o.createElementVNode("output",Pt,o.toDisplayString(t.value?a.vale:"#000000"),1)])):o.createCommentVNode("",!0),t.type=="select"?o.withDirectives((o.openBlock(),o.createElementBlock("select",o.mergeProps({key:7,"onUpdate:modelValue":e[5]||(e[5]=r=>l.inputVal=r),class:`form-select${t.size?` form-select-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.id,id:t.id,pattern:l.needPattern()},a.$attrs),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(r,i)=>(o.openBlock(),o.createElementBlock("option",{key:i,value:r.value},o.toDisplayString(r.display?r.display:r.value),9,It))),128))],16,Ot)),[[o.vModelSelect,l.inputVal]]):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:8,class:"form-check-input",type:t.type,name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Ut)):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("label",{key:9,class:o.normalizeClass(`form-label form-check-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label},null,10,Wt)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:10,class:`btn-check${t.inputclass?` ${t.inputclass}`:""}`,type:t.type.replace("-btn",""),autocomplete:"off",name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Xt)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("label",{key:11,class:o.normalizeClass(`btn${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label,onClick:e[6]||(e[6]=(...r)=>l.clickEvent&&l.clickEvent(...r))},null,10,Kt)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default"),t.errormsg?(o.openBlock(),o.createElementBlock("span",{key:12,class:"invalid-feedback mb-0",innerHTML:t.errormsg},null,8,Yt)):o.createCommentVNode("",!0),l.allowDatalist()?(o.openBlock(),o.createElementBlock("datalist",{key:13,id:t.id+"-list"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(r,i)=>(o.openBlock(),o.createElementBlock("option",{key:i,value:r.value},o.toDisplayString(r.value),9,Jt))),128))],8,Gt)):o.createCommentVNode("",!0)],2)}const N=v(Ct,[["render",Qt]]);function Zt(a,e){const t=e.querySelector(".files"),n=e.querySelector(".drop-area"),s=a.querySelector("input"),l=a.hasAttribute("data-maxsize")?a.getAttribute("data-maxsize"):0,r=s.cloneNode();n.append(r),e.addEventListener("click",i=>{i&&i.target instanceof HTMLElement&&i.target.closest(".btn-primary")&&(i.target.closest(".btn-primary"),(s.hasAttribute("multiple")?r:s).click())}),e.addEventListener("click",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest(".files button")){const d=new DataTransfer,{files:c}=s,u=i.target.closest(".files button");for(let p=0;p<c.length;p++){const h=c[p];h.name!=u.getAttribute("data-file")&&d.items.add(h)}s.files=d.files;const m=new Event("change");s.dispatchEvent(m)}}),r.addEventListener("change",i=>{if(s.hasAttribute("multiple")){const c=[...s.files,...r.files];let u=[];const m=new DataTransfer;for(let p=0;p<c.length;p++){const h=c[p],b=h.size/1e3;!u.includes(h.name)&&(l==0||b<l)&&m.items.add(h),u.push(h.name)}s.files=m.files}else s.files=r.files;const d=new Event("change");s.dispatchEvent(d)}),r.addEventListener("dragenter",i=>{r.classList.add("focus")}),r.addEventListener("dragleave",i=>{r.classList.remove("focus")}),r.addEventListener("drop",i=>{r.classList.remove("focus")}),s.addEventListener("change",i=>{t.innerHTML="";for(const d of s.files)t.innerHTML+=`<span class="file">${d.name} <button data-file="${d.name}">Remove</button></span>`})}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class te 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=`@import "${e}/css/components/fileupload.css";`,s=document.createElement("template");s.innerHTML=`
75
+ <option value="${m*4}">${m*4}</option>`),r.value=m}static get observedAttributes(){return["data-total","data-increment","data-page","data-show"]}attributeChangedCallback(e,t,n){switch(e){case"data-total":{t!=n&&(this.setAttribute("data-page",1),this.setup());break}case"data-show":{t!=n&&(this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:n}})));break}case"data-increment":{t!=n&&(this.setAttribute("data-show",n),this.setAttribute("data-page",1),this.setup(),this.dispatchEvent(new CustomEvent("update-show",{detail:{show:n}})));break}case"data-page":{t!=n&&(this.setup(),this.dispatchEvent(new CustomEvent("update-page",{detail:{page:n}})));break}}}};const kt=a=>a.charAt(0).toUpperCase()+a.slice(1),At=a=>a.replace(/_/g," "),_t=a=>a.replace(/ /g,"_"),Lt=function(a){return a=a.toLowerCase(),a=_t(a),a=a.replace(/\W/g,""),a},xt={name:"Table",props:{items:{type:Array,required:!1},fields:{type:Array,required:!1}},computed:{cellHeading(){return a=>`${kt(At(a))}`}},created(){this.$nextTick(function(){window.customElements.get("iam-table")||window.customElements.define("iam-table",vt),window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",K)})},updated(){}},St={key:0},Et={key:0},qt=["data-row-id"],$t=["innerHTML"];function Tt(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-table",null,[t.fields?(o.openBlock(),o.createElementBlock("table",St,[o.createElementVNode("thead",null,[o.createElementVNode("tr",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.fields,r=>(o.openBlock(),o.createElementBlock("th",{key:r.key},o.toDisplayString(l.cellHeading(r.key)),1))),128))])]),t.items?(o.openBlock(),o.createElementBlock("tbody",Et,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("tr",{key:i,"data-row-id":r.rowid},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.fromEntries(Object.entries(r).filter(([d])=>d!=="rowid")),(d,c)=>(o.openBlock(),o.createElementBlock("td",{key:c,innerHTML:d},null,8,$t))),128))],8,qt))),128))])):o.createCommentVNode("",!0)])):o.renderSlot(a.$slots,"default",{key:1})])}const H=v(xt,[["render",Tt]]),Ct={name:"Input",props:{value:{type:String,required:!1},id:{type:String,required:!0},name:{type:String,required:!1},list:{type:String,required:!1},label:{type:String,required:!1},labelclass:{type:String,required:!1},inputclass:{type:String,required:!1},type:{type:String,required:!1,default:"text"},size:{type:String,required:!1},errormsg:{type:String,required:!1},options:{type:Array,required:!1},prefix:{type:String,required:!1},prefixClass:{type:String,required:!1},suffix:{type:String,required:!1},pattern:{type:String,required:!1},suffixClass:{type:String,required:!1},title:{type:String,required:!1},hint:{type:String,required:!1},multiple:{type:String,required:!1}},computed:{displayLabel(){return()=>this.$attrs.multiple?this.label+'<span class="small d-block text-body font-body fw-normal">Hold down the Ctrl (windows) or Command (Mac) button to select multiple options.</span>':this.hint?this.label+`<span class="small d-block text-body font-body fw-normal">${this.hint}</span>`:this.label},wrapperClass(){return()=>{switch(this.type){case"radio":case"checkbox":return"form-check";case"radio-btn":case"checkbox-btn":return!1;default:return"form-control__wrapper"}}},needPattern(){return()=>{if(this.pattern)return this.pattern;switch(this.type){case"datetime-local":return"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}"}return"(.*?)"}},needsLabel(){return()=>{switch(this.type){case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},isInput(){return()=>{switch(this.type){case"textarea":case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":case"range":case"color":return!1;default:return!0}}},allowDatalist(){return()=>{switch(this.type){case"select":case"radio":case"radio-btn":case"checkbox":case"checkbox-btn":return!1;default:return!0}}},hasOptions(){return()=>{if(this.list)return this.list;if(this.options)return this.id+"-list"}},inputVal:{get(){return this.value==null&&this.options!=null&&this.type=="select"?this.$attrs.multiple?[]:this.options[0].value:this.value},set(a){this.$emit("input",a)}}},mounted(){this.$nextTick(function(){let a=this.$refs.wrapper;if(a.parentNode&&a.parentNode.classList.contains("form-check")||a.classList.length==0){const e=document.createDocumentFragment();Array.from(a.childNodes).forEach(t=>e.appendChild(t)),a.parentNode.insertBefore(e,a),a.parentNode.removeChild(a)}})},methods:{inputKeyup(a){this.$emit("keyupEvent",a)},clickEvent(){this.$emit("bus")}}},Mt=["for","innerHTML","title"],Bt=["innerHTML"],Ht=["innerHTML"],Nt=["type","name","id","pattern","list"],Rt=["type","name","id","pattern"],jt={key:5,class:"input-group"},Dt=["type","name","id","pattern","list"],Vt={class:"input-group-text border-0 col-2 col-sm-1 px-0"},zt={key:6,class:"input-group"},Ft=["type","name","id","pattern","list"],Pt={class:"input-group-text flex-fill"},It=["type","name","id","pattern"],Ot=["value"],Ut=["type","name","id"],Wt=["for","innerHTML"],Xt=["type","name","id"],Kt=["for","innerHTML"],Yt=["innerHTML"],Gt=["id"],Jt=["value"];function Qt(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(l.wrapperClass()),ref:"wrapper"},[l.needsLabel()?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(`form-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:l.displayLabel(),title:t.title},null,10,Mt)):o.createCommentVNode("",!0),t.prefix?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(`prefix ${this.prefixClass} ${t.size?`prefix-${t.size}`:""}`),innerHTML:t.prefix,role:"presentation"},null,10,Bt)):o.createCommentVNode("",!0),t.suffix?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(`suffix ${this.suffixClass} ${t.size?`suffix-${t.size}`:""}`),innerHTML:t.suffix,role:"presentation"},null,10,Ht)):o.createCommentVNode("",!0),l.isInput()?o.withDirectives((o.openBlock(),o.createElementBlock("input",o.mergeProps({key:3,"onUpdate:modelValue":e[0]||(e[0]=r=>l.inputVal=r),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{onKeyup:e[1]||(e[1]=(...r)=>l.inputKeyup&&l.inputKeyup(...r))}),null,16,Nt)),[[o.vModelDynamic,l.inputVal]]):o.createCommentVNode("",!0),t.type=="textarea"?o.withDirectives((o.openBlock(),o.createElementBlock("textarea",o.mergeProps({key:4,"onUpdate:modelValue":e[2]||(e[2]=r=>l.inputVal=r),class:`form-control${t.size?` form-control-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern()},a.$attrs),null,16,Rt)),[[o.vModelText,l.inputVal]]):o.createCommentVNode("",!0),t.type=="range"?(o.openBlock(),o.createElementBlock("div",jt,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[3]||(e[3]=r=>l.inputVal=r),class:`form-range${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,Dt),[[o.vModelDynamic,l.inputVal]]),o.createElementVNode("output",Vt,o.toDisplayString(t.value),1)])):o.createCommentVNode("",!0),t.type=="color"?(o.openBlock(),o.createElementBlock("div",zt,[o.withDirectives(o.createElementVNode("input",o.mergeProps({"onUpdate:modelValue":e[4]||(e[4]=r=>l.inputVal=r),class:`form-control form-control-color${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.name?t.name:t.id,id:t.id,pattern:l.needPattern(),list:l.hasOptions()},a.$attrs,{oninput:"this.nextElementSibling.value=this.value;"}),null,16,Ft),[[o.vModelDynamic,l.inputVal]]),o.createElementVNode("output",Pt,o.toDisplayString(t.value?a.vale:"#000000"),1)])):o.createCommentVNode("",!0),t.type=="select"?o.withDirectives((o.openBlock(),o.createElementBlock("select",o.mergeProps({key:7,"onUpdate:modelValue":e[5]||(e[5]=r=>l.inputVal=r),class:`form-select${t.size?` form-select-${t.size}`:""}${t.inputclass?` ${t.inputclass}`:""}`,type:t.type,name:t.id,id:t.id,pattern:l.needPattern()},a.$attrs),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(r,i)=>(o.openBlock(),o.createElementBlock("option",{key:i,value:r.value},o.toDisplayString(r.display?r.display:r.value),9,Ot))),128))],16,It)),[[o.vModelSelect,l.inputVal]]):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:8,class:"form-check-input",type:t.type,name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Ut)):o.createCommentVNode("",!0),t.type=="checkbox"||t.type=="radio"?(o.openBlock(),o.createElementBlock("label",{key:9,class:o.normalizeClass(`form-label form-check-label${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label},null,10,Wt)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("input",o.mergeProps({key:10,class:`btn-check${t.inputclass?` ${t.inputclass}`:""}`,type:t.type.replace("-btn",""),autocomplete:"off",name:t.name?t.name:t.id,id:t.id},a.$attrs),null,16,Xt)):o.createCommentVNode("",!0),t.type=="checkbox-btn"||t.type=="radio-btn"?(o.openBlock(),o.createElementBlock("label",{key:11,class:o.normalizeClass(`btn${t.labelclass?` ${t.labelclass}`:""}`),for:t.id,innerHTML:t.label,onClick:e[6]||(e[6]=(...r)=>l.clickEvent&&l.clickEvent(...r))},null,10,Kt)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default"),t.errormsg?(o.openBlock(),o.createElementBlock("span",{key:12,class:"invalid-feedback mb-0",innerHTML:t.errormsg},null,8,Yt)):o.createCommentVNode("",!0),l.allowDatalist()?(o.openBlock(),o.createElementBlock("datalist",{key:13,id:t.id+"-list"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.options,(r,i)=>(o.openBlock(),o.createElementBlock("option",{key:i,value:r.value},o.toDisplayString(r.value),9,Jt))),128))],8,Gt)):o.createCommentVNode("",!0)],2)}const N=v(Ct,[["render",Qt]]);function Zt(a,e){const t=e.querySelector(".files"),n=e.querySelector(".drop-area"),s=a.querySelector("input"),l=a.hasAttribute("data-maxsize")?a.getAttribute("data-maxsize"):0,r=s.cloneNode();n.append(r),e.addEventListener("click",i=>{i&&i.target instanceof HTMLElement&&i.target.closest(".btn-primary")&&(i.target.closest(".btn-primary"),(s.hasAttribute("multiple")?r:s).click())}),e.addEventListener("click",i=>{if(i&&i.target instanceof HTMLElement&&i.target.closest(".files button")){const d=new DataTransfer,{files:c}=s,u=i.target.closest(".files button");for(let p=0;p<c.length;p++){const h=c[p];h.name!=u.getAttribute("data-file")&&d.items.add(h)}s.files=d.files;const m=new Event("change");s.dispatchEvent(m)}}),r.addEventListener("change",i=>{if(s.hasAttribute("multiple")){const c=[...s.files,...r.files];let u=[];const m=new DataTransfer;for(let p=0;p<c.length;p++){const h=c[p],b=h.size/1e3;!u.includes(h.name)&&(l==0||b<l)&&m.items.add(h),u.push(h.name)}s.files=m.files}else s.files=r.files;const d=new Event("change");s.dispatchEvent(d)}),r.addEventListener("dragenter",i=>{r.classList.add("focus")}),r.addEventListener("dragleave",i=>{r.classList.remove("focus")}),r.addEventListener("drop",i=>{r.classList.remove("focus")}),s.addEventListener("change",i=>{t.innerHTML="";for(const d of s.files)t.innerHTML+=`<span class="file">${d.name} <button data-file="${d.name}">Remove</button></span>`})}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"fileupload"});class te 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=`@import "${e}/css/components/fileupload.css";`,s=document.createElement("template");s.innerHTML=`
76
76
  <style>
77
77
  @import "${t}";
78
78
  ${n}
@@ -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"),n=this.shadowRoot.querySelector(".helper-text");n.innerHTML=`${this.hasAttribute("data-maxsize")?`Max file size is ${this.getAttribute("data-maxsize")}kb. `:""}${t.hasAttribute("accept")?`Supported file types are ${t.getAttribute("accept")}`:""}`,Zt(this,e)}}const ee={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",te)})}};function ae(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-fileupload",null,[o.renderSlot(a.$slots,"default")])}const oe=v(ee,[["render",ae]]);/*!
91
- * iamKey v4.1.0
91
+ * iamKey v4.1.1-beta
92
92
  * Copyright 2022-2023 iamproperty
93
93
  */function re(a){let e=a.querySelectorAll("details"),t=a.querySelectorAll("summary");if(e.forEach(n=>{n.classList.add("accordion-item")}),t.forEach(n=>{n.classList.add("accordion-header"),n.classList.add("accordion-button"),n.classList.add("h4")}),!a.classList.contains("accordion--keep-open")){const n=a.querySelectorAll(":scope > details");n.forEach(s=>{s.addEventListener("click",()=>{n.forEach(l=>{l!==s&&l.removeAttribute("open")})})})}}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"accordion"});let ne=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`,n=document.createElement("template");n.innerHTML=`
94
94
  <style>
@@ -101,7 +101,7 @@
101
101
  <slot></slot>
102
102
  </div>
103
103
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){re(this)}};const fr="";window.customElements.get("iam-accordion")||window.customElements.define("iam-accordion",ne);const ie={name:"Accordion",props:{},mounted(){}},se={ref:"wrapper"};function le(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-accordion",se,[o.renderSlot(a.$slots,"default")],512)}const ce=v(ie,[["render",le]]),de={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 a=>`${Lt(a)}`}},data(){return{show:!this.lazy}}},me=["id"],ue=["classList"];function he(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("details",{id:l.createID(t.title)},[o.createElementVNode("summary",{classList:`${t.titlecolour?`bg-${t.titlecolour}`:""}`},[o.createTextVNode(o.toDisplayString(t.title),1),t.badge?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(`badge bg-${t.badgecolour}`)},o.toDisplayString(t.badge),3)):o.createCommentVNode("",!0)],8,ue),o.renderSlot(a.$slots,"default")],8,me)}const pe=v(de,[["render",he]]),be={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1},background:{type:String,default:"light",required:!1}}},fe={class:"container"},ge={class:"row"},ye={class:"col-sm-6"},we={class:"pt-5 pb-3 px-4"},ve={class:"col-sm-6 col-md-5 ms-auto"},ke=["src"];function Ae(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",fe,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background+" mb-4")},[o.createElementVNode("div",ge,[o.createElementVNode("div",ye,[o.createElementVNode("div",we,[o.createElementVNode("h2",null,o.toDisplayString(t.title),1),o.renderSlot(a.$slots,"default")])]),o.createElementVNode("div",ve,[t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:"",class:"h-100 w-100 object-cover"},null,8,ke)):o.createCommentVNode("",!0)])])],2)])}const _e=v(be,[["render",Ae]]),Le={name:"Card",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>rr).then(a=>{window.customElements.get("iam-card")||window.customElements.define("iam-card",a.default)}).catch(a=>{console.log(a.message)})})}};function xe(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-card",null,[o.renderSlot(a.$slots,"default")])}const Y=v(Le,[["render",xe]]);function Se(a){var e;let t=a.querySelector(".carousel__inner"),n=a.querySelectorAll(".carousel__item").length;a.getAttribute("data-cols");let s=a.getAttribute("data-sm-cols"),l=a.getAttribute("data-md-cols");a.querySelector(".carousel__controls a").classList.add("active"),t.addEventListener("scroll",function(r){clearTimeout(e),e=setTimeout(function(){let i=t.clientWidth,d=t.scrollWidth,c=t.scrollLeft,u=Math.round(c/d*n)+1,m=a.querySelector(".carousel__item:last-child").offsetLeft;Array.from(a.querySelectorAll(".carousel__controls a")).forEach((p,h)=>{p.classList.remove("active")}),a.querySelector(".control-"+u).classList.add("active"),u==1?a.querySelector(".btn-prev").setAttribute("disabled","disabled"):a.querySelector(".btn-prev").removeAttribute("disabled"),t.scrollLeft+i>m?a.querySelector(".btn-next").setAttribute("disabled","disabled"):a.querySelector(".btn-next").removeAttribute("disabled")},100)},!1),a.addEventListener("click",function(r){for(var i=r.target;i&&i!=this;i=i.parentNode)if(i.matches(".carousel__controls a")){r.preventDefault(),Array.from(a.querySelectorAll(".carousel__controls a")).forEach((c,u)=>{c.classList.remove("active")}),i.classList.add("active");const d=document.querySelector(i.getAttribute("href"));t.scroll({top:0,left:d.offsetLeft,behavior:"smooth"});break}},!1),a.addEventListener("click",function(r){for(var i=r.target;i&&i!=this;i=i.parentNode)if(i.matches(".btn-next, .btn-prev")){r.preventDefault();let d=i.classList.contains("btn-prev")?t.scrollLeft-t.clientWidth:t.scrollLeft+t.clientWidth;t.scroll({top:0,left:d,behavior:"smooth"});break}},!1),n==1&&a.classList.add("hide-btns"),s>=n&&a.classList.add("hide-sm-btns"),l>=n&&a.classList.add("hide-md-btns")}const gr="",Ee={components:{Card:Y},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 a=>`${a.image?`<img src="${a.image}" alt="" />`:""}${a.content?a.content:""}`}},mounted(){this.id=this._uid,this.$nextTick(function(){Se(this.$refs.wrapper)})}},qe=["id","data-cols","data-sm-cols","data-md-cols"],$e={class:"carousel__wrapper"},Te={class:"carousel__inner"},Ce=["id"],Me=["innerHTML","id"],Be=["href"],He=o.createElementVNode("button",{class:"btn btn-prev","data-go":"0",disabled:""},"Prev",-1),Ne=o.createElementVNode("button",{class:"btn btn-next","data-go":"2"},"Next",-1);function Re(a,e,t,n,s,l){const r=o.resolveComponent("Card");return o.openBlock(),o.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},[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",$e,[o.createElementVNode("div",Te,[t.type=="card"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(i,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,id:"carousel"+s.id+"slide"+(d+1)},[o.createVNode(r,o.mergeProps(i,{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,Ce))),128))],2)):o.createCommentVNode("",!0),t.type!="card"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap?`g-${t.gap}`:""}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(i,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(`col carousel__item${t.colclass?` ${t.colclass}`:""}`),key:d,innerHTML:l.content(i),id:"carousel"+s.id+"slide"+(d+1)},null,10,Me))),128))],2)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(`carousel__controls cols-${t.cols} cols-sm-${t.smcols} cols-md-${t.mdcols}`)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(i,d)=>(o.openBlock(),o.createElementBlock("a",{key:d,href:"#carousel"+s.id+"slide"+(d+1),class:o.normalizeClass(`control-${d+1}`)},"Slide "+o.toDisplayString(d+1),11,Be))),128))],2),He,Ne])],8,qe)}const je=v(Ee,[["render",Re]]);/*!
104
- * iamKey v4.1.0
104
+ * iamKey v4.1.1-beta
105
105
  * Copyright 2022-2023 iamproperty
106
106
  */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`,n=document.createElement("template");n.innerHTML=`
107
107
  <style>
@@ -124,8 +124,8 @@
124
124
  <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="" lazy="" />
125
125
  </picture>
126
126
  </div>
127
- `,this.shadowRoot.appendChild(n.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={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1}},mounted(){this.$nextTick(function(){window.customElements.get("iam-header")||window.customElements.define("iam-header",De)})}},ze=["image"],Fe=["innerHTML"];function Pe(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-header",{class:"bg-secondary",image:t.image},[o.renderSlot(a.$slots,"breadcrumb"),t.title?(o.openBlock(),o.createElementBlock("h1",{key:0,innerHTML:t.title},null,8,Fe)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")],8,ze)}const Oe=v(Ve,[["render",Pe]]);function Ie(a){var e;const t=a.querySelector(".testimonial__images"),n=t.querySelectorAll("img").length;if(n==1)return!1;a.classList.add("testimonial--multi");const s=function(l){const r=a.querySelector(".btn-next"),i=a.querySelector(".btn-prev");r.setAttribute("data-go",l+1),i.setAttribute("data-go",l-1),r.removeAttribute("disabled"),i.removeAttribute("disabled"),l==1?i.setAttribute("disabled",!0):l==n&&r.setAttribute("disabled",!0)};t.addEventListener("scroll",function(l){clearTimeout(e),e=setTimeout(function(){let r=t.scrollWidth,i=t.scrollHeight,d=t.scrollLeft,c=t.scrollTop,u=Math.round(d/r*n)+1;d==0&&c!=0&&(u=Math.round(c/i*n)+1),a.setAttribute("data-show",u),s(u)},300)},!1),a.addEventListener("click",function(l){for(var r=l.target;r&&r!=this;r=r.parentNode)if(r.matches("[data-go]")){let i=parseInt(r.getAttribute("data-go")),d=0,c=0,u=t.scrollWidth,m=t.scrollHeight;u>m?c=Math.floor(u*((i-1)/n)):d=Math.floor(m*((i-1)/n)),t.scroll({top:d,left:c,behavior:"smooth"});break}},!1)}const yr="",Ue={name:"Testimonial",props:{items:{type:Array,required:!0},background:{type:String,default:"light",required:!1}},mounted(){Ie(this.$refs.wrapper)}},We={class:"container testimonial mb-5","data-show":"1",ref:"wrapper"},Xe={class:"row"},Ke={class:"col-md-5 position-relative"},Ye={class:"testimonial__images"},Ge=["src"],Je=o.createElementVNode("div",{class:"testimonial__controls"},[o.createElementVNode("button",{"data-go":"0",disabled:"",class:"btn-prev"},"Previous"),o.createElementVNode("button",{"data-go":"2",class:"btn-next"},"Next")],-1),Qe={class:"col-md-7"},Ze=o.createElementVNode("h2",null,"What our customers think…",-1),ta={class:"testimonial__content"},ea=["innerHTML"],aa=["innerHTML"],oa={class:"testimonial__after"},ra=o.createElementVNode("span",{class:"circle circle--dots d-none d-md-block"},null,-1);function na(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",We,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background)},[o.createElementVNode("div",Xe,[o.createElementVNode("div",Ke,[o.createElementVNode("div",Ye,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("img",{key:i,src:r.image?r.image:"data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"",class:o.normalizeClass("h-100 w-100 object-cover"+(r.image?"":" opacity-0"))},null,10,Ge))),128))]),Je]),o.createElementVNode("div",Qe,[Ze,o.createElementVNode("div",ta,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("blockquote",{key:i,class:o.normalizeClass(r.class)},[o.createElementVNode("div",{innerHTML:r.quote},null,8,ea),o.createElementVNode("cite",{innerHTML:r.cite},null,8,aa)],2))),128))]),o.createElementVNode("div",oa,[o.renderSlot(a.$slots,"default")])])]),ra],2)],512)}const ia=v(Ue,[["render",na]]),wr="",sa={name:"Timeline",props:{image:{type:String,required:!1}}},la={class:"timeline"},ca={class:"timeline__content"},da=["src"];function ma(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",la,[o.createElementVNode("div",ca,[o.renderSlot(a.$slots,"default")]),t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:""},null,8,da)):o.createCommentVNode("",!0)])}const ua=v(sa,[["render",ma]]),vr="",ha={components:{Input:N},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(a){this.$emit("locationKeyup",a)}},computed:{locationSet:{get(){return this.locationSave?this.locationSave:this.location},set(a){this.locationSave=a,this.$emit("input",a)}},locationsList(){return()=>this.locations?this.locations:[{value:"Newcastle"}]}}},pa={class:"container",ref:"wrapper"},ba={class:"property-searchbar"},fa=["action","method"],ga={class:"col-12 col-md-3"},ya={class:"col-12 col-md"},wa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Price range",-1),va={class:"row","data-input-range":""},ka={class:"col-12 col-md"},Aa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Number of beds",-1),_a={class:"row","data-input-range":""},La={class:"col-12 col-md-2"},xa=o.createElementVNode("div",{class:"col-12 col-md mw-md-fit-content d-flex property-searchbar__btn"},[o.createElementVNode("button",{class:"btn w-100 me-0",type:"submit",value:"submit"},"Search")],-1);function Sa(a,e,t,n,s,l){const r=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",pa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",ba,[o.createElementVNode("form",{class:"row",action:t.formaction,method:t.formmethod},[o.createElementVNode("fieldset",ga,[o.createVNode(r,{inputClass:"input--locations",modelValue:l.locationSet,"onUpdate:modelValue":e[0]||(e[0]=i=>l.locationSet=i),label:"Location",id:"location",options:l.locationsList(),required:"",placeholder:"i.e. Newcastle or NE1",onKeyupEvent:e[1]||(e[1]=i=>l.locationKeyup(...arguments)),ref:"search"},null,8,["modelValue","options"]),o.createVNode(r,{class:"select--miles",label:"Miles",id:"miles",type:"select",options:t.distances},null,8,["options"])]),o.createElementVNode("fieldset",ya,[wa,o.createElementVNode("div",va,[o.createVNode(r,{class:"col-6",label:"Minimum price",id:"price-min","data-min":"true",type:"select",options:t.pricemin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum price",id:"price-max","data-max":"true",type:"select",options:t.pricemax},null,8,["options"])])]),o.createElementVNode("fieldset",ka,[Aa,o.createElementVNode("div",_a,[o.createVNode(r,{class:"col-6",label:"Minimum beds",id:"beds-min","data-min":"true",type:"select",options:t.bedsmin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum beds",id:"beds-max","data-max":"true",type:"select",options:t.bedsmax},null,8,["options"])])]),o.createElementVNode("fieldset",La,[o.createVNode(r,{label:"Property type",id:"property-type",type:"select",options:t.propertytypes},null,8,["options"])]),xa],8,fa)]),o.renderSlot(a.$slots,"after")],512)}const Ea=v(ha,[["render",Sa]]),qa={components:{},name:"Nav",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>ir).then(a=>{window.customElements.get("iam-nav")||window.customElements.define("iam-nav",a.default)}).catch(a=>{console.log(a.message)})})},methods:{}},$a={ref:"wrapper"};function Ta(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-nav",$a,[o.renderSlot(a.$slots,"default")],512)}const Ca=v(qa,[["render",Ta]]),kr="",Ma={name:"Stepper",props:{label:{type:String,required:!1},endlabel:{type:String,required:!1,default:"Complete"}}},Ba={class:"container"},Ha=["aria-label"],Na={key:0,class:"h6 stepper__start"},Ra={class:"list-unstyled"},ja={class:"h6 stepper__end"};function Da(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",Ba,[o.createElementVNode("nav",{class:"stepper","aria-label":t.label?t.label:"Progress"},[t.label?(o.openBlock(),o.createElementBlock("span",Na,o.toDisplayString(t.label),1)):o.createCommentVNode("",!0),o.createElementVNode("ol",Ra,[o.renderSlot(a.$slots,"default")]),o.createElementVNode("span",ja,o.toDisplayString(t.endlabel),1)],8,Ha)])}const Va=v(Ma,[["render",Da]]),Ar="",za={name:"Snapshot",props:{items:{type:Array,required:!0}}},Fa={class:"container snapshot",ref:"wrapper"},Pa={class:"row"},Oa=["href"],Ia={class:"lead snapshot__title"},Ua={class:"stat"};function Wa(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",Fa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",Pa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("div",{class:"col",key:i},[r.link?(o.openBlock(),o.createElementBlock("a",{key:0,href:r.link},"View "+o.toDisplayString(r.title),9,Oa)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(`snapshot__item ${r.bg?"bg-"+r.bg:""}`)},[o.createElementVNode("span",Ia,o.toDisplayString(r.title),1),o.createElementVNode("span",Ua,o.toDisplayString(r.number),1)],2)]))),128))])],512)}const Xa=v(za,[["render",Wa]]),Ka={name:"Stepper",props:{url:{type:String,required:!1},status:{type:String,required:!1},current:{type:String,required:!1}}},Ya=["href","aria-current"],Ga={key:0,class:"visually-hidden"};function Ja(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("li",null,[o.createElementVNode("a",{href:t.url,class:o.normalizeClass(`${t.status?"bg-"+t.status:""}${typeof t.current<"u"?"current":""}`),"aria-current":typeof t.current<"u"},[o.createElementVNode("span",null,[o.renderSlot(a.$slots,"default")]),t.status?(o.openBlock(),o.createElementBlock("em",Ga," - status: "+o.toDisplayString(t.status),1)):o.createCommentVNode("",!0)],10,Ya)])}const Qa=v(Ka,[["render",Ja]]);/*!
128
- * iamKey v4.1.0
127
+ `,this.shadowRoot.appendChild(n.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={name:"Header",props:{title:{type:String,required:!0},image:{type:String,required:!1}},mounted(){this.$nextTick(function(){window.customElements.get("iam-header")||window.customElements.define("iam-header",De)})}},ze=["image"],Fe=["innerHTML"];function Pe(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-header",{class:"bg-secondary",image:t.image},[o.renderSlot(a.$slots,"breadcrumb"),t.title?(o.openBlock(),o.createElementBlock("h1",{key:0,innerHTML:t.title},null,8,Fe)):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")],8,ze)}const Ie=v(Ve,[["render",Pe]]);function Oe(a){var e;const t=a.querySelector(".testimonial__images"),n=t.querySelectorAll("img").length;if(n==1)return!1;a.classList.add("testimonial--multi");const s=function(l){const r=a.querySelector(".btn-next"),i=a.querySelector(".btn-prev");r.setAttribute("data-go",l+1),i.setAttribute("data-go",l-1),r.removeAttribute("disabled"),i.removeAttribute("disabled"),l==1?i.setAttribute("disabled",!0):l==n&&r.setAttribute("disabled",!0)};t.addEventListener("scroll",function(l){clearTimeout(e),e=setTimeout(function(){let r=t.scrollWidth,i=t.scrollHeight,d=t.scrollLeft,c=t.scrollTop,u=Math.round(d/r*n)+1;d==0&&c!=0&&(u=Math.round(c/i*n)+1),a.setAttribute("data-show",u),s(u)},300)},!1),a.addEventListener("click",function(l){for(var r=l.target;r&&r!=this;r=r.parentNode)if(r.matches("[data-go]")){let i=parseInt(r.getAttribute("data-go")),d=0,c=0,u=t.scrollWidth,m=t.scrollHeight;u>m?c=Math.floor(u*((i-1)/n)):d=Math.floor(m*((i-1)/n)),t.scroll({top:d,left:c,behavior:"smooth"});break}},!1)}const yr="",Ue={name:"Testimonial",props:{items:{type:Array,required:!0},background:{type:String,default:"light",required:!1}},mounted(){Oe(this.$refs.wrapper)}},We={class:"container testimonial mb-5","data-show":"1",ref:"wrapper"},Xe={class:"row"},Ke={class:"col-md-5 position-relative"},Ye={class:"testimonial__images"},Ge=["src"],Je=o.createElementVNode("div",{class:"testimonial__controls"},[o.createElementVNode("button",{"data-go":"0",disabled:"",class:"btn-prev"},"Previous"),o.createElementVNode("button",{"data-go":"2",class:"btn-next"},"Next")],-1),Qe={class:"col-md-7"},Ze=o.createElementVNode("h2",null,"What our customers think…",-1),ta={class:"testimonial__content"},ea=["innerHTML"],aa=["innerHTML"],oa={class:"testimonial__after"},ra=o.createElementVNode("span",{class:"circle circle--dots d-none d-md-block"},null,-1);function na(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",We,[o.createElementVNode("div",{class:o.normalizeClass("bg-"+t.background)},[o.createElementVNode("div",Xe,[o.createElementVNode("div",Ke,[o.createElementVNode("div",Ye,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("img",{key:i,src:r.image?r.image:"data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"",class:o.normalizeClass("h-100 w-100 object-cover"+(r.image?"":" opacity-0"))},null,10,Ge))),128))]),Je]),o.createElementVNode("div",Qe,[Ze,o.createElementVNode("div",ta,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("blockquote",{key:i,class:o.normalizeClass(r.class)},[o.createElementVNode("div",{innerHTML:r.quote},null,8,ea),o.createElementVNode("cite",{innerHTML:r.cite},null,8,aa)],2))),128))]),o.createElementVNode("div",oa,[o.renderSlot(a.$slots,"default")])])]),ra],2)],512)}const ia=v(Ue,[["render",na]]),wr="",sa={name:"Timeline",props:{image:{type:String,required:!1}}},la={class:"timeline"},ca={class:"timeline__content"},da=["src"];function ma(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",la,[o.createElementVNode("div",ca,[o.renderSlot(a.$slots,"default")]),t.image?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.image,alt:""},null,8,da)):o.createCommentVNode("",!0)])}const ua=v(sa,[["render",ma]]),vr="",ha={components:{Input:N},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(a){this.$emit("locationKeyup",a)}},computed:{locationSet:{get(){return this.locationSave?this.locationSave:this.location},set(a){this.locationSave=a,this.$emit("input",a)}},locationsList(){return()=>this.locations?this.locations:[{value:"Newcastle"}]}}},pa={class:"container",ref:"wrapper"},ba={class:"property-searchbar"},fa=["action","method"],ga={class:"col-12 col-md-3"},ya={class:"col-12 col-md"},wa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Price range",-1),va={class:"row","data-input-range":""},ka={class:"col-12 col-md"},Aa=o.createElementVNode("span",{class:"form-label d-none d-md-block"},"Number of beds",-1),_a={class:"row","data-input-range":""},La={class:"col-12 col-md-2"},xa=o.createElementVNode("div",{class:"col-12 col-md mw-md-fit-content d-flex property-searchbar__btn"},[o.createElementVNode("button",{class:"btn w-100 me-0",type:"submit",value:"submit"},"Search")],-1);function Sa(a,e,t,n,s,l){const r=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",pa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",ba,[o.createElementVNode("form",{class:"row",action:t.formaction,method:t.formmethod},[o.createElementVNode("fieldset",ga,[o.createVNode(r,{inputClass:"input--locations",modelValue:l.locationSet,"onUpdate:modelValue":e[0]||(e[0]=i=>l.locationSet=i),label:"Location",id:"location",options:l.locationsList(),required:"",placeholder:"i.e. Newcastle or NE1",onKeyupEvent:e[1]||(e[1]=i=>l.locationKeyup(...arguments)),ref:"search"},null,8,["modelValue","options"]),o.createVNode(r,{class:"select--miles",label:"Miles",id:"miles",type:"select",options:t.distances},null,8,["options"])]),o.createElementVNode("fieldset",ya,[wa,o.createElementVNode("div",va,[o.createVNode(r,{class:"col-6",label:"Minimum price",id:"price-min","data-min":"true",type:"select",options:t.pricemin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum price",id:"price-max","data-max":"true",type:"select",options:t.pricemax},null,8,["options"])])]),o.createElementVNode("fieldset",ka,[Aa,o.createElementVNode("div",_a,[o.createVNode(r,{class:"col-6",label:"Minimum beds",id:"beds-min","data-min":"true",type:"select",options:t.bedsmin},null,8,["options"]),o.createVNode(r,{class:"col-6",label:"Maximum beds",id:"beds-max","data-max":"true",type:"select",options:t.bedsmax},null,8,["options"])])]),o.createElementVNode("fieldset",La,[o.createVNode(r,{label:"Property type",id:"property-type",type:"select",options:t.propertytypes},null,8,["options"])]),xa],8,fa)]),o.renderSlot(a.$slots,"after")],512)}const Ea=v(ha,[["render",Sa]]),qa={components:{},name:"Nav",mounted(){this.$nextTick(function(){Promise.resolve().then(()=>ir).then(a=>{window.customElements.get("iam-nav")||window.customElements.define("iam-nav",a.default)}).catch(a=>{console.log(a.message)})})},methods:{}},$a={ref:"wrapper"};function Ta(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-nav",$a,[o.renderSlot(a.$slots,"default")],512)}const Ca=v(qa,[["render",Ta]]),kr="",Ma={name:"Stepper",props:{label:{type:String,required:!1},endlabel:{type:String,required:!1,default:"Complete"}}},Ba={class:"container"},Ha=["aria-label"],Na={key:0,class:"h6 stepper__start"},Ra={class:"list-unstyled"},ja={class:"h6 stepper__end"};function Da(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",Ba,[o.createElementVNode("nav",{class:"stepper","aria-label":t.label?t.label:"Progress"},[t.label?(o.openBlock(),o.createElementBlock("span",Na,o.toDisplayString(t.label),1)):o.createCommentVNode("",!0),o.createElementVNode("ol",Ra,[o.renderSlot(a.$slots,"default")]),o.createElementVNode("span",ja,o.toDisplayString(t.endlabel),1)],8,Ha)])}const Va=v(Ma,[["render",Da]]),Ar="",za={name:"Snapshot",props:{items:{type:Array,required:!0}}},Fa={class:"container snapshot",ref:"wrapper"},Pa={class:"row"},Ia=["href"],Oa={class:"lead snapshot__title"},Ua={class:"stat"};function Wa(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("div",Fa,[o.renderSlot(a.$slots,"default"),o.createElementVNode("div",Pa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.items,(r,i)=>(o.openBlock(),o.createElementBlock("div",{class:"col",key:i},[r.link?(o.openBlock(),o.createElementBlock("a",{key:0,href:r.link},"View "+o.toDisplayString(r.title),9,Ia)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(`snapshot__item ${r.bg?"bg-"+r.bg:""}`)},[o.createElementVNode("span",Oa,o.toDisplayString(r.title),1),o.createElementVNode("span",Ua,o.toDisplayString(r.number),1)],2)]))),128))])],512)}const Xa=v(za,[["render",Wa]]),Ka={name:"Stepper",props:{url:{type:String,required:!1},status:{type:String,required:!1},current:{type:String,required:!1}}},Ya=["href","aria-current"],Ga={key:0,class:"visually-hidden"};function Ja(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("li",null,[o.createElementVNode("a",{href:t.url,class:o.normalizeClass(`${t.status?"bg-"+t.status:""}${typeof t.current<"u"?"current":""}`),"aria-current":typeof t.current<"u"},[o.createElementVNode("span",null,[o.renderSlot(a.$slots,"default")]),t.status?(o.openBlock(),o.createElementBlock("em",Ga," - status: "+o.toDisplayString(t.status),1)):o.createCommentVNode("",!0)],10,Ya)])}const Qa=v(Ka,[["render",Ja]]);/*!
128
+ * iamKey v4.1.1-beta
129
129
  * Copyright 2022-2023 iamproperty
130
130
  */const Za=function(a){const e=a.querySelectorAll(":scope > details");a.querySelectorAll(":scope > details > summary");let t=a.querySelector(":scope > .tabs__links");if(a.shadowRoot&&a.shadowRoot.querySelector(".tabs__links")&&(t=a.shadowRoot.querySelector(".tabs__links")),!t){t=document.createElement("div"),t.classList.add("tabs__links");let n=document.createElement("div");n.classList.add("tabs__links__wrapper"),n.prepend(t),a.prepend(n)}e.forEach((n,s)=>{let l=n.querySelector(":scope > summary"),r=l.classList.contains("disabled");l.classList.add("visually-hidden");let i=document.createElement("button");n.hasAttribute("id")&&(i=document.createElement("a"),i.setAttribute("href",`#${n.getAttribute("id")}`)),n.hasAttribute("open")&&i.setAttribute("aria-pressed",!0),i.innerHTML=`${l.innerText}`,i.classList.add("link"),i.setAttribute("data-index",s),i.setAttribute("tabindex","-1"),r&&i.classList.add("disabled"),t.appendChild(i)})},to=function(a){let e=a.querySelectorAll(":scope > details"),t=a.querySelectorAll(":scope > details > summary"),n=a.querySelectorAll(":scope .tabs__links > .link");a.shadowRoot&&(n=a.shadowRoot.querySelectorAll(".tabs__links > .link")),n.forEach(s=>{s.addEventListener("click",l=>{if(l.preventDefault(),s.classList.contains("disabled"))return!1;n.forEach(r=>{let i=r==s;r.setAttribute("aria-pressed",i)}),e.forEach((r,i)=>{let d=s.getAttribute("data-index")==i;d?r.setAttribute("open",d):r.removeAttribute("open")}),s.hasAttribute("href")&&history.pushState(void 0,void 0,s.getAttribute("href")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"openTab",tabTitle:s.textContent})})}),t.forEach((s,l)=>{s.addEventListener("focus",r=>{n.forEach(i=>{i.classList.remove("focus")}),n[l].classList.add("focus")}),s.addEventListener("click",r=>{r.preventDefault(),n[l].click()})})},eo=function(a){let e=a.querySelectorAll(":scope > details"),t=a.querySelectorAll(":scope > .tabs__links > button, .tabs__links > a");a.shadowRoot&&(t=a.shadowRoot.querySelectorAll(".tabs__links > button, .tabs__links > a")),location.hash&&a.querySelector(`.tabs__links [href="${location.hash}"]`)?(a.querySelector(`[href="${location.hash}"]`).setAttribute("open",!0),a.querySelector(`details[id="${location.hash.replace("#","")}"]`).setAttribute("open",!0)):a.querySelector("details[open]")||(e[0].setAttribute("open",!0),t[0].setAttribute("aria-pressed",!0))},ao=function(a){Za(a),to(a),eo(a)};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"tabs"});let oo=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`,n=document.createElement("template");n.innerHTML=`
131
131
  <style>
@@ -144,7 +144,7 @@
144
144
  <slot></slot>
145
145
  </div>
146
146
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){let e=this.classList.toString().replace("container","");this.shadowRoot.querySelector(".tabs").setAttribute("class",`tabs ${e}`),ao(this)}};const _r="";window.customElements.get("iam-tabs")||window.customElements.define("iam-tabs",oo);const ro={name:"Tabs"},no={ref:"wrapper"};function io(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-tabs",no,[o.renderSlot(a.$slots,"default")],512)}const so=v(ro,[["render",io]]),lo={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}}},co={class:"tab"},mo=["innerHTML"];function uo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("details",co,[o.createElementVNode("summary",{innerHTML:t.title,class:o.normalizeClass({disabled:s.isDisabled})},null,10,mo),o.renderSlot(a.$slots,"default")])}const ho=v(lo,[["render",uo]]);let G=H.props;G.fields.required=!1;const po={components:{Table:H,Input:N},data(){return{itemsData:[...this.items]}},methods:{submitForm:function(a){console.log(this);const e=new FormData(a.target);let t=new Date;const n=t.getFullYear();let s=t.getMonth()+1,l=t.getDate();l<10&&(l="0"+l),s<10&&(s="0"+s),t=l+"/"+s+"/"+n,this.itemsData.unshift({date_added:t,user:e.get("user"),note:e.get("addNote")}),this.$emit("formSubmitted",a)}},name:"NoteFeed",props:{user:{type:String,required:!0},...G,title:{type:String,required:!1},method:{type:String,required:!1,default:"post"},action:{type:String,required:!1}}},bo={class:"container note-feed mb-2"},fo=["innerHTML"],go=["action","method"],yo=["value"],wo=o.createElementVNode("button",{class:"btn btn-tertiary"},"Submit note",-1);function vo(a,e,t,n,s,l){const r=o.resolveComponent("Table"),i=o.resolveComponent("Input");return o.openBlock(),o.createElementBlock("div",bo,[t.title?(o.openBlock(),o.createElementBlock("span",{key:0,class:"h3",innerHTML:t.title},null,8,fo)):o.createCommentVNode("",!0),o.createVNode(r,o.mergeProps({fields:[{key:"date_added"},{key:"user"},{key:"note"}],items:s.itemsData},a.$props,{class:"mb-0"}),null,16,["items"]),o.createElementVNode("form",{action:t.action,method:t.method,onSubmit:e[0]||(e[0]=o.withModifiers(d=>l.submitForm(...arguments),["prevent"]))},[o.createElementVNode("input",{type:"hidden",value:t.user,name:"user"},null,8,yo),o.createVNode(i,{id:"addNote",type:"textarea",label:"Add note",required:"",class:"mw-100"}),wo],40,go)])}const ko=v(po,[["render",vo]]);/*!
147
- * iamKey v4.1.0
147
+ * iamKey v4.1.1-beta
148
148
  * Copyright 2022-2023 iamproperty
149
149
  */function Ao(a,e){function t(n,s){let l=!1,r=s.getAttribute("name");r.includes("[]")&&(r=r.replace("[]",`[${s.value}]`));let i=n.querySelector(`[data-name="${r}"]`);i&&s.getAttribute("type")=="checkbox"&&(l=!0);let d=s.getAttribute("data-filter-text");if(i||(i=document.createElement("button"),n.appendChild(i)),i.setAttribute("type","button"),i.classList.add("filter"),i.setAttribute("data-name",r),i.innerHTML=d.replace("$value",s.value),(!s.value||l)&&i.remove(),s.parentNode.closest("[data-filter-text]")){let c=s.parentNode.closest("[data-filter-text]"),u=!0;if(r="",c.querySelectorAll("input").forEach((m,p)=>{let h=m.getAttribute("name");if(r+=`${p!=0?",":""}${h}`,n.querySelector(`[data-name="${h}"]`)&&n.querySelector(`[data-name="${h}"]`).remove(),m.value){let b=document.createElement("button");b.setAttribute("type","button"),b.classList.add("filter"),b.setAttribute("data-name",h),b.innerHTML=d.replace("$value",m.value),n.appendChild(b)}else u=!1}),n.querySelector(`[data-name="${r}"]`)&&n.querySelector(`[data-name="${r}"]`).remove(),u){let m=c.getAttribute("data-filter-text");c.querySelectorAll("input").forEach((h,b)=>{let f=h.getAttribute("name");n.querySelector(`[data-name="${f}"]`)&&n.querySelector(`[data-name="${f}"]`).remove(),m=m.replace(`$${b+1}`,h.value)});let p=document.createElement("button");p.setAttribute("type","button"),p.classList.add("filter"),p.setAttribute("data-name",r),p.innerHTML=m,n.appendChild(p)}}}Array.from(a.querySelectorAll('input[type="checkbox"]:checked')).forEach((n,s)=>{t(e,n)}),Array.from(a.querySelectorAll("input[data-filter-text]")).forEach((n,s)=>{n.addEventListener("change",function(l){t(e,n)})}),e.addEventListener("click",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest(".filter")){let r=n.target.closest(".filter"),i=r.getAttribute("data-name").split(",");for(var s=0;s<i.length;s++){let d=i[s],c=`[name="${d}"]`;d.match(/\[(.*)\]/)&&(d.replace(/\[(.*)\]/,"[]"),c=`[value="${d.replace(/.*\[(.*)\]/,"$1")}"]`);let u=a.querySelectorAll(c);for(var l=0;l<u.length;l++){let m=u[l];if(m.getAttribute("type")!="radio"&&m.getAttribute("type")!="checkbox")m.value="";else{m.checked=!1;var n=new Event("force");a.hasAttribute("data-nosubmit")||m.closest("form").dispatchEvent(n)}}}r.remove()}},!1)}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Applied Filters"});let _o=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 n=this.classList.toString();const s=document.createElement("template");s.innerHTML=`
150
150
  <style>
@@ -156,7 +156,7 @@
156
156
  <div class="applied-filters ${n}"></div>
157
157
  <slot></slot>
158
158
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){Ao(this,this.shadowRoot.querySelector(".applied-filters"))}};window.customElements.get("iam-applied-filters")||window.customElements.define("iam-applied-filters",_o);const Lo={name:"Header"};function xo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-applied-filters",null,[o.renderSlot(a.$slots,"default")])}const So=v(Lo,[["render",xo]]);/*!
159
- * iamKey v4.1.0
159
+ * iamKey v4.1.1-beta
160
160
  * Copyright 2022-2023 iamproperty
161
161
  */function Eo(a,e){qo(a,e)}function qo(a,e){var t;e.addEventListener("keyup",n=>{clearTimeout(t),t=setTimeout(function(){J(a,e.value)},500)}),e.addEventListener("change",n=>{clearTimeout(t),J(a,e.value)})}const J=function(a,e){Array.from(a.querySelectorAll(":scope > li")).forEach((t,n)=>{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 $o 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=`
162
162
  <style>
@@ -198,7 +198,7 @@
198
198
  ${this.hasAttribute("data-dismiss")?'<div class="notification__dismiss"><button data-dismiss-button>Dismiss</button></div>':""}
199
199
  </div>
200
200
  `,this.shadowRoot.appendChild(l.content.cloneNode(!0))}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 n=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>'}Bo(n),e&&e.addEventListener("click",function(s){R(n)},!1)}}const Ro={name:"Notification",props:{},created(){this.$nextTick(function(){window.customElements.get("iam-notification")||window.customElements.define("iam-notification",No)})}};function jo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-notification",null,[o.renderSlot(a.$slots,"default")])}const Do=v(Ro,[["render",jo]]);/*!
201
- * iamKey v4.1.0
201
+ * iamKey v4.1.1-beta
202
202
  * Copyright 2022-2023 iamproperty
203
203
  */const Vo=function(a){typeof window.player<"u"&&typeof window.player.pauseVideo=="function"&&window.player.pauseVideo();var e=a.getAttribute("data-id"),t=a.getAttribute("id");if(typeof t>"u"||t==null){var n=String.fromCharCode(65+Math.floor(Math.random()*26));t=n+Date.now(),a.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:i}})}s();function l(d){d.target.playVideo()}var r=!1;function i(d){if(d.data==YT.PlayerState.PLAYING&&!r){var c=document.getElementById(t);c.classList.add("player-ready"),r=!0}}},zo=a=>(Array.from(a.querySelectorAll("dialog[open]")).forEach((e,t)=>{e.closest(".dialog__wrapper")||(e.removeAttribute("open"),e.showModal(),e.focus(),Q(e))}),a.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"),r=document.querySelector(`dialog#${l}`);Q(r),r.showModal(),r.focus();let i=r.offsetWidth;r.setAttribute("style",`max-width: ${i}px;`),Array.from(r.querySelectorAll("[data-duplicate]")).forEach((d,c)=>{const u=d.getAttribute("data-duplicate"),m=document.getElementById(u);if(d.checked!=m.checked){d.checked=m.checked;let p=new Event("change");d.dispatchEvent(p)}}),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,r)=>{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,r)=>{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,r="openPopover",i=l.querySelector(":scope > dialog");if(document.querySelector("*:not([data-keep-open]) > dialog[open]")&&document.querySelector("*:not([data-keep-open]) > dialog[open]")!=i&&document.querySelector("*:not([data-keep-open]) > dialog[open]").close(),Array.from(document.querySelectorAll(".dialog__wrapper > button")).forEach((m,p)=>{m.classList.remove("active")}),i.hasAttribute("open"))i.close(),r="closePopover",i.removeAttribute("style"),s.classList.remove("active");else{i.show(),s.classList.add("active");var n=s.getBoundingClientRect();let m=n.top,p=n.left;if(s.closest("iam-table")){let h=s.closest("iam-table").parentNode.getBoundingClientRect();m-=h.top,p-=h.left}i.classList.contains("dialog--fix")&&i.setAttribute("style",`position:fixed;top: ${m}px; left: ${p}px; margin: 3rem 0 0 0;`)}let d=i.getBoundingClientRect(),c=d.bottom-window.scrollY,u=window.innerHeight-window.scrollY;if(c>u){let m=i.hasAttribute("style")?i.getAttribute("style")+" ":"";i.setAttribute("style",m+"transform: translate(0, calc(-100% - 4rem))"),d=i.getBoundingClientRect(),d.top-window.scrollY<100&&i.removeAttribute("style")}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:r,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.classList.remove("active")}))}),null),Q=a=>{a.querySelector(":scope > .mh-lg > form:last-child > button:last-child, :scope > .mh-lg > button:last-child")&&!a.classList.contains("dialog--multi")&&a.addEventListener("cancel",t=>{t.preventDefault()});let e=a.querySelector(".youtube-embed a");if(e&&Vo(e),a.classList.contains("dialog--multi")&&!a.querySelector(":scope > .steps")&&Fo(a),!a.querySelector(":scope > .mh-lg")&&!a.classList.contains("dialog--multi")){a.innerHTML=`<div class="mh-lg">${a.innerHTML}</div>`;let t=a.querySelector(".mh-lg"),n=a.querySelector(".mh-lg :is(.h1,.h2,.h3,.h4,.h5,.h6)");if(n){let s=n.previousSibling;t.before(n),s&&n.before(s)}}a.querySelector(":scope > button:first-child")||a.insertAdjacentHTML("afterbegin",'<button class="dialog__close">Close</button>')},Fo=a=>{let e="",t=Array.from(a.querySelectorAll("fieldset[data-title]")),n=a.querySelector("form");t.forEach((r,i)=>{e+=`<button data-title="${r.getAttribute("data-title")}" type="button" class="${i==0?"active":""}" tabindex="-1">${r.getAttribute("data-title")}</button>`;const d=document.createElement("div");if(d.classList.add("btn--wrapper"),r.appendChild(d),i!=0&&(d.innerHTML+=`<button data-title="${t[i-1].getAttribute("data-title")}" class="btn btn-secondary mb-0" data-previous type="button">Previous</button>`),i!=t.length-1&&(d.innerHTML+=`<button data-title="${t[i+1].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="button">Next</button>`),i==t.length-1)if(n&&n.querySelector(':scope > button[type="submit"]')){let c=n.querySelector(':scope > button[type="submit"]');c.classList.add("mb-0"),d.insertAdjacentElement("beforeend",c)}else d.innerHTML+=`<button data-title="${t[i].getAttribute("data-title")}" class="btn btn-primary mb-0" data-next type="submit">Submit</button>`}),a.insertAdjacentHTML("afterbegin",`<div class="steps bg-primary">${e}</div>`);let s=Array.from(a.querySelectorAll("fieldset.was-validated"));for(let r=0;r<s.length;r++){let i=s[r],d=i.getAttribute("data-title");if(i.querySelector(".is-invalid")){Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((c,u)=>{c.classList.add("active")});break}else Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((c,u)=>{c.classList.add("valid")})}a.addEventListener("invalid",function(){return function(r){r.preventDefault()}}(),!0);function l(r){const i=a.querySelector("fieldset.active")?a.querySelector("fieldset.active"):a.querySelector("fieldset[data-title]"),d=i.getAttribute("data-title");let c=!0;if(i.classList.add("was-validated"),Array.from(i.querySelectorAll("input")).forEach((p,h)=>{p.checkValidity()||(c=!1)}),c?Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((p,h)=>{p.classList.add("valid")}):Array.from(a.querySelectorAll(`[data-title="${d}"]`)).forEach((p,h)=>{p.classList.remove("valid")}),c||!r.hasAttribute("data-next")){const p=a.querySelector(`fieldset[data-title="${r.getAttribute("data-title")}"]`),h=a.querySelector(`.steps button[data-title="${r.getAttribute("data-title")}"]`);Array.from(a.querySelectorAll("button")).forEach((b,f)=>{b.classList.remove("active")}),Array.from(a.querySelectorAll("fieldset")).forEach((b,f)=>{b.classList.remove("active")}),h.classList.add("active"),p.classList.add("active")}let u=Array.from(a.querySelectorAll("fieldset")).length,m=Array.from(a.querySelectorAll("fieldset.valid")).length;a.style.setProperty("--progress",`${m/(u-1)*100}%`)}a.addEventListener("keydown",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest("button")){const i=r.target.closest("button");r.keyCode==13&&i.getAttribute("type")!="submit"&&(r.preventDefault(),l(i))}r&&r.target instanceof HTMLElement&&r.target.closest("input")&&(r.target.closest("input").classList.remove("is-invalid"),r.keyCode==13&&r.preventDefault())}),a.addEventListener("click",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest('button[type="submit"]'))r.target.closest("form").classList.add("was-validated");else if(r&&r.target instanceof HTMLElement&&r.target.closest("button[data-title]")){const i=r.target.closest("button[data-title]");l(i)}return null})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"action bar"});function Z(a,e){a&&e=="all"?(a.querySelector("input").indeterminate=!1,a.querySelector("input").checked=!0,a.querySelector("label").textContent="Select all"):a&&e==0?(a.querySelector("input").indeterminate=!1,a.querySelector("input").checked=!1,a.querySelector("label").textContent="Select all"):a&&e?(a.querySelector("input").indeterminate=!0,a.querySelector("input").checked=!1,a.querySelector("label").textContent=`${e} item${e>1?"s":""} selected`):a&&(a.querySelector("input").checked=!1,a.querySelector("input").indeterminate=!1,a.querySelector("label").textContent="Select all")}class Po 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=`
204
204
  <style>
@@ -248,8 +248,8 @@
248
248
 
249
249
  </div>
250
250
  </div>
251
- `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}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 l=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&Z(l,this.getAttribute("data-selected")),l.addEventListener("change",i=>{i&&i.target instanceof HTMLElement&&i.target.closest("input")&&(i.target.closest("input").checked?this.setAttribute("data-selected","all"):this.setAttribute("data-selected",0))});let r=this.querySelector("button[data-cancel]");r&&r.addEventListener("click",i=>{this.setAttribute("data-selected",0)})}if(this.hasAttribute("data-select-watch")){const l=document.getElementById(this.getAttribute("data-select-watch"));l.setAttribute("data-select-container","true"),Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((r,i)=>{r.parentElement.setAttribute("slot","checkbox")}),l.addEventListener("change",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest('[type="checkbox"]')){let i=l.querySelectorAll('input[type="checkbox"]').length,d=l.querySelectorAll('input[type="checkbox"]:checked').length;e.setAttribute("data-selected",i==d?"all":d),r.target.closest('[type="checkbox"]'),d?Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").setAttribute("data-selected","true")}):Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").removeAttribute("data-selected")})}})}if(this.hasAttribute("data-switchviews")){let l="";this.getAttribute("data-switchviews").split(",").forEach((r,i)=>{let d="fa-grid-2";r=="list"?d="fa-grip-lines":r=="small"&&(d="fa-bars"),l+=`<button class="btn btn-action btn-compact mb-0 fa-regular ${d}">${r}</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="views m-0">${l}</div>`),this.shadowRoot.querySelector(".views").addEventListener("click",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".btn-action")){let i=r.target.closest(".btn-action");this.setAttribute("data-view",i.textContent);const d=new CustomEvent("switch-view",{detail:{view:i.textContent}});this.dispatchEvent(d)}})}const n=this.shadowRoot.querySelector(".actionbar--search");this.hasAttribute("data-search")&&this.getAttribute("data-search")=="show"&&n.classList.add("show"),this.shadowRoot.addEventListener("click",l=>{l&&l.target instanceof HTMLElement&&l.target.closest("button[data-search]")&&n.classList.toggle("show")}),n.addEventListener("keyup",l=>{const r=new CustomEvent("search-keyup",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("change",l=>{const r=new CustomEvent("search-change",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("click",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button.suffix")){const r=new CustomEvent("search-submit",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}}),Array.from(this.shadowRoot.querySelectorAll(".body")).forEach((l,r)=>{zo(l)});function s(){const l=t.scrollWidth,r=document.documentElement.scrollWidth;let i=750,d=16,c=e.hasAttribute("data-switchviews")?144:210,u=1;r>=992&&r<=1280?u=r/1280:r>=576&&r<=1280?u=r/768:r<576&&(u=r/375),l>=992&&l<=1280?i=i*u:l>=576&&l<=1280?i=450*u:l<576&&(i=c*u),d=d*u,l<576?Array.from(e.querySelectorAll(":scope > .btn:not(.js-updated)")).forEach((m,p)=>{m.className=m.className.replace(" btn-compact"," _btn-compact"),m.classList.add("btn-compact"),m.classList.add("js-updated")}):Array.from(e.querySelectorAll(":scope > .btn.js-updated")).forEach((m,p)=>{m.classList.remove("btn-compact"),m.classList.remove("js-updated"),m.className=m.className.replace(" _btn-compact"," btn-compact")}),Array.from(e.querySelectorAll("[slot]")).forEach((m,p)=>{m.getAttribute("slot")=="overflow"&&m.removeAttribute("slot"),m.getAttribute("slot")=="selected-overflow"&&m.setAttribute("slot","selected")}),Array.from(e.querySelectorAll(".show")).forEach((m,p)=>{m.classList.remove("show")}),Array.from(e.shadowRoot.querySelectorAll(".safe-area")).forEach((m,p)=>{let h="overflow";m.querySelector("slot").hasAttribute("name")&&m.querySelector("slot").getAttribute("name")=="selected"&&(h="selected-overflow");let b=m.querySelector("slot").assignedElements(),f=44*u;e.hasAttribute("data-search")&&(f+=44*u);for(let g=0;g<b.length;g++)!b[g].classList.contains("btn-action")&&!b[g].classList.contains("dialog__wrapper")&&(f+=b[g].offsetWidth,f+=d);for(let g=0;g<b.length;g++)if(b[g].classList.contains("dialog__wrapper")&&(b[g].classList.add("show"),f+=b[g].offsetWidth,f+=d/2,f-d/2>i)){b[g].classList.remove("show");break}for(let g=0;g<b.length;g++)if(b[g].classList.contains("btn-action")&&(b[g].classList.add("show"),f+=b[g].offsetWidth,f+=d/2,f-d/2>i)){b[g].classList.remove("show");break}let A=m.querySelector(".dialog-overflow");A&&A.classList.add("d-none");for(let g=0;g<b.length;g++)(b[g].classList.contains("btn-action")||b[g].classList.contains("dialog__wrapper"))&&(b[g].classList.contains("show")||(b[g].setAttribute("slot",h),A&&A.classList.remove("d-none")))})}s(),new ResizeObserver(s).observe(t)}static get observedAttributes(){return["data-selected"]}attributeChangedCallback(e,t,n){switch(e){case"data-selected":{let s=this.shadowRoot.querySelector(".selectall");s&&Z(s,n);const l=new CustomEvent("selected",{detail:{selected:n}});if(this.dispatchEvent(l),n=="all"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((i,d)=>{i.checked=!0,i.closest("iam-card")&&i.closest("iam-card").setAttribute("data-selected","true")})}if(n=="0"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((i,d)=>{i.checked=!1,i.closest("iam-card")&&i.closest("iam-card").removeAttribute("data-selected","true")})}break}}}}window.customElements.get("iam-actionbar")||window.customElements.define("iam-actionbar",Po);const Oo={name:"Actionbar",props:{},mounted(){}};function Io(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-actionbar",null,[o.renderSlot(a.$slots,"default")])}const Uo=v(Oo,[["render",Io]]),Wo={name:"Pagination",props:{},computed:{},created(){this.$nextTick(function(){window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",K)})},updated(){}};function Xo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-pagination")}const Ko=v(Wo,[["render",Xo]]),Yo=(a,e)=>{const t=a[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))})},Go={name:"Address Lookup",mounted(){console.log(process.env.NODE_ENV),this.$nextTick(function(){Yo(Object.assign({"../../../assets/js/components/address-lookup/address-lookup.component.js":()=>Promise.resolve().then(()=>cr),"../../../assets/js/components/address-lookup/address-lookup.component.min.js":()=>Promise.resolve().then(()=>mr)}),"../../../assets/js/components/address-lookup/address-lookup.component.js").then(a=>{window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",a.default)}).catch(a=>{console.log(a.message)})})}};function Jo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-address-lookup",null,[o.renderSlot(a.$slots,"default")])}const Qo=v(Go,[["render",Jo]]);/*!
252
- * iamKey v4.1.0
251
+ `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}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 l=this.shadowRoot.querySelector(".selectall");this.hasAttribute("data-selected")&&Z(l,this.getAttribute("data-selected")),l.addEventListener("change",i=>{i&&i.target instanceof HTMLElement&&i.target.closest("input")&&(i.target.closest("input").checked?this.setAttribute("data-selected","all"):this.setAttribute("data-selected",0))});let r=this.querySelector("button[data-cancel]");r&&r.addEventListener("click",i=>{this.setAttribute("data-selected",0)})}if(this.hasAttribute("data-select-watch")){const l=document.getElementById(this.getAttribute("data-select-watch"));l.setAttribute("data-select-container","true"),Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((r,i)=>{r.parentElement.setAttribute("slot","checkbox")}),l.addEventListener("change",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest('[type="checkbox"]')){let i=l.querySelectorAll('input[type="checkbox"]').length,d=l.querySelectorAll('input[type="checkbox"]:checked').length;e.setAttribute("data-selected",i==d?"all":d),r.target.closest('[type="checkbox"]'),d?Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").setAttribute("data-selected","true")}):Array.from(l.querySelectorAll('input[type="checkbox"]')).forEach((c,u)=>{c.closest("iam-card")&&c.closest("iam-card").removeAttribute("data-selected")})}})}if(this.hasAttribute("data-switchviews")){let l="";this.getAttribute("data-switchviews").split(",").forEach((r,i)=>{let d="fa-grid-2";r=="list"?d="fa-grip-lines":r=="small"&&(d="fa-bars"),l+=`<button class="btn btn-action btn-compact mb-0 fa-regular ${d}">${r}</button>`}),t.insertAdjacentHTML("afterbegin",`<div class="views m-0">${l}</div>`),this.shadowRoot.querySelector(".views").addEventListener("click",r=>{if(r&&r.target instanceof HTMLElement&&r.target.closest(".btn-action")){let i=r.target.closest(".btn-action");this.setAttribute("data-view",i.textContent);const d=new CustomEvent("switch-view",{detail:{view:i.textContent}});this.dispatchEvent(d)}})}const n=this.shadowRoot.querySelector(".actionbar--search");this.hasAttribute("data-search")&&this.getAttribute("data-search")=="show"&&n.classList.add("show"),this.shadowRoot.addEventListener("click",l=>{l&&l.target instanceof HTMLElement&&l.target.closest("button[data-search]")&&n.classList.toggle("show")}),n.addEventListener("keyup",l=>{const r=new CustomEvent("search-keyup",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("change",l=>{const r=new CustomEvent("search-change",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}),n.addEventListener("click",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest("button.suffix")){const r=new CustomEvent("search-submit",{detail:{search:n.querySelector("input").value}});this.dispatchEvent(r)}}),Array.from(this.shadowRoot.querySelectorAll(".body")).forEach((l,r)=>{zo(l)});function s(){const l=t.scrollWidth,r=document.documentElement.scrollWidth;let i=750,d=16,c=e.hasAttribute("data-switchviews")?144:210,u=1;r>=992&&r<=1280?u=r/1280:r>=576&&r<=1280?u=r/768:r<576&&(u=r/375),l>=992&&l<=1280?i=i*u:l>=576&&l<=1280?i=450*u:l<576&&(i=c*u),d=d*u,l<576?Array.from(e.querySelectorAll(":scope > .btn:not(.js-updated)")).forEach((m,p)=>{m.className=m.className.replace(" btn-compact"," _btn-compact"),m.classList.add("btn-compact"),m.classList.add("js-updated")}):Array.from(e.querySelectorAll(":scope > .btn.js-updated")).forEach((m,p)=>{m.classList.remove("btn-compact"),m.classList.remove("js-updated"),m.className=m.className.replace(" _btn-compact"," btn-compact")}),Array.from(e.querySelectorAll("[slot]")).forEach((m,p)=>{m.getAttribute("slot")=="overflow"&&m.removeAttribute("slot"),m.getAttribute("slot")=="selected-overflow"&&m.setAttribute("slot","selected")}),Array.from(e.querySelectorAll(".show")).forEach((m,p)=>{m.classList.remove("show")}),Array.from(e.shadowRoot.querySelectorAll(".safe-area")).forEach((m,p)=>{let h="overflow";m.querySelector("slot").hasAttribute("name")&&m.querySelector("slot").getAttribute("name")=="selected"&&(h="selected-overflow");let b=m.querySelector("slot").assignedElements(),f=44*u;e.hasAttribute("data-search")&&(f+=44*u);for(let g=0;g<b.length;g++)!b[g].classList.contains("btn-action")&&!b[g].classList.contains("dialog__wrapper")&&(f+=b[g].offsetWidth,f+=d);for(let g=0;g<b.length;g++)if(b[g].classList.contains("dialog__wrapper")&&(b[g].classList.add("show"),f+=b[g].offsetWidth,f+=d/2,f-d/2>i)){b[g].classList.remove("show");break}for(let g=0;g<b.length;g++)if(b[g].classList.contains("btn-action")&&(b[g].classList.add("show"),f+=b[g].offsetWidth,f+=d/2,f-d/2>i)){b[g].classList.remove("show");break}let A=m.querySelector(".dialog-overflow");A&&A.classList.add("d-none");for(let g=0;g<b.length;g++)(b[g].classList.contains("btn-action")||b[g].classList.contains("dialog__wrapper"))&&(b[g].classList.contains("show")||(b[g].setAttribute("slot",h),A&&A.classList.remove("d-none")))})}s(),new ResizeObserver(s).observe(t)}static get observedAttributes(){return["data-selected"]}attributeChangedCallback(e,t,n){switch(e){case"data-selected":{let s=this.shadowRoot.querySelector(".selectall");s&&Z(s,n);const l=new CustomEvent("selected",{detail:{selected:n}});if(this.dispatchEvent(l),n=="all"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((i,d)=>{i.checked=!0,i.closest("iam-card")&&i.closest("iam-card").setAttribute("data-selected","true")})}if(n=="0"&&this.hasAttribute("data-select-watch")){const r=document.getElementById(this.getAttribute("data-select-watch"));Array.from(r.querySelectorAll('input[type="checkbox"]')).forEach((i,d)=>{i.checked=!1,i.closest("iam-card")&&i.closest("iam-card").removeAttribute("data-selected","true")})}break}}}}window.customElements.get("iam-actionbar")||window.customElements.define("iam-actionbar",Po);const Io={name:"Actionbar",props:{},mounted(){}};function Oo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-actionbar",null,[o.renderSlot(a.$slots,"default")])}const Uo=v(Io,[["render",Oo]]),Wo={name:"Pagination",props:{},computed:{},created(){this.$nextTick(function(){window.customElements.get("iam-pagination")||window.customElements.define("iam-pagination",K)})},updated(){}};function Xo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-pagination")}const Ko=v(Wo,[["render",Xo]]),Yo=(a,e)=>{const t=a[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e)))})},Go={name:"Address Lookup",mounted(){this.$nextTick(function(){Yo(Object.assign({"../../../assets/js/components/address-lookup/address-lookup.component.js":()=>Promise.resolve().then(()=>cr),"../../../assets/js/components/address-lookup/address-lookup.component.min.js":()=>Promise.resolve().then(()=>mr)}),"../../../assets/js/components/address-lookup/address-lookup.component.js").then(a=>{window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",a.default)}).catch(a=>{console.log(a.message)})})}};function Jo(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-address-lookup",null,[o.renderSlot(a.$slots,"default")])}const Qo=v(Go,[["render",Jo]]);/*!
252
+ * iamKey v4.1.1-beta
253
253
  * Copyright 2022-2023 iamproperty
254
254
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"collapsible side menu"});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`,n=document.createElement("template");n.innerHTML=`
255
255
  <style class="styles">
@@ -274,7 +274,7 @@
274
274
 
275
275
  </div>
276
276
  `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){const e=this.shadowRoot.querySelector(".side-menu"),t=this.shadowRoot.querySelector(".side-menu-content"),n=this.shadowRoot.querySelector(".main-content"),s=this.shadowRoot.querySelector(".side-menu > .btn");this.hasAttribute("data-css")&&this.shadowRoot.querySelector(".styles").insertAdjacentHTML("beforeend",`@import "${this.getAttribute("data-css")}";`),this.hasAttribute("data-title")||this.setAttribute("data-title","configuration"),t.insertAdjacentHTML("afterbegin",`<span class="h3">${this.getAttribute("data-title")}</span>`),n.insertAdjacentHTML("afterbegin",`<span class="h3">${this.getAttribute("data-title")}</span>`),this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)")&&(this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)").classList.add("h4"),this.querySelector(":scope > :is(h1,h2,h3,h4,h5,h6)").classList.add("main-content__title")),s.addEventListener("click",l=>{e.classList.contains("open")?(e.classList.remove("open"),setTimeout(function(){t.classList.add("closed")},1e3),e.classList.add("pe-none"),setTimeout(function(){e.classList.remove("pe-none")},1e3)):(t.classList.remove("closed"),setTimeout(function(){e.classList.add("open")},100))}),e.addEventListener("mouseenter",l=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"),e.classList.add("hover"))}),e.addEventListener("mousemove",l=>{window.innerWidth>992&&(e.classList.contains("open")||t.classList.remove("closed"))}),e.addEventListener("mouseleave",l=>{window.innerWidth>992&&(e.classList.remove("hover"),e.classList.contains("open")||setTimeout(function(){t.classList.add("closed")},1e3))})}}window.customElements.get("iam-collapsible-side")||window.customElements.define("iam-collapsible-side",Zo);const tr={name:"CollapsibleSideMenu",props:{},mounted(){}};function er(a,e,t,n,s,l){return o.openBlock(),o.createElementBlock("iam-collapsible-side",null,[o.renderSlot(a.$slots,"default")])}const ar=v(tr,[["render",er]]);/*!
277
- * iamKey v4.1.0
277
+ * iamKey v4.1.1-beta
278
278
  * Copyright 2022-2023 iamproperty
279
279
  */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",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
280
280
  <style>
@@ -295,7 +295,7 @@
295
295
  ${this.hasAttribute("data-cta")?`<div class="card__footer"><span class="link">${this.getAttribute("data-cta")}</span></div>`:""}
296
296
  </div>
297
297
  `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}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",n=>{let s=new Event("click");t.dispatchEvent(s)}),t.addEventListener("click",n=>{if(e.matches("label[for]")){n.stopPropagation(),n.preventDefault();const s=document.getElementById(e.getAttribute("for")),l=s.getAttribute("name"),r=s.getAttribute("id");Array.from(document.querySelectorAll(`[name="${l}"][type="radio"]:not([id="${r}"])`)).forEach((i,d)=>{document.querySelector(`[for="${i.getAttribute("id")}"] iam-card`).dispatchEvent(new Event("inactive"))}),e.click(),s.checked?t.classList.add("checked"):t.classList.remove("checked")}}),this.addEventListener("inactive",n=>{t.classList.remove("checked")}),t.addEventListener("keydown",n=>{switch(n.keyCode){case 32:case 13:if(e.matches("label[for]")){n.stopPropagation(),n.preventDefault();const s=document.getElementById(e.getAttribute("for")),l=s.getAttribute("name"),r=s.getAttribute("id");Array.from(document.querySelectorAll(`[name="${l}"]:not([id="${r}"])`)).forEach((i,d)=>{document.querySelector(`[for="${i.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,n){switch(e){case"data-total":{this.shadowRoot.querySelector(".card__total")&&(this.shadowRoot.querySelector(".card__total").innerHTML=n);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 rr=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"}));/*!
298
- * iamKey v4.1.0
298
+ * iamKey v4.1.1-beta
299
299
  * Copyright 2022-2023 iamproperty
300
300
  */window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"nav"});class nr extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:"open"}),t=document.body.hasAttribute("data-assets-location")?document.body.getAttribute("data-assets-location"):"/assets",n=document.body.hasAttribute("data-core-css")?document.body.getAttribute("data-core-css"):`${t}/css/core.min.css`,s=document.createElement("template");s.innerHTML=`
301
301
  <style class="styles">
@@ -373,7 +373,7 @@
373
373
  <button class="btn btn-tertiary switch-to-lookup-btn">Use postcode lookup</button>
374
374
  </div>
375
375
  </div>
376
- `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){return et(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector("label"),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),s=this.shadowRoot.querySelector("datalist"),l=this.shadowRoot.querySelector(".switch-to-manual-btn"),r=this.shadowRoot.querySelector(".switch-to-lookup-btn");if(this.hasAttribute("data-use")){let c=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",c),this.shadowRoot.addEventListener("change",u=>{if(u&&u.target instanceof HTMLElement&&u.target.closest('[name="use"]')&&u.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let p=JSON.parse(this.getAttribute("data-use"));Object.keys(p).forEach((h,b)=>{let f=p[h];this.querySelector(`[data-name="${h}"]`)?this.querySelector(`[data-name="${h}"]`).value=f:this.querySelector(`[name="${h}"]`)&&(this.querySelector(`[name="${h}"]`).value=f)})}})}l.addEventListener("click",d=>{t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((c,u)=>{c.setAttribute("required","true")})}),r.addEventListener("click",d=>{t.classList.remove("js-hide"),n.classList.add("js-hide")}),e.addEventListener("keyup",d=>{e.value.length>=3&&i(e.value)}),e.addEventListener("change",d=>{if(e.value.length>=3&&(i(e.value),s.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let c=JSON.parse(s.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(c).forEach((u,m)=>{let p=c[u];this.querySelector(`[data-name="${u}"]`)?this.querySelector(`[data-name="${u}"]`).value=p:this.querySelector(`[name="${u}"]`)&&(this.querySelector(`[name="${u}"]`).value=p)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((u,m)=>{u.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const i=d=>et(this,void 0,void 0,function*(){let c=this.getAttribute("data-url");c+=`${encodeURI(d)}`,window.controller||(window.controller=[]),window.controller[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:u}=controller[c];try{yield fetch(c,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(m=>m.json()).then(m=>{let p="";return m.forEach((h,b)=>{let f=JSON.stringify(h.value);p+=`<option value="${h.label}, ${d}" data-values='${f}'></option>`}),s.innerHTML=p,m})}catch(m){console.log(m)}})})}}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"}));var at=function(a,e,t,n){function s(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function i(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?l(u.value):s(u.value).then(i,d)}c((n=n.apply(a,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class dr 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=`
376
+ `,this.shadowRoot.appendChild(s.content.cloneNode(!0))}connectedCallback(){return et(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),s=this.shadowRoot.querySelector("datalist"),l=this.shadowRoot.querySelector(".switch-to-manual-btn"),r=this.shadowRoot.querySelector(".switch-to-lookup-btn");if(this.hasAttribute("data-use")){let c=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",c),this.shadowRoot.addEventListener("change",u=>{if(u&&u.target instanceof HTMLElement&&u.target.closest('[name="use"]')&&u.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let p=JSON.parse(this.getAttribute("data-use"));Object.keys(p).forEach((h,b)=>{let f=p[h];this.querySelector(`[data-name="${h}"]`)?this.querySelector(`[data-name="${h}"]`).value=f:this.querySelector(`[name="${h}"]`)&&(this.querySelector(`[name="${h}"]`).value=f)})}})}l.addEventListener("click",d=>{t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((c,u)=>{c.setAttribute("required","true")})}),r.addEventListener("click",d=>{t.classList.remove("js-hide"),n.classList.add("js-hide")}),e.addEventListener("keyup",d=>{e.value.length>=3&&i(e.value)}),e.addEventListener("change",d=>{if(e.value.length>=3&&(i(e.value),s.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let c=JSON.parse(s.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(c).forEach((u,m)=>{let p=c[u];this.querySelector(`[data-name="${u}"]`)?this.querySelector(`[data-name="${u}"]`).value=p:this.querySelector(`[name="${u}"]`)&&(this.querySelector(`[name="${u}"]`).value=p)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((u,m)=>{u.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const i=d=>et(this,void 0,void 0,function*(){let c=this.getAttribute("data-url");c+=`${encodeURI(d)}`,window.controller||(window.controller=[]),window.controller[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:u}=controller[c];try{yield fetch(c,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(m=>m.json()).then(m=>{let p="";return m.forEach((h,b)=>{let f=JSON.stringify(h.value);p+=`<option value="${h.label}, ${d}" data-values='${f}'></option>`}),s.innerHTML=p,m})}catch(m){console.log(m)}})})}}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"}));var at=function(a,e,t,n){function s(l){return l instanceof t?l:new t(function(r){r(l)})}return new(t||(t=Promise))(function(l,r){function i(u){try{c(n.next(u))}catch(m){r(m)}}function d(u){try{c(n.throw(u))}catch(m){r(m)}}function c(u){u.done?l(u.value):s(u.value).then(i,d)}c((n=n.apply(a,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class dr 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=`
377
377
  <style>
378
378
  @import "${t}";
379
379
  :host{margin-bottom:1rem;display:block}input[name=postcode]{border-color:var(--error-border, var(--colour-primary)) !important}div:has(input[name=postcode]) .suffix{border-color:var(--error-border, var(--colour-primary)) !important}.invalid-feedback{display:var(--error-display, none) !important}.optional{display:var(--req-display, inline-block) !important}/*# sourceMappingURL=assets/css/components/address-lookup.css.map */
@@ -404,4 +404,4 @@
404
404
  <button class="btn btn-tertiary switch-to-lookup-btn">Use postcode lookup</button>
405
405
  </div>
406
406
  </div>
407
- `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){return at(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector("label"),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),s=this.shadowRoot.querySelector("datalist"),l=this.shadowRoot.querySelector(".switch-to-manual-btn"),r=this.shadowRoot.querySelector(".switch-to-lookup-btn");if(this.hasAttribute("data-use")){let d=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",d),this.shadowRoot.addEventListener("change",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest('[name="use"]')&&c.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let u=JSON.parse(this.getAttribute("data-use"));Object.keys(u).forEach((m,p)=>{let h=u[m];this.querySelector(`[data-name="${m}"]`)?this.querySelector(`[data-name="${m}"]`).value=h:this.querySelector(`[name="${m}"]`)&&(this.querySelector(`[name="${m}"]`).value=h)})}})}l.addEventListener("click",d=>{t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((c,u)=>{c.setAttribute("required","true")})}),r.addEventListener("click",d=>{t.classList.remove("js-hide"),n.classList.add("js-hide")}),e.addEventListener("keyup",d=>{e.value.length>=3&&i(e.value)}),e.addEventListener("change",d=>{if(e.value.length>=3&&(i(e.value),s.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let c=JSON.parse(s.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(c).forEach((u,m)=>{let p=c[u];this.querySelector(`[data-name="${u}"]`)?this.querySelector(`[data-name="${u}"]`).value=p:this.querySelector(`[name="${u}"]`)&&(this.querySelector(`[name="${u}"]`).value=p)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((u,m)=>{u.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const i=d=>at(this,void 0,void 0,function*(){let c=this.getAttribute("data-url");c+=`${encodeURI(d)}`,window.controller||(window.controller=[]),window.controller[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:u}=controller[c];try{yield fetch(c,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(m=>m.json()).then(m=>{let p="";return m.forEach((h,b)=>{let f=JSON.stringify(h.value);p+=`<option value="${h.label}, ${d}" data-values='${f}'></option>`}),s.innerHTML=p,m})}catch(m){console.log(m)}})})}}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"}));y.Accordion=ce,y.AccordionItem=pe,y.Actionbar=Uo,y.AddressLookup=Qo,y.AppliedFilters=So,y.Banner=_e,y.Card=Y,y.Carousel=je,y.CollapsibleSideMenu=ar,y.FileUpload=oe,y.Filterlist=Mo,y.Header=Oe,y.Input=N,y.Logo=lt,y.Nav=Ca,y.NoteFeed=ko,y.Notification=Do,y.Pagination=Ko,y.PropertySearchbar=Ea,y.Snapshot=Xa,y.Step=Qa,y.Stepper=Va,y.Tab=ho,y.Table=H,y.Tabs=so,y.Testimonial=ia,y.Timeline=ua,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
407
+ `,this.shadowRoot.appendChild(n.content.cloneNode(!0))}connectedCallback(){return at(this,void 0,void 0,function*(){this.shadowRoot.querySelector(".wrapper");const e=this.shadowRoot.querySelector('[name="postcode"]'),t=this.shadowRoot.querySelector(".postcode-lookup"),n=this.shadowRoot.querySelector(".manual-address"),s=this.shadowRoot.querySelector("datalist"),l=this.shadowRoot.querySelector(".switch-to-manual-btn"),r=this.shadowRoot.querySelector(".switch-to-lookup-btn");if(this.hasAttribute("data-use")){let d=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;t.insertAdjacentHTML("afterbegin",d),this.shadowRoot.addEventListener("change",c=>{if(c&&c.target instanceof HTMLElement&&c.target.closest('[name="use"]')&&c.target.closest('[name="use"]').checked){t.classList.add("js-hide"),n.classList.remove("js-hide");let u=JSON.parse(this.getAttribute("data-use"));Object.keys(u).forEach((m,p)=>{let h=u[m];this.querySelector(`[data-name="${m}"]`)?this.querySelector(`[data-name="${m}"]`).value=h:this.querySelector(`[name="${m}"]`)&&(this.querySelector(`[name="${m}"]`).value=h)})}})}l.addEventListener("click",d=>{t.classList.add("js-hide"),n.classList.remove("js-hide"),Array.from(this.querySelectorAll("[data-required]")).forEach((c,u)=>{c.setAttribute("required","true")})}),r.addEventListener("click",d=>{t.classList.remove("js-hide"),n.classList.add("js-hide")}),e.addEventListener("keyup",d=>{e.value.length>=3&&i(e.value)}),e.addEventListener("change",d=>{if(e.value.length>=3&&(i(e.value),s.querySelector(`[value="${e.value}"]`))){t.classList.add("js-hide"),n.classList.remove("js-hide");let c=JSON.parse(s.querySelector(`[value="${e.value}"]`).getAttribute("data-values"));Object.keys(c).forEach((u,m)=>{let p=c[u];this.querySelector(`[data-name="${u}"]`)?this.querySelector(`[data-name="${u}"]`).value=p:this.querySelector(`[name="${u}"]`)&&(this.querySelector(`[name="${u}"]`).value=p)}),this.querySelector('[data-name="address_1"]').focus(),Array.from(this.querySelectorAll("[data-required]")).forEach((u,m)=>{u.setAttribute("required","true")}),e.removeAttribute("required"),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}});const i=d=>at(this,void 0,void 0,function*(){let c=this.getAttribute("data-url");c+=`${encodeURI(d)}`,window.controller||(window.controller=[]),window.controller[c]&&window.controller[c].abort(),window.controller[c]=new AbortController;const{signal:u}=controller[c];try{yield fetch(c,{signal:u,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":tt.get("XSRF-TOKEN")})}).then(m=>m.json()).then(m=>{let p="";return m.forEach((h,b)=>{let f=JSON.stringify(h.value);p+=`<option value="${h.label}, ${d}" data-values='${f}'></option>`}),s.innerHTML=p,m})}catch(m){console.log(m)}})})}}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"}));y.Accordion=ce,y.AccordionItem=pe,y.Actionbar=Uo,y.AddressLookup=Qo,y.AppliedFilters=So,y.Banner=_e,y.Card=Y,y.Carousel=je,y.CollapsibleSideMenu=ar,y.FileUpload=oe,y.Filterlist=Mo,y.Header=Ie,y.Input=N,y.Logo=lt,y.Nav=Ca,y.NoteFeed=ko,y.Notification=Do,y.Pagination=Ko,y.PropertySearchbar=Ea,y.Snapshot=Xa,y.Step=Qa,y.Stepper=Va,y.Tab=ho,y.Table=H,y.Tabs=so,y.Testimonial=ia,y.Timeline=ua,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});