mp-design-system 1.2.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- (()=>{function e(e){e.addEventListener("click",(e=>{e.currentTarget.parentElement.classList.toggle("c-accordion__item--open")}))}var t=function(){Array.from(document.querySelectorAll(".c-accordion__title")).forEach(e)};var o=function(){let e=0;const t=document.querySelectorAll(".c-hero__image-bg"),o=document.querySelectorAll(".c-hero__image-fg");o.length>0&&setInterval((()=>{for(var n of t)n.style.opacity=0;for(var r of(e=e!=t.length-1?e+1:0,t[e].style.opacity=1,o))r.style.opacity=0;o[e].style.opacity=1}),5e3)};var n=function(){const e=document.getElementById("clearForm");e&&e.addEventListener("click",(function(){this.closest("form").elements.forEach((e=>{if(""!=e.value){if("text"==e.type.toLowerCase()||"email"==e.type.toLowerCase()||"tel"==e.type.toLowerCase()||"select-one"==e.type.toLowerCase()||"textarea"==e.type.toLowerCase())return void(e.value="");if("checkbox"==e.type.toLowerCase())return void(e.checked=!1)}}))}))};var r=function(){Array.from(document.querySelectorAll(".c-combobox")).forEach((function(e){const t=e.querySelector(".c-combobox__input"),o=e.querySelector(".c-combobox__select"),n=Array.from(o.querySelectorAll('li[role="option"]'));t.setAttribute("aria-expanded","false"),t.setAttribute("aria-owns",o.id),t.setAttribute("aria-controls",o.id),t.addEventListener("focus",(function(){t.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true")})),t.addEventListener("blur",(function(){t.setAttribute("aria-expanded","false"),o.setAttribute("aria-expanded","false")})),t.addEventListener("input",(function(){const e=t.value.toLowerCase();n.forEach((function(t){t.textContent.toLowerCase().includes(e)?(t.style.display="",t.setAttribute("aria-hidden","false")):(t.style.display="none",t.setAttribute("aria-hidden","true"))}))})),o.addEventListener("click",(function(e){const n=e.target;if("option"===n.getAttribute("role")){const e=o.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),n.setAttribute("aria-selected","true"),t.value=n.textContent,t.focus()}})),n.forEach((function(e){e.style.display="",e.setAttribute("aria-hidden","false")}))}))};function c(e){const t=e.querySelector(".c-table tbody"),o=e.querySelector(".c-table thead"),n=e.querySelector(".c-comparison__mobile");if(!t||!o||!n)return;const r=Array.from(o.children[0].children).filter(((e,t)=>t)).map((e=>({info:e.innerHTML,table:[]})));Array.from(t.children).forEach((e=>{if(e.classList.contains("c-table__title"))r.forEach((t=>{t.table.push({type:"title",title:e.children[0].textContent})}));else{const t=Array.from(e.children),o=t.shift();t.forEach(((e,t)=>{r[t].table.push({type:"row",key:o.textContent,value:e.innerHTML})}))}})),r.forEach((e=>{const t=function(e){const t=document.createElement("article");return t.innerHTML=`<div class="c-comparison__content">\n ${e.info}\n </div>\n <table class="c-table">\n ${e.table.map((e=>"title"===e.type?`<tr class="c-table__title"><th colspan="2">${e.title}</th></tr>`:`<tr>\n <td>${e.key}</td>\n <td>${e.value}</td>\n </tr>`)).join("")}\n </table>`,t}(e);n.appendChild(t)}))}var a=function(){document.querySelectorAll(".c-comparison").forEach(c)};var i=function(){const e=document.querySelectorAll(".c-gallery__main .c-gallery__slide"),t=document.querySelectorAll(".c-gallery__thumbnails .c-gallery__slide");function o(){const e=document.querySelector(".c-gallery__main").cloneNode(!0);e.classList.remove("c-gallery__main"),e.classList.add("c-lightbox"),e.querySelectorAll(".c-gallery__slide").forEach((function(e){if(e.classList.contains("c-gallery__video")&&e.remove(),!e.classList.contains("c-gallery__video")){var t=e.querySelector("img");""!=t.srcset&&t.removeAttribute("srcset")}e.classList.add("c-lightbox__slide"),e.classList.remove("c-gallery__slide")})),document.body.appendChild(e),e.insertAdjacentHTML("beforeend",'<a class="c-lightbox__prev"></a><a class="c-lightbox__next"></a>'),e.querySelector(".c-lightbox__prev").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)-1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.querySelector(".c-lightbox__next").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)+1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.addEventListener("click",(function(t){t.target===t.currentTarget&&e.remove()}))}t.forEach((o=>o.addEventListener("click",(function(n){t.forEach((function(e){e!=n.target.parentNode&&e.classList.remove("active")})),n.target.parentNode.classList.add("active"),e.forEach((function(e){e.dataset.slide==o.dataset.slide?e.classList.add("active"):e.classList.remove("active")}))})))),e.forEach((function(e){e.classList.contains("c-gallery__video")||e.addEventListener("click",o)}))};const s=(e,t,o)=>((e,t=0,o=1)=>Math.min(o,Math.max(t,e)))((o-e)/(t-e));var l=function(){let e=0;const t=document.querySelector(".c-hero__canvas");if(!t)return;const o=t.getContext("2d"),n=!window.matchMedia("(prefers-reduced-motion: no-preference)").matches,r=147,c=.25;let a,i,l,d,u,f=[];function h(){a=t.scrollWidth,i=t.scrollHeight,o.canvas.width=a,o.canvas.height=i,l=Math.ceil(a/r),d=Math.ceil(i/r),u=(l+1)*(d+1);const e=function(e){const t=[...e];for(let e=t.length-1;e>0;e--){let o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}return t}(Array.from({length:u},((e,t)=>t)));f=[];for(let t=0;t<=l;t++)for(let o=0;o<=d;o++)f.push({counter:e.shift(),direction:Math.random()>.5?c:-.25,x:r*(t+1)-147,y:r*(o+1)-73.5})}window.addEventListener("resize",h),h(),function r(){e+=.005,o.clearRect(0,0,t.width,t.height),o.beginPath();for(let n=t.width;n>0;n--)o.lineTo(n,.5*t.height-Math.cos(e+n/5*.03)*(.3*i));o.lineWidth=.5,o.strokeStyle="rgb(19,170,19)",o.stroke(),f.forEach((e=>{var t,n,r,a,i,l,d,u;t=e.x,n=e.y,a=0,i=f.length,l=0,d=.5,u=e.counter,r=((e,t,o)=>e*(1-o)+t*o)(l,d,s(a,i,u)),o.beginPath(),o.moveTo(t-14,n),o.lineTo(t+14,n),o.strokeStyle=`rgba(255, 255, 255, ${r}`,o.moveTo(t,n-14),o.lineTo(t,n+14),o.stroke(),e.counter+=e.direction,e.counter>=f.length&&(e.direction=-.25),e.counter<0&&(e.direction=c)})),n||window.requestAnimationFrame(r)}()};var d=function(){document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("videoBackground");if(void 0!==e&&null!=e){const o=window.matchMedia("(prefers-reduced-motion: reduce)");o&&!o.matches||e.classList.add("u-hidden");const n=document.getElementById("playVideo"),r=document.getElementById("lightboxVideo"),c=r.querySelector(".c-lightbox__video");function t(){r.classList.contains("u-hidden")?(e.paused&&e.play(),c.paused||c.pause()):e.paused||e.pause()}n.addEventListener("click",(o=>{e.pause(),r.classList.remove("u-hidden"),t()})),r.addEventListener("click",(o=>{o.target.classList.contains("c-lightbox__video")||(e.setAttribute("autoplay",""),r.classList.add("u-hidden"),t())})),window.addEventListener("keydown",(function(o){"Escape"==o.key&&(e.setAttribute("autoplay",""),r.classList.add("u-hidden"),t())}))}}))};function u(e){const t=e.getBoundingClientRect(),o=window.getComputedStyle(e);return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&"none"!==o.display&&"hidden"!==o.visibility}function f(e,t){const o=document.getElementById(e.getAttribute("data-target"));!0===t?function(e){e.classList.add("c-off-canvas"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true");const t=e.querySelector('[data-off-canvas="header"]'),o=e.querySelector('[data-off-canvas="main"]'),n=e.querySelector('[data-off-canvas="footer"]'),r=null!==t?t.outerHTML:"",c=null!==o?o.outerHTML:"",a=null!==n?n.outerHTML:"";e.innerHTML=`\n <div class="c-off-canvas__backdrop" role="presentation"></div>\n <div class="c-off-canvas__content" role="dialog" aria-modal="true" aria-labelledby="offCanvasHeader">\n <header id="offCanvasHeader" class="c-off-canvas__header">${r}</header>\n <main class="c-off-canvas__main">${c}</main>\n <footer class="c-off-canvas__footer">\n ${a}\n <button class="mp c-twi c-twi--left c-off-canvas__close" data-off-canvas-close="true">\n <span>Cancel</span>\n <svg role="img" aria-hidden="true" focusable="false" class="mp c-icon c-icon--cross">\n <use xlink:href="/static/svg/sprite.svg#cross"></use>\n </svg>\n </button>\n </footer>\n </div>\n `}(o):function(e){e.classList.remove("c-off-canvas","c-off-canvas--active"),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden");const t=e.querySelector(".c-off-canvas__backdrop");t&&t.remove();const o=e.querySelector(".c-off-canvas__content");if(o){for(;o.firstChild;)e.insertBefore(o.firstChild,o);e.removeChild(o)}const n=e.querySelector(".c-off-canvas__header");if(n){for(;n.firstChild;)e.insertBefore(n.firstChild,n);e.removeChild(n)}const r=e.querySelector(".c-off-canvas__main");if(r){for(;r.firstChild;)e.insertBefore(r.firstChild,r);e.removeChild(r)}const c=e.querySelector(".c-off-canvas__footer");if(c){for(;c.firstChild;)e.insertBefore(c.firstChild,c);e.removeChild(c)}const a=e.querySelector(".c-off-canvas__close");a&&a.remove()}(o)}function h(e){document.querySelector('[data-target="'+e.id+'"').setAttribute("aria-expanded","false"),e.classList.remove("c-off-canvas--active"),e.setAttribute("aria-hidden","true"),document.body.style.overflowY=""}function v(){h(this.closest(".c-off-canvas"))}function y(e){if("Escape"===e.key){const e=document.querySelector(".c-off-canvas--active");e&&h(e)}}function m(){h(this.closest(".c-off-canvas"))}var b=function(){const e=document.querySelectorAll(".c-off-canvas__toggle");e.length&&(e.forEach((e=>{f(e,u(e)),e.addEventListener("click",(()=>function(e){const t=document.getElementById(e.getAttribute("data-target"));t.classList.contains("c-off-canvas--active")?t.classList.contains("c-off-canvas--active")&&h(t):function(e,t){e.setAttribute("aria-expanded","true"),t.classList.add("c-off-canvas--active"),t.setAttribute("aria-hidden","false");const o=t.querySelector(".c-off-canvas__backdrop");o&&o.addEventListener("click",v);const n=t.querySelectorAll('[data-off-canvas-close="true"]');n.length>0&&n.forEach((e=>{e.addEventListener("click",m)}));document.addEventListener("keydown",y,{once:!0}),document.body.style.overflowY="hidden";const r=Array.from(document.querySelectorAll(".c-off-canvas")).filter((e=>e!==t));r.length>0&&r.forEach((e=>{h(e)}))}(e,t)}(e)))})),window.addEventListener("resize",(()=>{e.forEach((e=>{f(e,u(e))}))})))};var p=()=>{Array.from(document.querySelectorAll(".c-table--responsive")).forEach((function(e){const t=e.querySelectorAll("thead > :first-child th"),o=Number(e.getAttribute("data-columns"))||2;if(t.length<o)return void e.classList.remove("c-table--responsive");Array.from(e.querySelectorAll("tbody tr")).forEach((e=>{Array.from(t).map((e=>e.textContent)).forEach(((t,o)=>{e.children[o]&&e.children[o].setAttribute("data-responsive-title",t)}))}))}))};function g(){document.documentElement.style.setProperty("--scrollbarWidth",window.innerWidth-document.body.clientWidth+"px")}var _=function(){g(),window.addEventListener("resize",((e,t)=>{let o=!1;return()=>{o||(e(),o=!0,setTimeout((()=>o=!1),t))}})(g,250))};function L(e){const t=Array.from(e.querySelectorAll("a")),o=new IntersectionObserver(function(e){return t=>{const o=t.find((e=>e.isIntersecting));o&&e.forEach((e=>{e.classList.toggle("c-scroll-spy-active",e.getAttribute("href")==="#"+o.target.id)}))}}(t));t.forEach((e=>{const t=e.getAttribute("href").replace("#",""),n=document.getElementById(t);n&&o.observe(n)}))}var E=function(){Array.from(document.querySelectorAll(".c-scroll-spy")).forEach(L)};function A(e){const t=Array.from(e.querySelectorAll(".c-tabs__control")),o=Array.from(e.querySelectorAll(".c-tab")),n=e.classList.contains("c-tabs--persist");if(t.length&&o.length&&(t.forEach((e=>{e.addEventListener("click",function(e,t,o){return n=>{const r=n.currentTarget,c=t.find((e=>e.id===r.getAttribute("href").replace("#","")));if(!c)return!0;n.preventDefault(),o&&history.pushState(null,null,r.getAttribute("href")),e.forEach((e=>e.classList.toggle("c-tabs__control--active",e===r))),t.forEach((e=>{const t=e===c;if(e.classList.toggle("c-tab--active",t),!o)if(t){e.setAttribute("tabIndex",-1);const t=window.scrollY;e.focus(),window.scrollTo({behavior:"auto",top:t})}else e.removeAttribute("tabIndex")}))}}(t,o,n))})),n&&window.location.hash)){const t=e.querySelector('[href="'+window.location.hash+'"]');t&&t.dispatchEvent(new Event("click"))}}var w=function(){Array.from(document.querySelectorAll(".c-tabs--anchor")).forEach(A)};window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),t(),o(),n(),r(),a(),i(),l(),d(),b(),p(),_(),E(),w()})();
1
+ (()=>{function e(e){e.addEventListener("click",(e=>{e.currentTarget.parentElement.classList.toggle("c-accordion__item--open")}))}var t=function(){Array.from(document.querySelectorAll(".c-accordion__title")).forEach(e)};var o=function(){let e=0;const t=document.querySelectorAll(".c-hero__image-bg"),o=document.querySelectorAll(".c-hero__image-fg");o.length>0&&setInterval((()=>{for(var r of t)r.style.opacity=0;for(var n of(e=e!=t.length-1?e+1:0,t[e].style.opacity=1,o))n.style.opacity=0;o[e].style.opacity=1}),5e3)};var r=function(){const e=document.getElementById("clearForm");e&&e.addEventListener("click",(function(){this.closest("form").elements.forEach((e=>{if(""!=e.value){if("text"==e.type.toLowerCase()||"email"==e.type.toLowerCase()||"tel"==e.type.toLowerCase()||"select-one"==e.type.toLowerCase()||"textarea"==e.type.toLowerCase())return void(e.value="");if("checkbox"==e.type.toLowerCase())return void(e.checked=!1)}}))}))};var n=function(){Array.from(document.querySelectorAll(".c-combobox")).forEach((function(e){const t=e.querySelector(".c-combobox__input"),o=e.querySelector(".c-combobox__select"),r=Array.from(o.querySelectorAll('li[role="option"]'));t.setAttribute("aria-expanded","false"),t.setAttribute("aria-owns",o.id),t.setAttribute("aria-controls",o.id),t.addEventListener("focus",(function(){t.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true")})),t.addEventListener("blur",(function(){t.setAttribute("aria-expanded","false"),o.setAttribute("aria-expanded","false")})),t.addEventListener("input",(function(){const e=t.value.toLowerCase();r.forEach((function(t){t.textContent.toLowerCase().includes(e)?(t.style.display="",t.setAttribute("aria-hidden","false")):(t.style.display="none",t.setAttribute("aria-hidden","true"))}))})),o.addEventListener("click",(function(e){const r=e.target;if("option"===r.getAttribute("role")){const e=o.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),r.setAttribute("aria-selected","true"),t.value=r.textContent,t.focus()}})),r.forEach((function(e){e.style.display="",e.setAttribute("aria-hidden","false")}))}))};function c(e){const t=e.querySelector(".c-table tbody"),o=e.querySelector(".c-table thead"),r=e.querySelector(".c-comparison__mobile");if(!t||!o||!r)return;const n=Array.from(o.children[0].children).filter(((e,t)=>t)).map((e=>({info:e.innerHTML,table:[]})));Array.from(t.children).forEach((e=>{if(e.classList.contains("c-table__title"))n.forEach((t=>{t.table.push({type:"title",title:e.children[0].textContent})}));else{const t=Array.from(e.children),o=t.shift();t.forEach(((e,t)=>{n[t].table.push({type:"row",key:o.textContent,value:e.innerHTML})}))}})),n.forEach((e=>{const t=function(e){const t=document.createElement("article");return t.innerHTML=`<div class="c-comparison__content">\n ${e.info}\n </div>\n <table class="c-table">\n ${e.table.map((e=>"title"===e.type?`<tr class="c-table__title"><th colspan="2">${e.title}</th></tr>`:`<tr>\n <td>${e.key}</td>\n <td>${e.value}</td>\n </tr>`)).join("")}\n </table>`,t}(e);r.appendChild(t)}))}var a=function(){document.querySelectorAll(".c-comparison").forEach(c)};var i=function(){const e=document.querySelectorAll(".c-gallery__main .c-gallery__slide"),t=document.querySelectorAll(".c-gallery__thumbnails .c-gallery__slide");function o(){const e=document.querySelector(".c-gallery__main").cloneNode(!0);e.classList.remove("c-gallery__main"),e.classList.add("c-lightbox"),e.querySelectorAll(".c-gallery__slide").forEach((function(e){if(e.classList.contains("c-gallery__video")&&e.remove(),!e.classList.contains("c-gallery__video")){var t=e.querySelector("img");""!=t.srcset&&t.removeAttribute("srcset");var o=t.getAttribute("src");o?-1!==o.indexOf("?")?t.setAttribute("src",o.split("?")[0]+"?quality=90&width=2176"):t.setAttribute("src",o+"?quality=90&width=2176"):(console.log(t),console.log("has no src defined..."))}e.classList.add("c-lightbox__slide"),e.classList.remove("c-gallery__slide")})),document.body.appendChild(e),e.insertAdjacentHTML("beforeend",'<a class="c-lightbox__prev"></a><a class="c-lightbox__next"></a>'),e.querySelector(".c-lightbox__prev").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)-1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.querySelector(".c-lightbox__next").addEventListener("click",(function(){const t=e.querySelector(".active"),o=e.querySelector('[data-slide="'+(parseInt(t.dataset.slide)+1)+'"]');null!=o&&(t.classList.remove("active"),o.classList.add("active"))})),e.addEventListener("click",(function(t){t.target===t.currentTarget&&e.remove()}))}t.forEach((o=>o.addEventListener("click",(function(r){t.forEach((function(e){e!=r.target.parentNode&&e.classList.remove("active")})),r.target.parentNode.classList.add("active"),e.forEach((function(e){e.dataset.slide==o.dataset.slide?e.classList.add("active"):e.classList.remove("active")}))})))),e.forEach((function(e){e.classList.contains("c-gallery__video")||e.addEventListener("click",o)}))};const s=(e,t,o)=>((e,t=0,o=1)=>Math.min(o,Math.max(t,e)))((o-e)/(t-e));var l=function(){let e=0;const t=document.querySelector(".c-hero__canvas");if(!t)return;const o=t.getContext("2d"),r=!window.matchMedia("(prefers-reduced-motion: no-preference)").matches,n=147,c=.25;let a,i,l,d,u,f=[];function h(){a=t.scrollWidth,i=t.scrollHeight,o.canvas.width=a,o.canvas.height=i,l=Math.ceil(a/n),d=Math.ceil(i/n),u=(l+1)*(d+1);const e=function(e){const t=[...e];for(let e=t.length-1;e>0;e--){let o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}return t}(Array.from({length:u},((e,t)=>t)));f=[];for(let t=0;t<=l;t++)for(let o=0;o<=d;o++)f.push({counter:e.shift(),direction:Math.random()>.5?c:-.25,x:n*(t+1)-147,y:n*(o+1)-73.5})}window.addEventListener("resize",h),h(),function n(){e+=.005,o.clearRect(0,0,t.width,t.height),o.beginPath();for(let r=t.width;r>0;r--)o.lineTo(r,.5*t.height-Math.cos(e+r/5*.03)*(.3*i));o.lineWidth=.5,o.strokeStyle="rgb(19,170,19)",o.stroke(),f.forEach((e=>{var t,r,n,a,i,l,d,u;t=e.x,r=e.y,a=0,i=f.length,l=0,d=.5,u=e.counter,n=((e,t,o)=>e*(1-o)+t*o)(l,d,s(a,i,u)),o.beginPath(),o.moveTo(t-14,r),o.lineTo(t+14,r),o.strokeStyle=`rgba(255, 255, 255, ${n}`,o.moveTo(t,r-14),o.lineTo(t,r+14),o.stroke(),e.counter+=e.direction,e.counter>=f.length&&(e.direction=-.25),e.counter<0&&(e.direction=c)})),r||window.requestAnimationFrame(n)}()};var d=function(){document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("videoBackground");if(void 0!==e&&null!=e){const o=window.matchMedia("(prefers-reduced-motion: reduce)");o&&!o.matches||e.classList.add("u-hidden");const r=document.getElementById("playVideo"),n=document.getElementById("lightboxVideo"),c=n.querySelector(".c-lightbox__video");function t(){n.classList.contains("u-hidden")?(e.paused&&e.play(),c.paused||c.pause()):e.paused||e.pause()}r.addEventListener("click",(o=>{e.pause(),n.classList.remove("u-hidden"),t()})),n.addEventListener("click",(o=>{o.target.classList.contains("c-lightbox__video")||(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())})),window.addEventListener("keydown",(function(o){"Escape"==o.key&&(e.setAttribute("autoplay",""),n.classList.add("u-hidden"),t())}))}}))};function u(e){const t=e.getBoundingClientRect(),o=window.getComputedStyle(e);return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)&&"none"!==o.display&&"hidden"!==o.visibility}function f(e,t){const o=document.getElementById(e.getAttribute("data-target"));!0===t?function(e){e.classList.add("c-off-canvas"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true");const t=e.querySelector('[data-off-canvas="header"]'),o=e.querySelector('[data-off-canvas="main"]'),r=e.querySelector('[data-off-canvas="footer"]'),n=null!==t?t.outerHTML:"",c=null!==o?o.outerHTML:"",a=null!==r?r.outerHTML:"";e.innerHTML=`\n <div class="c-off-canvas__backdrop" role="presentation"></div>\n <div class="c-off-canvas__content" role="dialog" aria-modal="true" aria-labelledby="offCanvasHeader">\n <header id="offCanvasHeader" class="c-off-canvas__header">${n}</header>\n <main class="c-off-canvas__main">${c}</main>\n <footer class="c-off-canvas__footer">\n ${a}\n <button class="mp c-twi c-twi--left c-off-canvas__close" data-off-canvas-close="true" onclick="return false">\n <span>Cancel</span>\n <svg role="img" aria-hidden="true" focusable="false" class="mp c-icon c-icon--cross">\n <use xlink:href="/static/svg/sprite.svg#cross"></use>\n </svg>\n </button>\n </footer>\n </div>\n `}(o):function(e){e.classList.remove("c-off-canvas","c-off-canvas--active"),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden");const t=e.querySelector(".c-off-canvas__backdrop");t&&t.remove();const o=e.querySelector(".c-off-canvas__content");if(o){for(;o.firstChild;)e.insertBefore(o.firstChild,o);e.removeChild(o)}const r=e.querySelector(".c-off-canvas__header");if(r){for(;r.firstChild;)e.insertBefore(r.firstChild,r);e.removeChild(r)}const n=e.querySelector(".c-off-canvas__main");if(n){for(;n.firstChild;)e.insertBefore(n.firstChild,n);e.removeChild(n)}const c=e.querySelector(".c-off-canvas__footer");if(c){for(;c.firstChild;)e.insertBefore(c.firstChild,c);e.removeChild(c)}const a=e.querySelector(".c-off-canvas__close");a&&a.remove()}(o)}function h(e){document.querySelector('[data-target="'+e.id+'"').setAttribute("aria-expanded","false"),e.classList.remove("c-off-canvas--active"),e.setAttribute("aria-hidden","true"),document.body.style.overflowY=""}function v(){h(this.closest(".c-off-canvas"))}function y(e){if("Escape"===e.key){const e=document.querySelector(".c-off-canvas--active");e&&h(e)}}function m(){h(this.closest(".c-off-canvas"))}var b=function(){const e=document.querySelectorAll(".c-off-canvas__toggle");e.length&&(e.forEach((e=>{f(e,u(e)),e.addEventListener("click",(()=>function(e){const t=document.getElementById(e.getAttribute("data-target"));t.classList.contains("c-off-canvas--active")?t.classList.contains("c-off-canvas--active")&&h(t):function(e,t){e.setAttribute("aria-expanded","true"),t.classList.add("c-off-canvas--active"),t.setAttribute("aria-hidden","false");const o=t.querySelector(".c-off-canvas__backdrop");o&&o.addEventListener("click",v);const r=t.querySelectorAll('[data-off-canvas-close="true"]');r.length>0&&r.forEach((e=>{e.addEventListener("click",m)}));document.addEventListener("keydown",y,{once:!0}),document.body.style.overflowY="hidden";const n=Array.from(document.querySelectorAll(".c-off-canvas")).filter((e=>e!==t));n.length>0&&n.forEach((e=>{h(e)}))}(e,t)}(e)))})),window.addEventListener("resize",(()=>{e.forEach((e=>{f(e,u(e))}))})))};var p=()=>{Array.from(document.querySelectorAll(".c-table--responsive")).forEach((function(e){const t=e.querySelectorAll("thead > :first-child th"),o=Number(e.getAttribute("data-columns"))||2;if(t.length<o)return void e.classList.remove("c-table--responsive");Array.from(e.querySelectorAll("tbody tr")).forEach((e=>{Array.from(t).map((e=>e.textContent)).forEach(((t,o)=>{e.children[o]&&e.children[o].setAttribute("data-responsive-title",t)}))}))}))};function g(){document.documentElement.style.setProperty("--scrollbarWidth",window.innerWidth-document.body.clientWidth+"px")}var _=function(){g(),window.addEventListener("resize",((e,t)=>{let o=!1;return()=>{o||(e(),o=!0,setTimeout((()=>o=!1),t))}})(g,250))};function L(e){const t=Array.from(e.querySelectorAll("a")),o=new IntersectionObserver(function(e){return t=>{const o=t.find((e=>e.isIntersecting));o&&e.forEach((e=>{e.classList.toggle("c-scroll-spy-active",e.getAttribute("href")==="#"+o.target.id)}))}}(t));t.forEach((e=>{const t=e.getAttribute("href").replace("#",""),r=document.getElementById(t);r&&o.observe(r)}))}var A=function(){Array.from(document.querySelectorAll(".c-scroll-spy")).forEach(L)};function E(e){const t=Array.from(e.querySelectorAll(".c-tabs__control")),o=Array.from(e.querySelectorAll(".c-tab")),r=e.classList.contains("c-tabs--persist");if(t.length&&o.length&&(t.forEach((e=>{e.addEventListener("click",function(e,t,o){return r=>{const n=r.currentTarget,c=t.find((e=>e.id===n.getAttribute("href").replace("#","")));if(!c)return!0;r.preventDefault(),o&&history.pushState(null,null,n.getAttribute("href")),e.forEach((e=>e.classList.toggle("c-tabs__control--active",e===n))),t.forEach((e=>{const t=e===c;if(e.classList.toggle("c-tab--active",t),!o)if(t){e.setAttribute("tabIndex",-1);const t=window.scrollY;e.focus(),window.scrollTo({behavior:"auto",top:t})}else e.removeAttribute("tabIndex")}))}}(t,o,r))})),r&&window.location.hash)){const t=e.querySelector('[href="'+window.location.hash+'"]');t&&t.dispatchEvent(new Event("click"))}}var w=function(){Array.from(document.querySelectorAll(".c-tabs--anchor")).forEach(E)};window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.HTMLCollection&&!HTMLCollection.prototype.forEach&&(HTMLCollection.prototype.forEach=Array.prototype.forEach),t(),o(),r(),n(),a(),i(),l(),d(),b(),p(),_(),A(),w()})();
2
2
  //# sourceMappingURL=app.js.map
@@ -1 +1 @@
1
- {"mappings":"MAKA,SAASA,EAAgBC,GACrBA,EAAMC,iBAAiB,SAIfC,IACOA,EAAMC,cAAcC,cAC1BC,UAAUC,OAAO,kCAI9BC,EAhBA,WACuBC,MAAMC,KAAKC,SAASC,iBAAiB,wBAC7CC,QAAQb,QCmBvBc,EArBA,WACE,IAAIC,EAAU,EACd,MAAMC,EAAWL,SAASC,iBAAiB,qBACrCK,EAAWN,SAASC,iBAAiB,qBAExCK,EAASC,OAAS,GACnBC,aAAY,KACV,IAAK,IAAIC,KAAWJ,EAClBI,EAAQC,MAAMC,QAAU,EAK1B,IAAK,IAAIC,KAHTR,EAAWA,GAAWC,EAASE,OAAS,EAAKH,EAAU,EAAI,EAC3DC,EAASD,GAASM,MAAMC,QAAU,EAEdL,GAClBM,EAAQF,MAAMC,QAAU,EAE1BL,EAASF,GAASM,MAAMC,QAAU,IACjC,UCSPE,EA1BA,WACE,MAAMC,EAAY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AEzE,aAAa,YAAY,GAE3B,MAAMiE,EAAIY,OAAOsI,QACjB1I,EAAE/D,QACFmE,OAAOuI,SAAS,CAAEC,SAAU,OAAQ/E,IAAKrE,SAEzCQ,EAAErB,gBAAgB,gBAtCYkK,CAAaZ,EAAUC,EAASC,OAGhEA,GAAW/H,OAAO0I,SAASC,MAAM,CACnC,MAAMX,EAAU1K,EAAOtC,cAAc,UAAYgF,OAAO0I,SAASC,KAAO,MACpEX,GAASA,EAAQY,cAAc,IAAIC,MAAM,eAuCjDC,EAzDA,WACe3P,MAAMC,KAAKC,SAASC,iBAAiB,oBAC7CC,QAAQqO,ICaV5H,OAAO+I,WAAaA,SAASC,UAAUzP,UACxCwP,SAASC,UAAUzP,QAAUJ,MAAM6P,UAAUzP,SAE5CyG,OAAOiJ,iBAAmBA,eAAeD,UAAUzP,UACpD0P,eAAeD,UAAUzP,QAAUJ,MAAM6P,UAAUzP,SAGrDL,IACAM,IACAU,IACAW,IACA8C,IACAC,IACA8B,IACAiD,IACA+C,IACAwD,IACAxC,IACAyC,IACAL","sources":["src/assets/js/imports/accordion.js","src/assets/js/imports/carousel.js","src/assets/js/imports/clear-form.js","src/assets/js/imports/combobox.js","src/assets/js/imports/comparison.js","src/assets/js/imports/gallery.js","src/assets/js/imports/utilities.js","src/assets/js/imports/hero-pattern.js","src/assets/js/imports/hero-video.js","src/assets/js/imports/off-canvas.js","src/assets/js/imports/responsive-table.js","src/assets/js/imports/scrollbar-width.js","src/assets/js/imports/scroll-spy.js","src/assets/js/imports/tabs.js","src/assets/js/app.js"],"sourcesContent":["function Accordion() {\r\n const accordions = Array.from(document.querySelectorAll('.c-accordion__title'));\r\n accordions.forEach(setupAccordions);\r\n}\r\n\r\nfunction setupAccordions(title) {\r\n title.addEventListener('click', titleClick())\r\n}\r\n\r\nfunction titleClick() {\r\n return (event) => {\r\n var item = event.currentTarget.parentElement;\r\n item.classList.toggle('c-accordion__item--open');\r\n }\r\n}\r\n\r\nexport default Accordion;\r\n","function Carousel() {\r\n let current = 0;\r\n const bgSlides = document.querySelectorAll('.c-hero__image-bg');\r\n const fgSlides = document.querySelectorAll('.c-hero__image-fg');\r\n\r\n if(fgSlides.length > 0) {\r\n setInterval(() => {\r\n for (var bgSlide of bgSlides) {\r\n bgSlide.style.opacity = 0;\r\n }\r\n current = (current != bgSlides.length - 1) ? current + 1 : 0;\r\n bgSlides[current].style.opacity = 1;\r\n \r\n for (var fgSlide of fgSlides) {\r\n fgSlide.style.opacity = 0;\r\n }\r\n fgSlides[current].style.opacity = 1;\r\n }, 5000);\r\n }\r\n}\r\n\r\nexport default Carousel;","function ClearForm() {\r\n const formClear = document.getElementById('clearForm');\r\n if (formClear) {\r\n formClear.addEventListener('click', function () {\r\n const fields = this.closest('form').elements;\r\n fields.forEach(field => {\r\n if (field.value != '') {\r\n if (\r\n field.type.toLowerCase() == 'text' || \r\n field.type.toLowerCase() == 'email' || \r\n field.type.toLowerCase() == 'tel' || \r\n field.type.toLowerCase() == 'select-one' || \r\n field.type.toLowerCase() == 'textarea'\r\n ) {\r\n field.value = '';\r\n return;\r\n } else if (field.type.toLowerCase() == 'checkbox') {\r\n field.checked = false;\r\n return;\r\n }\r\n }\r\n });\r\n });\r\n };\r\n}\r\n\r\nexport default ClearForm;","function Combobox() {\r\n const comboboxes = Array.from(document.querySelectorAll('.c-combobox'));\r\n\r\n comboboxes.forEach(function (combobox) {\r\n const input = combobox.querySelector('.c-combobox__input');\r\n const select = combobox.querySelector('.c-combobox__select');\r\n const options = Array.from(select.querySelectorAll('li[role=\"option\"]'));\r\n\r\n // Set initial state\r\n input.setAttribute('aria-expanded', 'false');\r\n input.setAttribute('aria-owns', select.id);\r\n input.setAttribute('aria-controls', select.id);\r\n\r\n // Event listeners\r\n input.addEventListener('focus', function () {\r\n input.setAttribute('aria-expanded', 'true');\r\n select.setAttribute('aria-expanded', 'true');\r\n });\r\n\r\n input.addEventListener('blur', function () {\r\n input.setAttribute('aria-expanded', 'false');\r\n select.setAttribute('aria-expanded', 'false');\r\n });\r\n\r\n input.addEventListener('input', function () {\r\n const inputValue = input.value.toLowerCase();\r\n\r\n options.forEach(function (option) {\r\n const optionText = option.textContent.toLowerCase();\r\n\r\n if (optionText.includes(inputValue)) {\r\n option.style.display = '';\r\n option.setAttribute('aria-hidden', 'false');\r\n } else {\r\n option.style.display = 'none';\r\n option.setAttribute('aria-hidden', 'true');\r\n }\r\n });\r\n });\r\n\r\n select.addEventListener('click', function (event) {\r\n const target = event.target;\r\n const isOption = target.getAttribute('role') === 'option';\r\n\r\n if (isOption) {\r\n const selectedOption = select.querySelector('[aria-selected=\"true\"]');\r\n if (selectedOption) {\r\n selectedOption.setAttribute('aria-selected', 'false');\r\n }\r\n\r\n target.setAttribute('aria-selected', 'true');\r\n input.value = target.textContent;\r\n\r\n input.focus();\r\n }\r\n });\r\n\r\n // Display options initially\r\n options.forEach(function (option) {\r\n option.style.display = '';\r\n option.setAttribute('aria-hidden', 'false');\r\n });\r\n });\r\n}\r\n\r\nexport default Combobox;\r\n","function Comparison() {\r\n document.querySelectorAll('.c-comparison').forEach(extractMobileComparison)\r\n}\r\n\r\nfunction extractMobileComparison(container) {\r\n const body = container.querySelector('.c-table tbody');\r\n const head = container.querySelector('.c-table thead');\r\n const mobile = container.querySelector('.c-comparison__mobile');\r\n\r\n if (!body || !head || !mobile) return;\r\n\r\n // Remove empty corner piece\r\n const products = Array.from(head.children[0].children)\r\n .filter((x, i) => i)\r\n .map(x => ({ info: x.innerHTML, table: [] }));\r\n\r\n Array.from(body.children).forEach(row => {\r\n // For table row headers, push to all products\r\n if (row.classList.contains('c-table__title')) {\r\n products.forEach(x => {\r\n x.table.push({ type: 'title', title: row.children[0].textContent })\r\n })\r\n } else {\r\n // For all others, loop the cells and push to their appropriate parent\r\n const cells = Array.from(row.children);\r\n const firstCell = cells.shift();\r\n\r\n cells.forEach((el, index) => {\r\n products[index].table.push({\r\n type: 'row',\r\n key: firstCell.textContent,\r\n value: el.innerHTML\r\n })\r\n })\r\n }\r\n })\r\n\r\n products.forEach(product => {\r\n const el = createMobileProduct(product);\r\n mobile.appendChild(el)\r\n })\r\n}\r\n\r\nfunction createMobileProduct(product) {\r\n const parent = document.createElement('article');\r\n parent.innerHTML = `<div class=\"c-comparison__content\">\r\n ${product.info}\r\n </div>\r\n <table class=\"c-table\">\r\n ${product.table.map(x => {\r\n if (x.type === 'title') {\r\n return `<tr class=\"c-table__title\"><th colspan=\"2\">${x.title}</th></tr>`;\r\n } else {\r\n return `<tr>\r\n <td>${x.key}</td>\r\n <td>${x.value}</td>\r\n </tr>`;\r\n }\r\n }).join('')}\r\n </table>`;\r\n\r\n return parent;\r\n}\r\n\r\nexport default Comparison;\r\n","function Gallery() {\r\n const mainSlides = document.querySelectorAll('.c-gallery__main .c-gallery__slide');\r\n const thumbnailSlides = document.querySelectorAll('.c-gallery__thumbnails .c-gallery__slide');\r\n\r\n thumbnailSlides.forEach(thumbnailSlide => thumbnailSlide.addEventListener('click', function(e) {\r\n thumbnailSlides.forEach(function(thumbnail) {\r\n if(thumbnail != e.target.parentNode) {\r\n thumbnail.classList.remove('active');\r\n }\r\n });\r\n e.target.parentNode.classList.add('active');\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(mainSlide.dataset.slide == thumbnailSlide.dataset.slide) {\r\n mainSlide.classList.add('active');\r\n } else {\r\n mainSlide.classList.remove('active');\r\n }\r\n });\r\n }));\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(!mainSlide.classList.contains('c-gallery__video')) {\r\n mainSlide.addEventListener('click', lightboxTrigger);\r\n }\r\n });\r\n\r\n function lightboxTrigger() {\r\n const lightbox = document.querySelector('.c-gallery__main').cloneNode(true);\r\n lightbox.classList.remove('c-gallery__main');\r\n lightbox.classList.add('c-lightbox');\r\n lightbox.querySelectorAll('.c-gallery__slide').forEach(function(slide) {\r\n if(slide.classList.contains('c-gallery__video')) {\r\n slide.remove();\r\n }\r\n if(!slide.classList.contains('c-gallery__video')) {\r\n var slideImg = slide.querySelector('img');\r\n if(slideImg.srcset != '') {\r\n slideImg.removeAttribute('srcset');\r\n }\r\n }\r\n slide.classList.add('c-lightbox__slide');\r\n slide.classList.remove('c-gallery__slide');\r\n });\r\n document.body.appendChild(lightbox);\r\n lightbox.insertAdjacentHTML('beforeend', '<a class=\"c-lightbox__prev\"></a><a class=\"c-lightbox__next\"></a>');\r\n\r\n lightbox.querySelector('.c-lightbox__prev').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const prevImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) - 1) + '\"]');\r\n if(prevImage != null) {\r\n lightboxActive.classList.remove('active');\r\n prevImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.querySelector('.c-lightbox__next').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const nextImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) + 1) + '\"]');\r\n if(nextImage != null) {\r\n lightboxActive.classList.remove('active');\r\n nextImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.addEventListener('click', function(e) {\r\n if (e.target !== e.currentTarget) {\r\n return;\r\n } else {\r\n lightbox.remove();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Gallery;\r\n","export function shuffle(array) {\r\n const arr = [...array];\r\n for (let i = arr.length - 1; i > 0; i--) {\r\n let j = Math.floor(Math.random() * (i + 1));\r\n [arr[i], arr[j]] = [arr[j], arr[i]];\r\n }\r\n\r\n return arr;\r\n}\r\n\r\nexport function userPrefersReducedMotion() {\r\n const QUERY = '(prefers-reduced-motion: no-preference)';\r\n const mediaQueryList = window.matchMedia(QUERY);\r\n const prefersReducedMotion = !mediaQueryList.matches;\r\n return prefersReducedMotion;\r\n}\r\n\r\nexport const debounce = (func, limit) => {\r\n let wait = false; \r\n return () => {\r\n if (wait) return;\r\n func();\r\n wait = true;\r\n setTimeout(() => wait = false, limit);\r\n }\r\n}\r\n\r\nexport const lerp = (x, y, a) => x * (1 - a) + y * a;\r\nexport const clamp = (a, min = 0, max = 1) => Math.min(max, Math.max(min, a));\r\nexport const invlerp = (x, y, a) => clamp((a - x) / (y - x));\r\nexport const range = (x1, y1, x2, y2, a) => lerp(x2, y2, invlerp(x1, y1, a));\r\n","import { range, shuffle, userPrefersReducedMotion } from './utilities';\r\n\r\nfunction HeroPattern() {\r\n let time = 0;\r\n\r\n const c = document.querySelector('.c-hero__canvas');\r\n if (!c) return;\r\n const ctx = c.getContext(\"2d\");\r\n \r\n const sineColour = \"rgb(19,170,19)\";\r\n const reduceMotion = userPrefersReducedMotion();\r\n\r\n const crossGap = 147;\r\n const minimumOpacity = 0;\r\n const maximumOpacity = 0.5;\r\n const crossSpeed = 0.25;\r\n\r\n let width;\r\n let height;\r\n let across;\r\n let down;\r\n let crosses = [];\r\n let totalPoints;\r\n\r\n function draw() {\r\n // Sine wave\r\n time = time + 0.005;\r\n \r\n ctx.clearRect(0, 0, c.width, c.height);\r\n ctx.beginPath();\r\n \r\n for(let cnt = c.width; cnt > 0; cnt--) {\r\n ctx.lineTo(cnt, c.height * 0.5 - (Math.cos(time + cnt / 5 * 0.03) * (height * 0.3) ));\r\n }\r\n \r\n ctx.lineWidth = 0.5;\r\n ctx.strokeStyle = sineColour;\r\n ctx.stroke();\r\n \r\n // Crosses\r\n crosses.forEach(cross => {\r\n drawCross(cross.x, cross.y, range(0, crosses.length, minimumOpacity, maximumOpacity, cross.counter));\r\n \r\n cross.counter += cross.direction;\r\n if (cross.counter >= crosses.length) cross.direction = -1 * crossSpeed;\r\n if (cross.counter < 0) cross.direction = crossSpeed;\r\n })\r\n \r\n if (!reduceMotion) {\r\n window.requestAnimationFrame(draw);\r\n }\r\n }\r\n \r\n function onResize() {\r\n width = c.scrollWidth;\r\n height = c.scrollHeight;\r\n \r\n ctx.canvas.width = width;\r\n ctx.canvas.height = height;\r\n \r\n across = Math.ceil(width / crossGap);\r\n down = Math.ceil(height / crossGap);\r\n \r\n totalPoints = (across + 1) * (down + 1);\r\n const ids = shuffle(Array.from({ length: totalPoints }, (_, i) => (i)))\r\n crosses = [];\r\n for(let x = 0; x <= across; x++) {\r\n for(let y = 0; y <= down; y++) {\r\n crosses.push({\r\n counter: ids.shift(),\r\n direction: Math.random() > 0.5 ? crossSpeed : -1 * crossSpeed,\r\n x: crossGap * (x + 1) - crossGap / 1,\r\n y: crossGap * (y + 1) - crossGap / 2\r\n });\r\n }\r\n }\r\n }\r\n \r\n function drawCross(x, y, opacity) {\r\n ctx.beginPath();\r\n ctx.moveTo(x - 14, y);\r\n ctx.lineTo(x + 14, y);\r\n ctx.strokeStyle = `rgba(255, 255, 255, ${opacity}`;\r\n ctx.moveTo(x, y - 14);\r\n ctx.lineTo(x, y + 14);\r\n ctx.stroke();\r\n }\r\n\r\n window.addEventListener('resize', onResize);\r\n onResize();\r\n draw();\r\n}\r\n\r\nexport default HeroPattern;\r\n","function HeroVideo() {\r\n document.addEventListener(\"DOMContentLoaded\", () => {\r\n const videoBackground = document.getElementById('videoBackground');\r\n if(typeof(videoBackground) != 'undefined' && videoBackground != null) {\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');\r\n if(!reducedMotion || reducedMotion.matches) {\r\n videoBackground.classList.add('u-hidden');\r\n }\r\n \r\n const lightboxTrigger = document.getElementById('playVideo');\r\n const lightboxContainer = document.getElementById('lightboxVideo');\r\n const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');\r\n\r\n lightboxTrigger.addEventListener('click', e => {\r\n videoBackground.pause();\r\n lightboxContainer.classList.remove('u-hidden');\r\n checkVideos();\r\n });\r\n \r\n lightboxContainer.addEventListener('click', (e) => {\r\n if (!e.target.classList.contains('c-lightbox__video')) {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n window.addEventListener('keydown', function(e) {\r\n if (e.key == \"Escape\") {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n\r\n function checkVideos() {\r\n if(lightboxContainer.classList.contains('u-hidden')) {\r\n if (videoBackground.paused) {\r\n videoBackground.play();\r\n }\r\n if (!lightboxVideo.paused) {\r\n lightboxVideo.pause();\r\n }\r\n } else {\r\n if (!videoBackground.paused) {\r\n videoBackground.pause();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport default HeroVideo;","// Function to initialize off-canvas behavior\r\nfunction OffCanvas() {\r\n // Select all elements that trigger off-canvas behavior\r\n const toggles = document.querySelectorAll(\".c-off-canvas__toggle\");\r\n\r\n // Iterate through each toggle element\r\n if (toggles.length) {\r\n toggles.forEach(toggle => {\r\n // Determine initial visibility state and handle click event\r\n handleOffCanvas(toggle, isVisible(toggle));\r\n toggle.addEventListener('click', () => toggleOffCanvas(toggle));\r\n });\r\n\r\n // Add event listener for scroll events to check visibility\r\n // window.addEventListener('scroll', () => {\r\n // toggles.forEach(toggle => {\r\n // handleOffCanvas(toggle, isVisible(toggle));\r\n // });\r\n // });\r\n\r\n // Add event listener for resize events to check visibility\r\n window.addEventListener('resize', () => {\r\n toggles.forEach(toggle => {\r\n handleOffCanvas(toggle, isVisible(toggle));\r\n });\r\n });\r\n }\r\n}\r\n\r\n// Function to check if an element is currently visible on the page\r\nfunction isVisible(element) {\r\n // Check element's position and styles for visibility\r\n const rect = element.getBoundingClientRect();\r\n const style = window.getComputedStyle(element);\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) &&\r\n style.display !== 'none' &&\r\n style.visibility !== 'hidden'\r\n );\r\n}\r\n\r\n// Function to handle off-canvas behavior based on visibility\r\nfunction handleOffCanvas(toggle, isVisible) {\r\n const target = document.getElementById(toggle.getAttribute('data-target'));\r\n if (isVisible === true) {\r\n createOffCanvas(target);\r\n } else {\r\n removeOffCanvas(target);\r\n }\r\n}\r\n\r\n// Function to create off canvas\r\nfunction createOffCanvas(target) {\r\n // Add necessary classes and attributes for off-canvas display\r\n target.classList.add('c-off-canvas');\r\n target.setAttribute('tabindex', '-1');\r\n target.setAttribute('aria-hidden', 'true');\r\n \r\n // Extract specific sections of the off-canvas content\r\n const targetHeader = target.querySelector('[data-off-canvas=\"header\"]');\r\n const targetMain = target.querySelector('[data-off-canvas=\"main\"]');\r\n const targetFooter = target.querySelector('[data-off-canvas=\"footer\"]');\r\n\r\n // Extract content from the sections\r\n const targetHeaderContent = targetHeader !== null ? targetHeader.outerHTML : '';\r\n const targetMainContent = targetMain !== null ? targetMain.outerHTML : '';\r\n const targetFooterContent = targetFooter !== null ? targetFooter.outerHTML : '';\r\n\r\n // Replace the target's content with off-canvas structure\r\n target.innerHTML = `\r\n <div class=\"c-off-canvas__backdrop\" role=\"presentation\"></div>\r\n <div class=\"c-off-canvas__content\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"offCanvasHeader\">\r\n <header id=\"offCanvasHeader\" class=\"c-off-canvas__header\">${targetHeaderContent}</header>\r\n <main class=\"c-off-canvas__main\">${targetMainContent}</main>\r\n <footer class=\"c-off-canvas__footer\">\r\n ${targetFooterContent}\r\n <button class=\"mp c-twi c-twi--left c-off-canvas__close\" data-off-canvas-close=\"true\">\r\n <span>Cancel</span>\r\n <svg role=\"img\" aria-hidden=\"true\" focusable=\"false\" class=\"mp c-icon c-icon--cross\">\r\n <use xlink:href=\"/static/svg/sprite.svg#cross\"></use>\r\n </svg>\r\n </button>\r\n </footer>\r\n </div>\r\n `;\r\n}\r\n\r\n// Function to remove off-canvas layout\r\nfunction removeOffCanvas(target) {\r\n // Remove classes and attributes for off-canvas display\r\n target.classList.remove('c-off-canvas', 'c-off-canvas--active');\r\n target.removeAttribute('tabindex');\r\n target.removeAttribute('aria-hidden');\r\n\r\n // Remove backdrop element if present\r\n const targetBackdrop = target.querySelector('.c-off-canvas__backdrop');\r\n if (targetBackdrop) {\r\n targetBackdrop.remove();\r\n }\r\n\r\n // Restore original content by removing off-canvas structure\r\n const targetContent = target.querySelector('.c-off-canvas__content');\r\n if (targetContent) {\r\n while (targetContent.firstChild) {\r\n target.insertBefore(targetContent.firstChild, targetContent);\r\n }\r\n target.removeChild(targetContent);\r\n }\r\n\r\n const targetHeader = target.querySelector('.c-off-canvas__header');\r\n if (targetHeader) {\r\n while (targetHeader.firstChild) {\r\n target.insertBefore(targetHeader.firstChild, targetHeader);\r\n }\r\n target.removeChild(targetHeader);\r\n }\r\n\r\n const targetMain = target.querySelector('.c-off-canvas__main');\r\n if (targetMain) {\r\n while (targetMain.firstChild) {\r\n target.insertBefore(targetMain.firstChild, targetMain);\r\n }\r\n target.removeChild(targetMain);\r\n }\r\n\r\n const targetFooter = target.querySelector('.c-off-canvas__footer');\r\n if (targetFooter) {\r\n while (targetFooter.firstChild) {\r\n target.insertBefore(targetFooter.firstChild, targetFooter);\r\n }\r\n target.removeChild(targetFooter);\r\n }\r\n \r\n // Remove close button element if present\r\n const targetClose = target.querySelector('.c-off-canvas__close');\r\n if (targetClose) {\r\n targetClose.remove();\r\n }\r\n}\r\n\r\n// Function to toggle off-canvas visibility\r\nfunction toggleOffCanvas(toggle) {\r\n const target = document.getElementById(toggle.getAttribute('data-target'));\r\n\r\n // Check if the target is already open or closed\r\n if (!target.classList.contains('c-off-canvas--active')) {\r\n openOffCanvas(toggle, target);\r\n } else if (target.classList.contains('c-off-canvas--active')) {\r\n closeOffCanvas(target);\r\n }\r\n}\r\n\r\nfunction openOffCanvas(toggle, target) {\r\n // Add classes and attributes for open off-canvas\r\n toggle.setAttribute('aria-expanded', 'true');\r\n target.classList.add('c-off-canvas--active');\r\n target.setAttribute('aria-hidden', 'false');\r\n\r\n // Add event listener for backdrop clicks\r\n const offCanvasBackdrop = target.querySelector('.c-off-canvas__backdrop');\r\n if(offCanvasBackdrop) {\r\n offCanvasBackdrop.addEventListener('click', handleBackdropClick);\r\n }\r\n\r\n // Add event listener forclose button clicks\r\n const offCanvasCloseElements = target.querySelectorAll('[data-off-canvas-close=\"true\"]');\r\n if (offCanvasCloseElements.length > 0) {\r\n offCanvasCloseElements.forEach((offCanvasClose) => {\r\n offCanvasClose.addEventListener('click', handleCloseClick);\r\n });\r\n }\r\n\r\n // Add event listener for Escape key press\r\n document.addEventListener('keydown', handleKeyDown, { once: true });\r\n\r\n // Adjust body overflow to prevent scrolling\r\n document.body.style.overflowY = 'hidden';\r\n\r\n // Close other open off-canvas elements\r\n const allOffCanvasElementsExceptCurrent = Array.from(document.querySelectorAll('.c-off-canvas')).filter(offCanvas => offCanvas !== target);\r\n if (allOffCanvasElementsExceptCurrent.length > 0) {\r\n allOffCanvasElementsExceptCurrent.forEach((offCanvas) => {\r\n closeOffCanvas(offCanvas);\r\n });\r\n }\r\n}\r\n\r\n// Function to close an off-canvas\r\nfunction closeOffCanvas(target) {\r\n // Remove classes and attributes for open off-canvas\r\n document.querySelector('[data-target=\"' + target.id + '\"').setAttribute('aria-expanded', 'false');\r\n target.classList.remove('c-off-canvas--active');\r\n target.setAttribute('aria-hidden', 'true');\r\n\r\n // Restore body overflow\r\n document.body.style.overflowY = '';\r\n}\r\n\r\n// Function to handle backdrop click\r\nfunction handleBackdropClick() {\r\n const offCanvas = this.closest('.c-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to handle Escape key press\r\nfunction handleKeyDown(event) {\r\n if (event.key === 'Escape') {\r\n const activeOffCanvas = document.querySelector('.c-off-canvas--active');\r\n if (activeOffCanvas) {\r\n closeOffCanvas(activeOffCanvas);\r\n }\r\n }\r\n}\r\n\r\n// Function to handle close button click\r\nfunction handleCloseClick() {\r\n const offCanvas = this.closest('.c-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\nexport default OffCanvas;","const ResponsiveTable = () => {\r\n const tables = Array.from(document.querySelectorAll('.c-table--responsive'));\r\n tables.forEach(createResponsiveTable);\r\n\r\n /**\r\n * Create responsive table headers for large tables\r\n * @param {HTMLTableElement} table\r\n */\r\n function createResponsiveTable(table) {\r\n const headers = table.querySelectorAll('thead > :first-child th');\r\n const breakPoint = Number(table.getAttribute('data-columns')) || 2\r\n \r\n if (headers.length < breakPoint) {\r\n table.classList.remove('c-table--responsive');\r\n return;\r\n };\r\n\r\n Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {\r\n Array.from(headers)\r\n .map((x) => x.textContent)\r\n .forEach((header, index) => {\r\n if (row.children[index]) {\r\n row.children[index].setAttribute('data-responsive-title', header);\r\n }\r\n });\r\n });\r\n }\r\n};\r\n\r\nexport default ResponsiveTable;\r\n","import { debounce } from './utilities';\r\n\r\nfunction ScrollbarWidth() {\r\n setScrollbarWidth();\r\n window.addEventListener('resize', debounce(setScrollbarWidth, 250));\r\n}\r\n\r\nfunction setScrollbarWidth() {\r\n document.documentElement.style.setProperty(\r\n '--scrollbarWidth', \r\n window.innerWidth - document.body.clientWidth + 'px'\r\n );\r\n}\r\n\r\nexport default ScrollbarWidth;","function ScrollSpy() {\r\n const spies = Array.from(document.querySelectorAll('.c-scroll-spy'));\r\n spies.forEach(setup);\r\n}\r\n\r\nfunction setup(element) {\r\n const anchors = Array.from(element.querySelectorAll('a'));\r\n const observer = new IntersectionObserver(observation(anchors));\r\n \r\n anchors.forEach(anchor => {\r\n const id = anchor.getAttribute('href').replace('#', '');\r\n const target = document.getElementById(id);\r\n if (!target) return;\r\n\r\n observer.observe(target);\r\n });\r\n}\r\n\r\n/**\r\n * @param {Array<HTMLAnchorElement>} results \r\n * @return {Array<IntersectionObserverEntry>}\r\n */\r\nfunction observation(anchors) {\r\n return (results) => {\r\n const firstObservation = results.find(x => x.isIntersecting);\r\n\r\n if (firstObservation) {\r\n anchors.forEach(x => {\r\n x.classList.toggle(\r\n 'c-scroll-spy-active',\r\n x.getAttribute('href') === '#' + firstObservation.target.id\r\n )\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport default ScrollSpy;\r\n","function Tabs() {\r\n const tabs = Array.from(document.querySelectorAll('.c-tabs--anchor'));\r\n tabs.forEach(setupTabs);\r\n}\r\n\r\nfunction setupTabs(parent) {\r\n const controls = Array.from(parent.querySelectorAll('.c-tabs__control'));\r\n const content = Array.from(parent.querySelectorAll('.c-tab'));\r\n const persist = parent.classList.contains('c-tabs--persist');\r\n \r\n if (!controls.length || !content.length) return;\r\n\r\n controls.forEach(control => {\r\n control.addEventListener('click', controlClick(controls, content, persist))\r\n })\r\n\r\n if (persist && window.location.hash) {\r\n const control = parent.querySelector('[href=\"' + window.location.hash + '\"]');\r\n if (control) control.dispatchEvent(new Event('click'));\r\n }\r\n}\r\n\r\nfunction controlClick(controls, contents, persist) {\r\n return (event) => {\r\n const control = event.currentTarget;\r\n const content = contents.find(x => x.id === control.getAttribute('href').replace('#', ''));\r\n \r\n if (!content) {\r\n return true;\r\n };\r\n\r\n event.preventDefault();\r\n \r\n if (persist) {\r\n history.pushState(null, null, control.getAttribute('href'));\r\n }\r\n\r\n controls.forEach(c => c.classList.toggle('c-tabs__control--active', c === control));\r\n contents.forEach(c => {\r\n const isCurrent = c === content;\r\n c.classList.toggle('c-tab--active', isCurrent);\r\n \r\n if (persist) return;\r\n\r\n if (isCurrent) {\r\n c.setAttribute('tabIndex', -1);\r\n \r\n const y = window.scrollY;\r\n c.focus();\r\n window.scrollTo({ behavior: \"auto\", top: y })\r\n } else {\r\n c.removeAttribute('tabIndex');\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Tabs;\r\n","import Accordion from './imports/accordion';\r\nimport Carousel from './imports/carousel';\r\nimport ClearForm from './imports/clear-form';\r\nimport Combobox from './imports/combobox';\r\nimport Comparison from './imports/comparison';\r\nimport Gallery from './imports/gallery';\r\nimport HeroPattern from './imports/hero-pattern';\r\nimport HeroVideo from './imports/hero-video';\r\nimport OffCanvas from './imports/off-canvas';\r\nimport ResponsiveTable from './imports/responsive-table';\r\nimport ScrollbarWidth from './imports/scrollbar-width';\r\nimport ScrollSpy from './imports/scroll-spy';\r\nimport Tabs from './imports/tabs';\r\n\r\n(() => {\r\n if(window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = Array.prototype.forEach;\r\n }\r\n if(window.HTMLCollection && !HTMLCollection.prototype.forEach) {\r\n HTMLCollection.prototype.forEach = Array.prototype.forEach;\r\n }\r\n \r\n Accordion();\r\n Carousel();\r\n ClearForm();\r\n Combobox();\r\n Comparison();\r\n Gallery();\r\n HeroPattern();\r\n HeroVideo();\r\n OffCanvas();\r\n ResponsiveTable();\r\n ScrollbarWidth();\r\n ScrollSpy();\r\n Tabs();\r\n})();"],"names":["$c274619fa9ae66ac$var$setupAccordions","title","addEventListener","event","currentTarget","parentElement","classList","toggle","$c274619fa9ae66ac$export$2e2bcd8739ae039","Array","from","document","querySelectorAll","forEach","$5bdce36a18199573$export$2e2bcd8739ae039","current","bgSlides","fgSlides","length","setInterval","bgSlide","style","opacity","fgSlide","$2b04c6f63ef290fb$export$2e2bcd8739ae039","formClear","getElementById","this","closest","elements","field","value","type","toLowerCase","checked","$aa83c1ae3cb5b048$export$2e2bcd8739ae039","combobox","input","querySelector","select","options","setAttribute","id","inputValue","option","textContent","includes","display","target","getAttribute","selectedOption","focus","$7fbc59e2fab6d5d2$var$extractMobileComparison","container","body","head","mobile","products","children","filter","x","i","map","info","innerHTML","table","row","contains","push","cells","firstCell","shift","el","index","key","product","parent","createElement","join","$7fbc59e2fab6d5d2$var$createMobileProduct","appendChild","$7fbc59e2fab6d5d2$export$2e2bcd8739ae039","$dfe0031b837edf6f$export$2e2bcd8739ae039","mainSlides","thumbnailSlides","lightboxTrigger","lightbox","cloneNode","remove","add","slide","slideImg","srcset","removeAttribute","insertAdjacentHTML","lightboxActive","prevImage","parseInt","dataset","nextImage","e","thumbnailSlide","thumbnail","parentNode","mainSlide","$41a3994d4318effb$export$b568019c0551f0a4","y","a","min","max","Math","$41a3994d4318effb$export$7d15b64cf5a3a4c4","$2e27ca8f14f20195$export$2e2bcd8739ae039","time","c","ctx","getContext","reduceMotion","window","matchMedia","matches","crossGap","crossSpeed","width","height","across","down","totalPoints","crosses","onResize","scrollWidth","scrollHeight","canvas","ceil","ids","array","arr","j","floor","random","$41a3994d4318effb$export$448332262467e042","_","counter","direction","draw","clearRect","beginPath","cnt","lineTo","cos","lineWidth","strokeStyle","stroke","cross","x1","y1","x2","y2","$41a3994d4318effb$export$3a89f8d6f6bf6c9f","moveTo","requestAnimationFrame","$63fd9338c6a56d33$export$2e2bcd8739ae039","videoBackground","reducedMotion","lightboxContainer","lightboxVideo","checkVideos","paused","play","pause","$34e92b90f028a0e5$var$isVisible","element","rect","getBoundingClientRect","getComputedStyle","top","left","bottom","innerHeight","documentElement","clientHeight","right","innerWidth","clientWidth","visibility","$34e92b90f028a0e5$var$handleOffCanvas","isVisible","targetHeader","targetMain","targetFooter","targetHeaderContent","outerHTML","targetMainContent","targetFooterContent","$34e92b90f028a0e5$var$createOffCanvas","targetBackdrop","targetContent","firstChild","insertBefore","removeChild","targetClose","$34e92b90f028a0e5$var$removeOffCanvas","$34e92b90f028a0e5$var$closeOffCanvas","overflowY","$34e92b90f028a0e5$var$handleBackdropClick","$34e92b90f028a0e5$var$handleKeyDown","activeOffCanvas","$34e92b90f028a0e5$var$handleCloseClick","$34e92b90f028a0e5$export$2e2bcd8739ae039","toggles","offCanvasBackdrop","offCanvasCloseElements","offCanvasClose","once","allOffCanvasElementsExceptCurrent","offCanvas","$34e92b90f028a0e5$var$openOffCanvas","$34e92b90f028a0e5$var$toggleOffCanvas","headers","breakPoint","Number","header","$e3dc92a106d80d6c$var$setScrollbarWidth","setProperty","$e3dc92a106d80d6c$export$2e2bcd8739ae039","func","limit","wait","setTimeout","$41a3994d4318effb$export$61fc7d43ac8f84b0","$9d1dec2ad218c628$var$setup","anchors","observer","IntersectionObserver","results","firstObservation","find","isIntersecting","$9d1dec2ad218c628$var$observation","anchor","replace","observe","$1d2dabc452d8efd6$var$setupTabs","controls","content","persist","control","contents","preventDefault","history","pushState","isCurrent","scrollY","scrollTo","behavior","$1d2dabc452d8efd6$var$controlClick","location","hash","dispatchEvent","Event","$1d2dabc452d8efd6$export$2e2bcd8739ae039","NodeList","prototype","HTMLCollection","$384feef4bde84172$export$2e2bcd8739ae039","$9d1dec2ad218c628$export$2e2bcd8739ae039"],"version":3,"file":"app.js.map"}
1
+ {"mappings":"MAKA,SAASA,EAAgBC,GACrBA,EAAMC,iBAAiB,SAIfC,IACOA,EAAMC,cAAcC,cAC1BC,UAAUC,OAAO,kCAI9BC,EAhBA,WACuBC,MAAMC,KAAKC,SAASC,iBAAiB,wBAC7CC,QAAQb,QCmBvBc,EArBA,WACE,IAAIC,EAAU,EACd,MAAMC,EAAWL,SAASC,iBAAiB,qBACrCK,EAAWN,SAASC,iBAAiB,qBAExCK,EAASC,OAAS,GACnBC,aAAY,KACV,IAAK,IAAIC,KAAWJ,EAClBI,EAAQC,MAAMC,QAAU,EAK1B,IAAK,IAAIC,KAHTR,EAAWA,GAAWC,EAASE,OAAS,EAAKH,EAAU,EAAI,EAC3DC,EAASD,GAASM,MAAMC,QAAU,EAEdL,GAClBM,EAAQF,MAAMC,QAAU,EAE1BL,EAASF,GAASM,MAAMC,QAAU,IACjC,UCSPE,EA1BA,WACE,MAAMC,EAAYd,SAASe,eAAe,aACtCD,GACFA,EAAUvB,iBAAiB,SAAS,WACnByB,KAAKC,QAAQ,QAAQC,SAC7BhB,SAAQiB,IACb,GAAmB,IAAfA,EAAMC,MAAa,CACrB,GAC8B,QAA5BD,EAAME,KAAKC,eACiB,SAA5BH,EAAME,KAAKC,eACiB,OAA5BH,EAAME,KAAKC,eACiB,cAA5BH,EAAME,KAAKC,eACiB,YAA5BH,EAAME,KAAKC,cAGX,YADAH,EAAMC,MAAQ,IAET,GAAgC,YAA5BD,EAAME,KAAKC,cAEpB,YADAH,EAAMI,SAAU,eCgD5BC,EAjEA,WACqB1B,MAAMC,KAAKC,SAASC,iBAAiB,gBAE7CC,SAAQ,SAAUuB,GAC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,OAAO0I,SAASC,KAAO,MACpEX,GAASA,EAAQY,cAAc,IAAIC,MAAM,eAuCjDC,EAzDA,WACehQ,MAAMC,KAAKC,SAASC,iBAAiB,oBAC7CC,QAAQ0O,ICaV5H,OAAO+I,WAAaA,SAASC,UAAU9P,UACxC6P,SAASC,UAAU9P,QAAUJ,MAAMkQ,UAAU9P,SAE5C8G,OAAOiJ,iBAAmBA,eAAeD,UAAU9P,UACpD+P,eAAeD,UAAU9P,QAAUJ,MAAMkQ,UAAU9P,SAGrDL,IACAM,IACAU,IACAW,IACA8C,IACAC,IACAmC,IACAiD,IACA+C,IACAwD,IACAxC,IACAyC,IACAL","sources":["src/assets/js/imports/accordion.js","src/assets/js/imports/carousel.js","src/assets/js/imports/clear-form.js","src/assets/js/imports/combobox.js","src/assets/js/imports/comparison.js","src/assets/js/imports/gallery.js","src/assets/js/imports/utilities.js","src/assets/js/imports/hero-pattern.js","src/assets/js/imports/hero-video.js","src/assets/js/imports/off-canvas.js","src/assets/js/imports/responsive-table.js","src/assets/js/imports/scrollbar-width.js","src/assets/js/imports/scroll-spy.js","src/assets/js/imports/tabs.js","src/assets/js/app.js"],"sourcesContent":["function Accordion() {\r\n const accordions = Array.from(document.querySelectorAll('.c-accordion__title'));\r\n accordions.forEach(setupAccordions);\r\n}\r\n\r\nfunction setupAccordions(title) {\r\n title.addEventListener('click', titleClick())\r\n}\r\n\r\nfunction titleClick() {\r\n return (event) => {\r\n var item = event.currentTarget.parentElement;\r\n item.classList.toggle('c-accordion__item--open');\r\n }\r\n}\r\n\r\nexport default Accordion;\r\n","function Carousel() {\r\n let current = 0;\r\n const bgSlides = document.querySelectorAll('.c-hero__image-bg');\r\n const fgSlides = document.querySelectorAll('.c-hero__image-fg');\r\n\r\n if(fgSlides.length > 0) {\r\n setInterval(() => {\r\n for (var bgSlide of bgSlides) {\r\n bgSlide.style.opacity = 0;\r\n }\r\n current = (current != bgSlides.length - 1) ? current + 1 : 0;\r\n bgSlides[current].style.opacity = 1;\r\n \r\n for (var fgSlide of fgSlides) {\r\n fgSlide.style.opacity = 0;\r\n }\r\n fgSlides[current].style.opacity = 1;\r\n }, 5000);\r\n }\r\n}\r\n\r\nexport default Carousel;","function ClearForm() {\r\n const formClear = document.getElementById('clearForm');\r\n if (formClear) {\r\n formClear.addEventListener('click', function () {\r\n const fields = this.closest('form').elements;\r\n fields.forEach(field => {\r\n if (field.value != '') {\r\n if (\r\n field.type.toLowerCase() == 'text' || \r\n field.type.toLowerCase() == 'email' || \r\n field.type.toLowerCase() == 'tel' || \r\n field.type.toLowerCase() == 'select-one' || \r\n field.type.toLowerCase() == 'textarea'\r\n ) {\r\n field.value = '';\r\n return;\r\n } else if (field.type.toLowerCase() == 'checkbox') {\r\n field.checked = false;\r\n return;\r\n }\r\n }\r\n });\r\n });\r\n };\r\n}\r\n\r\nexport default ClearForm;","function Combobox() {\r\n const comboboxes = Array.from(document.querySelectorAll('.c-combobox'));\r\n\r\n comboboxes.forEach(function (combobox) {\r\n const input = combobox.querySelector('.c-combobox__input');\r\n const select = combobox.querySelector('.c-combobox__select');\r\n const options = Array.from(select.querySelectorAll('li[role=\"option\"]'));\r\n\r\n // Set initial state\r\n input.setAttribute('aria-expanded', 'false');\r\n input.setAttribute('aria-owns', select.id);\r\n input.setAttribute('aria-controls', select.id);\r\n\r\n // Event listeners\r\n input.addEventListener('focus', function () {\r\n input.setAttribute('aria-expanded', 'true');\r\n select.setAttribute('aria-expanded', 'true');\r\n });\r\n\r\n input.addEventListener('blur', function () {\r\n input.setAttribute('aria-expanded', 'false');\r\n select.setAttribute('aria-expanded', 'false');\r\n });\r\n\r\n input.addEventListener('input', function () {\r\n const inputValue = input.value.toLowerCase();\r\n\r\n options.forEach(function (option) {\r\n const optionText = option.textContent.toLowerCase();\r\n\r\n if (optionText.includes(inputValue)) {\r\n option.style.display = '';\r\n option.setAttribute('aria-hidden', 'false');\r\n } else {\r\n option.style.display = 'none';\r\n option.setAttribute('aria-hidden', 'true');\r\n }\r\n });\r\n });\r\n\r\n select.addEventListener('click', function (event) {\r\n const target = event.target;\r\n const isOption = target.getAttribute('role') === 'option';\r\n\r\n if (isOption) {\r\n const selectedOption = select.querySelector('[aria-selected=\"true\"]');\r\n if (selectedOption) {\r\n selectedOption.setAttribute('aria-selected', 'false');\r\n }\r\n\r\n target.setAttribute('aria-selected', 'true');\r\n input.value = target.textContent;\r\n\r\n input.focus();\r\n }\r\n });\r\n\r\n // Display options initially\r\n options.forEach(function (option) {\r\n option.style.display = '';\r\n option.setAttribute('aria-hidden', 'false');\r\n });\r\n });\r\n}\r\n\r\nexport default Combobox;\r\n","function Comparison() {\r\n document.querySelectorAll('.c-comparison').forEach(extractMobileComparison)\r\n}\r\n\r\nfunction extractMobileComparison(container) {\r\n const body = container.querySelector('.c-table tbody');\r\n const head = container.querySelector('.c-table thead');\r\n const mobile = container.querySelector('.c-comparison__mobile');\r\n\r\n if (!body || !head || !mobile) return;\r\n\r\n // Remove empty corner piece\r\n const products = Array.from(head.children[0].children)\r\n .filter((x, i) => i)\r\n .map(x => ({ info: x.innerHTML, table: [] }));\r\n\r\n Array.from(body.children).forEach(row => {\r\n // For table row headers, push to all products\r\n if (row.classList.contains('c-table__title')) {\r\n products.forEach(x => {\r\n x.table.push({ type: 'title', title: row.children[0].textContent })\r\n })\r\n } else {\r\n // For all others, loop the cells and push to their appropriate parent\r\n const cells = Array.from(row.children);\r\n const firstCell = cells.shift();\r\n\r\n cells.forEach((el, index) => {\r\n products[index].table.push({\r\n type: 'row',\r\n key: firstCell.textContent,\r\n value: el.innerHTML\r\n })\r\n })\r\n }\r\n })\r\n\r\n products.forEach(product => {\r\n const el = createMobileProduct(product);\r\n mobile.appendChild(el)\r\n })\r\n}\r\n\r\nfunction createMobileProduct(product) {\r\n const parent = document.createElement('article');\r\n parent.innerHTML = `<div class=\"c-comparison__content\">\r\n ${product.info}\r\n </div>\r\n <table class=\"c-table\">\r\n ${product.table.map(x => {\r\n if (x.type === 'title') {\r\n return `<tr class=\"c-table__title\"><th colspan=\"2\">${x.title}</th></tr>`;\r\n } else {\r\n return `<tr>\r\n <td>${x.key}</td>\r\n <td>${x.value}</td>\r\n </tr>`;\r\n }\r\n }).join('')}\r\n </table>`;\r\n\r\n return parent;\r\n}\r\n\r\nexport default Comparison;\r\n","function Gallery() {\r\n const mainSlides = document.querySelectorAll('.c-gallery__main .c-gallery__slide');\r\n const thumbnailSlides = document.querySelectorAll('.c-gallery__thumbnails .c-gallery__slide');\r\n\r\n thumbnailSlides.forEach(thumbnailSlide => thumbnailSlide.addEventListener('click', function(e) {\r\n thumbnailSlides.forEach(function(thumbnail) {\r\n if(thumbnail != e.target.parentNode) {\r\n thumbnail.classList.remove('active');\r\n }\r\n });\r\n e.target.parentNode.classList.add('active');\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(mainSlide.dataset.slide == thumbnailSlide.dataset.slide) {\r\n mainSlide.classList.add('active');\r\n } else {\r\n mainSlide.classList.remove('active');\r\n }\r\n });\r\n }));\r\n\r\n mainSlides.forEach(function(mainSlide) {\r\n if(!mainSlide.classList.contains('c-gallery__video')) {\r\n mainSlide.addEventListener('click', lightboxTrigger);\r\n }\r\n });\r\n\r\n function lightboxTrigger() {\r\n const lightbox = document.querySelector('.c-gallery__main').cloneNode(true);\r\n lightbox.classList.remove('c-gallery__main');\r\n lightbox.classList.add('c-lightbox');\r\n lightbox.querySelectorAll('.c-gallery__slide').forEach(function(slide) {\r\n if(slide.classList.contains('c-gallery__video')) {\r\n slide.remove();\r\n }\r\n if(!slide.classList.contains('c-gallery__video')) {\r\n var slideImg = slide.querySelector('img');\r\n if(slideImg.srcset != '') {\r\n slideImg.removeAttribute('srcset');\r\n }\r\n var slideImgSrc = slideImg.getAttribute('src');\r\n if (slideImgSrc) {\r\n if (slideImgSrc.indexOf('?') !== -1) {\r\n slideImg.setAttribute('src', slideImgSrc.split(\"?\")[0] + '?quality=90&width=2176');\r\n } else {\r\n slideImg.setAttribute('src', slideImgSrc + '?quality=90&width=2176');\r\n }\r\n } else {\r\n console.log(slideImg);\r\n console.log('has no src defined...');\r\n }\r\n }\r\n slide.classList.add('c-lightbox__slide');\r\n slide.classList.remove('c-gallery__slide');\r\n });\r\n document.body.appendChild(lightbox);\r\n lightbox.insertAdjacentHTML('beforeend', '<a class=\"c-lightbox__prev\"></a><a class=\"c-lightbox__next\"></a>');\r\n\r\n lightbox.querySelector('.c-lightbox__prev').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const prevImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) - 1) + '\"]');\r\n if(prevImage != null) {\r\n lightboxActive.classList.remove('active');\r\n prevImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.querySelector('.c-lightbox__next').addEventListener('click', function() {\r\n const lightboxActive = lightbox.querySelector('.active');\r\n const nextImage = lightbox.querySelector('[data-slide=\"' + (parseInt(lightboxActive.dataset.slide) + 1) + '\"]');\r\n if(nextImage != null) {\r\n lightboxActive.classList.remove('active');\r\n nextImage.classList.add('active');\r\n }\r\n });\r\n\r\n lightbox.addEventListener('click', function(e) {\r\n if (e.target !== e.currentTarget) {\r\n return;\r\n } else {\r\n lightbox.remove();\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Gallery;\r\n","export function shuffle(array) {\r\n const arr = [...array];\r\n for (let i = arr.length - 1; i > 0; i--) {\r\n let j = Math.floor(Math.random() * (i + 1));\r\n [arr[i], arr[j]] = [arr[j], arr[i]];\r\n }\r\n\r\n return arr;\r\n}\r\n\r\nexport function userPrefersReducedMotion() {\r\n const QUERY = '(prefers-reduced-motion: no-preference)';\r\n const mediaQueryList = window.matchMedia(QUERY);\r\n const prefersReducedMotion = !mediaQueryList.matches;\r\n return prefersReducedMotion;\r\n}\r\n\r\nexport const debounce = (func, limit) => {\r\n let wait = false; \r\n return () => {\r\n if (wait) return;\r\n func();\r\n wait = true;\r\n setTimeout(() => wait = false, limit);\r\n }\r\n}\r\n\r\nexport const lerp = (x, y, a) => x * (1 - a) + y * a;\r\nexport const clamp = (a, min = 0, max = 1) => Math.min(max, Math.max(min, a));\r\nexport const invlerp = (x, y, a) => clamp((a - x) / (y - x));\r\nexport const range = (x1, y1, x2, y2, a) => lerp(x2, y2, invlerp(x1, y1, a));\r\n","import { range, shuffle, userPrefersReducedMotion } from './utilities';\r\n\r\nfunction HeroPattern() {\r\n let time = 0;\r\n\r\n const c = document.querySelector('.c-hero__canvas');\r\n if (!c) return;\r\n const ctx = c.getContext(\"2d\");\r\n \r\n const sineColour = \"rgb(19,170,19)\";\r\n const reduceMotion = userPrefersReducedMotion();\r\n\r\n const crossGap = 147;\r\n const minimumOpacity = 0;\r\n const maximumOpacity = 0.5;\r\n const crossSpeed = 0.25;\r\n\r\n let width;\r\n let height;\r\n let across;\r\n let down;\r\n let crosses = [];\r\n let totalPoints;\r\n\r\n function draw() {\r\n // Sine wave\r\n time = time + 0.005;\r\n \r\n ctx.clearRect(0, 0, c.width, c.height);\r\n ctx.beginPath();\r\n \r\n for(let cnt = c.width; cnt > 0; cnt--) {\r\n ctx.lineTo(cnt, c.height * 0.5 - (Math.cos(time + cnt / 5 * 0.03) * (height * 0.3) ));\r\n }\r\n \r\n ctx.lineWidth = 0.5;\r\n ctx.strokeStyle = sineColour;\r\n ctx.stroke();\r\n \r\n // Crosses\r\n crosses.forEach(cross => {\r\n drawCross(cross.x, cross.y, range(0, crosses.length, minimumOpacity, maximumOpacity, cross.counter));\r\n \r\n cross.counter += cross.direction;\r\n if (cross.counter >= crosses.length) cross.direction = -1 * crossSpeed;\r\n if (cross.counter < 0) cross.direction = crossSpeed;\r\n })\r\n \r\n if (!reduceMotion) {\r\n window.requestAnimationFrame(draw);\r\n }\r\n }\r\n \r\n function onResize() {\r\n width = c.scrollWidth;\r\n height = c.scrollHeight;\r\n \r\n ctx.canvas.width = width;\r\n ctx.canvas.height = height;\r\n \r\n across = Math.ceil(width / crossGap);\r\n down = Math.ceil(height / crossGap);\r\n \r\n totalPoints = (across + 1) * (down + 1);\r\n const ids = shuffle(Array.from({ length: totalPoints }, (_, i) => (i)))\r\n crosses = [];\r\n for(let x = 0; x <= across; x++) {\r\n for(let y = 0; y <= down; y++) {\r\n crosses.push({\r\n counter: ids.shift(),\r\n direction: Math.random() > 0.5 ? crossSpeed : -1 * crossSpeed,\r\n x: crossGap * (x + 1) - crossGap / 1,\r\n y: crossGap * (y + 1) - crossGap / 2\r\n });\r\n }\r\n }\r\n }\r\n \r\n function drawCross(x, y, opacity) {\r\n ctx.beginPath();\r\n ctx.moveTo(x - 14, y);\r\n ctx.lineTo(x + 14, y);\r\n ctx.strokeStyle = `rgba(255, 255, 255, ${opacity}`;\r\n ctx.moveTo(x, y - 14);\r\n ctx.lineTo(x, y + 14);\r\n ctx.stroke();\r\n }\r\n\r\n window.addEventListener('resize', onResize);\r\n onResize();\r\n draw();\r\n}\r\n\r\nexport default HeroPattern;\r\n","function HeroVideo() {\r\n document.addEventListener(\"DOMContentLoaded\", () => {\r\n const videoBackground = document.getElementById('videoBackground');\r\n if(typeof(videoBackground) != 'undefined' && videoBackground != null) {\r\n const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');\r\n if(!reducedMotion || reducedMotion.matches) {\r\n videoBackground.classList.add('u-hidden');\r\n }\r\n \r\n const lightboxTrigger = document.getElementById('playVideo');\r\n const lightboxContainer = document.getElementById('lightboxVideo');\r\n const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');\r\n\r\n lightboxTrigger.addEventListener('click', e => {\r\n videoBackground.pause();\r\n lightboxContainer.classList.remove('u-hidden');\r\n checkVideos();\r\n });\r\n \r\n lightboxContainer.addEventListener('click', (e) => {\r\n if (!e.target.classList.contains('c-lightbox__video')) {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n window.addEventListener('keydown', function(e) {\r\n if (e.key == \"Escape\") {\r\n videoBackground.setAttribute('autoplay','');\r\n lightboxContainer.classList.add('u-hidden');\r\n checkVideos();\r\n }\r\n });\r\n\r\n function checkVideos() {\r\n if(lightboxContainer.classList.contains('u-hidden')) {\r\n if (videoBackground.paused) {\r\n videoBackground.play();\r\n }\r\n if (!lightboxVideo.paused) {\r\n lightboxVideo.pause();\r\n }\r\n } else {\r\n if (!videoBackground.paused) {\r\n videoBackground.pause();\r\n }\r\n }\r\n }\r\n }\r\n });\r\n}\r\n\r\nexport default HeroVideo;","// Function to initialize off-canvas behavior\r\nfunction OffCanvas() {\r\n // Select all elements that trigger off-canvas behavior\r\n const toggles = document.querySelectorAll(\".c-off-canvas__toggle\");\r\n\r\n // Iterate through each toggle element\r\n if (toggles.length) {\r\n toggles.forEach(toggle => {\r\n // Determine initial visibility state and handle click event\r\n handleOffCanvas(toggle, isVisible(toggle));\r\n toggle.addEventListener('click', () => toggleOffCanvas(toggle));\r\n });\r\n\r\n // Add event listener for scroll events to check visibility\r\n // window.addEventListener('scroll', () => {\r\n // toggles.forEach(toggle => {\r\n // handleOffCanvas(toggle, isVisible(toggle));\r\n // });\r\n // });\r\n\r\n // Add event listener for resize events to check visibility\r\n window.addEventListener('resize', () => {\r\n toggles.forEach(toggle => {\r\n handleOffCanvas(toggle, isVisible(toggle));\r\n });\r\n });\r\n }\r\n}\r\n\r\n// Function to check if an element is currently visible on the page\r\nfunction isVisible(element) {\r\n // Check element's position and styles for visibility\r\n const rect = element.getBoundingClientRect();\r\n const style = window.getComputedStyle(element);\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) &&\r\n style.display !== 'none' &&\r\n style.visibility !== 'hidden'\r\n );\r\n}\r\n\r\n// Function to handle off-canvas behavior based on visibility\r\nfunction handleOffCanvas(toggle, isVisible) {\r\n const target = document.getElementById(toggle.getAttribute('data-target'));\r\n if (isVisible === true) {\r\n createOffCanvas(target);\r\n } else {\r\n removeOffCanvas(target);\r\n }\r\n}\r\n\r\n// Function to create off canvas\r\nfunction createOffCanvas(target) {\r\n // Add necessary classes and attributes for off-canvas display\r\n target.classList.add('c-off-canvas');\r\n target.setAttribute('tabindex', '-1');\r\n target.setAttribute('aria-hidden', 'true');\r\n \r\n // Extract specific sections of the off-canvas content\r\n const targetHeader = target.querySelector('[data-off-canvas=\"header\"]');\r\n const targetMain = target.querySelector('[data-off-canvas=\"main\"]');\r\n const targetFooter = target.querySelector('[data-off-canvas=\"footer\"]');\r\n\r\n // Extract content from the sections\r\n const targetHeaderContent = targetHeader !== null ? targetHeader.outerHTML : '';\r\n const targetMainContent = targetMain !== null ? targetMain.outerHTML : '';\r\n const targetFooterContent = targetFooter !== null ? targetFooter.outerHTML : '';\r\n\r\n // Replace the target's content with off-canvas structure\r\n target.innerHTML = `\r\n <div class=\"c-off-canvas__backdrop\" role=\"presentation\"></div>\r\n <div class=\"c-off-canvas__content\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"offCanvasHeader\">\r\n <header id=\"offCanvasHeader\" class=\"c-off-canvas__header\">${targetHeaderContent}</header>\r\n <main class=\"c-off-canvas__main\">${targetMainContent}</main>\r\n <footer class=\"c-off-canvas__footer\">\r\n ${targetFooterContent}\r\n <button class=\"mp c-twi c-twi--left c-off-canvas__close\" data-off-canvas-close=\"true\" onclick=\"return false\">\r\n <span>Cancel</span>\r\n <svg role=\"img\" aria-hidden=\"true\" focusable=\"false\" class=\"mp c-icon c-icon--cross\">\r\n <use xlink:href=\"/static/svg/sprite.svg#cross\"></use>\r\n </svg>\r\n </button>\r\n </footer>\r\n </div>\r\n `;\r\n}\r\n\r\n// Function to remove off-canvas layout\r\nfunction removeOffCanvas(target) {\r\n // Remove classes and attributes for off-canvas display\r\n target.classList.remove('c-off-canvas', 'c-off-canvas--active');\r\n target.removeAttribute('tabindex');\r\n target.removeAttribute('aria-hidden');\r\n\r\n // Remove backdrop element if present\r\n const targetBackdrop = target.querySelector('.c-off-canvas__backdrop');\r\n if (targetBackdrop) {\r\n targetBackdrop.remove();\r\n }\r\n\r\n // Restore original content by removing off-canvas structure\r\n const targetContent = target.querySelector('.c-off-canvas__content');\r\n if (targetContent) {\r\n while (targetContent.firstChild) {\r\n target.insertBefore(targetContent.firstChild, targetContent);\r\n }\r\n target.removeChild(targetContent);\r\n }\r\n\r\n const targetHeader = target.querySelector('.c-off-canvas__header');\r\n if (targetHeader) {\r\n while (targetHeader.firstChild) {\r\n target.insertBefore(targetHeader.firstChild, targetHeader);\r\n }\r\n target.removeChild(targetHeader);\r\n }\r\n\r\n const targetMain = target.querySelector('.c-off-canvas__main');\r\n if (targetMain) {\r\n while (targetMain.firstChild) {\r\n target.insertBefore(targetMain.firstChild, targetMain);\r\n }\r\n target.removeChild(targetMain);\r\n }\r\n\r\n const targetFooter = target.querySelector('.c-off-canvas__footer');\r\n if (targetFooter) {\r\n while (targetFooter.firstChild) {\r\n target.insertBefore(targetFooter.firstChild, targetFooter);\r\n }\r\n target.removeChild(targetFooter);\r\n }\r\n \r\n // Remove close button element if present\r\n const targetClose = target.querySelector('.c-off-canvas__close');\r\n if (targetClose) {\r\n targetClose.remove();\r\n }\r\n}\r\n\r\n// Function to toggle off-canvas visibility\r\nfunction toggleOffCanvas(toggle) {\r\n const target = document.getElementById(toggle.getAttribute('data-target'));\r\n\r\n // Check if the target is already open or closed\r\n if (!target.classList.contains('c-off-canvas--active')) {\r\n openOffCanvas(toggle, target);\r\n } else if (target.classList.contains('c-off-canvas--active')) {\r\n closeOffCanvas(target);\r\n }\r\n}\r\n\r\nfunction openOffCanvas(toggle, target) {\r\n // Add classes and attributes for open off-canvas\r\n toggle.setAttribute('aria-expanded', 'true');\r\n target.classList.add('c-off-canvas--active');\r\n target.setAttribute('aria-hidden', 'false');\r\n\r\n // Add event listener for backdrop clicks\r\n const offCanvasBackdrop = target.querySelector('.c-off-canvas__backdrop');\r\n if(offCanvasBackdrop) {\r\n offCanvasBackdrop.addEventListener('click', handleBackdropClick);\r\n }\r\n\r\n // Add event listener forclose button clicks\r\n const offCanvasCloseElements = target.querySelectorAll('[data-off-canvas-close=\"true\"]');\r\n if (offCanvasCloseElements.length > 0) {\r\n offCanvasCloseElements.forEach((offCanvasClose) => {\r\n offCanvasClose.addEventListener('click', handleCloseClick);\r\n });\r\n }\r\n\r\n // Add event listener for Escape key press\r\n document.addEventListener('keydown', handleKeyDown, { once: true });\r\n\r\n // Adjust body overflow to prevent scrolling\r\n document.body.style.overflowY = 'hidden';\r\n\r\n // Close other open off-canvas elements\r\n const allOffCanvasElementsExceptCurrent = Array.from(document.querySelectorAll('.c-off-canvas')).filter(offCanvas => offCanvas !== target);\r\n if (allOffCanvasElementsExceptCurrent.length > 0) {\r\n allOffCanvasElementsExceptCurrent.forEach((offCanvas) => {\r\n closeOffCanvas(offCanvas);\r\n });\r\n }\r\n}\r\n\r\n// Function to close an off-canvas\r\nfunction closeOffCanvas(target) {\r\n // Remove classes and attributes for open off-canvas\r\n document.querySelector('[data-target=\"' + target.id + '\"').setAttribute('aria-expanded', 'false');\r\n target.classList.remove('c-off-canvas--active');\r\n target.setAttribute('aria-hidden', 'true');\r\n\r\n // Restore body overflow\r\n document.body.style.overflowY = '';\r\n}\r\n\r\n// Function to handle backdrop click\r\nfunction handleBackdropClick() {\r\n const offCanvas = this.closest('.c-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\n// Function to handle Escape key press\r\nfunction handleKeyDown(event) {\r\n if (event.key === 'Escape') {\r\n const activeOffCanvas = document.querySelector('.c-off-canvas--active');\r\n if (activeOffCanvas) {\r\n closeOffCanvas(activeOffCanvas);\r\n }\r\n }\r\n}\r\n\r\n// Function to handle close button click\r\nfunction handleCloseClick() {\r\n const offCanvas = this.closest('.c-off-canvas');\r\n closeOffCanvas(offCanvas);\r\n}\r\n\r\nexport default OffCanvas;","const ResponsiveTable = () => {\r\n const tables = Array.from(document.querySelectorAll('.c-table--responsive'));\r\n tables.forEach(createResponsiveTable);\r\n\r\n /**\r\n * Create responsive table headers for large tables\r\n * @param {HTMLTableElement} table\r\n */\r\n function createResponsiveTable(table) {\r\n const headers = table.querySelectorAll('thead > :first-child th');\r\n const breakPoint = Number(table.getAttribute('data-columns')) || 2\r\n \r\n if (headers.length < breakPoint) {\r\n table.classList.remove('c-table--responsive');\r\n return;\r\n };\r\n\r\n Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {\r\n Array.from(headers)\r\n .map((x) => x.textContent)\r\n .forEach((header, index) => {\r\n if (row.children[index]) {\r\n row.children[index].setAttribute('data-responsive-title', header);\r\n }\r\n });\r\n });\r\n }\r\n};\r\n\r\nexport default ResponsiveTable;\r\n","import { debounce } from './utilities';\r\n\r\nfunction ScrollbarWidth() {\r\n setScrollbarWidth();\r\n window.addEventListener('resize', debounce(setScrollbarWidth, 250));\r\n}\r\n\r\nfunction setScrollbarWidth() {\r\n document.documentElement.style.setProperty(\r\n '--scrollbarWidth', \r\n window.innerWidth - document.body.clientWidth + 'px'\r\n );\r\n}\r\n\r\nexport default ScrollbarWidth;","function ScrollSpy() {\r\n const spies = Array.from(document.querySelectorAll('.c-scroll-spy'));\r\n spies.forEach(setup);\r\n}\r\n\r\nfunction setup(element) {\r\n const anchors = Array.from(element.querySelectorAll('a'));\r\n const observer = new IntersectionObserver(observation(anchors));\r\n \r\n anchors.forEach(anchor => {\r\n const id = anchor.getAttribute('href').replace('#', '');\r\n const target = document.getElementById(id);\r\n if (!target) return;\r\n\r\n observer.observe(target);\r\n });\r\n}\r\n\r\n/**\r\n * @param {Array<HTMLAnchorElement>} results \r\n * @return {Array<IntersectionObserverEntry>}\r\n */\r\nfunction observation(anchors) {\r\n return (results) => {\r\n const firstObservation = results.find(x => x.isIntersecting);\r\n\r\n if (firstObservation) {\r\n anchors.forEach(x => {\r\n x.classList.toggle(\r\n 'c-scroll-spy-active',\r\n x.getAttribute('href') === '#' + firstObservation.target.id\r\n )\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport default ScrollSpy;\r\n","function Tabs() {\r\n const tabs = Array.from(document.querySelectorAll('.c-tabs--anchor'));\r\n tabs.forEach(setupTabs);\r\n}\r\n\r\nfunction setupTabs(parent) {\r\n const controls = Array.from(parent.querySelectorAll('.c-tabs__control'));\r\n const content = Array.from(parent.querySelectorAll('.c-tab'));\r\n const persist = parent.classList.contains('c-tabs--persist');\r\n \r\n if (!controls.length || !content.length) return;\r\n\r\n controls.forEach(control => {\r\n control.addEventListener('click', controlClick(controls, content, persist))\r\n })\r\n\r\n if (persist && window.location.hash) {\r\n const control = parent.querySelector('[href=\"' + window.location.hash + '\"]');\r\n if (control) control.dispatchEvent(new Event('click'));\r\n }\r\n}\r\n\r\nfunction controlClick(controls, contents, persist) {\r\n return (event) => {\r\n const control = event.currentTarget;\r\n const content = contents.find(x => x.id === control.getAttribute('href').replace('#', ''));\r\n \r\n if (!content) {\r\n return true;\r\n };\r\n\r\n event.preventDefault();\r\n \r\n if (persist) {\r\n history.pushState(null, null, control.getAttribute('href'));\r\n }\r\n\r\n controls.forEach(c => c.classList.toggle('c-tabs__control--active', c === control));\r\n contents.forEach(c => {\r\n const isCurrent = c === content;\r\n c.classList.toggle('c-tab--active', isCurrent);\r\n \r\n if (persist) return;\r\n\r\n if (isCurrent) {\r\n c.setAttribute('tabIndex', -1);\r\n \r\n const y = window.scrollY;\r\n c.focus();\r\n window.scrollTo({ behavior: \"auto\", top: y })\r\n } else {\r\n c.removeAttribute('tabIndex');\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default Tabs;\r\n","import Accordion from './imports/accordion';\r\nimport Carousel from './imports/carousel';\r\nimport ClearForm from './imports/clear-form';\r\nimport Combobox from './imports/combobox';\r\nimport Comparison from './imports/comparison';\r\nimport Gallery from './imports/gallery';\r\nimport HeroPattern from './imports/hero-pattern';\r\nimport HeroVideo from './imports/hero-video';\r\nimport OffCanvas from './imports/off-canvas';\r\nimport ResponsiveTable from './imports/responsive-table';\r\nimport ScrollbarWidth from './imports/scrollbar-width';\r\nimport ScrollSpy from './imports/scroll-spy';\r\nimport Tabs from './imports/tabs';\r\n\r\n(() => {\r\n if(window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = Array.prototype.forEach;\r\n }\r\n if(window.HTMLCollection && !HTMLCollection.prototype.forEach) {\r\n HTMLCollection.prototype.forEach = Array.prototype.forEach;\r\n }\r\n \r\n Accordion();\r\n Carousel();\r\n ClearForm();\r\n Combobox();\r\n Comparison();\r\n Gallery();\r\n HeroPattern();\r\n HeroVideo();\r\n OffCanvas();\r\n ResponsiveTable();\r\n ScrollbarWidth();\r\n ScrollSpy();\r\n Tabs();\r\n})();"],"names":["$c274619fa9ae66ac$var$setupAccordions","title","addEventListener","event","currentTarget","parentElement","classList","toggle","$c274619fa9ae66ac$export$2e2bcd8739ae039","Array","from","document","querySelectorAll","forEach","$5bdce36a18199573$export$2e2bcd8739ae039","current","bgSlides","fgSlides","length","setInterval","bgSlide","style","opacity","fgSlide","$2b04c6f63ef290fb$export$2e2bcd8739ae039","formClear","getElementById","this","closest","elements","field","value","type","toLowerCase","checked","$aa83c1ae3cb5b048$export$2e2bcd8739ae039","combobox","input","querySelector","select","options","setAttribute","id","inputValue","option","textContent","includes","display","target","getAttribute","selectedOption","focus","$7fbc59e2fab6d5d2$var$extractMobileComparison","container","body","head","mobile","products","children","filter","x","i","map","info","innerHTML","table","row","contains","push","cells","firstCell","shift","el","index","key","product","parent","createElement","join","$7fbc59e2fab6d5d2$var$createMobileProduct","appendChild","$7fbc59e2fab6d5d2$export$2e2bcd8739ae039","$dfe0031b837edf6f$export$2e2bcd8739ae039","mainSlides","thumbnailSlides","lightboxTrigger","lightbox","cloneNode","remove","add","slide","slideImg","srcset","removeAttribute","slideImgSrc","indexOf","split","console","log","insertAdjacentHTML","lightboxActive","prevImage","parseInt","dataset","nextImage","e","thumbnailSlide","thumbnail","parentNode","mainSlide","$41a3994d4318effb$export$b568019c0551f0a4","y","a","min","max","Math","$41a3994d4318effb$export$7d15b64cf5a3a4c4","$2e27ca8f14f20195$export$2e2bcd8739ae039","time","c","ctx","getContext","reduceMotion","window","matchMedia","matches","crossGap","crossSpeed","width","height","across","down","totalPoints","crosses","onResize","scrollWidth","scrollHeight","canvas","ceil","ids","array","arr","j","floor","random","$41a3994d4318effb$export$448332262467e042","_","counter","direction","draw","clearRect","beginPath","cnt","lineTo","cos","lineWidth","strokeStyle","stroke","cross","x1","y1","x2","y2","$41a3994d4318effb$export$3a89f8d6f6bf6c9f","moveTo","requestAnimationFrame","$63fd9338c6a56d33$export$2e2bcd8739ae039","videoBackground","reducedMotion","lightboxContainer","lightboxVideo","checkVideos","paused","play","pause","$34e92b90f028a0e5$var$isVisible","element","rect","getBoundingClientRect","getComputedStyle","top","left","bottom","innerHeight","documentElement","clientHeight","right","innerWidth","clientWidth","visibility","$34e92b90f028a0e5$var$handleOffCanvas","isVisible","targetHeader","targetMain","targetFooter","targetHeaderContent","outerHTML","targetMainContent","targetFooterContent","$34e92b90f028a0e5$var$createOffCanvas","targetBackdrop","targetContent","firstChild","insertBefore","removeChild","targetClose","$34e92b90f028a0e5$var$removeOffCanvas","$34e92b90f028a0e5$var$closeOffCanvas","overflowY","$34e92b90f028a0e5$var$handleBackdropClick","$34e92b90f028a0e5$var$handleKeyDown","activeOffCanvas","$34e92b90f028a0e5$var$handleCloseClick","$34e92b90f028a0e5$export$2e2bcd8739ae039","toggles","offCanvasBackdrop","offCanvasCloseElements","offCanvasClose","once","allOffCanvasElementsExceptCurrent","offCanvas","$34e92b90f028a0e5$var$openOffCanvas","$34e92b90f028a0e5$var$toggleOffCanvas","headers","breakPoint","Number","header","$e3dc92a106d80d6c$var$setScrollbarWidth","setProperty","$e3dc92a106d80d6c$export$2e2bcd8739ae039","func","limit","wait","setTimeout","$41a3994d4318effb$export$61fc7d43ac8f84b0","$9d1dec2ad218c628$var$setup","anchors","observer","IntersectionObserver","results","firstObservation","find","isIntersecting","$9d1dec2ad218c628$var$observation","anchor","replace","observe","$1d2dabc452d8efd6$var$setupTabs","controls","content","persist","control","contents","preventDefault","history","pushState","isCurrent","scrollY","scrollTo","behavior","$1d2dabc452d8efd6$var$controlClick","location","hash","dispatchEvent","Event","$1d2dabc452d8efd6$export$2e2bcd8739ae039","NodeList","prototype","HTMLCollection","$384feef4bde84172$export$2e2bcd8739ae039","$9d1dec2ad218c628$export$2e2bcd8739ae039"],"version":3,"file":"app.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mp-design-system",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm-run-all --parallel bundle:*",
package/src/_headers CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' polyfill.io; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self' data: p3.aprimocdn.net; font-src 'self' fonts.gstatic.com; frame-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests; block-all-mixed-content; sandbox allow-forms allow-same-origin allow-scripts;
2
+ Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' polyfill.io; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self' data: p3.aprimocdn.net img.youtube.com; font-src 'self' fonts.gstatic.com; frame-src 'self' brand.malvernpanalytical.com www.youtube.com; frame-ancestors 'self' brand.malvernpanalytical.com; object-src 'none'; base-uri 'self'; form-action 'self'; upgrade-insecure-requests; block-all-mixed-content; sandbox allow-forms allow-same-origin allow-scripts;
3
3
  X-Content-Type-Options: nosniff
4
4
  X-Frame-Options: SAMEORIGIN
5
5
  X-XSS-Protection: 1; mode=block
@@ -3,6 +3,7 @@ module.exports = {
3
3
  component: {
4
4
  name: 'accordion'
5
5
  },
6
+ figma: 'https://www.figma.com/file/szD8e7jNeWIfKpt6y41isi/Franklin-design-system?type=design&node-id=6879%3A3616&mode=design&t=vh7UGUcY3zjfbgUR-1',
6
7
  docs: true,
7
8
  context: {
8
9
  items: [
@@ -1,3 +1,5 @@
1
+ - To make an item display in its opened state when the page loads, add the class `c-accordion--item__open`
2
+ - The classnames `o-prose` and `u-flow--prose` on the content are optional
1
3
  ## Blank HTML template
2
4
  ```html
3
5
  <dl class="c-accordion">
@@ -10,6 +12,4 @@
10
12
  <dd class="c-accordion__content o-prose u-flow--prose">Content two</dd>
11
13
  </div>
12
14
  </dl>
13
- ```
14
- - To make an item display in its opened state when the page loads, add the class `c-accordion--item__open`
15
- - The classnames `o-prose` and `u-flow--prose` on the content are optional
15
+ ```
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  {% endfor %}
23
23
  </div>
24
- <button class="mp c-button o-off-canvas__update" data-off-canvas="footer" data-off-canvas-close="true">{{ params.target.button.text }}</button>
24
+ <button class="mp c-button o-off-canvas__update" data-off-canvas="footer" data-off-canvas-close="true" onclick="return false">{{ params.target.button.text }}</button>
25
25
  </div>
26
26
 
27
27
  <button class="{{ classNames }}" data-target="{{ params.target.id }}" aria-controls="{{ params.target.id }}" aria-expanded="false" aria-label="Toggle {{ params.header }}" onclick="return false">{{ params.toggle.text }}</button>
@@ -19,7 +19,7 @@ index: true
19
19
  classes: 'c-library__hero'
20
20
  }) }}
21
21
 
22
- <div class="u-wrap u-flow--l">
22
+ <div class="u-wrap u-flow--l u-pad-right-xl">
23
23
  {{ content | safe }}
24
24
  </div>
25
25
  </div>
@@ -38,6 +38,17 @@ function Gallery() {
38
38
  if(slideImg.srcset != '') {
39
39
  slideImg.removeAttribute('srcset');
40
40
  }
41
+ var slideImgSrc = slideImg.getAttribute('src');
42
+ if (slideImgSrc) {
43
+ if (slideImgSrc.indexOf('?') !== -1) {
44
+ slideImg.setAttribute('src', slideImgSrc.split("?")[0] + '?quality=90&width=2176');
45
+ } else {
46
+ slideImg.setAttribute('src', slideImgSrc + '?quality=90&width=2176');
47
+ }
48
+ } else {
49
+ console.log(slideImg);
50
+ console.log('has no src defined...');
51
+ }
41
52
  }
42
53
  slide.classList.add('c-lightbox__slide');
43
54
  slide.classList.remove('c-gallery__slide');
@@ -77,7 +77,7 @@ function createOffCanvas(target) {
77
77
  <main class="c-off-canvas__main">${targetMainContent}</main>
78
78
  <footer class="c-off-canvas__footer">
79
79
  ${targetFooterContent}
80
- <button class="mp c-twi c-twi--left c-off-canvas__close" data-off-canvas-close="true">
80
+ <button class="mp c-twi c-twi--left c-off-canvas__close" data-off-canvas-close="true" onclick="return false">
81
81
  <span>Cancel</span>
82
82
  <svg role="img" aria-hidden="true" focusable="false" class="mp c-icon c-icon--cross">
83
83
  <use xlink:href="/static/svg/sprite.svg#cross"></use>
@@ -10,7 +10,7 @@ tags: brand
10
10
  {% from "components/twi/macro.njk" import twi %}
11
11
 
12
12
  {% set content %}
13
- ## UI design kit
13
+ ## Figma
14
14
 
15
15
  Franklin is available as a UI design kit in Figma. It contains text and color styles, grids and spacing, icons, and a complete library of components.
16
16
 
package/src/index.njk CHANGED
@@ -11,7 +11,7 @@ renderData:
11
11
  {% from "components/card/macro.njk" import card %}
12
12
  {% from "components/usp/macro.njk" import usp %}
13
13
 
14
- <div class="o-grid o-grid--of-four u-pad-right-xl">
14
+ <div class="o-grid o-grid--of-four">
15
15
  {{ card({
16
16
  theme: {
17
17
  layout: 'single',
@@ -94,6 +94,7 @@ renderData:
94
94
  </div>
95
95
 
96
96
  {% set content %}
97
+
97
98
  ## What is Franklin?
98
99
 
99
100
  Franklin is Malvern Panalytical's **design system** for web-based marketing materials.
@@ -103,6 +104,28 @@ Franklin is Malvern Panalytical's **design system** for web-based marketing mate
103
104
  A set of brand guidelines and a library of HTML/CSS/JS components. Using this system is the quickest and easiest way to ensure your website or web-app is on brand.
104
105
 
105
106
  The [Design Systems Handbook](https://www.designbetter.co/design-systems-handbook) by InVision is a great (free) way to learn more about design systems.
107
+
108
+ ## Are there other design systems in use?
109
+
110
+ There are two other design systems in use at Malvern Panalytical.
111
+
112
+ - [Sencillo](https://confluence.systems.mp/pages/viewpage.action?spaceKey=FA&title=MP+Sencillo+-+Design+System) (pronounced *sehn-see-yoh*) is a design system used in Smart Manager, Agrilytics, and other web-based customer-facing software applications.
113
+ - [Malvern Panalytical User Interface Guidelines](https://malvern.sharepoint.com/sites/o365-sw-ebl/SitePages/User%20Interface%20Guidelines/Malvern-Panalytical-User-Interface-Guidelines.aspx) (also known as the XBL) is the Design System that is used in our desktop software, including the new OmniTrust. At the time of writing, it hasn't been rolled out to all platforms but it should be the go to Design System for any new software that we create for our products. It is also backed up with a reusable framework that provides the styles and controls within a fixed layout base application.
114
+
115
+ ## Where does Franklin come in?
116
+
117
+ <div class="ds-table c-table c-table--responsive">
118
+
119
+ | Design system | [MP User Interface Guidelines (XBL)](https://malvern.sharepoint.com/sites/o365-sw-ebl/SitePages/User%20Interface%20Guidelines/Malvern-Panalytical-User-Interface-Guidelines.aspx) | [MP Sencillo](https://confluence.systems.mp/pages/viewpage.action?spaceKey=FA&title=MP+Sencillo+-+Design+System) | Franklin |
120
+ |---------------|------------------------------------|-------------|----------|
121
+ | Target | Desktop and tablet based software for our products | Web-based apps that are part of the Smart Manager platform | Commercial websites |
122
+ | Goal | A common look and feel with a consistent user experience across all of our product software | Bridge the gap between our desktop software and our web sites, providing a familiar and branded experience | A common look and feel with a consistent user experience across all of our web sites |
123
+ | Framework technologies | .NET C# and WPF/Xaml | .NET Blazor (C#), CSS and HTML | CSS, HTML and JavaScript |
124
+ | Devices | Desktops and tablets | Desktops, tablets and mobiles | Desktops, tablets and mobiles |
125
+ | Target Content Type | Fast changing, short textual elements, data visualisations and high user interactivity | Frequently changing, short textual elements, data visualisations and medium user interactivity | Infrequently changing, blocks of copy, marketing/product photos and low user interactivity |
126
+
127
+ </div>
128
+
106
129
  {% endset %}
107
130
 
108
131
  {% set latest %}
@@ -115,12 +138,37 @@ The [Design Systems Handbook](https://www.designbetter.co/design-systems-handboo
115
138
  - Misc. fixes
116
139
  {% endset %}
117
140
 
141
+ <div class="o-grid o-grid--layout o-grid--8/4">
142
+
118
143
  {{ markdown({
119
144
  content: content
120
145
  }) }}
121
146
 
122
- <div class="c-slat c-slat--crystal u-bg-blue-step-3 u-pad-x-l">
147
+ <div><div class="c-slat c-slat--crystal u-bg-blue-step-3 u-pad-x-l">
123
148
  {{ markdown({
124
149
  content: latest
125
150
  }) }}
126
- </div>
151
+ </div></div>
152
+
153
+ </div>
154
+
155
+ <style>
156
+ .ds-table {
157
+ border-left: 1px solid #ebf1f2;
158
+ }
159
+ .ds-table table th:nth-child(1),
160
+ .ds-table table td:nth-child(1) {
161
+ background-color: #fff;
162
+ border-color: #ebf1f2;
163
+ color: #333;
164
+ }
165
+ .ds-table table th:nth-child(2) {
166
+ background-color: #00a2c2;
167
+ }
168
+ .ds-table table th:nth-child(3) {
169
+ background-color: #005461;
170
+ }
171
+ .ds-table table th:nth-child(4) {
172
+ background-color: #003039;
173
+ }
174
+ </style>