diff --git a/dist/main/main.js b/dist/main/main.js
index ed534f6b..9f3b5fc6 100644
--- a/dist/main/main.js
+++ b/dist/main/main.js
@@ -10,7 +10,7 @@ import{s as u,x as c}from"../__chunks__/lit-element.XkUWx5ik.js";import{n as E,t
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */function B(n,e){return(t,r,s)=>{const o=a=>{var l;return((l=a.renderRoot)==null?void 0:l.querySelector(n))??null};if(e){const{get:a,set:l}=typeof r=="object"?t:s??(()=>{const i=Symbol();return{get(){return this[i]},set(d){this[i]=d}}})();return C(t,r,{get(){let i=a.call(this);return i===void 0&&(i=o(this),(i!==null||this.hasUpdated)&&l.call(this,i)),i}})}return C(t,r,{get(){return o(this)}})}}var b={},L;function M(n){return function(...e){return function(t,r,s){return Object.assign(Object.assign({},s),{value:n(s.value,...e)})}}}Object.defineProperty(b,"__esModule",{value:!0});const N=M(function(n,e=0){let t=-1;const r=function(...s){clearTimeout(t),t=window.setTimeout(()=>{n.call(this,...s)},e)};return r.cancel=function(){clearTimeout(t)},r}),H=M(function(n,e=0){let t,r=[];const s=function(...o){r=o,t===void 0&&(t=window.setTimeout(()=>{t=void 0,n.call(this,...r)},e))};return s.cancel=function(){clearTimeout(t),t=void 0},s});L=b.debounce=N,b.throttle=H;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,O=(n,e,t,r)=>{for(var s=r>1?void 0:r?V(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&U(e,t,s),s};let g=class extends u{constructor(){super(...arguments),this.getSubmenuName=n=>n.path.split("/")[1],this.groupByFirstLevelPath=n=>{const e={};return n.forEach(r=>{const s=this.getSubmenuName(r);e[s]||(e[s]=[]),e[s].push({path:r.path,navtitle:this.getNavTitle(r)})}),Object.values(e).map(r=>r.length===1?r[0]:{navtitle:r[0].path.split("/")[1],path:r[0].path,children:r})}}createRenderRoot(){return this}async firstUpdated(){const n=await this.fetchSitemap();this.items=this.groupByFirstLevelPath(n)}render(){if(this.items)return c``}toggleSubmenu({currentTarget:n}){!(n instanceof HTMLElement)||!n.classList.contains("opener")||n.classList.toggle("active")}renderSubMenu(n){return c`
`}renderMenuItem(n){return c`${n.children!==void 0?this.renderSubMenu(n):c`${n.navtitle}`}`}renderMenuItems(){return c`${this.items.map(n=>this.renderMenuItem(n))}
`}async fetchSitemap(){return(await(await fetch(`${window.hlx.codeBasePath}/query-index.json`)).json()).data}getNavTitle(n){return n.path==="/"?"Homepage":n.navtitle||n.title}};O([h()],g.prototype,"items",2);g=O([p("sidebar-nav")],g);const m=async n=>{const{endpoint:e,getJson:t=!1,init:r}=n,s=e.startsWith("/")?e:`/${e}`,o=await fetch(`${window.hlx.codeBasePath}${s}`,r);return t?await o.json():await o.text()};var k=Object.defineProperty,z=Object.getOwnPropertyDescriptor,T=(n,e,t,r)=>{for(var s=r>1?void 0:r?z(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&k(e,t,s),s};let y=class extends u{createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchContactData()}async fetchContactData(){const n=await m({endpoint:"contact.plain.html"}),e=document.createElement("div");e.innerHTML=n,this.contactTemplateArgs={headline:e.querySelector("h2"),text:e.querySelector("p"),contacts:Array.from(e.querySelectorAll(".contact > div:not(:first-child)")).map(t=>{var r,s;return{contactIcon:(r=t.querySelector("div"))==null?void 0:r.innerText,contactMarkup:(s=t.querySelector("div:last-child"))==null?void 0:s.innerHTML}})}}render(){const{headline:n,text:e,contacts:t}=this.contactTemplateArgs;return c``}};T([h()],y.prototype,"contactTemplateArgs",2);y=T([p("sidebar-contact")],y);var F=Object.defineProperty,J=Object.getOwnPropertyDescriptor,D=(n,e,t,r)=>{for(var s=r>1?void 0:r?J(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&F(e,t,s),s};let w=class extends u{async connectedCallback(){super.connectedCallback();const n=await this.fetchSitemap(),e=this.getPosts(n);this.lastTreePosts=this.getLastThreePosts(e)}render(){if(this.lastTreePosts)return c`${this.lastTreePosts.map(n=>this.renderPost(n))}
`}createRenderRoot(){return this}getLastThreePosts(n){return n.sort((e,t)=>e.lastModified>t.lastModified?-1:e.lastModified${I({src:n.image,alt:n.imageAlt})}${n.description}
`}getPosts(n){return n.filter(e=>e.path.includes("/posts"))}};D([h()],w.prototype,"lastTreePosts",2);w=D([p("sidebar-posts")],w);var K=Object.defineProperty,W=Object.getOwnPropertyDescriptor,x=(n,e,t,r)=>{for(var s=r>1?void 0:r?W(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&K(e,t,s),s};let S=class extends u{createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchFooterData()}async fetchFooterData(){var t;const n=await m({endpoint:"footer.plain.html"}),e=document.createElement("div");e.innerHTML=n,this.footerMarkup=e.querySelector("p"),(t=this.footerMarkup)==null||t.classList.add("copyright")}render(){if(this.footerMarkup)return c`${this.footerMarkup}`}};x([h()],S.prototype,"footerMarkup",2);S=x([p("sidebar-footer")],S);var G=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,_=(n,e,t,r)=>{for(var s=r>1?void 0:r?Q(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&G(e,t,s),s};let f=class extends u{constructor(){super(...arguments),this.handleToggleClick=n=>{n.preventDefault(),this.classList.toggle("inactive")}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setInitialVisibility(),window.addEventListener("resize",this.setInitialVisibility.bind(this))}setInitialVisibility(){window.innerWidth<=1280?this.classList.add("inactive"):this.classList.remove("inactive")}firstUpdated(){this.toggle.addEventListener("click",this.handleToggleClick)}render(){return c`
`}};_([B(".toggle")],f.prototype,"toggle",2);_([L(100)],f.prototype,"setInitialVisibility",1);f=_([p("sidebar-component")],f);var X=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,q=(n,e,t,r)=>{for(var s=r>1?void 0:r?Y(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&X(e,t,s),s};let $=class extends u{createRenderRoot(){return this}async firstUpdated(n){await this.fetchHeaderData()}async fetchHeaderData(){try{const n=await m({endpoint:"header.json",getJson:!0});this.headerData={leftCol:n.leftCol.data[0],rightCol:n.rightCol.data}}catch(n){console.error("HeaderComponent: ",n)}}render(){if(!this.headerData)return;const{leftCol:n,rightCol:e}=this.headerData;return c`${n.logoText}`}};q([h()],$.prototype,"headerData",2);$=q([p("header-component")],$);function v(n){return typeof n=="string"?n.toLowerCase().replace(/[^0-9a-z]/gi,"-").replace(/-+/g,"-").replace(/^-|-$/g,""):""}class Z{readBlockConfig(e){const t={};return e.querySelectorAll(":scope > div").forEach(r=>{if(r.children){const s=[...r.children];if(s[1]){const o=s[1],a=v(s[0].textContent??"");let l="";if(o.querySelector("a")){const i=[...o.querySelectorAll("a")];i.length===1?l=i[0].href:l=i.map(d=>d.href)}else if(o.querySelector("img")){const i=[...o.querySelectorAll("img")];i.length===1?l=i[0].src:l=i.map(d=>d.src)}else if(o.querySelector("p")){const i=[...o.querySelectorAll("p")];i.length===1?l=i[0].textContent:l=i.map(d=>d.textContent)}else l=r.children[1].textContent;t[a]=l}}}),t}decorateBlocks(e){e.querySelectorAll("div.section > div > div").forEach(this.decorateBlock)}decorateBlock(e){const t=e.classList[0];if(t){e.classList.add("block"),e.dataset.blockName=t;const r=e.parentElement;r==null||r.classList.add(`${t}-wrapper`);const s=e.closest(".section");s&&s.classList.add(`${t}-container`)}}}function ee(n){return v(n).replace(/-([a-z])/g,e=>e[1].toUpperCase())}class te{constructor(e){this.blockService=e}init(e){this.transformSection(e)}transformSection(e){e.querySelectorAll(":scope > div").forEach(t=>{this.adjustMarkup(t),this.processSectionMetaData(t)})}processSectionMetaData(e){const t=e.querySelector("div.section-metadata");if(t){const r=this.blockService.readBlockConfig(t);Object.keys(r).forEach(s=>{s==="style"?r.style.split(",").filter(a=>a).map(a=>v(a.trim())).forEach(a=>e.classList.add(a)):e.dataset[ee(s)]=r[s]}),t.parentElement&&t.parentElement.remove()}}adjustMarkup(e){const t=[];let r=!1;[...e.children].forEach(s=>{if(s.tagName==="DIV"||!r){const o=document.createElement("div");t.push(o),r=s.tagName!=="DIV",r&&o.classList.add("default-content-wrapper")}t[t.length-1].append(s)}),t.forEach(s=>e.append(s)),this.decorateImages(),e.classList.add("section"),e.dataset.sectionStatus="initialized",e.style.display="none"}decorateImages(){document.querySelectorAll(".default-content-wrapper picture").forEach(t=>{const r=t.parentElement;r&&r.classList.add("image","main")})}}const P=(n,e)=>{e.split(",").forEach(t=>{n.classList.add(v(t.trim()))})};function j(n,e=document){const t=n&&n.includes(":")?"property":"name",s=[...e.head.querySelectorAll(`meta[${t}="${n}"]`)].map(o=>o.content).join(", ");return s.length?s:""}class ne{constructor(e,t){this.sectionService=e,this.blockService=t,this.init=async()=>{this.setup(),await this.loadEager()},this.loadEager=async()=>{if(document.documentElement.lang="en",this.decorateTemplateAndTheme(),document){const s=document.querySelector("body");s&&(s.style.display="none")}const r=document.querySelector("main");r&&(r.setAttribute("id","main"),this.addSidebarContainer(r),this.sectionService.init(r),this.addInnerContainer(r),this.blockService.decorateBlocks(r),await this.loadComponents(),setTimeout(()=>{document.body.removeAttribute("style")},0))},this.loadComponents=async()=>{document.querySelectorAll(".section").forEach(async s=>{const o=this.collectComponents(s);if(!o.length){this.showSection(s);return}await this.loadComponentModules(o),this.showSection(s)})}}setup(){window.hlx=window.hlx||{},window.hlx.RUM_MASK_URL="full",window.hlx.codeBasePath="",window.hlx.lighthouse=new URLSearchParams(window.location.search).get("lighthouse")==="on";const e=document.querySelector('script[src$="/scripts/scripts.js"]');if(e)try{[window.hlx.codeBasePath]=new URL(e.src).pathname.split("/scripts/scripts.js")}catch(t){console.log(t)}}addSidebarContainer(e){const t=document.createElement("sidebar-component");t.setAttribute("id","sidebar"),e.after(t)}addInnerContainer(e){const t=e.innerHTML;e.innerHTML=`${t}
`}decorateTemplateAndTheme(){const e=j("template");e&&P(document.body,e);const t=j("theme");t&&P(document.body,t)}collectComponents(e){const t=[];return e.querySelectorAll("[data-block-name]").forEach(s=>{s.style.display="none",t.push({name:s.dataset.blockName,element:s})}),t}async loadComponentModules(e){for(const t of e){const r=await A(()=>import(`${window.hlx.codeBasePath}/dist/${t.name}/${t.name}.js`),__vite__mapDeps([]));r.default&&await r.default(t.element)}}showSection(e){e.style.removeProperty("display")}}(async function(){const n=new Z,e=new te(n);await new ne(e,n).init()})();
+ */function B(n,e){return(t,r,s)=>{const o=a=>{var l;return((l=a.renderRoot)==null?void 0:l.querySelector(n))??null};if(e){const{get:a,set:l}=typeof r=="object"?t:s??(()=>{const i=Symbol();return{get(){return this[i]},set(d){this[i]=d}}})();return C(t,r,{get(){let i=a.call(this);return i===void 0&&(i=o(this),(i!==null||this.hasUpdated)&&l.call(this,i)),i}})}return C(t,r,{get(){return o(this)}})}}var b={},j;function M(n){return function(...e){return function(t,r,s){return Object.assign(Object.assign({},s),{value:n(s.value,...e)})}}}Object.defineProperty(b,"__esModule",{value:!0});const N=M(function(n,e=0){let t=-1;const r=function(...s){clearTimeout(t),t=window.setTimeout(()=>{n.call(this,...s)},e)};return r.cancel=function(){clearTimeout(t)},r}),H=M(function(n,e=0){let t,r=[];const s=function(...o){r=o,t===void 0&&(t=window.setTimeout(()=>{t=void 0,n.call(this,...r)},e))};return s.cancel=function(){clearTimeout(t),t=void 0},s});j=b.debounce=N,b.throttle=H;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,O=(n,e,t,r)=>{for(var s=r>1?void 0:r?V(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&U(e,t,s),s};let g=class extends u{constructor(){super(...arguments),this.getSubmenuName=n=>n.path.split("/")[1],this.groupByFirstLevelPath=n=>{const e={};return n.forEach(r=>{const s=this.getSubmenuName(r);e[s]||(e[s]=[]),e[s].push({path:r.path,navtitle:this.getNavTitle(r)})}),Object.values(e).map(r=>r.length===1?r[0]:{navtitle:r[0].path.split("/")[1],path:r[0].path,children:r})}}createRenderRoot(){return this}async firstUpdated(){const n=await this.fetchSitemap();this.items=this.groupByFirstLevelPath(n)}render(){if(this.items)return c``}toggleSubmenu({currentTarget:n}){!(n instanceof HTMLElement)||!n.classList.contains("opener")||n.classList.toggle("active")}renderSubMenu(n){return c``}renderMenuItem(n){return c`${n.children!==void 0?this.renderSubMenu(n):c`${n.navtitle}`}`}renderMenuItems(){return c`${this.items.map(n=>this.renderMenuItem(n))}
`}async fetchSitemap(){return(await(await fetch(`${window.hlx.codeBasePath}/query-index.json`)).json()).data}getNavTitle(n){return n.path==="/"?"Homepage":n.navtitle||n.title}};O([h()],g.prototype,"items",2);g=O([p("sidebar-nav")],g);const m=async n=>{const{endpoint:e,getJson:t=!1,init:r}=n,s=e.startsWith("/")?e:`/${e}`,o=await fetch(`${window.hlx.codeBasePath}${s}`,r);return t?await o.json():await o.text()};var k=Object.defineProperty,z=Object.getOwnPropertyDescriptor,T=(n,e,t,r)=>{for(var s=r>1?void 0:r?z(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&k(e,t,s),s};let y=class extends u{createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchContactData()}async fetchContactData(){const n=await m({endpoint:"contact.plain.html"}),e=document.createElement("div");e.innerHTML=n,this.contactTemplateArgs={headline:e.querySelector("h2"),text:e.querySelector("p"),contacts:Array.from(e.querySelectorAll(".contact > div:not(:first-child)")).map(t=>{var r,s;return{contactIcon:(r=t.querySelector("div"))==null?void 0:r.innerText,contactMarkup:(s=t.querySelector("div:last-child"))==null?void 0:s.innerHTML}})}}render(){const{headline:n,text:e,contacts:t}=this.contactTemplateArgs;return c``}};T([h()],y.prototype,"contactTemplateArgs",2);y=T([p("sidebar-contact")],y);var F=Object.defineProperty,J=Object.getOwnPropertyDescriptor,D=(n,e,t,r)=>{for(var s=r>1?void 0:r?J(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&F(e,t,s),s};let w=class extends u{async connectedCallback(){super.connectedCallback();const n=await this.fetchSitemap(),e=this.getPosts(n);this.lastTreePosts=this.getLastThreePosts(e)}render(){if(this.lastTreePosts)return c`${this.lastTreePosts.map(n=>this.renderPost(n))}
`}createRenderRoot(){return this}getLastThreePosts(n){return n.sort((e,t)=>e.lastModified>t.lastModified?-1:e.lastModified${I({src:n.image,alt:n.imageAlt})}${n.description}
`}getPosts(n){return n.filter(e=>e.path.includes("/posts"))}};D([h()],w.prototype,"lastTreePosts",2);w=D([p("sidebar-posts")],w);var K=Object.defineProperty,W=Object.getOwnPropertyDescriptor,x=(n,e,t,r)=>{for(var s=r>1?void 0:r?W(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&K(e,t,s),s};let S=class extends u{createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.fetchFooterData()}async fetchFooterData(){var t;const n=await m({endpoint:"footer.plain.html"}),e=document.createElement("div");e.innerHTML=n,this.footerMarkup=e.querySelector("p"),(t=this.footerMarkup)==null||t.classList.add("copyright")}render(){if(this.footerMarkup)return c`${this.footerMarkup}`}};x([h()],S.prototype,"footerMarkup",2);S=x([p("sidebar-footer")],S);var G=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,_=(n,e,t,r)=>{for(var s=r>1?void 0:r?Q(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&G(e,t,s),s};let f=class extends u{constructor(){super(...arguments),this.handleToggleClick=n=>{n.preventDefault(),this.classList.toggle("inactive")}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setInitialVisibility(),window.addEventListener("resize",this.setInitialVisibility.bind(this))}setInitialVisibility(){window.innerWidth<=1280?this.classList.add("inactive"):this.classList.remove("inactive")}firstUpdated(){this.toggle.addEventListener("click",this.handleToggleClick)}render(){return c`
`}};_([B(".toggle")],f.prototype,"toggle",2);_([j(100)],f.prototype,"setInitialVisibility",1);f=_([p("sidebar-component")],f);var X=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,q=(n,e,t,r)=>{for(var s=r>1?void 0:r?Y(e,t):e,o=n.length-1,a;o>=0;o--)(a=n[o])&&(s=(r?a(e,t,s):a(s))||s);return r&&s&&X(e,t,s),s};let $=class extends u{createRenderRoot(){return this}async firstUpdated(n){await this.fetchHeaderData()}async fetchHeaderData(){try{const n=await m({endpoint:"header.json",getJson:!0});this.headerData={leftCol:n.leftCol.data[0],rightCol:n.rightCol.data}}catch(n){console.error("HeaderComponent: ",n)}}render(){if(!this.headerData)return;const{leftCol:n,rightCol:e}=this.headerData;return c`${n.logoText}`}};q([h()],$.prototype,"headerData",2);$=q([p("header-component")],$);function v(n){return typeof n=="string"?n.toLowerCase().replace(/[^0-9a-z]/gi,"-").replace(/-+/g,"-").replace(/^-|-$/g,""):""}class Z{readBlockConfig(e){const t={};return e.querySelectorAll(":scope > div").forEach(r=>{if(r.children){const s=[...r.children];if(s[1]){const o=s[1],a=v(s[0].textContent??"");let l="";if(o.querySelector("a")){const i=[...o.querySelectorAll("a")];i.length===1?l=i[0].href:l=i.map(d=>d.href)}else if(o.querySelector("img")){const i=[...o.querySelectorAll("img")];i.length===1?l=i[0].src:l=i.map(d=>d.src)}else if(o.querySelector("p")){const i=[...o.querySelectorAll("p")];i.length===1?l=i[0].textContent:l=i.map(d=>d.textContent)}else l=r.children[1].textContent;t[a]=l}}}),t}decorateBlocks(e){e.querySelectorAll("div.section > div > div").forEach(this.decorateBlock)}decorateBlock(e){const t=e.classList[0];if(t){e.classList.add("block"),e.dataset.blockName=t;const r=e.parentElement;r==null||r.classList.add(`${t}-wrapper`);const s=e.closest(".section");s&&s.classList.add(`${t}-container`)}}}function ee(n){return v(n).replace(/-([a-z])/g,e=>e[1].toUpperCase())}class te{constructor(e){this.blockService=e}init(e){this.transformSection(e)}transformSection(e){e.querySelectorAll(":scope > div").forEach(t=>{this.adjustMarkup(t),this.processSectionMetaData(t)})}processSectionMetaData(e){const t=e.querySelector("div.section-metadata");if(t){const r=this.blockService.readBlockConfig(t);Object.keys(r).forEach(s=>{s==="style"?r.style.split(",").filter(a=>a).map(a=>v(a.trim())).forEach(a=>e.classList.add(a)):e.dataset[ee(s)]=r[s]}),t.parentElement&&t.parentElement.remove()}}adjustMarkup(e){const t=[];let r=!1;[...e.children].forEach(s=>{if(s.tagName==="DIV"||!r){const o=document.createElement("div");t.push(o),r=s.tagName!=="DIV",r&&o.classList.add("default-content-wrapper")}t[t.length-1].append(s)}),t.forEach(s=>e.append(s)),this.decorateImages(),e.classList.add("section"),e.dataset.sectionStatus="initialized",e.style.display="none"}decorateImages(){document.querySelectorAll(".default-content-wrapper picture").forEach(t=>{const r=t.parentElement;r&&r.classList.add("image","main")})}}const P=(n,e)=>{e.split(",").forEach(t=>{n.classList.add(v(t.trim()))})};function L(n,e=document){const t=n&&n.includes(":")?"property":"name",s=[...e.head.querySelectorAll(`meta[${t}="${n}"]`)].map(o=>o.content).join(", ");return s.length?s:""}class ne{constructor(e,t){this.sectionService=e,this.blockService=t,this.init=async()=>{this.setup(),await this.loadEager()},this.loadEager=async()=>{if(document.documentElement.lang="en",this.decorateTemplateAndTheme(),document){const s=document.querySelector("body");s&&(s.style.display="none")}const r=document.querySelector("main");r&&(r.setAttribute("id","main"),this.addSidebarContainer(r),this.sectionService.init(r),this.addInnerContainer(r),this.blockService.decorateBlocks(r),await this.loadComponents(),setTimeout(()=>{document.body.removeAttribute("style")},0))},this.loadComponents=async()=>{document.querySelectorAll(".section").forEach(async s=>{const o=this.collectComponents(s);if(!o.length){this.showSection(s);return}await this.loadComponentModules(o),this.showSection(s)})}}setup(){window.hlx=window.hlx||{},window.hlx.RUM_MASK_URL="full",window.hlx.codeBasePath="",window.hlx.lighthouse=new URLSearchParams(window.location.search).get("lighthouse")==="on";const e=document.querySelector('script[src$="/scripts/scripts.js"]');if(e)try{[window.hlx.codeBasePath]=new URL(e.src).pathname.split("/scripts/scripts.js")}catch(t){console.log(t)}}addSidebarContainer(e){const t=document.createElement("sidebar-component");t.setAttribute("id","sidebar"),t.classList.add("inactive"),e.after(t)}addInnerContainer(e){const t=e.innerHTML;e.innerHTML=`${t}
`}decorateTemplateAndTheme(){const e=L("template");e&&P(document.body,e);const t=L("theme");t&&P(document.body,t)}collectComponents(e){const t=[];return e.querySelectorAll("[data-block-name]").forEach(s=>{s.style.display="none",t.push({name:s.dataset.blockName,element:s})}),t}async loadComponentModules(e){for(const t of e){const r=await A(()=>import(`${window.hlx.codeBasePath}/dist/${t.name}/${t.name}.js`),__vite__mapDeps([]));r.default&&await r.default(t.element)}}showSection(e){e.style.removeProperty("display")}}(async function(){const n=new Z,e=new te(n);await new ne(e,n).init()})();
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
diff --git a/dist/main/main.js.map b/dist/main/main.js.map
index 768e681a..3a89c0e0 100644
--- a/dist/main/main.js.map
+++ b/dist/main/main.js.map
@@ -1 +1 @@
-{"version":3,"mappings":"iTACA;AAAA;AAAA;AAAA;AAAA,GAIG,SAASA,EAAEA,EAAE,CAAC,OAAOC,EAAE,CAAC,GAAGD,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC,CAAC,CCLvD;AAAA;AAAA;AAAA;AAAA,GAKA,MAAME,EAAE,CAACA,EAAED,EAAEE,KAAKA,EAAE,aAAa,GAAGA,EAAE,WAAW,GAAG,QAAQ,UAAoB,OAAOF,GAAjB,UAAoB,OAAO,eAAeC,EAAED,EAAEE,CAAC,EAAEA,GCJvH;AAAA;AAAA;AAAA;AAAA,GAIG,SAASD,EAAEA,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AC5C,CAiBQ,kBAAkB7B,EAA0C,CAClE,MAAMwB,EAAiC,GAGhC,OAFQxB,EAAQ,iBAAiC,mBAAmB,EAEpE,QAASf,GAA0B,CACxCA,EAAM,MAAM,QAAU,OACtBuC,EAAW,KAAK,CACd,KAAMvC,EAAM,QAAQ,UACpB,QAASA,CAAA,CACV,EACF,EAEMuC,CACT,CAEA,MAAc,qBAAqBA,EAAgC,CACjE,UAAWM,KAAaN,EAAY,CAClC,MAAMO,EAAkB,MAAAC,EAAA,IAAM,OAAO,GAAG,OAAO,IAAI,YAAY,SAASF,EAAU,IAAI,IAAIA,EAAU,IAAI,4BAEpGC,EAAgB,SACZ,MAAAA,EAAgB,QAAQD,EAAU,OAAO,CAEnD,CACF,CAEQ,YAAY9B,EAAsB,CAChCA,EAAA,MAAM,eAAe,SAAS,CACxC,CACF,EC3HC,gBAAkB,CACX,MAAAI,EAAe,IAAIpB,EACnBsC,EAAiB,IAAInB,GAAeC,CAAY,EAEtD,MADa,IAAIiB,GAAYC,EAAgBlB,CAAY,EAC9C,MACb,GAAG","names":["r","t","e","c","n","s","i","_a","o","decorators","debounce","SidebarNav","LitElement","entry","data","groups","item","firstLevelPath","group","sitemap","html","currentTarget","child","__decorateClass","state","customElement","fetchData","options","endpoint","getJson","init","decoratedEndpoint","response","SidebarContact","responseMarkup","_b","headline","text","contacts","unsafeHTML","SidebarPosts","posts","siteMapEntry","sitemapEntry","nextSitemapEntry","createOptimizedPicture","SidebarFooter","SidebarComponent","query","HeaderComponent","_changedProperties","error","leftCol","rightCol","toClassName","name","BlockService","block","config","row","cols","col","value","as","a","imgs","img","ps","p","main","shortBlockName","blockWrapper","section","toCamelCase","g","SectionService","blockService","container","sectionMeta","meta","key","style","wrappers","defaultContent","wrapper","parentElement","addClasses","element","classes","getMetadata","doc","attr","m","MainService","sectionService","body","components","scriptEl","sidebarContainer","children","template","theme","component","componentModule","__vitePreload"],"sources":["../../node_modules/@lit/reactive-element/decorators/state.js","../../node_modules/@lit/reactive-element/decorators/base.js","../../node_modules/@lit/reactive-element/decorators/query.js","../../node_modules/@kluntje/js-utils/lib/function-helpers/decorators/index.js","../../src/components/sidebar/sidebarNav.ts","../../src/utils/fetchData.ts","../../src/components/sidebar/sidebarContact.ts","../../src/components/sidebar/sidebarPosts.ts","../../src/components/sidebar/sidebarFooter.ts","../../src/components/sidebar/sidebar.ts","../../src/components/header.ts","../../src/utils/toClassName.ts","../../src/services/block.service.ts","../../src/utils/toCamelCase.ts","../../src/services/section.service.ts","../../src/utils/addClasses.ts","../../src/utils/getMetadata.ts","../../src/services/main.service.ts","../../src/main.ts"],"sourcesContent":["import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","\"use strict\";function t(t){return function(...e){return function(n,o,c){return Object.assign(Object.assign({},c),{value:t(c.value,...e)})}}}Object.defineProperty(exports,\"__esModule\",{value:!0});const e=t((function(t,e=0){let n=-1;const o=function(...o){clearTimeout(n),n=window.setTimeout((()=>{t.call(this,...o)}),e)};return o.cancel=function(){clearTimeout(n)},o})),n=t((function(t,e=0){let n,o=[];const c=function(...c){o=c,void 0===n&&(n=window.setTimeout((()=>{n=void 0,t.call(this,...o)}),e))};return c.cancel=function(){clearTimeout(n),n=void 0},c}));exports.debounce=e,exports.throttle=n;\n//# sourceMappingURL=index.js.map\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport '../icon';\n\nexport type SiteMapEntry = {\n path: string;\n title: string;\n description: string;\n lastModified: string; // Assuming this is a string representing a timestamp\n image: string;\n imagealt: string;\n navtitle: string;\n 'nav-test': string;\n imageAlt: string;\n};\n\ninterface SubMenuItem {\n path: string;\n navtitle: string;\n}\n\ninterface MenuItem {\n path: string;\n navtitle: string;\n children?: SubMenuItem[];\n}\n\nexport type Sitemap = SiteMapEntry[];\n\n@customElement('sidebar-nav')\nexport class SidebarNav extends LitElement {\n @state()\n items: MenuItem[];\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n async firstUpdated() {\n const sitemap = await this.fetchSitemap();\n this.items = this.groupByFirstLevelPath(sitemap);\n }\n\n render() {\n if (!this.items) return;\n return html` `;\n }\n\n private toggleSubmenu({ currentTarget }: Event) {\n if (!(currentTarget instanceof HTMLElement) || !currentTarget.classList.contains('opener')) return;\n currentTarget.classList.toggle('active');\n }\n\n private renderSubMenu(item) {\n return html`\n \n \n \n `;\n }\n\n private renderMenuItem(item) {\n return html` \n ${item.children !== undefined ? this.renderSubMenu(item) : html`${item.navtitle}`}\n `;\n }\n\n private renderMenuItems() {\n return html` \n ${this.items.map((item) => this.renderMenuItem(item))}\n
`;\n }\n\n private async fetchSitemap(): Promise {\n const response = await fetch(`${window.hlx.codeBasePath}/query-index.json`);\n const json = await response.json();\n return json.data;\n }\n\n private getSubmenuName = (entry: SiteMapEntry) => {\n return entry.path.split('/')[1];\n };\n\n private getNavTitle(item: SiteMapEntry) {\n if (item.path === '/') return 'Homepage';\n return item.navtitle || item.title;\n }\n\n groupByFirstLevelPath = (data: Sitemap) => {\n const groups = {};\n data.forEach((item) => {\n const firstLevelPath = this.getSubmenuName(item); // Extracting the first level of the path\n if (!groups[firstLevelPath]) {\n groups[firstLevelPath] = [];\n }\n groups[firstLevelPath].push({\n path: item.path,\n navtitle: this.getNavTitle(item),\n });\n });\n\n const groupedData = Object.values(groups);\n\n return groupedData.map((group: MenuItem[]) => {\n if (group.length === 1) {\n return group[0];\n }\n\n return {\n navtitle: group[0].path.split('/')[1],\n path: group[0].path,\n children: group,\n };\n });\n };\n}\n","interface FetchDataOptions {\n endpoint: string;\n getJson?: boolean;\n init?: RequestInit | undefined;\n}\n\nexport const fetchData = async (options: FetchDataOptions): Promise => {\n const { endpoint, getJson = false, init } = options;\n const decoratedEndpoint = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\n\n const response = await fetch(`${window.hlx.codeBasePath}${decoratedEndpoint}`, init);\n\n if (getJson) {\n return await response.json();\n }\n return (await response.text()) as unknown as T;\n};\n","import { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../../utils/fetchData';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\n\ninterface SidebarContactTemplateArgs {\n headline: HTMLHeadingElement;\n text: HTMLParagraphElement;\n contacts: Contact[];\n}\n\ninterface Contact {\n contactIcon: string;\n contactMarkup: string;\n}\n\n@customElement('sidebar-contact')\nexport class SidebarContact extends LitElement {\n @state()\n contactTemplateArgs: SidebarContactTemplateArgs;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchContactData();\n }\n\n async fetchContactData() {\n const response = await fetchData({ endpoint: 'contact.plain.html' });\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n // TODO: refactor contactTemplateArgs\n this.contactTemplateArgs = {\n headline: responseMarkup.querySelector('h2') as HTMLHeadingElement,\n text: responseMarkup.querySelector('p') as HTMLParagraphElement,\n contacts: Array.from(responseMarkup.querySelectorAll('.contact > div:not(:first-child)')).map((item) => {\n return {\n contactIcon: item.querySelector('div')?.innerText as string,\n contactMarkup: item.querySelector('div:last-child')?.innerHTML as string,\n };\n }),\n };\n }\n\n render() {\n const { headline, text, contacts } = this.contactTemplateArgs;\n return html`\n \n `;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { fetchData } from '../../utils/fetchData.ts';\nimport { Sitemap, SiteMapEntry } from './sidebarNav.ts';\nimport { customElement, state } from 'lit/decorators.js';\nimport { createOptimizedPicture } from '../../utils/createOptimizedPicture.ts';\n\ninterface SheetsResponse {\n type: string;\n data: [];\n offset: number;\n total: number;\n}\n\n@customElement('sidebar-posts')\nexport class SidebarPosts extends LitElement {\n @state()\n private lastTreePosts: SiteMapEntry[];\n\n async connectedCallback() {\n super.connectedCallback();\n const sitemap = await this.fetchSitemap();\n const posts = this.getPosts(sitemap);\n this.lastTreePosts = this.getLastThreePosts(posts);\n }\n\n render() {\n if (!this.lastTreePosts) return;\n return html`\n \n ${this.lastTreePosts.map((siteMapEntry) => this.renderPost(siteMapEntry))}
\n `;\n\n //TODO: Add overview if more button is needed\n /* \n \n */\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private getLastThreePosts(sitemap: Sitemap) {\n sitemap.sort((sitemapEntry: SiteMapEntry, nextSitemapEntry: SiteMapEntry) => {\n if (sitemapEntry.lastModified > nextSitemapEntry.lastModified) {\n return -1;\n } else if (sitemapEntry.lastModified < nextSitemapEntry.lastModified) {\n return 1;\n }\n\n return 0;\n });\n\n return sitemap.slice(0, 3);\n }\n\n private async fetchSitemap() {\n return (await fetchData({ endpoint: '/query-index.json', getJson: true })).data;\n }\n\n private renderPost(siteMapEntry: SiteMapEntry) {\n return html` \n \n ${createOptimizedPicture({ src: siteMapEntry.image, alt: siteMapEntry.imageAlt })}\n \n ${siteMapEntry.description}
\n `;\n }\n\n private getPosts(sitemap: SiteMapEntry[]) {\n return sitemap.filter((item) => item.path.includes('/posts'));\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../../utils/fetchData';\n\n@customElement('sidebar-footer')\nexport class SidebarFooter extends LitElement {\n @state()\n footerMarkup: HTMLParagraphElement | null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchFooterData();\n }\n\n async fetchFooterData() {\n const response = await fetchData({ endpoint: 'footer.plain.html' });\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n this.footerMarkup = responseMarkup.querySelector('p');\n this.footerMarkup?.classList.add('copyright');\n }\n\n render() {\n if (!this.footerMarkup) return;\n return html`${this.footerMarkup}`;\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, query } from 'lit/decorators.js';\nimport { debounce } from '@kluntje/js-utils/lib/function-helpers/decorators';\n\nimport './sidebarNav.ts';\nimport './sidebarContact.ts';\nimport './sidebarPosts.ts';\nimport './sidebarFooter.ts';\n\n@customElement('sidebar-component')\nexport class SidebarComponent extends LitElement {\n @query('.toggle')\n toggle: HTMLAnchorElement;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setInitialVisibility();\n window.addEventListener('resize', this.setInitialVisibility.bind(this));\n }\n\n @debounce(100)\n private setInitialVisibility() {\n window.innerWidth <= 1280 ? this.classList.add('inactive') : this.classList.remove('inactive');\n }\n\n firstUpdated(): void {\n this.toggle.addEventListener('click', this.handleToggleClick);\n }\n\n handleToggleClick = (e: Event) => {\n e.preventDefault();\n this.classList.toggle('inactive');\n };\n\n render() {\n return html`\n \n \n \n \n \n
\n \n `;\n }\n}\n","import { LitElement, PropertyValueMap, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../utils/fetchData';\n\nexport interface HeaderResponseData {\n leftCol: LeftCol;\n rightCol: RightCol;\n}\n\nexport interface LeftCol {\n data: LeftColData[];\n}\n\nexport interface LeftColData {\n logoText: string;\n logoLink: string;\n}\n\nexport interface RightCol {\n data: RightColData[];\n}\n\nexport interface RightColData {\n socialIcon: string;\n socialLabel: string;\n socialLink: string;\n}\n\ninterface HeaderTemplateData {\n leftCol: LeftColData;\n rightCol: RightColData[];\n}\n\n@customElement('header-component')\nexport class HeaderComponent extends LitElement {\n @state()\n headerData: HeaderTemplateData;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n protected async firstUpdated(_changedProperties: PropertyValueMap | Map) {\n await this.fetchHeaderData();\n }\n\n async fetchHeaderData() {\n try {\n const response = await fetchData({ endpoint: 'header.json', getJson: true });\n this.headerData = { leftCol: response.leftCol.data[0], rightCol: response.rightCol.data };\n } catch (error) {\n console.error('HeaderComponent: ', error);\n }\n }\n\n render() {\n if (!this.headerData) return;\n const { leftCol, rightCol } = this.headerData;\n return html`\n ${leftCol.logoText}\n \n `;\n }\n}\n","export function toClassName(name: string) {\n return typeof name === 'string'\n ? name\n .toLowerCase()\n .replace(/[^0-9a-z]/gi, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '')\n : '';\n}\n","import { toClassName } from '../utils/toClassName';\n\nexport class BlockService {\n //TODO: Provider for fetch data\n\n /**\n * Extracts the config from a block.\n * @param {Element} block The block element\n * @returns {object} The block config\n */\n readBlockConfig(block: Element): Record {\n const config: Record = {};\n block.querySelectorAll(':scope > div').forEach((row) => {\n if (row.children) {\n const cols = [...row.children];\n if (cols[1]) {\n const col = cols[1];\n const name = toClassName(cols[0].textContent ?? '');\n let value: any = '';\n if (col.querySelector('a')) {\n const as = [...col.querySelectorAll('a')];\n if (as.length === 1) {\n value = as[0].href;\n } else {\n value = as.map((a) => a.href);\n }\n } else if (col.querySelector('img')) {\n const imgs = [...col.querySelectorAll('img')];\n if (imgs.length === 1) {\n value = imgs[0].src;\n } else {\n value = imgs.map((img) => img.src);\n }\n } else if (col.querySelector('p')) {\n const ps = [...col.querySelectorAll('p')];\n if (ps.length === 1) {\n value = ps[0].textContent;\n } else {\n value = ps.map((p) => p.textContent);\n }\n } else value = row.children[1].textContent;\n config[name] = value;\n }\n }\n });\n return config;\n }\n\n /**\n * Decorates all blocks in a container element.\n * @param {Element} main The container element\n */\n decorateBlocks(main: HTMLElement) {\n main.querySelectorAll('div.section > div > div').forEach(this.decorateBlock);\n }\n\n /**\n * Decorates a block.\n * @param {Element} block The block element\n */\n private decorateBlock(block: HTMLElement) {\n const shortBlockName = block.classList[0];\n if (shortBlockName) {\n block.classList.add('block');\n block.dataset.blockName = shortBlockName;\n const blockWrapper = block.parentElement;\n blockWrapper?.classList.add(`${shortBlockName}-wrapper`);\n const section = block.closest('.section');\n if (section) section.classList.add(`${shortBlockName}-container`);\n }\n }\n}\n","import { toClassName } from './toClassName';\n\n/**\n * Sanitizes a string for use as a js property name.\n * @param {string} name The unsanitized string\n * @returns {string} The camelCased name\n */\nexport function toCamelCase(name: string) {\n return toClassName(name).replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n}\n","import { toCamelCase } from '../utils/toCamelCase';\nimport { toClassName } from '../utils/toClassName';\nimport { BlockService } from './block.service';\n\nexport class SectionService {\n constructor(private blockService: BlockService) {}\n\n init(container: HTMLElement) {\n this.transformSection(container);\n }\n\n /**\n * Decorates all sections in a container element.\n * @param {Element} main The container element\n */\n private transformSection(main: HTMLElement) {\n main.querySelectorAll(':scope > div').forEach((section) => {\n this.adjustMarkup(section);\n this.processSectionMetaData(section);\n });\n }\n\n private processSectionMetaData(section: HTMLElement) {\n // Process section metadata\n const sectionMeta = section.querySelector('div.section-metadata');\n if (sectionMeta) {\n const meta = this.blockService.readBlockConfig(sectionMeta);\n Object.keys(meta).forEach((key) => {\n if (key === 'style') {\n const styles = meta.style\n .split(',')\n .filter((style: string) => style)\n .map((style: string) => toClassName(style.trim()));\n styles.forEach((style: string) => section.classList.add(style));\n } else {\n section.dataset[toCamelCase(key)] = meta[key];\n }\n });\n if (sectionMeta.parentElement) sectionMeta.parentElement.remove();\n }\n }\n\n private adjustMarkup(section: HTMLDivElement) {\n const wrappers: HTMLDivElement[] = [];\n let defaultContent = false;\n [...section.children].forEach((e) => {\n if (e.tagName === 'DIV' || !defaultContent) {\n const wrapper = document.createElement('div');\n wrappers.push(wrapper);\n defaultContent = e.tagName !== 'DIV';\n\n if (defaultContent) {\n wrapper.classList.add('default-content-wrapper');\n }\n }\n wrappers[wrappers.length - 1].append(e);\n });\n wrappers.forEach((wrapper) => section.append(wrapper));\n this.decorateImages();\n section.classList.add('section');\n section.dataset.sectionStatus = 'initialized';\n section.style.display = 'none';\n }\n decorateImages() {\n const picture = document.querySelectorAll('.default-content-wrapper picture');\n picture.forEach((item) => {\n const parentElement = item.parentElement;\n if (parentElement) {\n parentElement.classList.add('image', 'main');\n }\n });\n }\n}\n","import { toClassName } from './toClassName';\n\nexport const addClasses = (element: HTMLElement, classes: string) => {\n classes.split(',').forEach((c) => {\n element.classList.add(toClassName(c.trim()));\n });\n};\n","export function getMetadata(name: string, doc = document) {\n const attr = name && name.includes(':') ? 'property' : 'name';\n const metaTags: HTMLMetaElement[] =\n ([...doc.head.querySelectorAll(`meta[${attr}=\"${name}\"]`)] as HTMLMetaElement[]) || [];\n const meta = metaTags\n .map((m) => {\n return m.content;\n })\n .join(', ');\n return meta.length ? meta : '';\n}\n","import { addClasses } from '../utils/addClasses';\nimport { getMetadata } from '../utils/getMetadata';\nimport { BlockService } from './block.service';\nimport { SectionService } from './section.service';\n\ntype ComponentMapping = {\n name: string;\n element: HTMLDivElement;\n};\n\nexport class MainService {\n constructor(\n private sectionService: SectionService,\n private blockService: BlockService\n ) {}\n\n init = async () => {\n this.setup();\n await this.loadEager();\n };\n\n /**\n * Setup block utils.\n */\n private setup() {\n window.hlx = window.hlx || {};\n window.hlx.RUM_MASK_URL = 'full';\n window.hlx.codeBasePath = '';\n window.hlx.lighthouse = new URLSearchParams(window.location.search).get('lighthouse') === 'on';\n\n const scriptEl = document.querySelector('script[src$=\"/scripts/scripts.js\"]') as HTMLScriptElement;\n if (scriptEl) {\n try {\n [window.hlx.codeBasePath] = new URL(scriptEl.src).pathname.split('/scripts/scripts.js');\n } catch (error) {\n // eslint-disable-next-line no-console\n console.log(error);\n }\n }\n }\n\n private loadEager = async () => {\n // TODO: how to support different languages here\n document.documentElement.lang = 'en';\n this.decorateTemplateAndTheme();\n if (document) {\n const body = document.querySelector('body');\n if (body) {\n body.style.display = 'none';\n }\n }\n const main = document.querySelector('main');\n if (main) {\n main.setAttribute('id', 'main');\n this.addSidebarContainer(main);\n this.sectionService.init(main);\n this.addInnerContainer(main); // TODO refactor initializing\n this.blockService.decorateBlocks(main);\n await this.loadComponents();\n // TODO: Performace adjustment\n setTimeout(() => {\n document.body.removeAttribute('style');\n }, 0);\n\n // await this.waitForLCP(LCP_BLOCKS);\n }\n };\n\n private addSidebarContainer(main: HTMLElement) {\n const sidebarContainer = document.createElement('sidebar-component');\n sidebarContainer.setAttribute('id', 'sidebar');\n main.after(sidebarContainer);\n }\n\n private addInnerContainer(main: HTMLElement) {\n const children = main.innerHTML;\n main.innerHTML = `${children}
`;\n }\n\n // private loadLazy = async () => {};\n\n private decorateTemplateAndTheme() {\n const template = getMetadata('template');\n if (template) addClasses(document.body, template);\n const theme = getMetadata('theme');\n if (theme) addClasses(document.body, theme);\n }\n\n private loadComponents = async () => {\n const sections = document.querySelectorAll('.section');\n\n sections.forEach(async (section) => {\n const components: ComponentMapping[] = this.collectComponents(section);\n if (!components.length) {\n this.showSection(section);\n return;\n }\n\n await this.loadComponentModules(components);\n this.showSection(section);\n });\n };\n\n private collectComponents(section: HTMLElement): ComponentMapping[] {\n const components: ComponentMapping[] = [];\n const blocks = section.querySelectorAll('[data-block-name]');\n\n blocks.forEach((block: HTMLDivElement) => {\n block.style.display = 'none';\n components.push({\n name: block.dataset['blockName'] as string,\n element: block,\n });\n });\n\n return components;\n }\n\n private async loadComponentModules(components: ComponentMapping[]) {\n for (const component of components) {\n const componentModule = await import(`${window.hlx.codeBasePath}/dist/${component.name}/${component.name}.js`);\n\n if (componentModule.default) {\n await componentModule.default(component.element);\n }\n }\n }\n\n private showSection(section: HTMLElement) {\n section.style.removeProperty('display');\n }\n}\n","// const LCP_BLOCKS: string[] = []; // add your LCP blocks to the list\n\nimport './components/sidebar/sidebar.ts';\nimport './components/header.ts';\nimport { BlockService } from './services/block.service.ts';\nimport { SectionService } from './services/section.service.ts';\nimport { MainService } from './services/main.service.ts';\n\n(async function () {\n const blockService = new BlockService();\n const sectionService = new SectionService(blockService);\n const main = new MainService(sectionService, blockService);\n await main.init();\n})();\n\ndeclare global {\n interface Window {\n hlx: {\n RUM_MASK_URL: string;\n codeBasePath: string;\n lighthouse: boolean;\n };\n }\n}\n"],"file":"main/main.js"}
\ No newline at end of file
+{"version":3,"mappings":"iTACA;AAAA;AAAA;AAAA;AAAA,GAIG,SAASA,EAAEA,EAAE,CAAC,OAAOC,EAAE,CAAC,GAAGD,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC,CAAC,CCLvD;AAAA;AAAA;AAAA;AAAA,GAKA,MAAME,EAAE,CAACA,EAAED,EAAEE,KAAKA,EAAE,aAAa,GAAGA,EAAE,WAAW,GAAG,QAAQ,UAAoB,OAAOF,GAAjB,UAAoB,OAAO,eAAeC,EAAED,EAAEE,CAAC,EAAEA,GCJvH;AAAA;AAAA;AAAA;AAAA,GAIG,SAASD,EAAEA,EAAEF,EAAE,CAAC,MAAM,CAACI,EAAEC,EAAEC,IAAI,CAAC,MAAM,EAAEL,GAAC,OAAE,QAAAM,EAAAN,EAAE,aAAF,YAAAM,EAAc,cAAcL,KAAI,MAAK,GAAGF,EAAE,CAAC,KAAK,CAAC,IAAIE,EAAE,IAAIF,CAAC,EAAY,OAAOK,GAAjB,SAAmBD,EAAEE,IAAI,IAAI,CAAC,MAAML,EAAE,OAAM,EAAG,MAAM,CAAC,KAAK,CAAC,OAAO,KAAKA,CAAC,CAAC,EAAE,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,MAAAC,EAAA,IAAM,OAAO,GAAG,OAAO,IAAI,YAAY,SAASF,EAAU,IAAI,IAAIA,EAAU,IAAI,4BAEpGC,EAAgB,SACZ,MAAAA,EAAgB,QAAQD,EAAU,OAAO,CAEnD,CACF,CAEQ,YAAY9B,EAAsB,CAChCA,EAAA,MAAM,eAAe,SAAS,CACxC,CACF,EC5HC,gBAAkB,CACX,MAAAI,EAAe,IAAIpB,EACnBsC,EAAiB,IAAInB,GAAeC,CAAY,EAEtD,MADa,IAAIiB,GAAYC,EAAgBlB,CAAY,EAC9C,MACb,GAAG","names":["r","t","e","c","n","s","i","_a","o","decorators","debounce","SidebarNav","LitElement","entry","data","groups","item","firstLevelPath","group","sitemap","html","currentTarget","child","__decorateClass","state","customElement","fetchData","options","endpoint","getJson","init","decoratedEndpoint","response","SidebarContact","responseMarkup","_b","headline","text","contacts","unsafeHTML","SidebarPosts","posts","siteMapEntry","sitemapEntry","nextSitemapEntry","createOptimizedPicture","SidebarFooter","SidebarComponent","query","HeaderComponent","_changedProperties","error","leftCol","rightCol","toClassName","name","BlockService","block","config","row","cols","col","value","as","a","imgs","img","ps","p","main","shortBlockName","blockWrapper","section","toCamelCase","g","SectionService","blockService","container","sectionMeta","meta","key","style","wrappers","defaultContent","wrapper","parentElement","addClasses","element","classes","getMetadata","doc","attr","m","MainService","sectionService","body","components","scriptEl","sidebarContainer","children","template","theme","component","componentModule","__vitePreload"],"sources":["../../node_modules/@lit/reactive-element/decorators/state.js","../../node_modules/@lit/reactive-element/decorators/base.js","../../node_modules/@lit/reactive-element/decorators/query.js","../../node_modules/@kluntje/js-utils/lib/function-helpers/decorators/index.js","../../src/components/sidebar/sidebarNav.ts","../../src/utils/fetchData.ts","../../src/components/sidebar/sidebarContact.ts","../../src/components/sidebar/sidebarPosts.ts","../../src/components/sidebar/sidebarFooter.ts","../../src/components/sidebar/sidebar.ts","../../src/components/header.ts","../../src/utils/toClassName.ts","../../src/services/block.service.ts","../../src/utils/toCamelCase.ts","../../src/services/section.service.ts","../../src/utils/addClasses.ts","../../src/utils/getMetadata.ts","../../src/services/main.service.ts","../../src/main.ts"],"sourcesContent":["import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","\"use strict\";function t(t){return function(...e){return function(n,o,c){return Object.assign(Object.assign({},c),{value:t(c.value,...e)})}}}Object.defineProperty(exports,\"__esModule\",{value:!0});const e=t((function(t,e=0){let n=-1;const o=function(...o){clearTimeout(n),n=window.setTimeout((()=>{t.call(this,...o)}),e)};return o.cancel=function(){clearTimeout(n)},o})),n=t((function(t,e=0){let n,o=[];const c=function(...c){o=c,void 0===n&&(n=window.setTimeout((()=>{n=void 0,t.call(this,...o)}),e))};return c.cancel=function(){clearTimeout(n),n=void 0},c}));exports.debounce=e,exports.throttle=n;\n//# sourceMappingURL=index.js.map\n","import { html, LitElement } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport '../icon';\n\nexport type SiteMapEntry = {\n path: string;\n title: string;\n description: string;\n lastModified: string; // Assuming this is a string representing a timestamp\n image: string;\n imagealt: string;\n navtitle: string;\n 'nav-test': string;\n imageAlt: string;\n};\n\ninterface SubMenuItem {\n path: string;\n navtitle: string;\n}\n\ninterface MenuItem {\n path: string;\n navtitle: string;\n children?: SubMenuItem[];\n}\n\nexport type Sitemap = SiteMapEntry[];\n\n@customElement('sidebar-nav')\nexport class SidebarNav extends LitElement {\n @state()\n items: MenuItem[];\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n async firstUpdated() {\n const sitemap = await this.fetchSitemap();\n this.items = this.groupByFirstLevelPath(sitemap);\n }\n\n render() {\n if (!this.items) return;\n return html` `;\n }\n\n private toggleSubmenu({ currentTarget }: Event) {\n if (!(currentTarget instanceof HTMLElement) || !currentTarget.classList.contains('opener')) return;\n currentTarget.classList.toggle('active');\n }\n\n private renderSubMenu(item) {\n return html`\n \n \n \n `;\n }\n\n private renderMenuItem(item) {\n return html` \n ${item.children !== undefined ? this.renderSubMenu(item) : html`${item.navtitle}`}\n `;\n }\n\n private renderMenuItems() {\n return html` \n ${this.items.map((item) => this.renderMenuItem(item))}\n
`;\n }\n\n private async fetchSitemap(): Promise {\n const response = await fetch(`${window.hlx.codeBasePath}/query-index.json`);\n const json = await response.json();\n return json.data;\n }\n\n private getSubmenuName = (entry: SiteMapEntry) => {\n return entry.path.split('/')[1];\n };\n\n private getNavTitle(item: SiteMapEntry) {\n if (item.path === '/') return 'Homepage';\n return item.navtitle || item.title;\n }\n\n groupByFirstLevelPath = (data: Sitemap) => {\n const groups = {};\n data.forEach((item) => {\n const firstLevelPath = this.getSubmenuName(item); // Extracting the first level of the path\n if (!groups[firstLevelPath]) {\n groups[firstLevelPath] = [];\n }\n groups[firstLevelPath].push({\n path: item.path,\n navtitle: this.getNavTitle(item),\n });\n });\n\n const groupedData = Object.values(groups);\n\n return groupedData.map((group: MenuItem[]) => {\n if (group.length === 1) {\n return group[0];\n }\n\n return {\n navtitle: group[0].path.split('/')[1],\n path: group[0].path,\n children: group,\n };\n });\n };\n}\n","interface FetchDataOptions {\n endpoint: string;\n getJson?: boolean;\n init?: RequestInit | undefined;\n}\n\nexport const fetchData = async (options: FetchDataOptions): Promise => {\n const { endpoint, getJson = false, init } = options;\n const decoratedEndpoint = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\n\n const response = await fetch(`${window.hlx.codeBasePath}${decoratedEndpoint}`, init);\n\n if (getJson) {\n return await response.json();\n }\n return (await response.text()) as unknown as T;\n};\n","import { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../../utils/fetchData';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\n\ninterface SidebarContactTemplateArgs {\n headline: HTMLHeadingElement;\n text: HTMLParagraphElement;\n contacts: Contact[];\n}\n\ninterface Contact {\n contactIcon: string;\n contactMarkup: string;\n}\n\n@customElement('sidebar-contact')\nexport class SidebarContact extends LitElement {\n @state()\n contactTemplateArgs: SidebarContactTemplateArgs;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchContactData();\n }\n\n async fetchContactData() {\n const response = await fetchData({ endpoint: 'contact.plain.html' });\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n // TODO: refactor contactTemplateArgs\n this.contactTemplateArgs = {\n headline: responseMarkup.querySelector('h2') as HTMLHeadingElement,\n text: responseMarkup.querySelector('p') as HTMLParagraphElement,\n contacts: Array.from(responseMarkup.querySelectorAll('.contact > div:not(:first-child)')).map((item) => {\n return {\n contactIcon: item.querySelector('div')?.innerText as string,\n contactMarkup: item.querySelector('div:last-child')?.innerHTML as string,\n };\n }),\n };\n }\n\n render() {\n const { headline, text, contacts } = this.contactTemplateArgs;\n return html`\n \n `;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { fetchData } from '../../utils/fetchData.ts';\nimport { Sitemap, SiteMapEntry } from './sidebarNav.ts';\nimport { customElement, state } from 'lit/decorators.js';\nimport { createOptimizedPicture } from '../../utils/createOptimizedPicture.ts';\n\ninterface SheetsResponse {\n type: string;\n data: [];\n offset: number;\n total: number;\n}\n\n@customElement('sidebar-posts')\nexport class SidebarPosts extends LitElement {\n @state()\n private lastTreePosts: SiteMapEntry[];\n\n async connectedCallback() {\n super.connectedCallback();\n const sitemap = await this.fetchSitemap();\n const posts = this.getPosts(sitemap);\n this.lastTreePosts = this.getLastThreePosts(posts);\n }\n\n render() {\n if (!this.lastTreePosts) return;\n return html`\n \n ${this.lastTreePosts.map((siteMapEntry) => this.renderPost(siteMapEntry))}
\n `;\n\n //TODO: Add overview if more button is needed\n /* \n \n */\n }\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n private getLastThreePosts(sitemap: Sitemap) {\n sitemap.sort((sitemapEntry: SiteMapEntry, nextSitemapEntry: SiteMapEntry) => {\n if (sitemapEntry.lastModified > nextSitemapEntry.lastModified) {\n return -1;\n } else if (sitemapEntry.lastModified < nextSitemapEntry.lastModified) {\n return 1;\n }\n\n return 0;\n });\n\n return sitemap.slice(0, 3);\n }\n\n private async fetchSitemap() {\n return (await fetchData({ endpoint: '/query-index.json', getJson: true })).data;\n }\n\n private renderPost(siteMapEntry: SiteMapEntry) {\n return html` \n \n ${createOptimizedPicture({ src: siteMapEntry.image, alt: siteMapEntry.imageAlt })}\n \n ${siteMapEntry.description}
\n `;\n }\n\n private getPosts(sitemap: SiteMapEntry[]) {\n return sitemap.filter((item) => item.path.includes('/posts'));\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../../utils/fetchData';\n\n@customElement('sidebar-footer')\nexport class SidebarFooter extends LitElement {\n @state()\n footerMarkup: HTMLParagraphElement | null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.fetchFooterData();\n }\n\n async fetchFooterData() {\n const response = await fetchData({ endpoint: 'footer.plain.html' });\n const responseMarkup = document.createElement('div');\n responseMarkup.innerHTML = response;\n this.footerMarkup = responseMarkup.querySelector('p');\n this.footerMarkup?.classList.add('copyright');\n }\n\n render() {\n if (!this.footerMarkup) return;\n return html`${this.footerMarkup}`;\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, query } from 'lit/decorators.js';\nimport { debounce } from '@kluntje/js-utils/lib/function-helpers/decorators';\n\nimport './sidebarNav.ts';\nimport './sidebarContact.ts';\nimport './sidebarPosts.ts';\nimport './sidebarFooter.ts';\n\n@customElement('sidebar-component')\nexport class SidebarComponent extends LitElement {\n @query('.toggle')\n toggle: HTMLAnchorElement;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setInitialVisibility();\n window.addEventListener('resize', this.setInitialVisibility.bind(this));\n }\n\n @debounce(100)\n private setInitialVisibility() {\n window.innerWidth <= 1280 ? this.classList.add('inactive') : this.classList.remove('inactive');\n }\n\n firstUpdated(): void {\n this.toggle.addEventListener('click', this.handleToggleClick);\n }\n\n handleToggleClick = (e: Event) => {\n e.preventDefault();\n this.classList.toggle('inactive');\n };\n\n render() {\n return html`\n \n \n \n \n \n
\n \n `;\n }\n}\n","import { LitElement, PropertyValueMap, html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\nimport { fetchData } from '../utils/fetchData';\n\nexport interface HeaderResponseData {\n leftCol: LeftCol;\n rightCol: RightCol;\n}\n\nexport interface LeftCol {\n data: LeftColData[];\n}\n\nexport interface LeftColData {\n logoText: string;\n logoLink: string;\n}\n\nexport interface RightCol {\n data: RightColData[];\n}\n\nexport interface RightColData {\n socialIcon: string;\n socialLabel: string;\n socialLink: string;\n}\n\ninterface HeaderTemplateData {\n leftCol: LeftColData;\n rightCol: RightColData[];\n}\n\n@customElement('header-component')\nexport class HeaderComponent extends LitElement {\n @state()\n headerData: HeaderTemplateData;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n protected async firstUpdated(_changedProperties: PropertyValueMap | Map) {\n await this.fetchHeaderData();\n }\n\n async fetchHeaderData() {\n try {\n const response = await fetchData({ endpoint: 'header.json', getJson: true });\n this.headerData = { leftCol: response.leftCol.data[0], rightCol: response.rightCol.data };\n } catch (error) {\n console.error('HeaderComponent: ', error);\n }\n }\n\n render() {\n if (!this.headerData) return;\n const { leftCol, rightCol } = this.headerData;\n return html`\n ${leftCol.logoText}\n \n `;\n }\n}\n","export function toClassName(name: string) {\n return typeof name === 'string'\n ? name\n .toLowerCase()\n .replace(/[^0-9a-z]/gi, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '')\n : '';\n}\n","import { toClassName } from '../utils/toClassName';\n\nexport class BlockService {\n //TODO: Provider for fetch data\n\n /**\n * Extracts the config from a block.\n * @param {Element} block The block element\n * @returns {object} The block config\n */\n readBlockConfig(block: Element): Record {\n const config: Record = {};\n block.querySelectorAll(':scope > div').forEach((row) => {\n if (row.children) {\n const cols = [...row.children];\n if (cols[1]) {\n const col = cols[1];\n const name = toClassName(cols[0].textContent ?? '');\n let value: any = '';\n if (col.querySelector('a')) {\n const as = [...col.querySelectorAll('a')];\n if (as.length === 1) {\n value = as[0].href;\n } else {\n value = as.map((a) => a.href);\n }\n } else if (col.querySelector('img')) {\n const imgs = [...col.querySelectorAll('img')];\n if (imgs.length === 1) {\n value = imgs[0].src;\n } else {\n value = imgs.map((img) => img.src);\n }\n } else if (col.querySelector('p')) {\n const ps = [...col.querySelectorAll('p')];\n if (ps.length === 1) {\n value = ps[0].textContent;\n } else {\n value = ps.map((p) => p.textContent);\n }\n } else value = row.children[1].textContent;\n config[name] = value;\n }\n }\n });\n return config;\n }\n\n /**\n * Decorates all blocks in a container element.\n * @param {Element} main The container element\n */\n decorateBlocks(main: HTMLElement) {\n main.querySelectorAll('div.section > div > div').forEach(this.decorateBlock);\n }\n\n /**\n * Decorates a block.\n * @param {Element} block The block element\n */\n private decorateBlock(block: HTMLElement) {\n const shortBlockName = block.classList[0];\n if (shortBlockName) {\n block.classList.add('block');\n block.dataset.blockName = shortBlockName;\n const blockWrapper = block.parentElement;\n blockWrapper?.classList.add(`${shortBlockName}-wrapper`);\n const section = block.closest('.section');\n if (section) section.classList.add(`${shortBlockName}-container`);\n }\n }\n}\n","import { toClassName } from './toClassName';\n\n/**\n * Sanitizes a string for use as a js property name.\n * @param {string} name The unsanitized string\n * @returns {string} The camelCased name\n */\nexport function toCamelCase(name: string) {\n return toClassName(name).replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n}\n","import { toCamelCase } from '../utils/toCamelCase';\nimport { toClassName } from '../utils/toClassName';\nimport { BlockService } from './block.service';\n\nexport class SectionService {\n constructor(private blockService: BlockService) {}\n\n init(container: HTMLElement) {\n this.transformSection(container);\n }\n\n /**\n * Decorates all sections in a container element.\n * @param {Element} main The container element\n */\n private transformSection(main: HTMLElement) {\n main.querySelectorAll(':scope > div').forEach((section) => {\n this.adjustMarkup(section);\n this.processSectionMetaData(section);\n });\n }\n\n private processSectionMetaData(section: HTMLElement) {\n // Process section metadata\n const sectionMeta = section.querySelector('div.section-metadata');\n if (sectionMeta) {\n const meta = this.blockService.readBlockConfig(sectionMeta);\n Object.keys(meta).forEach((key) => {\n if (key === 'style') {\n const styles = meta.style\n .split(',')\n .filter((style: string) => style)\n .map((style: string) => toClassName(style.trim()));\n styles.forEach((style: string) => section.classList.add(style));\n } else {\n section.dataset[toCamelCase(key)] = meta[key];\n }\n });\n if (sectionMeta.parentElement) sectionMeta.parentElement.remove();\n }\n }\n\n private adjustMarkup(section: HTMLDivElement) {\n const wrappers: HTMLDivElement[] = [];\n let defaultContent = false;\n [...section.children].forEach((e) => {\n if (e.tagName === 'DIV' || !defaultContent) {\n const wrapper = document.createElement('div');\n wrappers.push(wrapper);\n defaultContent = e.tagName !== 'DIV';\n\n if (defaultContent) {\n wrapper.classList.add('default-content-wrapper');\n }\n }\n wrappers[wrappers.length - 1].append(e);\n });\n wrappers.forEach((wrapper) => section.append(wrapper));\n this.decorateImages();\n section.classList.add('section');\n section.dataset.sectionStatus = 'initialized';\n section.style.display = 'none';\n }\n decorateImages() {\n const picture = document.querySelectorAll('.default-content-wrapper picture');\n picture.forEach((item) => {\n const parentElement = item.parentElement;\n if (parentElement) {\n parentElement.classList.add('image', 'main');\n }\n });\n }\n}\n","import { toClassName } from './toClassName';\n\nexport const addClasses = (element: HTMLElement, classes: string) => {\n classes.split(',').forEach((c) => {\n element.classList.add(toClassName(c.trim()));\n });\n};\n","export function getMetadata(name: string, doc = document) {\n const attr = name && name.includes(':') ? 'property' : 'name';\n const metaTags: HTMLMetaElement[] =\n ([...doc.head.querySelectorAll(`meta[${attr}=\"${name}\"]`)] as HTMLMetaElement[]) || [];\n const meta = metaTags\n .map((m) => {\n return m.content;\n })\n .join(', ');\n return meta.length ? meta : '';\n}\n","import { addClasses } from '../utils/addClasses';\nimport { getMetadata } from '../utils/getMetadata';\nimport { BlockService } from './block.service';\nimport { SectionService } from './section.service';\n\ntype ComponentMapping = {\n name: string;\n element: HTMLDivElement;\n};\n\nexport class MainService {\n constructor(\n private sectionService: SectionService,\n private blockService: BlockService\n ) {}\n\n init = async () => {\n this.setup();\n await this.loadEager();\n };\n\n /**\n * Setup block utils.\n */\n private setup() {\n window.hlx = window.hlx || {};\n window.hlx.RUM_MASK_URL = 'full';\n window.hlx.codeBasePath = '';\n window.hlx.lighthouse = new URLSearchParams(window.location.search).get('lighthouse') === 'on';\n\n const scriptEl = document.querySelector('script[src$=\"/scripts/scripts.js\"]') as HTMLScriptElement;\n if (scriptEl) {\n try {\n [window.hlx.codeBasePath] = new URL(scriptEl.src).pathname.split('/scripts/scripts.js');\n } catch (error) {\n // eslint-disable-next-line no-console\n console.log(error);\n }\n }\n }\n\n private loadEager = async () => {\n // TODO: how to support different languages here\n document.documentElement.lang = 'en';\n this.decorateTemplateAndTheme();\n if (document) {\n const body = document.querySelector('body');\n if (body) {\n body.style.display = 'none';\n }\n }\n const main = document.querySelector('main');\n if (main) {\n main.setAttribute('id', 'main');\n this.addSidebarContainer(main);\n this.sectionService.init(main);\n this.addInnerContainer(main); // TODO refactor initializing\n this.blockService.decorateBlocks(main);\n await this.loadComponents();\n // TODO: Performace adjustment\n setTimeout(() => {\n document.body.removeAttribute('style');\n }, 0);\n\n // await this.waitForLCP(LCP_BLOCKS);\n }\n };\n\n private addSidebarContainer(main: HTMLElement) {\n const sidebarContainer = document.createElement('sidebar-component');\n sidebarContainer.setAttribute('id', 'sidebar');\n sidebarContainer.classList.add('inactive');\n main.after(sidebarContainer);\n }\n\n private addInnerContainer(main: HTMLElement) {\n const children = main.innerHTML;\n main.innerHTML = `${children}
`;\n }\n\n // private loadLazy = async () => {};\n\n private decorateTemplateAndTheme() {\n const template = getMetadata('template');\n if (template) addClasses(document.body, template);\n const theme = getMetadata('theme');\n if (theme) addClasses(document.body, theme);\n }\n\n private loadComponents = async () => {\n const sections = document.querySelectorAll('.section');\n\n sections.forEach(async (section) => {\n const components: ComponentMapping[] = this.collectComponents(section);\n if (!components.length) {\n this.showSection(section);\n return;\n }\n\n await this.loadComponentModules(components);\n this.showSection(section);\n });\n };\n\n private collectComponents(section: HTMLElement): ComponentMapping[] {\n const components: ComponentMapping[] = [];\n const blocks = section.querySelectorAll('[data-block-name]');\n\n blocks.forEach((block: HTMLDivElement) => {\n block.style.display = 'none';\n components.push({\n name: block.dataset['blockName'] as string,\n element: block,\n });\n });\n\n return components;\n }\n\n private async loadComponentModules(components: ComponentMapping[]) {\n for (const component of components) {\n const componentModule = await import(`${window.hlx.codeBasePath}/dist/${component.name}/${component.name}.js`);\n\n if (componentModule.default) {\n await componentModule.default(component.element);\n }\n }\n }\n\n private showSection(section: HTMLElement) {\n section.style.removeProperty('display');\n }\n}\n","// const LCP_BLOCKS: string[] = []; // add your LCP blocks to the list\n\nimport './components/sidebar/sidebar.ts';\nimport './components/header.ts';\nimport { BlockService } from './services/block.service.ts';\nimport { SectionService } from './services/section.service.ts';\nimport { MainService } from './services/main.service.ts';\n\n(async function () {\n const blockService = new BlockService();\n const sectionService = new SectionService(blockService);\n const main = new MainService(sectionService, blockService);\n await main.init();\n})();\n\ndeclare global {\n interface Window {\n hlx: {\n RUM_MASK_URL: string;\n codeBasePath: string;\n lighthouse: boolean;\n };\n }\n}\n"],"file":"main/main.js"}
\ No newline at end of file
diff --git a/src/services/main.service.ts b/src/services/main.service.ts
index 94512230..c839b282 100644
--- a/src/services/main.service.ts
+++ b/src/services/main.service.ts
@@ -69,6 +69,7 @@ export class MainService {
private addSidebarContainer(main: HTMLElement) {
const sidebarContainer = document.createElement('sidebar-component');
sidebarContainer.setAttribute('id', 'sidebar');
+ sidebarContainer.classList.add('inactive');
main.after(sidebarContainer);
}